java.awt.event.ActionEvent.getID()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(220)

本文整理了Java中java.awt.event.ActionEvent.getID()方法的一些代码示例,展示了ActionEvent.getID()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ActionEvent.getID()方法的具体详情如下:
包路径:java.awt.event.ActionEvent
类名称:ActionEvent
方法名:getID

ActionEvent.getID介绍

暂无

代码示例

代码示例来源:origin: JetBrains/ideavim

public void actionPerformed(@NotNull ActionEvent e) {
  ExTextField target = (ExTextField)getTextComponent(e);
  final Action currentAction = target.getCurrentAction();
  if (currentAction != null) {
   currentAction.actionPerformed(e);
  }
  else {
   KeyStroke key = convert(e);
   if (key != null) {
    final char c = key.getKeyChar();
    if (c > 0) {
     ActionEvent event = new ActionEvent(e.getSource(), e.getID(), "" + c, e.getWhen(), e.getModifiers());
     super.actionPerformed(event);
     target.saveLastEntry();
    }
   }
   else {
    super.actionPerformed(e);
    target.saveLastEntry();
   }
  }
 }
}

代码示例来源:origin: org.netbeans.api/org-openide-dialogs

@Override
  public void actionPerformed( ActionEvent e ) {
    nd.setValue(option);
    if (buttonListener != null) {
      // #34485: some listeners expect that the action source is the option, not the button
      ActionEvent e2 = new ActionEvent(
          option, e.getID(), e.getActionCommand(), e.getWhen(), e.getModifiers()
        );
      buttonListener.actionPerformed(e2);
    }
    if ((closingOptions == null) || Arrays.asList(closingOptions).contains(option)) {
      haveFinalValue = true;
      setVisible(false);
    }
  }
}

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

public void actionPerformed(ActionEvent _evt)
 {
  listener_.actionPerformed(new ActionEvent
       (_evt.getSource(),_evt.getID(),action_));
 }
}

代码示例来源:origin: datacleaner/DataCleaner

@Override
public void actionPerformed(final ActionEvent e) {
  _tabIndex = e.getID();
  final MouseEvent mouseEvent = (MouseEvent) e.getSource();
  showPopup(_tabbedPane, mouseEvent.getX(), mouseEvent.getY());
}

代码示例来源:origin: dsukhoroslov/bagri

public void actionPerformed(ActionEvent e) {
    if (null != successListener) {
      successListener.actionPerformed(new ActionEvent(AddUserDialog.this, e.getID(), "addUser"));
    }
    dispose();
  }
});

代码示例来源:origin: dsukhoroslov/bagri

public void actionPerformed(ActionEvent e) {
    if (null != successListener) {
      successListener.actionPerformed(new ActionEvent(EditNodeOptionDialog.this, e.getID(), "editNodeOption"));
    }
    dispose();
  }
});

代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core

/**
 * Handles click on warnIndicator
 */
@Override
public void actionPerformed(ActionEvent event) {
  if (event.getSource() == warnIndicator) {
    ActionRouter.getInstance().doActionNow(
        new ActionEvent(event.getSource(), event.getID(), ActionNames.LOGGER_PANEL_ENABLE_DISABLE));
  }
}

代码示例来源:origin: org.appdapter/org.appdapter.lib.gui

/**
* Event handling routine
*/
@Override public void actionPerformed(ActionEvent e) {
  if (textfield.isEditable() && e.getSource() == scrollPanel) {
    if (e.getID() == ScrollButtonPanel.DECREMENT)
      prevDay();
    else if (e.getID() == ScrollButtonPanel.INCREMENT)
      nextDay();
  }
}

代码示例来源:origin: stackoverflow.com

@Override
public void actionPerformed(ActionEvent e) {
 JTextComponent c = getFocusedComponent();
 if (s.equals("Find")) {
  Action a = c.getActionMap().get("Find");
  if (a.isEnabled()) {
   // generate new event to modify the source (menu item -> text component)
   ActionEvent ae = new ActionEvent(c, e.getID(), e.getCommand());
   a.actionPerformed(ae);
  }
 }
}

代码示例来源:origin: com.jidesoft/jide-oss

