当前位置: 首页>>代码示例>>Java>>正文


Java AbstractButton.setBorderPainted方法代码示例

本文整理汇总了Java中javax.swing.AbstractButton.setBorderPainted方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractButton.setBorderPainted方法的具体用法?Java AbstractButton.setBorderPainted怎么用?Java AbstractButton.setBorderPainted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.AbstractButton的用法示例。


在下文中一共展示了AbstractButton.setBorderPainted方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: removeButtonContentAreaAndBorder

import javax.swing.AbstractButton; //导入方法依赖的package包/类
private static void removeButtonContentAreaAndBorder(AbstractButton button) {
    boolean canRemove = true;
    if (button instanceof JToggleButton) {
        canRemove = !button.isSelected();
    }
    if (canRemove) {
        button.setContentAreaFilled(false);
        button.setBorderPainted(false);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:SearchButton.java

示例2: installUI

import javax.swing.AbstractButton; //导入方法依赖的package包/类
@Override
public void installUI(JComponent c) {
	super.installUI(c);
	c.setBorder(null);
	if (c instanceof AbstractButton) {
		AbstractButton btn = (AbstractButton) c;
		//btn.setMargin(new Insets(10,10,10,10));
		btn.setBorder(new EmptyBorder(5, 10, 5, 10));
		// btn.setIcon(new XDMBlankIcon(15, 10));
		btn.setBorderPainted(false);
		// btn.setMargin(new Insets(10, 10, 10, 10));
		// btn.setFont(new Font(Font.DIALOG, Font.PLAIN, 12));
	}
	// this.lightColor = Color.WHITE;
	// this.darkColor = new Color(230, 230, 230);
	// this.lightColor2 = new Color(245, 245, 245);
	// chkIcon = UIManager.getIcon("CheckBoxMenuItem.checkIcon");
}
 
开发者ID:kmarius,项目名称:xdman,代码行数:19,代码来源:XDMMenuItemUI.java

示例3: mouseEntered

import javax.swing.AbstractButton; //导入方法依赖的package包/类
@Override
public void mouseEntered(MouseEvent evt) {
    Object src = evt.getSource();

    if (src instanceof AbstractButton) {
        AbstractButton button = (AbstractButton) evt.getSource();
        if (button.isEnabled()) {
            button.setContentAreaFilled(true);
            button.setBorderPainted(true);
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:SearchButton.java

示例4: mouseEntered

import javax.swing.AbstractButton; //导入方法依赖的package包/类
public @Override void mouseEntered(MouseEvent evt) {
    Object src = evt.getSource();
    
    if (src instanceof AbstractButton) {
        AbstractButton button = (AbstractButton)evt.getSource();
        if (button.isEnabled()) {
            button.setContentAreaFilled(true);
            button.setBorderPainted(true);
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:NbEditorToolBar.java

示例5: mouseExited

import javax.swing.AbstractButton; //导入方法依赖的package包/类
@Override
public void mouseExited(MouseEvent evt) {
    Object src = evt.getSource();
    if (src instanceof AbstractButton) {
        AbstractButton button = (AbstractButton) evt.getSource();
        button.setContentAreaFilled(false);
        button.setBorderPainted(false);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:DataViewUI.java

示例6: processButton

import javax.swing.AbstractButton; //导入方法依赖的package包/类
private void processButton(AbstractButton button) {
    button.setContentAreaFilled(false);
    button.setBorderPainted(false);
    button.setMargin(BUTTON_INSETS);
    if (button instanceof AbstractButton) {
        button.addMouseListener(sharedMouseListener);
    }
    //Focus shouldn't stay in toolbar
    button.setFocusable(false);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:DataViewUI.java

示例7: mouseEntered

import javax.swing.AbstractButton; //导入方法依赖的package包/类
@Override
public void mouseEntered(final MouseEvent e) {
	final Component c = e.getComponent();
	if (c instanceof AbstractButton) {
		final AbstractButton ab = (AbstractButton) c;
		ab.setBorderPainted(true);
	}
}
 
开发者ID:roscisz,项目名称:KernelHive,代码行数:9,代码来源:JTabPanel.java

示例8: mouseExited

import javax.swing.AbstractButton; //导入方法依赖的package包/类
@Override
public void mouseExited(final MouseEvent e) {
	final Component c = e.getComponent();
	if (c instanceof AbstractButton) {
		final AbstractButton ab = (AbstractButton) c;
		ab.setBorderPainted(false);
	}
}
 
开发者ID:roscisz,项目名称:KernelHive,代码行数:9,代码来源:JTabPanel.java

示例9: setLAF

import javax.swing.AbstractButton; //导入方法依赖的package包/类
/** Gives a button the Groove look-and-feel. */
static public void setLAF(final AbstractButton button) {
    button.setHideActionText(true);
    button.setFocusable(false);
    button.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEtchedBorder(),
        BorderFactory.createEmptyBorder(3, 2, 3, 2)));
    button.setBorderPainted(button.isEnabled());
    button.addChangeListener(new ChangeListener() {
        @Override
        public void stateChanged(ChangeEvent e) {
            button.setBorderPainted(button.isEnabled());
        }
    });
}
 
开发者ID:meteoorkip,项目名称:JavaGraph,代码行数:15,代码来源:Options.java

示例10: mouseEntered

import javax.swing.AbstractButton; //导入方法依赖的package包/类
public void mouseEntered(MouseEvent e) {
    Component component = e.getComponent();
    if (component instanceof AbstractButton) {
        AbstractButton button = (AbstractButton) component;
        button.setBorderPainted(true);
    }
}
 
开发者ID:Vitaliy-Yakovchuk,项目名称:ramus,代码行数:8,代码来源:ButtonTabComponent.java

示例11: mouseExited

import javax.swing.AbstractButton; //导入方法依赖的package包/类
public void mouseExited(MouseEvent e) {
    Component component = e.getComponent();
    if (component instanceof AbstractButton) {
        AbstractButton button = (AbstractButton) component;
        button.setBorderPainted(false);
    }
}
 
开发者ID:Vitaliy-Yakovchuk,项目名称:ramus,代码行数:8,代码来源:ButtonTabComponent.java

示例12: mouseEntered

import javax.swing.AbstractButton; //导入方法依赖的package包/类
@Override
public void mouseEntered(MouseEvent e) {
    Component component = e.getComponent();
    if (component instanceof AbstractButton) {
        AbstractButton button = (AbstractButton) component;
        button.setBorderPainted(true);
    }
}
 
开发者ID:Vitaliy-Yakovchuk,项目名称:ramus,代码行数:9,代码来源:Tab.java

示例13: mouseExited

import javax.swing.AbstractButton; //导入方法依赖的package包/类
@Override
public void mouseExited(MouseEvent e) {
    Component component = e.getComponent();
    if (component instanceof AbstractButton) {
        AbstractButton button = (AbstractButton) component;
        button.setBorderPainted(false);
    }
}
 
开发者ID:Vitaliy-Yakovchuk,项目名称:ramus,代码行数:9,代码来源:Tab.java


注:本文中的javax.swing.AbstractButton.setBorderPainted方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。