本文整理了Java中javax.swing.JButton.setRequestFocusEnabled()
方法的一些代码示例,展示了JButton.setRequestFocusEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JButton.setRequestFocusEnabled()
方法的具体详情如下:
包路径:javax.swing.JButton
类名称:JButton
方法名:setRequestFocusEnabled
暂无
代码示例来源:origin: protegeproject/protege
public void addAction(Action action) {
JButton button = toolBar.add(action);
button.setRequestFocusEnabled(false);
}
代码示例来源:origin: edu.stanford.protege/org.protege.editor.core.application
public void addAction(Action action) {
JButton button = toolBar.add(action);
button.setRequestFocusEnabled(false);
}
代码示例来源:origin: org.protege/protege-editor-core-application
public void addAction(Action action) {
JButton button = toolBar.add(action);
button.setRequestFocusEnabled(false);
}
代码示例来源:origin: org.activecomponents.jadex/jadex-commons-gui
/**
* Create a tool bar, given a list of actions.
* @param name The name of the toolbar.
* @param actions The actions (null is mapped to separator).
* @return A tool bar containing the actions.
*/
public static JToolBar createToolBar(String name, Action[] actions)
{
// Create toolbar.
JToolBar toolbar = new JToolBar(name);
toolbar.addSeparator();
for(int i=0; i<actions.length; i++)
{
if(actions[i]==null)
{
toolbar.addSeparator();
}
else
{
JButton button = new JButton(actions[i]);
button.setToolTipText((String)actions[i].getValue(Action.NAME));
button.setText("");
button.setActionCommand((String)actions[i].getValue(Action.NAME));
button.setRequestFocusEnabled(false);
button.setMargin(new Insets(1, 1, 1, 1));
toolbar.add(button);
}
}
return toolbar;
}
代码示例来源:origin: syedlopez/proguard
/**
* Adds an image below the tab buttons, after all tabs have been added.
* The image will only be as visible as permitted by the available space.
*
* @param image the image.
* @return the component containing the image.
*/
public Component addImage(final Image image)
{
GridBagConstraints imageConstraints = new GridBagConstraints();
imageConstraints.gridx = 0;
imageConstraints.weighty = 1.0;
imageConstraints.fill = GridBagConstraints.BOTH;
imageConstraints.anchor = GridBagConstraints.SOUTHWEST;
JButton component = new JButton(new ImageIcon(image));
component.setFocusPainted(false);
component.setFocusable(false);
component.setRequestFocusEnabled(false);
component.setRolloverEnabled(false);
component.setMargin(new Insets(0, 0, 0, 0));
component.setHorizontalAlignment(JButton.LEFT);
component.setVerticalAlignment(JButton.BOTTOM);
component.setPreferredSize(new Dimension(0, 0));
add(component, imageConstraints);
return component;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf
@SuppressWarnings({"MethodMayBeStatic"})
protected JButton createOneTouchButton(int dir) {
JButton b = NapkinUtil.createArrowButton(dir, ARROW_SIZE);
b.setFocusable(false);
b.setMinimumSize(new Dimension(SIZE, SIZE));
b.setCursor(DEFAULT_CURSOR);
b.setFocusPainted(false);
b.setBorderPainted(false);
b.setRequestFocusEnabled(false);
return b;
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
Title(String _title)
{
JLabel t=new JLabel(_title);
t.setFont(BuLib.deriveFont("InternalFrameTitlePane",Font.PLAIN,-2));
t.setForeground(Color.white);
t.setBorder(new EmptyBorder(1,2,0,2));
JButton b=new JButton("-");
b.setFont(BuLib.deriveFont("InternalFrameTitlePane",Font.BOLD,-2));
b.setBorder(new EmptyBorder(0,2,0,2));
b.setRequestFocusEnabled(false);
b.setActionCommand("LINIFY");
// b.addActionListener(BuPopupWindow.this);
this.setBackground(this.getBackground().darker());
this.setOpaque(true);
this.setLayout(new BuBorderLayout());
this.add(t,BuBorderLayout.CENTER);
this.add(b,BuBorderLayout.EAST);
}
}
代码示例来源:origin: org.bitbucket.goalhub.simpleide/jedit
closeBox.setRequestFocusEnabled(false);
closeBox.setToolTipText(jEdit.getProperty("view.docking.close-tooltip"));
if(OperatingSystem.isMacOSLF())
menuBtn.setRequestFocusEnabled(false);
menuBtn.setToolTipText(jEdit.getProperty("view.docking.menu-tooltip"));
if(OperatingSystem.isMacOSLF())
代码示例来源:origin: net.sf.squirrel-sql.plugins/refactoring
pane.add(columnTF, getFieldConstraints(c));
super.executeButton.setRequestFocusEnabled(true);
代码示例来源:origin: net.sf.squirrel-sql.plugins/refactoring
cascadeCB.setPreferredSize(mediumField);
pane.add(cascadeCB, getFieldConstraints(c));
super.executeButton.setRequestFocusEnabled(true);
代码示例来源:origin: net.sf.squirrel-sql.plugins/refactoring
super.executeButton.setRequestFocusEnabled(true);
代码示例来源:origin: net.sf.squirrel-sql.plugins/refactoring
_cascadeCB.setPreferredSize(mediumField);
pane.add(_cascadeCB, getFieldConstraints(c));
super.executeButton.setRequestFocusEnabled(true);
代码示例来源:origin: stackoverflow.com
panel.setSize(this.getSize());
b1 = new JButton("Start");// The JButton name.
b1.setRequestFocusEnabled(false);
b1.addFocusListener(this);
b1.setLocation(10, 12);
b2.setRequestFocusEnabled(false);
b2.addFocusListener(this);
b2.setLocation(70, 12);
代码示例来源:origin: Revivius/nb-darcula
b.setFocusPainted(false);
b.setBorderPainted(false);
b.setRequestFocusEnabled(false);
return b;
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
b[i].setRequestFocusEnabled(false);
b[i].setMargin(BuInsets.INSETS1111);
scp_.add(b[i]);
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
/**
* This public method is implementation specific and should be private. Do
* not call or override.
*/
public void configureArrowButton()
{
if (arrowButton != null)
{
arrowButton.setEnabled(comboBox.isEnabled());
arrowButton.setRequestFocusEnabled(false);
arrowButton.addMouseListener(popup.getMouseListener());
arrowButton.addMouseMotionListener(popup.getMouseMotionListener());
arrowButton.resetKeyboardActions();
}
}
代码示例来源:origin: Revivius/nb-darcula
b.setFocusPainted(false);
b.setBorderPainted(false);
b.setRequestFocusEnabled(false);
return b;
代码示例来源:origin: com.jidesoft/jide-oss
b.setFocusPainted(false);
b.setBorderPainted(false);
b.setRequestFocusEnabled(false);
return b;
代码示例来源:origin: lbalazscs/Pixelitor
private void initDropDownButton() {
dropDownButton = new JButton(downIconEnabled);
dropDownButton.setDisabledIcon(downIconDisabled);
dropDownButton.putClientProperty("JComponent.sizeVariant", "mini");
dropDownButton.setRequestFocusEnabled(false);
dropDownButton.setInheritsPopupMenu(true);
dropDownButton.setBorderPainted(false);
dropDownButton.setFocusPainted(false);
dropDownButton.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
dropDown();
}
@Override
public void mouseEntered(MouseEvent e) {
dropDownButton.setBorderPainted(true);
}
@Override
public void mouseExited(MouseEvent e) {
dropDownButton.setBorderPainted(false);
}
});
dropDownButton.setIconTextGap(0);
dropDownButton.setBorder(null);
dropDownButton.setMargin(new Insets(0, 0, 0, 0));
setDropDownButtonSize();
}
代码示例来源:origin: org.java.net.substance/substance
oneTouchButton.setFocusPainted(false);
oneTouchButton.setBorderPainted(false);
oneTouchButton.setRequestFocusEnabled(false);
内容来源于网络,如有侵权,请联系作者删除!