本文整理了Java中javax.swing.JMenu.setText()
方法的一些代码示例,展示了JMenu.setText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenu.setText()
方法的具体详情如下:
包路径:javax.swing.JMenu
类名称:JMenu
方法名:setText
暂无
代码示例来源:origin: libgdx/libgdx
fileMenu.setText("File");
fileMenu.setMnemonic(KeyEvent.VK_F);
代码示例来源:origin: libgdx/libgdx
fileMenu.setText("File");
fileMenu.setMnemonic(KeyEvent.VK_F);
代码示例来源:origin: stanfordnlp/CoreNLP
jMenu1.setText("File");
loadDataItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.ALT_MASK));
loadDataItem.setMnemonic('o');
代码示例来源:origin: marytts/marytts
org.jdesktop.layout.GroupLayout.VERTICAL);
jMenu_File.setText("File");
jMenuItem_Open.setIcon(new javax.swing.ImageIcon(getClass().getResource("/marytts/tools/redstart/open_16x16.png")));
jMenuItem_Open.setText("Open Voice...");
jMenu_Tools.setText("Tools");
jMenuItem_Options.setIcon(new javax.swing.ImageIcon(getClass().getResource("/marytts/tools/redstart/options_16x16.png")));
jMenuItem_Options.setText("Options...");
jMenu_Window.setText("Window");
jCheckBoxMenuItem_AdminWindow.setSelected(true);
jCheckBoxMenuItem_AdminWindow.setText("Admin Window");
jMenu_Help.setText("Help");
jMenu_About.setIcon(new javax.swing.ImageIcon(getClass().getResource("/marytts/tools/redstart/about_16x16.png")));
jMenu_About.setText("About Redstart");
代码示例来源:origin: marytts/marytts
.add(spLanguages, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 303, Short.MAX_VALUE))));
menuTools1.setText("Tools");
miProxy1.setText("Proxy settings...");
miProxy1.addActionListener(new java.awt.event.ActionListener() {
代码示例来源:origin: marytts/marytts
.add(spLanguages, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 303, Short.MAX_VALUE))));
menuTools1.setText("Tools");
miProxy1.setText("Proxy settings...");
miProxy1.addActionListener(new java.awt.event.ActionListener() {
代码示例来源:origin: ron190/jsql-injection
@Override
public void actionPerformed(ActionEvent e) {
JMenuItem item = (JMenuItem) e.getSource();
MenuBarCoder.this.menu.setText(item.getText());
MenuBarCoder.this.menu.requestFocus();
}
代码示例来源:origin: apache/pdfbox
private JMenu createRotationMenu()
{
JMenu menu = new JMenu();
menu.setText("Rotation");
rotate0Item = new JRadioButtonMenuItem();
rotate90Item = new JRadioButtonMenuItem();
rotate180Item = new JRadioButtonMenuItem();
rotate270Item = new JRadioButtonMenuItem();
rotate0Item.setSelected(true);
ButtonGroup bg = new ButtonGroup();
bg.add(rotate0Item);
bg.add(rotate90Item);
bg.add(rotate180Item);
bg.add(rotate270Item);
rotate0Item.setText(ROTATE_0_DEGREES);
rotate90Item.setText(ROTATE_90_DEGREES);
rotate180Item.setText(ROTATE_180_DEGREES);
rotate270Item.setText(ROTATE_270_DEGREES);
menu.add(rotate0Item);
menu.add(rotate90Item);
menu.add(rotate180Item);
menu.add(rotate270Item);
return menu;
}
}
代码示例来源:origin: ron190/jsql-injection
@Override
public void execute() {
if (MediatorGui.managerDatabase() == null) {
LOGGER.error("Unexpected unregistered MediatorGui.managerDatabase() in "+ this.getClass());
}
MediatorGui.managerDatabase().getMenuVendor().setText(this.vendor.toString());
MediatorGui.managerDatabase().initErrorMethods(this.vendor);
}
代码示例来源:origin: winder/Universal-G-Code-Sender
/**
* Updates all text labels in the GUI with localized labels.
*/
private void setLocalLabels() {
this.controlContextTabbedPane.setTitleAt(0, Localization.getString("mainWindow.swing.controlContextTabbedPane.machineControl"));
this.controlContextTabbedPane.setTitleAt(1, Localization.getString("mainWindow.swing.controlContextTabbedPane.macros"));
this.controlContextTabbedPane.setTitleAt(2, Localization.getString("mainWindow.swing.visualizeButton"));
this.firmwareSettingsMenu.setText(Localization.getString("mainWindow.swing.firmwareSettingsMenu"));
this.grblConnectionSettingsMenuItem.setText(Localization.getString("mainWindow.swing.grblConnectionSettingsMenuItem"));
this.grblFirmwareSettingsMenuItem.setText(Localization.getString("mainWindow.swing.grblFirmwareSettingsMenuItem"));
this.settingsMenu.setText(Localization.getString("mainWindow.swing.settingsMenu"));
this.macroEditPanel.setToolTipText(Localization.getString("mainWindow.swing.macroInstructions"));
this.pendantMenu.setText(Localization.getString("mainWindow.swing.pendant"));
this.gcodeProcessorSettings.setText(Localization.getString("settings.processors.header"));
}
代码示例来源:origin: winder/Universal-G-Code-Sender
this.grblConnectionSettingsMenuItem.setText(Localization.getString("mainWindow.swing.grblConnectionSettingsMenuItem"));
this.helpButtonMachineControl.setText(Localization.getString("help"));
this.settingsMenu.setText(Localization.getString("mainWindow.swing.settingsMenu"));
this.statusPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(Localization.getString("mainWindow.swing.statusPanel")));
this.bottomTabbedPane.setTitleAt(0, Localization.getString("mainWindow.swing.bottomTabbedPane.console"));
this.resetZButton.setText(Localization.getString("mainWindow.swing.resetZ"));
this.activeStateLabel.setText(Localization.getString("mainWindow.swing.activeStateLabel"));
this.PendantMenu.setText(Localization.getString("mainWindow.swing.pendant"));
this.gcodeProcessorSettings.setText(Localization.getString("settings.processors.header"));
this.startPendantServerButton.setText(Localization.getString("PendantMenu.item.StartServer"));
代码示例来源:origin: ron190/jsql-injection
m.setText("<User-Agent default>")
);
r.setToolTipText("Java/"+ System.getProperty("java.version"));
JRadioButtonMenuItem rr = new JRadioButtonMenuItem(u.getLabel());
rr.addActionListener(actionEvent ->
m.setText(u.getLabel())
);
rr.setToolTipText(u.getNameUserAgent());
代码示例来源:origin: winder/Universal-G-Code-Sender
connectionPanel.setPreferredSize(new java.awt.Dimension(275, 130));
settingsMenu.setText("Settings");
settingsMenu.add(gcodeProcessorSettings);
firmwareSettingsMenu.setText("Firmware Settings");
代码示例来源:origin: ron190/jsql-injection
@Override
public void execute() {
if (MediatorGui.managerDatabase() == null) {
LOGGER.error("Unexpected unregistered MediatorGui.managerDatabase() in "+ this.getClass());
}
MediatorGui.managerDatabase().getMenuStrategy().setText(StrategyInjection.NORMAL.toString());
for (int i = 0 ; i < MediatorGui.managerDatabase().getMenuStrategy().getItemCount() ; i++) {
if (MediatorGui.managerDatabase().getMenuStrategy().getItem(i).getText().equals(StrategyInjection.NORMAL.toString())) {
MediatorGui.managerDatabase().getMenuStrategy().getItem(i).setSelected(true);
break;
}
}
}
代码示例来源:origin: ron190/jsql-injection
@Override
public void execute() {
if (MediatorGui.managerDatabase() == null) {
LOGGER.error("Unexpected unregistered MediatorGui.managerDatabase() in "+ this.getClass());
}
MediatorGui.managerDatabase().getMenuStrategy().setText(StrategyInjection.BLIND.toString());
for (int i = 0 ; i < MediatorGui.managerDatabase().getMenuStrategy().getItemCount() ; i++) {
if (MediatorGui.managerDatabase().getMenuStrategy().getItem(i).getText().equals(StrategyInjection.BLIND.toString())) {
MediatorGui.managerDatabase().getMenuStrategy().getItem(i).setSelected(true);
break;
}
}
}
代码示例来源:origin: ron190/jsql-injection
@Override
public void execute() {
if (MediatorGui.managerDatabase() == null) {
LOGGER.error("Unexpected unregistered MediatorGui.managerDatabase() in "+ this.getClass());
}
MediatorGui.managerDatabase().getMenuStrategy().setText(StrategyInjection.TIME.toString());
for (int i = 0 ; i < MediatorGui.managerDatabase().getMenuStrategy().getItemCount() ; i++) {
if (MediatorGui.managerDatabase().getMenuStrategy().getItem(i).getText().equals(StrategyInjection.TIME.toString())) {
MediatorGui.managerDatabase().getMenuStrategy().getItem(i).setSelected(true);
break;
}
}
}
代码示例来源:origin: ron190/jsql-injection
public void initErrorMethods(Vendor vendor) {
this.itemRadioStrategyError[0].removeAll();
Integer[] i = { 0 };
if (vendor != Vendor.AUTO && vendor.instance().getXmlModel().getStrategy().getError() != null) {
for (Method methodError: vendor.instance().getXmlModel().getStrategy().getError().getMethod()) {
JMenuItem itemRadioVendor = new JRadioButtonMenuItem(methodError.getName());
itemRadioVendor.setEnabled(false);
this.itemRadioStrategyError[0].add(itemRadioVendor);
this.groupStrategy.add(itemRadioVendor);
final int indexError = i[0];
itemRadioVendor.addActionListener(actionEvent -> {
ManagerDatabase.this.menuStrategy.setText(methodError.getName());
MediatorModel.model().setStrategy(StrategyInjection.ERROR);
((StrategyInjectionError) StrategyInjection.ERROR.instance()).setIndexMethod(indexError);
});
i[0]++;
}
}
}
代码示例来源:origin: ron190/jsql-injection
@Override
public void execute() {
if (MediatorGui.managerDatabase() == null) {
LOGGER.error("Unexpected unregistered MediatorGui.managerDatabase() in "+ this.getClass());
}
MediatorGui.managerDatabase().getMenuStrategy().setText(StrategyInjection.ERROR.toString());
JMenu menuError = (JMenu) MediatorGui.managerDatabase().getMenuStrategy().getMenuComponent(2);
int indexError = StrategyInjection.ERROR.instance().getIndexMethod();
String nameError = MediatorModel.model().getVendor().instance().getXmlModel().getStrategy().getError().getMethod().get(indexError).getName();
for (int i = 0 ; i < MediatorGui.managerDatabase().getMenuStrategy().getItemCount() ; i++) {
// Fix #44635: ArrayIndexOutOfBoundsException on getItem()
try {
if (menuError.getItem(i).getText().equals(nameError)) {
menuError.getItem(i).setSelected(true);
MediatorGui.managerDatabase().getMenuStrategy().setText(nameError);
break;
}
} catch (ArrayIndexOutOfBoundsException e) {
LOGGER.error(e, e);
}
}
}
代码示例来源:origin: ron190/jsql-injection
itemRadioStrategy = new JRadioButtonMenuItem(strategy.toString());
((AbstractButton) itemRadioStrategy).addActionListener(actionEvent -> {
ManagerDatabase.this.menuStrategy.setText(strategy.toString());
MediatorModel.model().setStrategy(strategy);
});
JMenuItem itemRadioVendor = new JRadioButtonMenuItem(vendor.toString(), vendor == Vendor.AUTO);
itemRadioVendor.addActionListener(actionEvent -> {
ManagerDatabase.this.menuVendor.setText(vendor.toString());
MediatorModel.model().setVendorByUser(vendor);
});
代码示例来源:origin: ron190/jsql-injection
MediatorGui.managerDatabase().getMenuVendor().setText(Vendor.AUTO.toString());
MediatorGui.managerDatabase().getMenuStrategy().setText("<Strategy auto>");
内容来源于网络,如有侵权,请联系作者删除!