Search in sources :

Example 1 with ActionPauseUnpause

use of com.jsql.view.swing.tree.ActionPauseUnpause 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);
}
Also used : ActionPauseUnpause(com.jsql.view.swing.tree.ActionPauseUnpause) JMenuItemWithMargin(com.jsql.view.swing.menubar.JMenuItemWithMargin) JMenuItem(javax.swing.JMenuItem) ActionLoadStop(com.jsql.view.swing.tree.ActionLoadStop)

Aggregations

JMenuItemWithMargin (com.jsql.view.swing.menubar.JMenuItemWithMargin)1 ActionLoadStop (com.jsql.view.swing.tree.ActionLoadStop)1 ActionPauseUnpause (com.jsql.view.swing.tree.ActionPauseUnpause)1 JMenuItem (javax.swing.JMenuItem)1