/** * Enables or disables the menu and tool bars with respect to the * state of script execution. */ private void updateEnabled(boolean interrupted) { ((Menubar)getJMenuBar()).updateEnabled(interrupted); for (int ci = 0, cc = toolBar.getComponentCount(); ci < cc; ci++) { boolean enableButton; if (ci == 0) { // Break enableButton = !interrupted; } else { enableButton = interrupted; } toolBar.getComponent(ci).setEnabled(enableButton); } if (interrupted) { toolBar.setEnabled(true); // raise the debugger window int state = getExtendedState(); if (state == Frame.ICONIFIED) { setExtendedState(Frame.NORMAL); } toFront(); context.setEnabled(true); } else { if (currentWindow != null) currentWindow.setPosition(-1); context.setEnabled(false); } }
/** * Enables or disables the menu and tool bars with respect to the * state of script execution. */ private void updateEnabled(boolean interrupted) { ((Menubar)getJMenuBar()).updateEnabled(interrupted); for (int ci = 0, cc = toolBar.getComponentCount(); ci < cc; ci++) { boolean enableButton; if (ci == 0) { // Break enableButton = !interrupted; } else { enableButton = interrupted; } toolBar.getComponent(ci).setEnabled(enableButton); } if (interrupted) { toolBar.setEnabled(true); // raise the debugger window int state = getExtendedState(); if (state == Frame.ICONIFIED) { setExtendedState(Frame.NORMAL); } toFront(); context.setEnabled(true); } else { if (currentWindow != null) currentWindow.setPosition(-1); context.setEnabled(false); } }
/** * Enables or disables the menu and tool bars with respect to the * state of script execution. */ private void updateEnabled(boolean interrupted) { ((Menubar)getJMenuBar()).updateEnabled(interrupted); for (int ci = 0, cc = toolBar.getComponentCount(); ci < cc; ci++) { boolean enableButton; if (ci == 0) { // Break enableButton = !interrupted; } else { enableButton = interrupted; } toolBar.getComponent(ci).setEnabled(enableButton); } if (interrupted) { toolBar.setEnabled(true); // raise the debugger window int state = getExtendedState(); if (state == Frame.ICONIFIED) { setExtendedState(Frame.NORMAL); } toFront(); context.enable(); } else { if (currentWindow != null) currentWindow.setPosition(-1); context.disable(); } }