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

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

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

ActionEvent.toString介绍

暂无

代码示例

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

public class FooActionListener implements ActionListener {

  @Override
  public void processAction(ActionEvent event)
      throws AbortProcessingException {
    System.out.println(event.toString());
  }

}

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

item.addActionListener(new ActionListener() {
   @Override
   public void processAction(ActionEvent event)
       throws AbortProcessingException {
     System.out.println(event.toString());
   }
 });

代码示例来源:origin: xiehui999/fuseProgram

public void actionPerformed(ActionEvent e) {
    System.out.println(e.toString());
    System.exit(0);
  }
}

代码示例来源:origin: jpos/jPOS

public void actionPerformed (ActionEvent ev) {
    System.out.println ("Action command: "+ev.getActionCommand ());
    System.out.println (ev.toString ());
    System.out.println ("");
  }
}

代码示例来源:origin: IanDarwin/javasrc

public static void main(String[] args) {
  JButton b = new JButton();
  JTextArea c = null;
  ActionListener l = (ActionEvent e) -> { b.setEnabled(false); c.setText(e.toString()); b.setEnabled(true); };
  System.out.println("'l' is a " + l.getClass().getName() + ")");
  b.addActionListener(l);
  //Callable c = (PurchaseVerifier pv, List<Purchases> pl) -> pv.verify(pl);
}

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

e.toString( ));
System.exit(1);

代码示例来源:origin: xiehui999/fuseProgram

public void actionPerformed(ActionEvent e) {
  System.out.println(e.toString());
  if (e.getSource() == buttonUse) {           // 金库使用按钮
    state.doUse(this);
  } else if (e.getSource() == buttonAlarm) {  // 按下警铃按钮
    state.doAlarm(this);
  } else if (e.getSource() == buttonPhone) {  // 正常通话按钮
    state.doPhone(this);
  } else if (e.getSource() == buttonExit) {   // 结束按钮
    System.exit(0);
  } else {
    System.out.println("?");
  }
}
// 设置时间

代码示例来源:origin: cytoscape/application

public void actionPerformed(ActionEvent ae) {
    try {
      csh.actionPerformed(ae);
    } catch (Exception e) {
      logger.warn("Couldn't display help for event: " + ae.toString(), e);
      // Try again with a fake action with a different source, a source
      // that has help defined for it.
      try {
        csh.actionPerformed( new ActionEvent( Cytoscape.getDesktop(), 
                            ae.getID(), ae.getActionCommand(), 
                            ae.getWhen(), ae.getModifiers() ) );
      } catch (Exception ex) {
        logger.error("REALLY Couldn't display help for previous event", ex);
      }
    }
  }
}

相关文章