本文整理了Java中javax.swing.JMenuItem.isOpaque()
方法的一些代码示例,展示了JMenuItem.isOpaque()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenuItem.isOpaque()
方法的具体详情如下:
包路径:javax.swing.JMenuItem
类名称:JMenuItem
方法名:isOpaque
暂无
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction(jsDoc = OPAQUE_TEXT_JSDOC)
@Override
public boolean getOpaque() {
return super.isOpaque();
}
代码示例来源:origin: com.jtattoo/JTattoo
protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor) {
if (menuItem.isOpaque()) {
int w = menuItem.getWidth();
int h = menuItem.getHeight();
paintBackground(g, menuItem, 0, 0, w, h);
}
}
代码示例来源:origin: com.jtattoo/JTattoo
protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor) {
if (menuItem.isOpaque()) {
int w = menuItem.getWidth();
int h = menuItem.getHeight();
paintBackground(g, menuItem, 0, 0, w, h);
}
}
代码示例来源:origin: com.jidesoft/jide-oss
/**
* Draws the background of the menu item.
*
* @param g the paint graphics
* @param menuItem menu item to be painted
* @param bgColor selection background color
* @since 1.4
*/
protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor) {
ButtonModel model = menuItem.getModel();
Color oldColor = g.getColor();
int menuWidth = menuItem.getWidth();
int menuHeight = menuItem.getHeight();
if (menuItem.isOpaque()) {
if (model.isArmed() || (menuItem instanceof JMenu && model.isSelected())) {
g.setColor(bgColor);
g.fillRect(0, 0, menuWidth, menuHeight);
}
else {
g.setColor(menuItem.getBackground());
g.fillRect(0, 0, menuWidth, menuHeight);
}
g.setColor(oldColor);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
/** Draws the background of the menu item
*
* @param g The paint graphics
* @param menuItem Menu item to be painted
* @param bgColor Selection background color
*/
protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor)
{
ButtonModel model= menuItem.getModel();
Color oldColor= g.getColor();
int menuWidth= menuItem.getWidth();
int menuHeight= menuItem.getHeight();
if (menuItem.isOpaque())
{
g.setColor(menuItem.getBackground());
g.fillRect(0, 0, menuWidth, menuHeight);
if (model.isArmed()
|| (menuItem instanceof JMenu && model.isSelected()))
{
g.setColor(bgColor);
g.fillRect(1, 1, menuWidth-2, menuHeight-2);
}
g.setColor(oldColor);
}
}
代码示例来源:origin: net.sf.nimrod/nimrod-laf
int menuHeight = menuItem.getHeight();
if ( menuItem.isOpaque() ) {
g.setColor( menuItem.getBackground());
g.fillRect( 0,0, menuWidth, menuHeight);
代码示例来源:origin: com.jidesoft/jide-oss
if (menuItem.isOpaque()) {
if (menuItem.getBackground() instanceof UIResource) {
g.setColor(backgroundColor);
代码示例来源:origin: com.jidesoft/jide-oss
if (menuItem.isOpaque()) {
if (menuItem.getModel().isArmed() || (menuItem instanceof JMenu && menuItem.getModel().isSelected())) {
g.setColor(bgColor);
代码示例来源:origin: com.jidesoft/jide-oss
if (menuItem.isOpaque()) {
if (menuItem.getParent() != null) {
g.setColor(menuItem.getParent().getBackground());
代码示例来源:origin: com.jidesoft/jide-oss
if (menuItem.isOpaque()) {
if (menuItem.getComponentOrientation().isLeftToRight()) {
if (menuItem.getBackground() instanceof UIResource) {
代码示例来源:origin: com.jidesoft/jide-oss
Border mouseSelectedBorder = UIDefaultsLookup.getBorder("Menu.mouseSelectedBorder");
if (menuItem.isOpaque()) {
if (menuItem.getParent() != null) {
g.setColor(menuItem.getParent().getBackground());
代码示例来源:origin: com.jidesoft/jide-oss
paintBackground = menuItem.isOpaque();
代码示例来源:origin: com.jidesoft/jide-oss
paintBackground = menuItem.isOpaque();
代码示例来源:origin: com.jidesoft/jide-oss
paintBackground = menuItem.isOpaque();
内容来源于网络,如有侵权,请联系作者删除!