Java Code Examples for javax.swing.JToggleButton#setToolTipText()

The following examples show how to use javax.swing.JToggleButton#setToolTipText() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClientComponent.java    From zap-extensions with Apache License 2.0 6 votes vote down vote up
protected void initUi() {
    // Common
    buttonShowView =
            new JToggleButton(
                    new ImageIcon(
                            HttpPanelComponentInterface.class.getResource(
                                    ExtensionPlugNHack.CLIENT_ACTIVE_ICON_RESOURCE)));

    buttonShowView.setToolTipText(BUTTON_TOOL_TIP);

    panelOptions = new JPanel();
    panelOptions.add(views.getSelectableViewsComponent());

    informationLabel = new JLabel();
    panelMoreOptions = new JPanel();
    panelMoreOptions.add(informationLabel);

    initViews();

    // All
    panelMain = new JPanel(new BorderLayout());
    panelMain.add(views.getViewsPanel());

    setSelected(false);
}
 
Example 2
Source File: StatisticsPanel.java    From netbeans with Apache License 2.0 6 votes vote down vote up
private JToggleButton newOptionButton(Icon icon, String tooltip, String accessibleName, final String property) {
JToggleButton newButton = new JToggleButton(icon);
newButton.setToolTipText(tooltip);
newButton.getAccessibleContext().setAccessibleName(accessibleName);
boolean isSelected = NbPreferences.forModule(StatisticsPanel.class).getBoolean(property, false);
newButton.setSelected(isSelected);
newButton.addItemListener(new ItemListener() {
    @Override
    public void itemStateChanged(ItemEvent e) {
	boolean selected;
	switch (e.getStateChange()) {
	    case ItemEvent.SELECTED:
		selected = true;
		break;
	    case ItemEvent.DESELECTED:
		selected = false;
		break;
	    default:
		return;
	}
	ResultWindow.getInstance().updateOptionStatus(property, selected);
    }
});
return newButton;
   }
 
