public void actionPerformed(java.awt.event.ActionEvent event) { if (TRACE) System.out.println("CutPanelView actionPerformed: view: " + viewName); if (event.getSource() == closeButn) { JToggleButton jtb = (JToggleButton) event.getSource(); jtb.setSelected(false); // System.out.println("Close!"); vm.hideView(this); toolbarButton.setSelected(false); } else if (toolbarButton.isSelected()) { vm.showView(this); } else vm.hideView(this); }
public void setToolbarButton(JToggleButton tb) { this.toolbarButton = tb; tb.addActionListener(this); }