java.awt.Button.setActionCommand()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(163)

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

Button.setActionCommand介绍

暂无

代码示例

代码示例来源:origin: com.h2database/h2

startBrowser.setActionCommand("console");
startBrowser.addActionListener(this);
startBrowser.setFont(font);

代码示例来源:origin: org.w3c.jigsaw/jigsaw

public ListEditor(int nbVisible, boolean multiple) {
super(IN, 2);
setInsets(new Insets(4,4,4,4));
editButton = new Button ("Edit");
editButton.setActionCommand("edit");
editButton.addActionListener(this);
list = new List(nbVisible, multiple);
setLayout(new BorderLayout());
add(list, "Center");
add(editButton,"East");
}

代码示例来源:origin: org.w3c.jigsaw/jigsaw

FComponent(SelectFileEditor editor) {
  this.editor = editor;
  this.text = new TextField();
  this.select = new Button("Select");
  select.setActionCommand("select");
  select.addActionListener(this);
  setLayout( new BorderLayout());
  add(text,"Center");
  add(select,"East");
}
}

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

copyButton.setActionCommand("copy");
copyButton.addActionListener(this);
c.gridy = 1;
pasteButton.setActionCommand("paste");
pasteButton.addActionListener(this);
pasteButton.setEnabled(false);

代码示例来源:origin: org.w3c.jigsaw/jigsaw

DispatcherComponent (DispatcherRulesEditor parent, String location) {
  super(IN, 2);
  this.editor = parent;
  this.locationEd  = new TextField(20);
  if (location != null)
  this.locationEd.setText(location);
  Button editB = new Button("Edit Rules");
  editB.setActionCommand("edit");
  editB.addActionListener(this);
  setLayout( new BorderLayout());
  add(locationEd,"Center");
  add(editB,"East");
}
}

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

cancelButton.addActionListener(this);
okButton.setActionCommand("ok");
cancelButton.setActionCommand("cancel");

代码示例来源:origin: org.w3c.jigsaw/jigsaw

protected void initAddPanel(Properties config) {
if(addFrame == null) {
  addFrame = new Panel(new BorderLayout());
  String af = config.getProperty("org.w3c.jigadm.editors.frames");
  StringTokenizer st = new StringTokenizer(af, "|");
  ScrollPane fsp = new ScrollPane();
  GridBagLayout fgbl = new GridBagLayout();
  GridBagConstraints fgbc = new GridBagConstraints();
  Panel fspp = new Panel (fgbl);
  fsp.add(fspp);
  PropertyManager pm = PropertyManager.getPropertyManager();
  String downPath = pm.getIconLocation("down");
  String leftPath = pm.getIconLocation("left");
  combo = new FakeComboBox(35,7,true,downPath,leftPath);
  while(st.hasMoreTokens())
  combo.add(st.nextToken().trim());
  fspp.add(combo);
  addFrame.add("Center", fsp); //Center
  // Add listener to switch between frame chooser and configurer
  Button newb     = new Button("Add Frame");
  newb.setActionCommand(FAL_ADD);
  newb.addActionListener(fal);
  addFrame.add("South", newb);
} else
  widget.remove(centerComp);
widget.add("Center", addFrame);
centerComp = addFrame;
}

代码示例来源:origin: org.w3c.jigsaw/jigsaw

MimeTypeAttributeComponent (MimeTypeAttributeEditor editor,
        String type)
{
  super();
  this.editor = editor;
  this.type = new TextField(20);
  this.type.setText(type);
  this.type.addTextListener(this);
  Button editB = new Button("Change");
  editB.setActionCommand("edit");
  editB.addActionListener(this);
  setLayout( new BorderLayout());
  add(this.type,"West");
  add(editB,"Center");
}

代码示例来源:origin: org.w3c.jigsaw/jigsaw

SelectComponent (SelectEditor editor,
     EditorFeeder feeder,
     EditorModifier modifier,
     String selected)
{
  super();
  this.feeder = feeder;
  this.modifier = modifier;
  this.editor = editor;
  this.selected = new TextField(20);
  this.selected.setText(selected);
  this.selected.addTextListener(this);
  Button editB = new Button("Change");
  editB.setActionCommand("edit");
  editB.addActionListener(this);
  setLayout( new BorderLayout());
  add(this.selected,"West");
  add(editB,"Center");
}

代码示例来源:origin: org.w3c.jigsaw/jigsaw

