javax.swing.JButton.setName()方法的使用及代码示例

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

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

JButton.setName介绍

暂无

代码示例

代码示例来源:origin: magefree/mage

btnPlayerName.setName("btnPlayerName"); // NOI18N
btnPlayerName.addActionListener(evt -> btnPlayerNameActionPerformed(evt));
lblGrave.setName("lblGrave"); // NOI18N
btnGrave.setName("btnGrave"); // NOI18N
btnGrave.addActionListener(evt -> btnGraveActionPerformed(evt));

代码示例来源:origin: magefree/mage

jButton1.setName("findServerBtn"); // NOI18N
jButton1.addActionListener(evt -> findPublicServerActionPerformed(evt));

代码示例来源:origin: magefree/mage

btnImport.setName("btnImport"); // NOI18N
btnImport.addActionListener(evt -> {
  Object[] options = {"File", "Clipboard", "Append from Clipboard"};
btnSubmit.setName("btnSubmit"); // NOI18N
btnSubmit.addActionListener(evt -> btnSubmitActionPerformed(evt));
btnSubmitTimer.setName("btnSubmitTimer");
btnSubmitTimer.addActionListener(evt -> btnSubmitTimerActionPerformed(evt));
btnAddLand.setName("btnAddLand"); // NOI18N
btnAddLand.addActionListener(evt -> btnAddLandActionPerformed(evt));
btnGenDeck.setName("btnGenDeck");
btnGenDeck.addActionListener(evt -> btnGenDeckActionPerformed(evt));
txtTimeRemaining.setEditable(false);

代码示例来源:origin: magefree/mage

btnFindMain.setMaximumSize(new java.awt.Dimension(42, 23));
btnFindMain.setMinimumSize(new java.awt.Dimension(42, 23));
btnFindMain.setName("connectXmageDeBtn"); // NOI18N
btnFindMain.setPreferredSize(new java.awt.Dimension(23, 23));
btnFindMain.addActionListener(new java.awt.event.ActionListener() {
btnFindLocal.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnFindLocal.setMargin(new java.awt.Insets(2, 2, 2, 2));
btnFindLocal.setName("connectLocalhostBtn"); // NOI18N
btnFindLocal.setPreferredSize(new java.awt.Dimension(23, 23));
btnFindLocal.addActionListener(new java.awt.event.ActionListener() {
btnFindUs.setAlignmentY(0.0F);
btnFindUs.setMargin(new java.awt.Insets(2, 2, 2, 2));
btnFindUs.setName("connectXmageusBtn"); // NOI18N
btnFindUs.setPreferredSize(new java.awt.Dimension(23, 23));
btnFindUs.addActionListener(new java.awt.event.ActionListener() {
btnFindOther.setToolTipText("Choose server from full servers list");
btnFindOther.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnFindOther.setName("findServerBtn"); // NOI18N
btnFindOther.addActionListener(new java.awt.event.ActionListener() {
  public void actionPerformed(java.awt.event.ActionEvent evt) {

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

btn.setName(TOOLBAR_POINTER_BUTTON_NAME);
toolBar.add(btn);
cursorToolGrp.add(btn);
btn.setName(TOOLBAR_ZOOMIN_BUTTON_NAME);
toolBar.add(btn);
cursorToolGrp.add(btn);
btn.setName(TOOLBAR_ZOOMOUT_BUTTON_NAME);
toolBar.add(btn);
cursorToolGrp.add(btn);
btn.setName(TOOLBAR_PAN_BUTTON_NAME);
toolBar.add(btn);
cursorToolGrp.add(btn);
btn.setName(TOOLBAR_INFO_BUTTON_NAME);
toolBar.add(btn);
btn.setName(TOOLBAR_RESET_BUTTON_NAME);
toolBar.add(btn);

代码示例来源:origin: dboissier/mongo4idea

defaultRowLimitTextField.setDocument(new NumberDocument());
testConnectionButton.setName("testConnection");

代码示例来源:origin: otros-systems/otroslogviewer

public void setApproveAction(Action action) {
 actionApproveDelegate = action;
 actionApproveButton.setAction(actionApproveDelegate);
 actionApproveButton.setName("VfsBrowser.open");
 actionApproveButton.setText(String.format("%s [Ctrl+Enter]", actionApproveDelegate.getValue(Action.NAME)));
 if (targetFileSelected) {
  actionApproveDelegate.actionPerformed(
   // TODO:  Does actionResult provide an ID for 2nd param here,
   // or should use a Random number?
   new ActionEvent(action, (int) new Date().getTime(), "SELECTED_FILE"));
 }
}

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

private JButton createButton(final String name) {
  final JButton button = new JButton(getText(name));
  button.setName(name);
  return button;
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets

protected void createAdd() {
  $objectMap.put("add", add = new JButton());
  
  add.setName("add");
  add.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__add"));
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets

protected void createAdd() {
  $objectMap.put("add", add = new JButton());
  
  add.setName("add");
  add.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__add"));
}

代码示例来源:origin: jsettlers/settlers-remake

@Override
  protected JButton createArrowButton() {
    JButton button = new ScrollbarUiButton(BasicArrowButton.SOUTH, UIDefaults.ARROW_COLOR);
    button.setName("ComboBox.arrowButton");
    return button;
  }
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets

protected void createResetButton() {
  $objectMap.put("resetButton", resetButton = new JButton());
  
  resetButton.setName("resetButton");
  resetButton.setFocusable(false);
  resetButton.setFocusPainted(false);
  resetButton.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__resetButton"));
}

代码示例来源:origin: org.nuiton.jrst/jrst

protected void createBoutonConvertir() {
  $objectMap.put("boutonConvertir", boutonConvertir = new JButton());
  
  boutonConvertir.setName("boutonConvertir");
  boutonConvertir.setText(t("Convert"));
  boutonConvertir.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__boutonConvertir"));
}

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

private void initializeMoveColorUpButton() {
  moveColorUp.setName("moveColorUp");
  moveColorUp.setFont(BUTTON_FONT);
  moveColorUp.setText(MOVE_UP);
  moveColorUp.addActionListener(new ColorSwapper(-1));
  moveColorUp.setVisible(index > 0);
}

代码示例来源:origin: org.nuiton.jrst/jrst

protected void createAddXslButton() {
  $objectMap.put("addXslButton", addXslButton = new JButton(Resource.getIcon("icone/more.gif")));
  
  addXslButton.setName("addXslButton");
  addXslButton.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__addXslButton"));
}

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

private void initializeAddButton() {
  addNextColor.setName("addNextColor");
  addNextColor.setFont(BUTTON_FONT);
  addNextColor.setText(ADD);
  addNextColor.addActionListener(new ColorAdder(index + 1));
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets

protected void createResetSelection() {
  $objectMap.put("resetSelection", resetSelection = new JButton());
  
  resetSelection.setName("resetSelection");
  resetSelection.setFocusable(false);
  resetSelection.setToolTipText(t("beanlist.action.reset.tip"));
  resetSelection.setFocusPainted(false);
  resetSelection.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__resetSelection"));
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets

protected void createDefaultSize() {
  $objectMap.put("defaultSize", defaultSize = new JButton());
  
  defaultSize.setName("defaultSize");
  defaultSize.setFocusPainted(false);
  defaultSize.setFocusable(false);
  defaultSize.setToolTipText(t("fontsize.action.default.tip"));
  defaultSize.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__defaultSize"));
}

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

private void initializeMoveColorDownButton() {
  moveColorDown.setName("moveColorDown");
  moveColorDown.setFont(BUTTON_FONT);
  moveColorDown.setText(MOVE_DOWN);
  moveColorDown.addActionListener(new ColorSwapper(+1));
  updateMoveColorDownButton();
}

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

private void addAddColorButton() {
  formlayout.appendRow(RowSpec.decode("CENTER:DEFAULT:NONE"));
  JButton addColor = new JButton();
  addColor.addActionListener(new ColorAdder(0));
  addColor.setName("addColor");
  addColor.setFont(BUTTON_FONT);
  addColor.setText(ADD);
  panel.add(addColor, cc.xy(11, 1));
}

相关文章

微信公众号

最新文章

更多

JButton类方法