コード例 #1
0
 public void activate() {
   // arranco la primera opcion
   if (m_actionfirst != null) {
     m_actionfirst.actionPerformed(null);
     m_actionfirst = null;
   }
 }
コード例 #2
0
ファイル: WizardPopup.java プロジェクト: ngoanhtan/consulo
 private boolean proceedKeyEvent(KeyEvent event, KeyStroke stroke) {
   if (myInputMap.get(stroke) != null) {
     final Action action = myActionMap.get(myInputMap.get(stroke));
     if (action != null && action.isEnabled()) {
       action.actionPerformed(
           new ActionEvent(
               getContent(), event.getID(), "", event.getWhen(), event.getModifiers()));
       return true;
     }
   }
   return false;
 }
コード例 #3
0
ファイル: EditFrame.java プロジェクト: BrotherPhil/ROPE
  public void redoAction() {
    try {
      if (undoMgr.canRedo()) {
        redoAction.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "Redo"));

        setRedoItem();
      } else {
        java.awt.Toolkit.getDefaultToolkit().beep();
      }
    } catch (CannotUndoException ex) {
      ex.printStackTrace();
    }
  }
コード例 #4
0
  @SuppressWarnings("HardCodedStringLiteral")
  private void processListSelection(final KeyEvent e) {
    if (togglePopup(e)) return;

    if (!isPopupShowing()) return;

    final InputMap map = myPathTextField.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
    if (map != null) {
      final Object object = map.get(KeyStroke.getKeyStrokeForEvent(e));
      if (object instanceof Action) {
        final Action action = (Action) object;
        if (action.isEnabled()) {
          action.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "action"));
          e.consume();
          return;
        }
      }
    }

    final Object action = getAction(e, myList);

    if ("selectNextRow".equals(action)) {
      if (ensureSelectionExists()) {
        ListScrollingUtil.moveDown(myList, e.getModifiersEx());
      }
    } else if ("selectPreviousRow".equals(action)) {
      ListScrollingUtil.moveUp(myList, e.getModifiersEx());
    } else if ("scrollDown".equals(action)) {
      ListScrollingUtil.movePageDown(myList);
    } else if ("scrollUp".equals(action)) {
      ListScrollingUtil.movePageUp(myList);
    } else if (getSelectedFileFromCompletionPopup() != null
        && (e.getKeyCode() == KeyEvent.VK_ENTER || e.getKeyCode() == KeyEvent.VK_TAB)
        && e.getModifiers() == 0) {
      hideCurrentPopup();
      e.consume();
      processChosenFromCompletion(e.getKeyCode() == KeyEvent.VK_TAB);
    }
  }
コード例 #5
0
ファイル: EditFrame.java プロジェクト: BrotherPhil/ROPE
 public void selectLine() {
   Action selectLine = getAction(DefaultEditorKit.selectLineAction);
   if (selectLine != null) {
     selectLine.actionPerformed(null);
   }
 }
コード例 #6
0
 public void actionPerformed(ActionEvent event) {
   saveHistoryAction.actionPerformed(event);
 }
コード例 #7
0
 public void actionPerformed(ActionEvent event) {
   stopRAction.actionPerformed(event);
 }
コード例 #8
0
 public void actionPerformed(ActionEvent e) {
   String keyword = EditorUtil.getSelectedkeyword(logArea);
   if (keyword != null) {
     openfunctionAction.actionPerformed(new ActionEvent(this, 0, keyword));
   }
 }
コード例 #9
0
 public void actionPerformed(ActionEvent event) {
   String keyword = EditorUtil.getSelectedkeyword(logArea);
   if (keyword != null) {
     requesthelpAction.actionPerformed(new ActionEvent(this, 0, keyword));
   }
 }