use of com.jsql.view.swing.tree.ActionLoadStop in project jsql-injection by ron190.
the class AbstractNodeModel method initializeItemLoadPause.
private void initializeItemLoadPause(DefaultMutableTreeNode currentTableNode, JPopupMenuCustomExtract popupMenu, AbstractSuspendable suspendableTask) {
JMenuItem menuItemLoad = new JMenuItemWithMargin(this.isRunning ? I18nViewUtil.valueByKey("THREAD_STOP") : I18nViewUtil.valueByKey("THREAD_LOAD"), 'o');
if (!this.isContainingSelection && !this.isRunning) {
menuItemLoad.setEnabled(false);
}
menuItemLoad.addActionListener(new ActionLoadStop(this, currentTableNode));
JMenuItem menuItemPause = new JMenuItemWithMargin(// Report #133: ignore if thread not found
suspendableTask != null && suspendableTask.isPaused() ? I18nViewUtil.valueByKey("THREAD_RESUME") : I18nViewUtil.valueByKey("THREAD_PAUSE"), 's');
if (!this.isRunning) {
menuItemPause.setEnabled(false);
}
menuItemPause.addActionListener(new ActionPauseUnpause(this));
popupMenu.add(menuItemLoad);
popupMenu.add(menuItemPause);
}
Aggregations