/[schmitzm]/trunk/src/skrueger/geotools/MapPaneToolBar.java
ViewVC logotype

Diff of /trunk/src/skrueger/geotools/MapPaneToolBar.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 141 by alfonx, Sun Jun 14 18:23:36 2009 UTC revision 151 by alfonx, Fri Jun 19 16:22:29 2009 UTC
# Line 8  import java.util.TreeMap; Line 8  import java.util.TreeMap;
8    
9  import javax.swing.AbstractAction;  import javax.swing.AbstractAction;
10  import javax.swing.AbstractButton;  import javax.swing.AbstractButton;
11    import javax.swing.Action;
12  import javax.swing.BorderFactory;  import javax.swing.BorderFactory;
13  import javax.swing.Icon;  import javax.swing.Icon;
14  import javax.swing.ImageIcon;  import javax.swing.ImageIcon;
# Line 724  public class MapPaneToolBar extends JToo Line 725  public class MapPaneToolBar extends JToo
725                   */                   */
726                  public MapPaneToolBarAction(int id, MapPaneToolBar toolBar,                  public MapPaneToolBarAction(int id, MapPaneToolBar toolBar,
727                                  String name, Icon icon) {                                  String name, Icon icon) {
728                            this (id, toolBar, name, icon, null);
729                    }
730                    
731                    /**
732                     * Creates a new action.
733                     *
734                     * @param id
735                     *            unique ID for the action
736                     * @param toolBar
737                     *            The {@link MapPaneToolBar} this action is made for
738                     * @param name
739                     *            description used for buttons or menus
740                     * @param icon
741                     *            icon used for buttons or menus
742                     * @param toolTip
743                     *            Tooltip to use for the button or menu
744                     */
745                    public MapPaneToolBarAction(int id, MapPaneToolBar toolBar,
746                                    String name, Icon icon, String toolTip) {
747                          super(name, icon);                          super(name, icon);
748                            
749                            if (toolTip != null && !toolTip.trim().isEmpty()){
750                                    putValue(Action.SHORT_DESCRIPTION, toolTip);
751                            }
752                            
753                          this.id = id;                          this.id = id;
754                          this.toolBar = toolBar;                          this.toolBar = toolBar;
755                  }                  }

Legend:
Removed from v.141  
changed lines
  Added in v.151

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26