本文整理了Java中javax.swing.JCheckBox.setMnemonic()
方法的一些代码示例,展示了JCheckBox.setMnemonic()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JCheckBox.setMnemonic()
方法的具体详情如下:
包路径:javax.swing.JCheckBox
类名称:JCheckBox
方法名:setMnemonic
暂无
代码示例来源:origin: wiztools/rest-client
OptionsEtcPanel(){
this.setLayout(new FlowLayout(FlowLayout.LEFT));
jcb_indentResponse.setMnemonic('a');
jcb_syntaxRequest.setToolTipText("Requires RESTClient restart!");
jcb_syntaxResponse.setToolTipText("Requires RESTClient restart!");
JPanel jp = new JPanel();
jp.setLayout(new GridLayout(4, 1));
jp.add(jcb_indentResponse);
jp.add(jcb_syntaxRequest);
jp.add(jcb_syntaxResponse);
JPanel jp_scrollSpeed = new JPanel(new BorderLayout());
JPanel jp_scrollSpeed_inner = new JPanel(new FlowLayout());
jp_scrollSpeed_inner.add(new JLabel("Text areas scroll speed"));
jp_scrollSpeed_inner.add(js_scrollSpeed);
jp_scrollSpeed.add(BorderLayout.WEST, jp_scrollSpeed_inner);
jp.add(jp_scrollSpeed);
((JSpinner.DefaultEditor)js_scrollSpeed.getEditor()).getTextField().setColumns(2);
this.add(jp);
}
代码示例来源:origin: wiztools/rest-client
jcb_enable.setMnemonic('e');
jcb_enable.addActionListener(new ActionListener() {
@Override
代码示例来源:origin: robo-code/robocode
private JCheckBox getEnableReplayRecordingCheckBox() {
if (enableReplayRecordingCheckBox == null) {
enableReplayRecordingCheckBox = new JCheckBox("Enable replay recording (uses memory and disk space)");
enableReplayRecordingCheckBox.setMnemonic('E');
}
return enableReplayRecordingCheckBox;
}
代码示例来源:origin: robo-code/robocode
private JCheckBox getEnableGunshotCheckBox() {
if (enableGunshotCheckBox == null) {
enableGunshotCheckBox = new JCheckBox("Gun Shots");
enableGunshotCheckBox.setMnemonic('G');
}
return enableGunshotCheckBox;
}
代码示例来源:origin: robo-code/robocode
private JCheckBox getVisibleRobotNameCheckBox() {
if (visibleRobotNameCheckBox == null) {
visibleRobotNameCheckBox = new JCheckBox("Visible Robot Name");
visibleRobotNameCheckBox.setMnemonic('V');
}
return visibleRobotNameCheckBox;
}
代码示例来源:origin: robo-code/robocode
private JCheckBox getEnableMixerVolumeCheckBox() {
if (enableMixerVolumeCheckBox == null) {
enableMixerVolumeCheckBox = new JCheckBox("Volume");
enableMixerVolumeCheckBox.setMnemonic('V');
enableMixerVolumeCheckBox.addActionListener(eventHandler);
}
return enableMixerVolumeCheckBox;
}
代码示例来源:origin: robo-code/robocode
public JCheckBox getWholeWordCheckBox() {
if (wholeWordCheckBox == null) {
wholeWordCheckBox = new JCheckBox();
wholeWordCheckBox.setText("Whole Words Only");
wholeWordCheckBox.setMnemonic('W');
wholeWordCheckBox.addActionListener(this);
}
return wholeWordCheckBox;
}
代码示例来源:origin: robo-code/robocode
private JCheckBox getVisibleExplosionDebrisCheckBox() {
if (visibleExplosionDebrisCheckBox == null) {
visibleExplosionDebrisCheckBox = new JCheckBox("Visible Explosion Debris");
visibleExplosionDebrisCheckBox.setMnemonic('E');
visibleExplosionDebrisCheckBox.setDisplayedMnemonicIndex(8);
}
return visibleExplosionDebrisCheckBox;
}
代码示例来源:origin: robo-code/robocode
private JCheckBox getNotifyAboutBetaVersionsCheckBox() {
if (notifyAboutBetaVersionsCheckBox == null) {
notifyAboutBetaVersionsCheckBox = new JCheckBox("Notify about new Beta versions of Robocode");
notifyAboutBetaVersionsCheckBox.setMnemonic('B');
notifyAboutBetaVersionsCheckBox.setDisplayedMnemonicIndex(17);
}
return notifyAboutBetaVersionsCheckBox;
}
代码示例来源:origin: robo-code/robocode
private JCheckBox getVisibleGroundCheckBox() {
if (visibleGroundCheckBox == null) {
visibleGroundCheckBox = new JCheckBox("Visible Ground");
visibleGroundCheckBox.setMnemonic('G');
visibleGroundCheckBox.setDisplayedMnemonicIndex(8);
}
return visibleGroundCheckBox;
}
代码示例来源:origin: robo-code/robocode
private JCheckBox getEnableBulletHitCheckBox() {
if (enableBulletHitCheckBox == null) {
enableBulletHitCheckBox = new JCheckBox("Bullet Hit");
enableBulletHitCheckBox.setMnemonic('H');
enableBulletHitCheckBox.setDisplayedMnemonicIndex(7);
}
return enableBulletHitCheckBox;
}
代码示例来源:origin: robo-code/robocode
private JCheckBox getDisplayFpsCheckBox() {
if (displayFpsCheckBox == null) {
displayFpsCheckBox = new JCheckBox("Display FPS in titlebar");
displayFpsCheckBox.setMnemonic('P');
displayFpsCheckBox.setDisplayedMnemonicIndex(9);
}
return displayFpsCheckBox;
}
代码示例来源:origin: robo-code/robocode
private JCheckBox getDisplayTpsCheckBox() {
if (displayTpsCheckBox == null) {
displayTpsCheckBox = new JCheckBox("Display TPS in titlebar");
displayTpsCheckBox.setMnemonic('T');
displayTpsCheckBox.setDisplayedMnemonicIndex(8);
}
return displayTpsCheckBox;
}
代码示例来源:origin: robo-code/robocode
private JCheckBox getVisibleExplosionsCheckBox() {
if (visibleExplosionsCheckBox == null) {
visibleExplosionsCheckBox = new JCheckBox("Visible Explosions");
visibleExplosionsCheckBox.setMnemonic('x');
visibleExplosionsCheckBox.setDisplayedMnemonicIndex(9);
}
return visibleExplosionsCheckBox;
}
代码示例来源:origin: robo-code/robocode
private JCheckBox getEnableRobotCollisionCheckBox() {
if (enableRobotCollisionCheckBox == null) {
enableRobotCollisionCheckBox = new JCheckBox("Robot Collisions");
enableRobotCollisionCheckBox.setMnemonic('t');
enableRobotCollisionCheckBox.setDisplayedMnemonicIndex(4);
}
return enableRobotCollisionCheckBox;
}
代码示例来源:origin: robo-code/robocode
private JCheckBox getEnableWallCollisionCheckBox() {
if (enableWallCollisionCheckBox == null) {
enableWallCollisionCheckBox = new JCheckBox("Wall Collisions");
enableWallCollisionCheckBox.setMnemonic('l');
enableWallCollisionCheckBox.setDisplayedMnemonicIndex(2);
}
return enableWallCollisionCheckBox;
}
代码示例来源:origin: robo-code/robocode
private JCheckBox getDontHideRankingsCheckBox() {
if (dontHideRankingsCheckBox == null) {
dontHideRankingsCheckBox = new JCheckBox("Don't hide current rankings when main window is minimized");
dontHideRankingsCheckBox.setMnemonic('t');
dontHideRankingsCheckBox.setDisplayedMnemonicIndex(4);
}
return dontHideRankingsCheckBox;
}
代码示例来源:origin: JetBrains/Grammar-Kit
public BnfIntroduceRulePopup(Project project, Editor editor, BnfRule rule, BnfExpression expr) {
super(rule, editor, project, "Introduce Rule", new BnfExpression[0], expr);
myCheckBox.setSelected(true);
myCheckBox.setMnemonic('p');
myPanel.setBorder(null);
myPanel.add(myCheckBox, new GridBagConstraints(0, 1, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, JBUI.insets(5), 0, 0));
myPanel.add(Box.createVerticalBox(), new GridBagConstraints(0, 2, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, JBUI.emptyInsets(), 0, 0));
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-highlight
private void initMnemonics() {
cbMarkOccurrences.setMnemonic(getString("EnableMarkOccurrences_Mnemonic").charAt(0));
cbKeepMarks.setMnemonic(getString("KeepMarks_Mnemonic").charAt(0));
cbMarkOccurrences.setToolTipText(getString("EnableMarkOccurrences_AD"));
cbKeepMarks.setToolTipText(getString("KeepMarks_AD"));
cbMarkOccurrences.getAccessibleContext().setAccessibleDescription(getString("EnableMarkOccurrences_AD"));
cbKeepMarks.getAccessibleContext().setAccessibleDescription(getString("KeepMarks_AD"));
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
void makeAccessibleCheckBox(JCheckBox box, Property p) {
box.getAccessibleContext().setAccessibleName(p.getDisplayName());
box.getAccessibleContext().setAccessibleDescription(p.getShortDescription());
Object mnemonicChar = p.getValue(ATTR_MNEMONIC_CHAR);
if ((null != mnemonicChar) && (mnemonicChar.toString().length() > 0)) {
box.setMnemonic(mnemonicChar.toString().charAt(0));
}
}
内容来源于网络,如有侵权,请联系作者删除!