Package javax.swing

Examples of javax.swing.Action.actionPerformed()


            Action action = _conversationActions.get(0);
            ActionEvent evt = new ActionEvent(conversationTable, 0,
                (String) action
                    .getValue(Action.ACTION_COMMAND_KEY));
            if (action.isEnabled()) {
              action.actionPerformed(evt);
            }
          }
        }
      }
    });
View Full Code Here


          nextSuccessAction = this;
        }

        String command = commands.remove(0);
        if (command.trim().isEmpty()) {
          nextSuccessAction.actionPerformed(null);
        } else {
          try {
            currentCompilationProcess = CompileContiki.compile(
                command,
                compilationEnvironment,
View Full Code Here

        final Action action;
        if (analyzerName != null && ((action = analyzerMap.get(analyzerName)) != null)) {
          java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
              action.putValue(Action.SELECTED_KEY, Boolean.TRUE);
              action.actionPerformed(null);
            }
          });
        }
      } else if (name.equals("pcap_file")) {
        pcapFile = simulation.getCooja().restorePortablePath(new File(element.getText()));
View Full Code Here

            if (!destinationComponent.isVisible()) {
                return;
            }
            Action action = destinationComponent.getActionMap().get(correspondingCommand);
            if (action != null) {
                action.actionPerformed(new ActionEvent(destinationComponent, ActionEvent.ACTION_PERFORMED, correspondingCommand, event.getWhen(), event.getModifiers()));
            }
        }
    }

    private abstract static class PassThroughToVerticalScrollbarAction extends PassThroughAction {
View Full Code Here

        protected static void passThroughEvent(final ActionEvent event, final String correspondingCommand) {
            JComboBox comboBox = (JComboBox)event.getSource();
            JList popupList = ((BasicComboBoxUI)comboBox.getUI()).popup.getList();
            Action action = popupList.getActionMap().get(correspondingCommand);
            if (action != null) {
                action.actionPerformed(new ActionEvent(popupList, ActionEvent.ACTION_PERFORMED, correspondingCommand, event.getWhen(), event.getModifiers()));
                comboBox.setSelectedIndex(popupList.getSelectedIndex());
            }
        }
    }
   
View Full Code Here

            } else {
                BasicComboBoxUI ui = ((BasicComboBoxUI)comboBox.getUI());
                JList popupList = ui.popup.getList();
                Action action = popupList.getActionMap().get(command);
                if (action != null) {
                    action.actionPerformed(new ActionEvent(popupList, ActionEvent.ACTION_PERFORMED, command,
                                           e.getWhen(), e.getModifiers()));
                    selectValue(ui);
                }
            }
        }
View Full Code Here

    action = menuItem.getAction();
    Assert.assertNotNull(action);
    Assert.assertEquals(action.getValue(Action.ACTION_COMMAND_KEY), DO_EXTRA);
    Assert.assertFalse(action.isEnabled());
   
    action.actionPerformed(new ActionEvent(testMenu, 0, null));
   
    testMenu.fireMenuDeselected();
    resetTargetComponent(housingB);
  }
View Full Code Here

        if (curKarteComposit != null) {
            JComponent focusOwner = getCurrentComponent();
            if (focusOwner != null) {
                Action a = focusOwner.getActionMap().get(TransferHandler.getCutAction().getValue(Action.NAME));
                if (a != null) {
                    a.actionPerformed(new ActionEvent(focusOwner,
                            ActionEvent.ACTION_PERFORMED,
                            null));
                    setCurKarteComposit(null);
                }
            }
View Full Code Here

    public void copy() {
        JComponent focusOwner = getCurrentComponent();
        if (focusOwner != null) {
            Action a = focusOwner.getActionMap().get(TransferHandler.getCopyAction().getValue(Action.NAME));
            if (a != null) {
                a.actionPerformed(new ActionEvent(focusOwner,
                        ActionEvent.ACTION_PERFORMED,
                        null));
            }
        }
    }
View Full Code Here

    public void paste() {
        JComponent focusOwner = getCurrentComponent();
        if (focusOwner != null) {
            Action a = focusOwner.getActionMap().get(TransferHandler.getPasteAction().getValue(Action.NAME));
            if (a != null) {
                a.actionPerformed(new ActionEvent(focusOwner,
                        ActionEvent.ACTION_PERFORMED,
                        null));
            }
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.