Example 3
Source File: ClientGui.java    From logging-log4j2 with Apache License 2.0 6 votes vote down vote up
private JScrollPane scroll(final JTextArea text) {
    final JToggleButton toggleButton = new JToggleButton();
    toggleButton.setAction(new AbstractAction() {
        private static final long serialVersionUID = -4214143754637722322L;

        @Override
        public void actionPerformed(final ActionEvent e) {
            final boolean wrap = toggleButton.isSelected();
            text.setLineWrap(wrap);
        }
    });
    toggleButton.setToolTipText("Toggle line wrapping");
    final JScrollPane scrollStatusLog = new JScrollPane(text, //
            ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, //
            ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
    scrollStatusLog.setCorner(ScrollPaneConstants.LOWER_RIGHT_CORNER, toggleButton);
    return scrollStatusLog;
}
 
Example 4
Source File: GUIFrame.java    From jaamsim with Apache License 2.0 6 votes vote down vote up
private void addSnapToGridButton(JToolBar buttonBar, Insets margin) {
	snapToGrid = new JToggleButton( new ImageIcon(
			GUIFrame.class.getResource("/resources/images/Snap-16.png")) );
	snapToGrid.setMargin(margin);
	snapToGrid.setFocusPainted(false);
	snapToGrid.setRequestFocusEnabled(false);
	snapToGrid.setToolTipText(formatToolTip("Snap to Grid",
			"During repositioning, objects are forced to the nearest grid point."));
	snapToGrid.addActionListener( new ActionListener() {

		@Override
		public void actionPerformed( ActionEvent event ) {
			KeywordIndex kw = InputAgent.formatBoolean("SnapToGrid", snapToGrid.isSelected());
			InputAgent.storeAndExecute(new KeywordCommand(sim.getSimulation(), kw));
			gridSpacing.setEnabled(snapToGrid.isSelected());
			controlStartResume.requestFocusInWindow();
		}
	} );

	buttonBar.add( snapToGrid );
}
 
Example 5
Source File: TimerPanel.java    From runelite with BSD 2-Clause "Simplified" License 6 votes vote down vote up
TimerPanel(ClockManager clockManager, Timer timer)
{
	super(clockManager, timer, "timer", true);

	JToggleButton loopButton = new JToggleButton(ClockTabPanel.LOOP_ICON);
	loopButton.setRolloverIcon(ClockTabPanel.LOOP_ICON_HOVER);
	loopButton.setSelectedIcon(ClockTabPanel.LOOP_SELECTED_ICON);
	loopButton.setRolloverSelectedIcon(ClockTabPanel.LOOP_SELECTED_ICON_HOVER);
	SwingUtil.removeButtonDecorations(loopButton);
	loopButton.setPreferredSize(new Dimension(16, 14));
	loopButton.setToolTipText("Loop timer");
	loopButton.addActionListener(e -> timer.setLoop(!timer.isLoop()));
	loopButton.setSelected(timer.isLoop());
	leftActions.add(loopButton);

	JButton deleteButton = new JButton(ClockTabPanel.DELETE_ICON);
	SwingUtil.removeButtonDecorations(deleteButton);
	deleteButton.setRolloverIcon(ClockTabPanel.DELETE_ICON_HOVER);
	deleteButton.setPreferredSize(new Dimension(16, 14));
	deleteButton.setToolTipText("Delete timer");
	deleteButton.addActionListener(e -> clockManager.removeTimer(timer));
	rightActions.add(deleteButton);
}
 
Example 6
Source File: GUIFrame.java    From jaamsim with Apache License 2.0 6 votes vote down vote up
private void addOutlineButton(JToolBar buttonBar, Insets margin) {
	outline = new JToggleButton(new ImageIcon(
			GUIFrame.class.getResource("/resources/images/Outline-16.png")));
	outline.setMargin(margin);
	outline.setFocusPainted(false);
	outline.setRequestFocusEnabled(false);
	outline.setToolTipText(formatToolTip("Show Outline", "Shows the outline."));
	outline.addActionListener( new ActionListener() {

		@Override
		public void actionPerformed( ActionEvent event ) {
			if (!(selectedEntity instanceof LineEntity))
				return;
			LineEntity lineEnt = (LineEntity) selectedEntity;
			lineWidth.setEnabled(outline.isSelected());
			lineColour.setEnabled(outline.isSelected());
			if (lineEnt.isOutlined() == outline.isSelected())
				return;
			KeywordIndex kw = InputAgent.formatBoolean("Outlined", outline.isSelected());
			InputAgent.storeAndExecute(new KeywordCommand((Entity)lineEnt, kw));
			controlStartResume.requestFocusInWindow();
		}
	});

	buttonBar.add( outline );
}
 
Example 7
Source File: DrawingViewPlacardPanel.java    From openAGV with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a button to toglle the labels.
 *
 * @param view The DrawingView the button will belong to.
 * @return The created button.
 */
private JToggleButton toggleLabelsButton(final OpenTCSDrawingView drawingView) {
  final JToggleButton toggleButton = new JToggleButton();

  toggleButton.setToolTipText(
      labels.getString("drawingViewPlacardPanel.button_toggleLabels.tooltipText")
  );

  toggleButton.setIcon(ImageDirectory.getImageIcon("/menu/comment-add.16.png"));

  toggleButton.setMargin(new Insets(0, 0, 0, 0));
  toggleButton.setFocusable(false);

  toggleButton.addItemListener(
      (ItemEvent event) -> drawingView.setLabelsVisible(toggleButton.isSelected())
  );

  return toggleButton;
}
 
Example 8
Source File: GUIFrame.java    From jaamsim with Apache License 2.0 6 votes vote down vote up
private void addShowAxesButton(JToolBar buttonBar, Insets margin) {
	xyzAxis = new JToggleButton( new ImageIcon(
			GUIFrame.class.getResource("/resources/images/Axes-16.png")) );
	xyzAxis.setMargin(margin);
	xyzAxis.setFocusPainted(false);
	xyzAxis.setRequestFocusEnabled(false);
	xyzAxis.setToolTipText(formatToolTip("Show Axes",
			"Shows the unit vectors for the x, y, and z axes."));
	xyzAxis.addActionListener( new ActionListener() {

		@Override
		public void actionPerformed( ActionEvent event ) {
			DisplayEntity ent = (DisplayEntity) sim.getNamedEntity("XYZ-Axis");
			if (ent != null) {
				KeywordIndex kw = InputAgent.formatBoolean("Show", xyzAxis.isSelected());
				InputAgent.storeAndExecute(new KeywordCommand(ent, kw));
			}
			controlStartResume.requestFocusInWindow();
		}
	} );
	buttonBar.add( xyzAxis );
}
 
Example 9
Source File: ShowWorkspacePlugin.java    From ramus with GNU General Public License v3.0 6 votes vote down vote up
public void createWorkspaceToolBar() {
    JToolBar workspaceToolBar = new JToolBar();
    workspaceToolBar.setFloatable(false);
    for (ActionDescriptor descriptor : getActionDescriptors()) {
        final Action action = descriptor.getAction();
        if (action instanceof ShowWorkspaceAction) {
            JToggleButton button = new JToggleButton(action);
            button.setText(cut((String) action
                    .getValue(Action.ACTION_COMMAND_KEY)));
            button.setToolTipText((String) action
                    .getValue(Action.ACTION_COMMAND_KEY));
            button.addActionListener(new java.awt.event.ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    action.actionPerformed(e);
                }
            });
            button.setFocusable(false);
            workspaceToolBar.add(button);
        }
    }
    factory.setNorthEastCornerComponent(workspaceToolBar);
}
 
