Changeset 155 in josm for src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
- Timestamp:
- 2006-10-08T17:29:58+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r119 r155 13 13 import org.openstreetmap.josm.Main; 14 14 import org.openstreetmap.josm.actions.JosmAction; 15 import org.openstreetmap.josm.actions.HelpAction.Helpful; 15 16 16 17 /** 17 18 * This class is a toggle dialog that can be turned on and off. It is attached 18 19 * to a ButtonModel. 19 * 20 * 20 21 * @author imi 21 22 */ 22 public class ToggleDialog extends JPanel {23 public class ToggleDialog extends JPanel implements Helpful { 23 24 24 25 public final class ToggleDialogAction extends JosmAction { … … 49 50 setPreferredSize(new Dimension(330,preferredHeight)); 50 51 action = new ToggleDialogAction(name, "dialogs/"+iconName, tooltip, shortCut, KeyEvent.ALT_MASK, iconName); 52 String helpId = "Dialog/"+getClass().getName().substring(getClass().getName().lastIndexOf('.')+1); 53 action.putValue("help", helpId.substring(0, helpId.length()-6)); 51 54 setLayout(new BorderLayout()); 52 55 add(new JLabel(name), BorderLayout.NORTH); … … 54 57 setBorder(BorderFactory.createEtchedBorder()); 55 58 } 59 60 public String helpTopic() { 61 String help = getClass().getName(); 62 help = help.substring(help.lastIndexOf('.')+1, help.length()-6); 63 return "Dialog/"+help; 64 } 56 65 }
Note:
See TracChangeset
for help on using the changeset viewer.