final public void actionPerformed(ActionEvent e) {
  if (!delegateActionPerformed(e)) {
    if (_action != null) {
      if (_target == null) {
        _action.actionPerformed(e);
      }
      else {
        _action.actionPerformed(new ActionEvent(getTarget(), e.getID(), e.getActionCommand(), e.getWhen(), e.getModifiers()));
      }
    }
  }
}

代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core

@Override
  public void actionPerformed(ActionEvent e) {
    String[] source = new String[] { Help.HELP_FUNCTIONS, functionList.getText() };
    ActionRouter.getInstance().doActionNow(
        new ActionEvent(source, e.getID(), ActionNames.HELP));
  }
}

代码示例来源:origin: stackoverflow.com

public void actionPerformed(ActionEvent ae) 
{
  mal.actionPerformed(new ActionEvent(this, ae.getID(),
    ae.getCommand(), ae.getWhen(), ae.getModifiers() )); 
}

代码示例来源:origin: com.threerings/nenya

public void actionPerformed (ActionEvent e) {
    if (e instanceof CommandEvent) {
      fireObjectAction(handler, scobj, e);
    } else {
      SceneObjectActionEvent event = new SceneObjectActionEvent(
        e.getSource(), e.getID(), e.getActionCommand(),
        e.getModifiers(), scobj);
      fireObjectAction(handler, scobj, event);
    }
  }
});

代码示例来源:origin: freeplane/freeplane

@Override
public void actionPerformed(ActionEvent e) {
  if(e != null && e.getSource() == dce){
    super.actionPerformed(new ActionEvent(getEditor(), e.getID(), e.getActionCommand(),e.getWhen(),e.getModifiers()));
  }
  else
    super.actionPerformed(e);
}

代码示例来源:origin: net.sf.ingenias/editor

public void redo_actionPerformed(ActionEvent e) {
    ActionEvent e1 = new ActionEvent(this.ids.editor.getGraph(), e.getID(),
        e.getActionCommand(), e.getModifiers());
    if (ids.editor.getGraph()!=null){
      resources.getCommonButtons().getRedo().actionPerformed(e1);
      ids.otherChange();
    }
  }
}

代码示例来源:origin: net.sf.ingenias/editor

public void undo_actionPerformed(ActionEvent e) {
  ActionEvent e1 = new ActionEvent(this.ids.editor.getGraph(), e.getID(),
      e.getActionCommand(), e.getModifiers());
  if (ids.editor.getGraph()!=null){
    resources.getCommonButtons().getUndo().actionPerformed(e1);
    ids.otherChange();
  }
}

代码示例来源:origin: net.sf.ingenias/editor

void delete_actionPerformed(ActionEvent e) {
  ActionEvent e1 = new ActionEvent(this.ids.editor.getGraph(), e.getID(),
      e.getActionCommand(), e.getModifiers());
  if (ids.editor.getGraph()!=null){
    resources.getCommonButtons().getRemove().actionPerformed(e1);
    ids.otherChange();
  }
}

代码示例来源:origin: net.sf.ingenias/editor

public void copy_actionPerformed(ActionEvent e) {
  ActionEvent e1 = new ActionEvent(this.ids.editor.getGraph(), e.getID(),
      e.getActionCommand(), e.getModifiers());
  if (ids.editor.getGraph()!=null) {
    (this.ids.editor.getGraph().getTransferHandler().getCopyAction()).
    actionPerformed(e1);            
  }
}

代码示例来源:origin: net.sf.ingenias/editor

public void paste_actionPerformed(ActionEvent e) {
    ActionEvent e1 = new ActionEvent(this.ids.editor.getGraph(), e.getID(),
        e.getActionCommand(), e.getModifiers());
    if (ids.editor.getGraph()!=null) {
      (this.ids.editor.getGraph().getTransferHandler().getPasteAction()).
      actionPerformed(e1);
      ids.otherChange();
    }    
  }
}

代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core

static void closeProject(ActionEvent e) {
    GuiPackage guiPackage = GuiPackage.getInstance();

    guiPackage.clearTestPlan();
    JTree tree = guiPackage.getTreeListener().getJTree();
    tree.setSelectionRow(0);
    FocusRequester.requestFocus(tree);
    FileServer.getFileServer().setScriptName(null);
    ActionRouter.getInstance().actionPerformed(new ActionEvent(e.getSource(), e.getID(), ActionNames.ADD_ALL));
  }
}

相关文章