Example 10
Source File: GUIFrame.java    From jaamsim with Apache License 2.0 6 votes vote down vote up
private void addRealTimeButton(JToolBar mainToolBar, Insets margin) {
	controlRealTime = new JToggleButton( " Real Time " );
	controlRealTime.setToolTipText(formatToolTip("Real Time Mode",
			"When selected, the simulation runs at a fixed multiple of wall clock time."));
	controlRealTime.setMargin(margin);
	controlRealTime.setFocusPainted(false);
	controlRealTime.setRequestFocusEnabled(false);
	controlRealTime.addActionListener(new ActionListener() {

		@Override
		public void actionPerformed( ActionEvent event ) {
			boolean bool = ((JToggleButton)event.getSource()).isSelected();
			KeywordIndex kw = InputAgent.formatBoolean("RealTime", bool);
			InputAgent.storeAndExecute(new KeywordCommand(sim.getSimulation(), kw));
			controlStartResume.requestFocusInWindow();
		}
	});
	mainToolBar.add( controlRealTime );
}
 
Example 11
Source File: IconPanel.java    From netbeans-mmd-plugin with Apache License 2.0 6 votes vote down vote up
@Nonnull
private JToggleButton makeIconButton(@Nonnull final ButtonGroup group, @Nonnull final String name) {
  final JToggleButton result = Utils.UI_COMPO_FACTORY.makeToggleButton();

  final Color panelColor = this.getBackground();

  result.setUI(new MetalToggleButtonUI() {
    @Override
    @Nullable
    protected Color getSelectColor() {
      return panelColor.brighter();
    }
  });

  result.setBackground(panelColor.darker());

  result.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEtchedBorder(), BorderFactory.createEmptyBorder(3, 3, 3, 3)));
  result.setIcon(new ImageIcon(MiscIcons.findForName(name)));
  result.setName(name);
  result.setFocusPainted(false);
  result.setToolTipText(name);

  group.add(result);
  return result;
}
 
Example 12
Source File: FilteringToolbar.java    From visualvm with GNU General Public License v2.0 5 votes vote down vote up
public FilteringToolbar(String name) {
    if (!UIUtils.isNimbusLookAndFeel())
        setBorder(BorderFactory.createEmptyBorder(3, 0, 0, 0));

    filterButton = new JToggleButton(Icons.getIcon(GeneralIcons.FILTER)) {
        protected void fireActionPerformed(ActionEvent e) {
            if (isSelected()) showFilter(); else hideFilter();
        }
    };
    filterButton.setToolTipText(name);
    add(filterButton);
}
 
Example 13
Source File: CSSStylesSelectionPanel.java    From netbeans with Apache License 2.0 5 votes vote down vote up
/**
 * Initializes Property Summary section.
 *
 * @return Property Summary panel.
 */
private JPanel initPropertyPane() {
    propertyPane = new PropertyPaneView();
    String valueTitle =  NbBundle.getMessage(CSSStylesSelectionPanel.class, "CSSStylesSelectionPanel.value"); // NOI18N
    propertyPane.setProperties(new Node.Property[] {
        new PropertySupport.ReadOnly<String>(MatchedPropertyNode.PROPERTY_VALUE, String.class, valueTitle, null) {
            @Override
            public String getValue() throws IllegalAccessException, InvocationTargetException {
                return null;
            }
        }
    });
    ExplorerManagerProviderPanel propertyPanePanel = new ExplorerManagerProviderPanel();
    propertyPanePanel.setLayout(new BorderLayout());
    propertyPanePanel.add(propertyPane, BorderLayout.CENTER);
    JPanel headerPanel = new JPanel();
    headerPanel.setLayout(new BorderLayout());
    JPanel titlePanel = new JPanel();
    titlePanel.setLayout(new BoxLayout(titlePanel, BoxLayout.X_AXIS));
    propertySummaryLabel = new JLabel();
    propertySummaryLabel.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0));
    propertySummaryLabel.setMinimumSize(new Dimension(0,0));
    titlePanel.add(propertySummaryLabel);
    titlePanel.add(Box.createHorizontalGlue());
    JToggleButton pseudoClassToggle = new JToggleButton();
    pseudoClassToggle.setFocusPainted(false);
    pseudoClassToggle.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/web/inspect/resources/elementStates.png", true)); // NOI18N
    pseudoClassToggle.setToolTipText(NbBundle.getMessage(CSSStylesSelectionPanel.class, "CSSStylesSelectionPanel.pseudoClasses")); // NOI18N
    CustomToolbar toolBar = new CustomToolbar();
    toolBar.addButton(pseudoClassToggle);
    titlePanel.add(toolBar);
    headerPanel.add(titlePanel, BorderLayout.PAGE_START);
    headerPanel.add(createPseudoClassPanel(pseudoClassToggle), BorderLayout.CENTER);
    propertyPanePanel.add(headerPanel, BorderLayout.PAGE_START);
    propertyPaneManager = propertyPanePanel.getExplorerManager();
    propertyPanePanel.setMinimumSize(new Dimension(0,0)); // allow shrinking in JSplitPane
    return propertyPanePanel;
}
 
Example 14
Source File: FilteringToolbar.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public FilteringToolbar(String name) {
    if (!UIUtils.isNimbusLookAndFeel())
        setBorder(BorderFactory.createEmptyBorder(3, 0, 0, 0));

    filterButton = new JToggleButton(Icons.getIcon(GeneralIcons.FILTER)) {
        protected void fireActionPerformed(ActionEvent e) {
            if (isSelected()) showFilter(); else hideFilter();
        }
    };
    filterButton.setToolTipText(name);
    add(filterButton);
}
 
Example 15
Source File: InfoPanel.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private JToggleButton createToggle (FiltersDescriptor filtersDesc, int index) {
        boolean isSelected = filtersDesc.isSelected(index);
        Icon icon = filtersDesc.getSelectedIcon(index);
        // ensure small size, just for the icon
        JToggleButton toggleButton = new JToggleButton(icon, isSelected);
//        Dimension size = new Dimension(icon.getIconWidth(), icon.getIconHeight());
//        toggleButton.setPreferredSize(size);
        toggleButton.setMargin(new Insets(2, 2, 2, 2));
        toggleButton.setToolTipText(filtersDesc.getTooltip(index));
        toggleButton.setFocusable(false);
        filtersDesc.connectToggleButton(index, toggleButton);
        return toggleButton;
    }
 
Example 16
Source File: CommunityDialog.java    From WorldGrower with GNU General Public License v3.0 5 votes vote down vote up
private JToggleButton createToggleButton(String label, String panelKey, SoundIdReader soundIdReader, CardLayout cardLayout, JPanel infoPanel, ButtonGroup buttonGroup, JPanel toggleButtonPanel, String tooltip) {
	JToggleButton button = JButtonFactory.createToggleButton(label, soundIdReader);
	button.addActionListener(e -> cardLayout.show(infoPanel, panelKey));
	button.setOpaque(false);
	button.setToolTipText(tooltip);
	buttonGroup.add(button);
	toggleButtonPanel.add(button);
	return button;
}
 
Example 17
Source File: SwingSet2.java    From beautyeye with Apache License 2.0 5 votes vote down vote up
/**
		 * Adds the toggle button.
		 *
		 * @param a the a
		 * @return the j toggle button
		 */
		JToggleButton addToggleButton(Action a) {
			JToggleButton tb = new JToggleButton(
					(String)a.getValue(Action.NAME),null
//					(Icon)a.getValue(Action.SMALL_ICON)
			);
//			tb.setMargin(zeroInsets);
//			tb.setText(null);
			tb.setEnabled(a.isEnabled());
			tb.setToolTipText((String)a.getValue(Action.SHORT_DESCRIPTION));
			tb.setAction(a);
			add(tb);
			return tb;
		}
 
Example 18
Source File: BoardEditor.java    From megamek with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets up JToggleButtons
 */
private JToggleButton addTerrainTButton(String iconName, String buttonName, ArrayList<JToggleButton> bList) {
    JToggleButton button = new JToggleButton(buttonName);
    button.addActionListener(this);
    
    // Get the normal icon
    File file = new MegaMekFile(Configuration.widgetsDir(), "/MapEditor/"+iconName+".png").getFile(); //$NON-NLS-1$ //$NON-NLS-2$
    Image imageButton = ImageUtil.loadImageFromFile(file.getAbsolutePath());
    if (imageButton != null) {
        button.setIcon(new ImageIcon(imageButton));
        // When there is an icon, then the text can be removed
        button.setText("");
    }
    
    // Get the hover icon
    file = new MegaMekFile(Configuration.widgetsDir(), "/MapEditor/"+iconName+"_H.png").getFile(); //$NON-NLS-1$ //$NON-NLS-2$
    imageButton = ImageUtil.loadImageFromFile(file.getAbsolutePath());
    if (imageButton != null)
        button.setRolloverIcon(new ImageIcon(imageButton));
    
    // Get the selected icon
    file = new MegaMekFile(Configuration.widgetsDir(), "/MapEditor/"+iconName+"_S.png").getFile(); //$NON-NLS-1$ //$NON-NLS-2$
    imageButton = ImageUtil.loadImageFromFile(file.getAbsolutePath());
    if (imageButton != null)
        button.setSelectedIcon(new ImageIcon(imageButton));
    
    button.setToolTipText(Messages.getString("BoardEditor."+iconName+"TT")); //$NON-NLS-1$ //$NON-NLS-2$
    if (bList != null) bList.add(button);
    return button;
}
 
Example 19
Source File: SnapshotJDBCView.java    From netbeans with Apache License 2.0 4 votes vote down vote up
private void initUI(Action saveAction, final Action compareAction, Action infoAction, ExportUtils.Exportable exportProvider) {
        setLayout(new BorderLayout(0, 0));
        
        jdbcCallsView = new JDBCTreeTableView(null, false) {
            protected void installDefaultAction() {
                getResultsComponent().setDefaultAction(new AbstractAction() {
                    public void actionPerformed(ActionEvent e) {
                        ProfilerTable t = getResultsComponent();
                        int row = t.getSelectedRow();
                        PresoObjAllocCCTNode node = (PresoObjAllocCCTNode)t.getValueForRow(row);
                        if (isSQL(node)) {
                            showQueryImpl(node);
                        } else {
                            ClientUtils.SourceCodeSelection userValue = getUserValueForRow(row);
                            if (userValue != null) performDefaultAction(userValue);
                        }
                    }
                });
            }
            protected void performDefaultAction(ClientUtils.SourceCodeSelection value) {
                if (showSourceSupported()) showSource(value);
            }
            protected void populatePopup(JPopupMenu popup, Object value, ClientUtils.SourceCodeSelection userValue) {
                SnapshotJDBCView.this.populatePopup(jdbcCallsView, popup, value, userValue);
            }
        };
        jdbcCallsView.notifyOnFocus(new Runnable() {
            public void run() { lastFocused = jdbcCallsView; }
        });
        
        add(jdbcCallsView, BorderLayout.CENTER);
        
        ProfilerToolbar toolbar = ProfilerToolbar.create(true);
        
        if (saveAction != null) toolbar.add(saveAction);
        
        toolbar.add(ExportUtils.exportButton(this, JDBCView.EXPORT_TOOLTIP, getExportables(exportProvider)));
        
        if (compareAction != null) {
            toolbar.addSpace(2);
            toolbar.addSeparator();
            toolbar.addSpace(2);
        
            Icon icon = (Icon)compareAction.getValue(Action.SMALL_ICON);
            compareButton = new JToggleButton(icon) {
                protected void fireActionPerformed(ActionEvent e) {
                    boolean sel = isSelected();
                    if (sel) {
                        compareAction.actionPerformed(e);
                        if (refSnapshot == null) setSelected(false);
                    } else {
                        setRefSnapshot(null);
                    }
                    setToolTipText(isSelected() ? RESET_COMPARE_SNAPSHOTS :
                                                  COMPARE_SNAPSHOTS);
                }
            };
            compareButton.setToolTipText(COMPARE_SNAPSHOTS);
            toolbar.add(compareButton);
        }
//        
//        toolbar.addSpace(2);
//        toolbar.addSeparator();
//        toolbar.addSpace(5);
        
//        GrayLabel aggregationL = new GrayLabel(TOOLBAR_AGGREGATION);
//        toolbar.add(aggregationL);
//        
//        toolbar.addSpace(2);
        
//        Action aMethods = new AbstractAction() {
//            { putValue(NAME, AGGREGATION_METHODS); }
//            public void actionPerformed(ActionEvent e) { setAggregation(CPUResultsSnapshot.METHOD_LEVEL_VIEW); }
//            
//        };
//        Action aClasses = new AbstractAction() {
//            { putValue(NAME, AGGREGATION_CLASSES); }
//            public void actionPerformed(ActionEvent e) { setAggregation(CPUResultsSnapshot.CLASS_LEVEL_VIEW); }
//            
//        };
//        Action aPackages = new AbstractAction() {
//            { putValue(NAME, AGGREGATION_PACKAGES); }
//            public void actionPerformed(ActionEvent e) { setAggregation(CPUResultsSnapshot.PACKAGE_LEVEL_VIEW); }
//            
//        };
//        
//        ActionPopupButton aggregation = new ActionPopupButton(aMethods, aClasses, aPackages);
//        toolbar.add(aggregation);
//        
        if (infoAction != null) {
            toolbar.addFiller();
            toolbar.add(infoAction);
        }
        
        add(toolbar.getComponent(), BorderLayout.NORTH);
        
//        // TODO: read last state?
//        setView(true, false);
    }
 
