本文整理了Java中javax.swing.JToggleButton.setRequestFocusEnabled()
方法的一些代码示例,展示了JToggleButton.setRequestFocusEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JToggleButton.setRequestFocusEnabled()
方法的具体详情如下:
包路径:javax.swing.JToggleButton
类名称:JToggleButton
方法名:setRequestFocusEnabled
暂无
代码示例来源:origin: magefree/mage
btnStateWaiting.setFocusable(false);
btnStateWaiting.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnStateWaiting.setRequestFocusEnabled(false);
btnStateWaiting.setVerifyInputWhenFocusTarget(false);
btnStateWaiting.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnStateActive.setFocusable(false);
btnStateActive.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnStateActive.setRequestFocusEnabled(false);
btnStateActive.setVerifyInputWhenFocusTarget(false);
btnStateActive.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnStateFinished.setFocusable(false);
btnStateFinished.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnStateFinished.setRequestFocusEnabled(false);
btnStateFinished.setVerifyInputWhenFocusTarget(false);
btnStateFinished.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnTypeMatch.setFocusable(false);
btnTypeMatch.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnTypeMatch.setRequestFocusEnabled(false);
btnTypeMatch.setVerifyInputWhenFocusTarget(false);
btnTypeMatch.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnTypeTourneyConstructed.setFocusPainted(false);
btnTypeTourneyConstructed.setFocusable(false);
btnTypeTourneyConstructed.setRequestFocusEnabled(false);
btnTypeTourneyConstructed.setVerifyInputWhenFocusTarget(false);
btnTypeTourneyConstructed.addActionListener(evt -> btnFilterActionPerformed(evt));
代码示例来源:origin: org.bitbucket.goalhub.simpleide/jedit
public void register(DockableWindowManagerImpl.Entry entry)
{
dockables.add(entry);
//{{{ Create button
int rotation;
if(position.equals(DockableWindowManagerImpl.TOP)
|| position.equals(DockableWindowManagerImpl.BOTTOM))
rotation = RotatedTextIcon.NONE;
else if(position.equals(DockableWindowManagerImpl.LEFT))
rotation = RotatedTextIcon.CCW;
else if(position.equals(DockableWindowManagerImpl.RIGHT))
rotation = RotatedTextIcon.CW;
else
throw new InternalError("Invalid position: " + position);
JToggleButton button = new JToggleButton();
button.setMargin(new Insets(1,1,1,1));
button.setRequestFocusEnabled(false);
button.setIcon(new RotatedTextIcon(rotation,button.getFont(),
entry.shortTitle()));
button.setActionCommand(entry.factory.name);
button.addActionListener(new ActionHandler());
button.addMouseListener(new MenuMouseHandler());
if(OperatingSystem.isMacOSLF())
button.putClientProperty("JButton.buttonType","toolbar");
//}}}
buttonGroup.add(button);
buttons.add(button);
entry.btn = button;
wm.revalidate();
} //}}}
内容来源于网络,如有侵权,请联系作者删除!