/** * Initialize the given toolbar. Image icons will be obtained from the ApplicationResources object * and added to the actions. Note that the image icons are not added to the actions -- if we did * that, the icons would appear in the menus, which I suppose is a neat trick but completely * useless. */ public void initializeToolBar(JToolBar tb) { Action action; RelativeBundle resources = getResources(); // Conventional new/open/save buttons action = getAction("New"); GUIUtilities.addToolBarButton(tb, action, null, resources.getImageIcon("NewImage")); action = getAction("Open"); GUIUtilities.addToolBarButton(tb, action, null, resources.getImageIcon("OpenImage")); action = getAction("Save"); GUIUtilities.addToolBarButton(tb, action, null, resources.getImageIcon("SaveImage")); }
/** * Add an action to the toolbar. If the tool tip is null, use the "tooltip" property already in * the action, otherwise add the property to the action. The new button is added to the action as * the "toolButton" property. * * @deprecated Use method in GUIUtilities instead. */ public JButton addToolBarButton( JToolBar toolbar, Action action, String tooltip, Icon icon, boolean isEnabled) { return GUIUtilities.addToolBarButton(toolbar, action, tooltip, icon, isEnabled); }
/** * Initialize this class. In this base class, a button for the full screen action is added to the * toolbar. */ protected void _initExtendedGraphFrame() { GUIUtilities.addToolBarButton(_toolbar, _fullScreenAction); }