Java 8 BasicMenuItemUI - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 BasicMenuItemUI class.

This code example shows how to use the following methods:installUI
  @Override 
  public void installUI(final JComponent c) {
    super.installUI(c);
 
    myHiddenItem = new JCheckBoxMenuItem();
    myOriginalUI.installUI(myHiddenItem);
    menuItem.setBorder(myHiddenItem.getBorder());
    final Icon icon = getCheckIconFromContext(myOriginalUI, myHiddenItem);
    checkIcon = isCheckBoxItem() ? icon : EmptyIcon.create(icon);
  } 
 
  @Override 
  public void uninstallUI(final JComponent c) {
    super.uninstallUI(c);
 
    myOriginalUI.uninstallUI(myHiddenItem);
    myHiddenItem = null;
    resetCachedCheckIcon(); 
  } 
 

4
CodeRank
This code example shows how to use the following methods:installUI
  @Override 
  public void installUI(final JComponent c) {
    super.installUI(c);
 
    final JMenu temp = new JMenu();
    myOriginalUI.installUI(temp);
    menuItem.setBorder(temp.getBorder());
  } 
 
  @Override 
  public void update(final Graphics g, final JComponent c) {
    if (arrowIcon != null && !(arrowIcon instanceof IconWrapper)) {
      arrowIcon = new IconWrapper(arrowIcon, myOriginalUI);
    } 
    super.update(g, c);
  } 
 
  @Override 
  protected void paintText(final Graphics g, final JMenuItem menuItem, final Rectangle textRect, final String text) {
    if (!menuItem.isEnabled() && UIUtil.isMurrineBasedTheme()) {
4
CodeRank
See Code Examples for Java 8 BasicMenuItemUI Methods: