List of usage examples for javax.swing JToolBar setEnabled
@BeanProperty(expert = true, preferred = true, visualUpdate = true, description = "The enabled state of the component.") public void setEnabled(boolean enabled)
From source file:org.zaproxy.zap.view.MainToolbarPanel.java
public void initialise() { setLayout(new java.awt.GridBagLayout()); setPreferredSize(DisplayUtils.getScaledDimension(getMaximumSize().width, 25)); setMaximumSize(DisplayUtils.getScaledDimension(getMaximumSize().width, 25)); this.setBorder(BorderFactory.createEtchedBorder()); expandButtons = new ButtonGroup(); GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); GridBagConstraints gridBagConstraints2 = new GridBagConstraints(); gridBagConstraints1.gridx = 0;//from w w w . j av a2s . c om gridBagConstraints1.gridy = 0; gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints2.gridx = 1; gridBagConstraints2.gridy = 0; gridBagConstraints2.weightx = 1.0; gridBagConstraints2.weighty = 1.0; gridBagConstraints2.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints2.fill = java.awt.GridBagConstraints.HORIZONTAL; JToolBar t1 = new JToolBar(); t1.setEnabled(true); t1.setPreferredSize(new java.awt.Dimension(80000, 25)); t1.setMaximumSize(new java.awt.Dimension(80000, 25)); add(getToolbar(), gridBagConstraints1); add(t1, gridBagConstraints2); toolbar.add(getModeSelect()); toolbar.add(getBtnNew()); toolbar.add(getBtnOpen()); toolbar.add(getBtnSave()); toolbar.add(getBtnSnapshot()); toolbar.add(getBtnSession()); toolbar.add(getBtnOptions()); toolbar.addSeparator(); toolbar.add(getShowAllTabs()); toolbar.add(getHideAllTabs()); toolbar.add(getShowTabIconNames()); toolbar.addSeparator(); toolbar.add(getBtnExpandSites()); toolbar.add(getBtnExpandReports()); toolbar.add(getBtnExpandFull()); toolbar.addSeparator(); }