Example 20
Source File: Schematic.java    From iBioSim with Apache License 2.0 4 votes vote down vote up
/**
 * create the toolbar.
 * @return
 */
private JToolBar buildLEMAToolBar(){

	JToolBar toolBar = new JToolBar();
	
	ButtonGroup modeButtonGroup = new ButtonGroup();
	selectButton = makeRadioToolButton("select_mode.png", "", "Select (" +
			KeyEvent.getKeyText(KeyEvent.VK_ESCAPE) + ")", this, modeButtonGroup); 
	toolBar.add(selectButton);
	selectButton.setSelected(true);
	addComponentButton = makeRadioToolButton("add_component.png", "", "Add Modules (M)", this, modeButtonGroup);
	toolBar.add(addComponentButton);
	addBooleanButton = makeRadioToolButton("boolean_mode.png", "", "Add Booleans (B)", this, modeButtonGroup);
	toolBar.add(addBooleanButton);
	addVariableButton = makeRadioToolButton("variable_mode.png", "", "Add Variables (V)", this, modeButtonGroup);
	toolBar.add(addVariableButton);
	addPlaceButton = makeRadioToolButton("add_place.png", "", "Add Places (P)", this, modeButtonGroup);
	toolBar.add(addPlaceButton);
	addTransitionButton = makeRadioToolButton("add_transition.png", "", "Add Transitions (T)", this, modeButtonGroup);
	toolBar.add(addTransitionButton);
	addRuleButton = makeRadioToolButton("rule_mode.png", "", "Add Rules (" +
			KeyEvent.getKeyText(KeyEvent.VK_SHIFT) + " R)", this, modeButtonGroup);
	toolBar.add(addRuleButton);
	addConstraintButton = makeRadioToolButton("constraint_mode.png", "", "Add Constraints (" +
			KeyEvent.getKeyText(KeyEvent.VK_SHIFT) + " C)", this, modeButtonGroup);
	toolBar.add(addConstraintButton);
	//addEventButton = Utils.makeRadioToolButton("event_mode.png", "", "Add Events", this, modeButtonGroup);
	//toolBar.add(addEventButton);

	//toolBar.addSeparator();
	ButtonGroup influenceButtonGroup = new ButtonGroup();
	
	activationButton = makeRadioToolButton("activation.png", "", "Activation", this, influenceButtonGroup);
	activationButton.setSelected(true);
	//toolBar.add(activationButton);

	toolBar.addSeparator();
	toolBar.add(makeToolButton("choose_layout.png", "showLayouts", "Apply Layout", this));
	
	toolBar.addSeparator();
	
	zoomButton = new JToggleButton();
	zoomButton.setText("Zoom");
	zoomButton.setToolTipText("Use the mouse wheel to zoom");
	
	panButton = new JToggleButton();
	panButton.setText("Pan");
	panButton.setToolTipText("Use mouse dragging to pan");
	
	toolBar.add(zoomButton);
	toolBar.add(makeToolButton("", "unZoom", "Un-Zoom", this));
	toolBar.add(panButton);
	//toolBar.add(Utils.makeToolButton("", "saveSBOL", "Save SBOL", this));
	//toolBar.add(Utils.makeToolButton("", "exportSBOL", "Export SBOL", this));
	
	//toolBar.addSeparator();

	//ModelPanel modelPanel = new ModelPanel(bioModel, modelEditor);
	//toolBar.add(modelPanel);

	toolBar.setFloatable(false);
	
	return toolBar;
}