javax.swing.JMenuItem.setOpaque()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(162)

本文整理了Java中javax.swing.JMenuItem.setOpaque()方法的一些代码示例,展示了JMenuItem.setOpaque()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenuItem.setOpaque()方法的具体详情如下:
包路径:javax.swing.JMenuItem
类名称:JMenuItem
方法名:setOpaque

JMenuItem.setOpaque介绍

暂无

代码示例

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf

/**
 * Description of the Method
 */
protected void uninstallDefaults() {
 super.uninstallDefaults();
 menuItem.setOpaque(true);
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction
@Override
public void setOpaque(boolean aValue) {
  super.setOpaque(aValue);
}

代码示例来源:origin: net.sf.nimrod/nimrod-laf

protected void uninstallDefaults() {
 super.uninstallDefaults();
 
 menuItem.setOpaque( true);
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf

/**
 * Description of the Method
 */
protected void installDefaults() {
 super.installDefaults();
 menuItem.setOpaque(false);
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf

/**
 * Description of the Method
 */
protected void installDefaults() {
 super.installDefaults();
 menuItem.setOpaque(false);
}

代码示例来源:origin: net.sf.nimrod/nimrod-laf

protected void uninstallDefaults() {
 super.uninstallDefaults();
 
 menuItem.setOpaque( true);
}

代码示例来源:origin: stackoverflow.com

JMenuItem a = new JMenuItem("A");
a.setOpaque(true);
a.setBackground(Color.GREEN);

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf

/**
 * Description of the Method
 */
protected void uninstallDefaults() {
 super.uninstallDefaults();
 menuItem.setOpaque(true);
}

代码示例来源:origin: net.sf.nimrod/nimrod-laf

protected void uninstallDefaults() {
 super.uninstallDefaults();
 
 menuItem.setOpaque( true);
}

代码示例来源:origin: stackoverflow.com

JMenuItem item= new JMenuItem("Test");
item.setOpaque(true);
item.setBackground(Color.CYAN);

代码示例来源:origin: net.sf.nimrod/nimrod-laf

protected void installDefaults() {
 super.installDefaults();
 
 menuItem.setBorderPainted( false);
 menuItem.setOpaque( false);
 
 defaultTextIconGap = 3;
}

代码示例来源:origin: net.sf.nimrod/nimrod-laf

protected void installDefaults() {
 super.installDefaults();
 
 menuItem.setBorderPainted( false);
 menuItem.setOpaque( false);
 
 defaultTextIconGap = 3;
}

代码示例来源:origin: net.sf.nimrod/nimrod-laf

protected void installDefaults() {
 super.installDefaults();
 
 menuItem.setBorderPainted( false);
 menuItem.setOpaque( false);
 
 defaultTextIconGap = 3;
}

代码示例来源:origin: stackoverflow.com

mHelp.setOpaque(false);
mHelp.setForeground(Color.DARK_GRAY);
mHelp.setFont(new Font("Verdana", Font.PLAIN,12));
mCredits.setOpaque(false);
mCredits.setForeground(Color.DARK_GRAY);
mCredits.setFont(new Font("Verdana", Font.PLAIN,12));
mExit.setOpaque(false);
mExit.setForeground(Color.DARK_GRAY);
mExit.setFont(new Font("Verdana", Font.PLAIN,12));

代码示例来源:origin: org.biojava.thirdparty/forester

static JMenuItem customizeMenuItemAsLabel( final JMenuItem label, final Configuration configuration ) {
  label.setFont( MainFrame.menu_font.deriveFont( Font.BOLD ) );
  if ( !configuration.isUseNativeUI() ) {
    label.setBackground( configuration.getGuiMenuBackgroundColor() );
    label.setForeground( configuration.getGuiMenuTextColor() );
    label.setOpaque( true );
  }
  label.setSelected( false );
  label.setEnabled( false );
  return label;
}

代码示例来源:origin: net.sf.nimrod/nimrod-laf

public void update( Graphics g, JComponent c) {
 JMenu menu = (JMenu)c;
 if ( menu.isTopLevelMenu() ) {
  menu.setOpaque( false);
  
  ButtonModel model = menu.getModel();
  if ( model.isArmed() || model.isSelected() ) {
   g.setColor( NimRODLookAndFeel.getFocusColor());
   g.fillRoundRect( 1,1, c.getWidth()-2, c.getHeight()-3, 2,2);
  }
 }
 else {
  menuItem.setBorderPainted( false);
  menuItem.setOpaque( false);
 }
 
 super.update( g, c);
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf

menuItem.setOpaque(true);
if (menuItem.getMargin() == null
  || (menuItem.getMargin() instanceof UIResource))

代码示例来源:origin: com.jidesoft/jide-oss

menuItem.setOpaque(true);
if (menuItem.getMargin() == null ||
    (menuItem.getMargin() instanceof UIResource)) {

代码示例来源:origin: com.jidesoft/jide-oss

menuItem.setOpaque(true);
if (menuItem.getMargin() == null ||
    (menuItem.getMargin() instanceof UIResource)) {

代码示例来源:origin: com.jidesoft/jide-oss

menuItem.setOpaque(true);
if (menuItem.getMargin() == null ||
    (menuItem.getMargin() instanceof UIResource)) {

相关文章

JMenuItem类方法