public QuestionPopup (Frame parent, String title, 
     String question, String yes, String no,
     boolean modal) 
{
super(parent, title, modal);
Button yesB      = new Button(yes);
yesB.setActionCommand("yes");
yesB.addActionListener(this);
Button noB       = new Button(no);
noB.addActionListener(this);
noB.setActionCommand("no");
Label  questionL = new Label(question);
Panel pq = new Panel();
pq.add(questionL);
BorderPanel pb = new BorderPanel(BorderPanel.IN, 2);
pb.setLayout(new FlowLayout());
pb.add(yesB);
pb.add(noB);
add(pq, "Center");
add(pb, "South");
pack();
}

代码示例来源:origin: sc.fiji/3D_Viewer

private void selectLandmarkSet(final Content content,
  final String actionCommand)
{
  hideAll();
  content.setVisible(true);
  content.displayAs(ContentConstants.ORTHO);
  content.showPointList(true);
  univ.ui.setPointTool();
  univ.select(content);
  univ
    .setStatus("Select landmarks in " + content.getName() + " and click OK");
  final Panel p = new Panel(new FlowLayout());
  Button b = new Button("OK");
  b.setActionCommand(actionCommand);
  b.addActionListener(this);
  p.add(b);
  if (actionCommand.equals("REGISTER")) {
    b = new Button("Back to template");
    b.setActionCommand("LS_TEMPLATE");
    b.addActionListener(this);
    p.add(b);
  }
  univ.getPointListDialog().addPanel(p);
}

代码示例来源:origin: org.w3c.jigsaw/jigsaw

okB.setActionCommand("update");
okB.addActionListener(this);
Button cancelB = new Button("Cancel");
cancelB.setActionCommand("cancel");
cancelB.addActionListener(this);

代码示例来源:origin: ome/bio-formats_plugins

select.setActionCommand("select");
select.addActionListener(this);
Button deselect = new Button("Deselect All");
deselect.setActionCommand("deselect");
deselect.addActionListener(this);

代码示例来源:origin: openmicroscopy/bioformats

select.setActionCommand("select");
select.addActionListener(this);
Button deselect = new Button("Deselect All");
deselect.setActionCommand("deselect");
deselect.addActionListener(this);

代码示例来源:origin: org.jacorb/jacorb

/**
 * Return the DetailsButton property value.
 * @return java.awt.Button
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private java.awt.Button getDetailsButton() {
if (ivjDetailsButton == null) {
    try {
      ivjDetailsButton = new java.awt.Button();
      ivjDetailsButton.setName("DetailsButton");
      ivjDetailsButton.setLocation(33, 170);
      ivjDetailsButton.setBackground(java.awt.SystemColor.control);
      ivjDetailsButton.setSize(23, 23);
      ivjDetailsButton.setFont(new java.awt.Font("dialog", 0, 8));			
      ivjDetailsButton.setActionCommand("...");
      ivjDetailsButton.setLabel("...");
      // user code begin {1}
      // user code end
    } catch (java.lang.Throwable ivjExc) {
      // user code begin {2}
      // user code end
      handleException(ivjExc);
    }
};
return ivjDetailsButton;
}
/**

代码示例来源:origin: org.jacorb/jacorb

/**
 * Return the DetailsButton property value.
 * @return java.awt.Button
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private java.awt.Button getDetailsButton() {
if (ivjDetailsButton == null) {
    try {
      ivjDetailsButton = new java.awt.Button();
      ivjDetailsButton.setName("DetailsButton");
      ivjDetailsButton.setLocation(33, 170);
      ivjDetailsButton.setBackground(java.awt.SystemColor.control);
      ivjDetailsButton.setSize(23, 23);
      ivjDetailsButton.setFont(new java.awt.Font("dialog", 0, 8));			
      ivjDetailsButton.setActionCommand("...");
      ivjDetailsButton.setLabel("...");
      // user code begin {1}
      // user code end
    } catch (java.lang.Throwable ivjExc) {
      // user code begin {2}
      // user code end
      handleException(ivjExc);
    }
};
return ivjDetailsButton;
}
/**

代码示例来源:origin: org.w3c.jigsaw/jigsaw

back.setActionCommand(FAL_BACK);
back.addActionListener(fal);
  del.setActionCommand(FAL_DELETE);
  del.addActionListener(fal);

代码示例来源:origin: com.h2database/com.springsource.org.h2

startBrowser.setActionCommand("console");
startBrowser.addActionListener(this);
startBrowser.setFont(font);

代码示例来源:origin: org.w3c.jigsaw/jigsaw

Ok.setActionCommand("update");
Ok.addActionListener(this);
Button Cancel = new Button("Cancel");
Cancel.setActionCommand("cancel");
Cancel.addActionListener(this);

代码示例来源:origin: sc.fiji/Volume_Calculator

Button clearButton = new Button("C");             // A Clear button
clearButton.setActionCommand("" + volumes.getCurrentColorIndex());
clearButton.addActionListener(new ActionListener() {

相关文章