javax.swing.plaf.basic
Class BasicMenuItemUI

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI 
      extended by javax.swing.plaf.ButtonUI sample code for javax.swing.plaf.ButtonUI definition code for javax.swing.plaf.ButtonUI 
          extended by javax.swing.plaf.MenuItemUI sample code for javax.swing.plaf.MenuItemUI definition code for javax.swing.plaf.MenuItemUI 
              extended by javax.swing.plaf.basic.BasicMenuItemUI
Direct Known Subclasses:
BasicCheckBoxMenuItemUI sample code for javax.swing.plaf.basic.BasicCheckBoxMenuItemUI definition code for javax.swing.plaf.basic.BasicCheckBoxMenuItemUI , BasicMenuUI sample code for javax.swing.plaf.basic.BasicMenuUI definition code for javax.swing.plaf.basic.BasicMenuUI , BasicRadioButtonMenuItemUI sample code for javax.swing.plaf.basic.BasicRadioButtonMenuItemUI definition code for javax.swing.plaf.basic.BasicRadioButtonMenuItemUI

public class BasicMenuItemUI
extends MenuItemUI sample code for javax.swing.plaf.MenuItemUI definition code for javax.swing.plaf.MenuItemUI

BasicMenuItem implementation


Nested Class Summary
protected  class BasicMenuItemUI.MouseInputHandler sample code for javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler definition code for javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler
           
 
Field Summary
protected  Font sample code for java.awt.Font definition code for java.awt.Font acceleratorFont sample code for javax.swing.plaf.basic.BasicMenuItemUI.acceleratorFont definition code for javax.swing.plaf.basic.BasicMenuItemUI.acceleratorFont
           
protected  Color sample code for java.awt.Color definition code for java.awt.Color acceleratorForeground sample code for javax.swing.plaf.basic.BasicMenuItemUI.acceleratorForeground definition code for javax.swing.plaf.basic.BasicMenuItemUI.acceleratorForeground
           
protected  Color sample code for java.awt.Color definition code for java.awt.Color acceleratorSelectionForeground sample code for javax.swing.plaf.basic.BasicMenuItemUI.acceleratorSelectionForeground definition code for javax.swing.plaf.basic.BasicMenuItemUI.acceleratorSelectionForeground
           
protected  Icon sample code for javax.swing.Icon definition code for javax.swing.Icon arrowIcon sample code for javax.swing.plaf.basic.BasicMenuItemUI.arrowIcon definition code for javax.swing.plaf.basic.BasicMenuItemUI.arrowIcon
           
protected  Icon sample code for javax.swing.Icon definition code for javax.swing.Icon checkIcon sample code for javax.swing.plaf.basic.BasicMenuItemUI.checkIcon definition code for javax.swing.plaf.basic.BasicMenuItemUI.checkIcon
           
protected  int defaultTextIconGap sample code for javax.swing.plaf.basic.BasicMenuItemUI.defaultTextIconGap definition code for javax.swing.plaf.basic.BasicMenuItemUI.defaultTextIconGap
           
protected  Color sample code for java.awt.Color definition code for java.awt.Color disabledForeground sample code for javax.swing.plaf.basic.BasicMenuItemUI.disabledForeground definition code for javax.swing.plaf.basic.BasicMenuItemUI.disabledForeground
           
protected  MenuDragMouseListener sample code for javax.swing.event.MenuDragMouseListener definition code for javax.swing.event.MenuDragMouseListener menuDragMouseListener sample code for javax.swing.plaf.basic.BasicMenuItemUI.menuDragMouseListener definition code for javax.swing.plaf.basic.BasicMenuItemUI.menuDragMouseListener
           
protected  JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem menuItem sample code for javax.swing.plaf.basic.BasicMenuItemUI.menuItem definition code for javax.swing.plaf.basic.BasicMenuItemUI.menuItem
           
protected  MenuKeyListener sample code for javax.swing.event.MenuKeyListener definition code for javax.swing.event.MenuKeyListener menuKeyListener sample code for javax.swing.plaf.basic.BasicMenuItemUI.menuKeyListener definition code for javax.swing.plaf.basic.BasicMenuItemUI.menuKeyListener
           
protected  MouseInputListener sample code for javax.swing.event.MouseInputListener definition code for javax.swing.event.MouseInputListener mouseInputListener sample code for javax.swing.plaf.basic.BasicMenuItemUI.mouseInputListener definition code for javax.swing.plaf.basic.BasicMenuItemUI.mouseInputListener
           
protected  boolean oldBorderPainted sample code for javax.swing.plaf.basic.BasicMenuItemUI.oldBorderPainted definition code for javax.swing.plaf.basic.BasicMenuItemUI.oldBorderPainted
           
protected  Color sample code for java.awt.Color definition code for java.awt.Color selectionBackground sample code for javax.swing.plaf.basic.BasicMenuItemUI.selectionBackground definition code for javax.swing.plaf.basic.BasicMenuItemUI.selectionBackground
           
protected  Color sample code for java.awt.Color definition code for java.awt.Color selectionForeground sample code for javax.swing.plaf.basic.BasicMenuItemUI.selectionForeground definition code for javax.swing.plaf.basic.BasicMenuItemUI.selectionForeground
           
 
Constructor Summary
BasicMenuItemUI sample code for javax.swing.plaf.basic.BasicMenuItemUI.BasicMenuItemUI() definition code for javax.swing.plaf.basic.BasicMenuItemUI.BasicMenuItemUI() ()
           
 
Method Summary
protected  MenuDragMouseListener sample code for javax.swing.event.MenuDragMouseListener definition code for javax.swing.event.MenuDragMouseListener createMenuDragMouseListener sample code for javax.swing.plaf.basic.BasicMenuItemUI.createMenuDragMouseListener(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.createMenuDragMouseListener(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
           
protected  MenuKeyListener sample code for javax.swing.event.MenuKeyListener definition code for javax.swing.event.MenuKeyListener createMenuKeyListener sample code for javax.swing.plaf.basic.BasicMenuItemUI.createMenuKeyListener(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.createMenuKeyListener(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
           
protected  MouseInputListener sample code for javax.swing.event.MouseInputListener definition code for javax.swing.event.MouseInputListener createMouseInputListener sample code for javax.swing.plaf.basic.BasicMenuItemUI.createMouseInputListener(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.createMouseInputListener(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
           
static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI createUI sample code for javax.swing.plaf.basic.BasicMenuItemUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.createUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
           
protected  void doClick sample code for javax.swing.plaf.basic.BasicMenuItemUI.doClick(javax.swing.MenuSelectionManager) definition code for javax.swing.plaf.basic.BasicMenuItemUI.doClick(javax.swing.MenuSelectionManager) (MenuSelectionManager sample code for javax.swing.MenuSelectionManager definition code for javax.swing.MenuSelectionManager  msm)
          Call this method when a menu item is to be activated.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMaximumSize sample code for javax.swing.plaf.basic.BasicMenuItemUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.getMaximumSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Returns the specified component's maximum size appropriate for the look and feel.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMinimumSize sample code for javax.swing.plaf.basic.BasicMenuItemUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.getMinimumSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Returns the specified component's minimum size appropriate for the look and feel.
 MenuElement sample code for javax.swing.MenuElement definition code for javax.swing.MenuElement [] getPath sample code for javax.swing.plaf.basic.BasicMenuItemUI.getPath() definition code for javax.swing.plaf.basic.BasicMenuItemUI.getPath() ()
           
protected  Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getPreferredMenuItemSize sample code for javax.swing.plaf.basic.BasicMenuItemUI.getPreferredMenuItemSize(javax.swing.JComponent, javax.swing.Icon, javax.swing.Icon, int) definition code for javax.swing.plaf.basic.BasicMenuItemUI.getPreferredMenuItemSize(javax.swing.JComponent, javax.swing.Icon, javax.swing.Icon, int) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c, Icon sample code for javax.swing.Icon definition code for javax.swing.Icon  checkIcon, Icon sample code for javax.swing.Icon definition code for javax.swing.Icon  arrowIcon, int defaultTextIconGap)
           
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getPreferredSize sample code for javax.swing.plaf.basic.BasicMenuItemUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.getPreferredSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Returns the specified component's preferred size appropriate for the look and feel.
protected  String sample code for java.lang.String definition code for java.lang.String getPropertyPrefix sample code for javax.swing.plaf.basic.BasicMenuItemUI.getPropertyPrefix() definition code for javax.swing.plaf.basic.BasicMenuItemUI.getPropertyPrefix() ()
           
protected  void installComponents sample code for javax.swing.plaf.basic.BasicMenuItemUI.installComponents(javax.swing.JMenuItem) definition code for javax.swing.plaf.basic.BasicMenuItemUI.installComponents(javax.swing.JMenuItem) (JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  menuItem)
           
protected  void installDefaults sample code for javax.swing.plaf.basic.BasicMenuItemUI.installDefaults() definition code for javax.swing.plaf.basic.BasicMenuItemUI.installDefaults() ()
           
protected  void installKeyboardActions sample code for javax.swing.plaf.basic.BasicMenuItemUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicMenuItemUI.installKeyboardActions() ()
           
protected  void installListeners sample code for javax.swing.plaf.basic.BasicMenuItemUI.installListeners() definition code for javax.swing.plaf.basic.BasicMenuItemUI.installListeners() ()
           
 void installUI sample code for javax.swing.plaf.basic.BasicMenuItemUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.installUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Configures the specified component appropriate for the look and feel.
 void paint sample code for javax.swing.plaf.basic.BasicMenuItemUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.paint(java.awt.Graphics, javax.swing.JComponent) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Paints the specified component appropriate for the look and feel.
protected  void paintBackground sample code for javax.swing.plaf.basic.BasicMenuItemUI.paintBackground(java.awt.Graphics, javax.swing.JMenuItem, java.awt.Color) definition code for javax.swing.plaf.basic.BasicMenuItemUI.paintBackground(java.awt.Graphics, javax.swing.JMenuItem, java.awt.Color) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  menuItem, Color sample code for java.awt.Color definition code for java.awt.Color  bgColor)
          Draws the background of the menu item.
protected  void paintMenuItem sample code for javax.swing.plaf.basic.BasicMenuItemUI.paintMenuItem(java.awt.Graphics, javax.swing.JComponent, javax.swing.Icon, javax.swing.Icon, java.awt.Color, java.awt.Color, int) definition code for javax.swing.plaf.basic.BasicMenuItemUI.paintMenuItem(java.awt.Graphics, javax.swing.JComponent, javax.swing.Icon, javax.swing.Icon, java.awt.Color, java.awt.Color, int) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c, Icon sample code for javax.swing.Icon definition code for javax.swing.Icon  checkIcon, Icon sample code for javax.swing.Icon definition code for javax.swing.Icon  arrowIcon, Color sample code for java.awt.Color definition code for java.awt.Color  background, Color sample code for java.awt.Color definition code for java.awt.Color  foreground, int defaultTextIconGap)
           
protected  void paintText sample code for javax.swing.plaf.basic.BasicMenuItemUI.paintText(java.awt.Graphics, javax.swing.JMenuItem, java.awt.Rectangle, java.lang.String) definition code for javax.swing.plaf.basic.BasicMenuItemUI.paintText(java.awt.Graphics, javax.swing.JMenuItem, java.awt.Rectangle, java.lang.String) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  menuItem, Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  textRect, String sample code for java.lang.String definition code for java.lang.String  text)
          Renders the text of the current menu item.
protected  void uninstallComponents sample code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallComponents(javax.swing.JMenuItem) definition code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallComponents(javax.swing.JMenuItem) (JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  menuItem)
           
protected  void uninstallDefaults sample code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallDefaults() ()
           
protected  void uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallKeyboardActions() definition code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallKeyboardActions() ()
           
protected  void uninstallListeners sample code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallListeners() ()
           
 void uninstallUI sample code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Reverses configuration which was done on the specified component during installUI.
 void update sample code for javax.swing.plaf.basic.BasicMenuItemUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.update(java.awt.Graphics, javax.swing.JComponent) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          We draw the background in paintMenuItem() so override update (which fills the background of opaque components by default) to just call paint().
 
Methods inherited from class javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
contains sample code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) definition code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) , getAccessibleChild sample code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) definition code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) , getAccessibleChildrenCount sample code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

menuItem sample code for javax.swing.plaf.basic.BasicMenuItemUI.menuItem

protected JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  menuItem

selectionBackground sample code for javax.swing.plaf.basic.BasicMenuItemUI.selectionBackground

protected Color sample code for java.awt.Color definition code for java.awt.Color  selectionBackground

selectionForeground sample code for javax.swing.plaf.basic.BasicMenuItemUI.selectionForeground

protected Color sample code for java.awt.Color definition code for java.awt.Color  selectionForeground

disabledForeground sample code for javax.swing.plaf.basic.BasicMenuItemUI.disabledForeground

protected Color sample code for java.awt.Color definition code for java.awt.Color  disabledForeground

acceleratorForeground sample code for javax.swing.plaf.basic.BasicMenuItemUI.acceleratorForeground

protected Color sample code for java.awt.Color definition code for java.awt.Color  acceleratorForeground

acceleratorSelectionForeground sample code for javax.swing.plaf.basic.BasicMenuItemUI.acceleratorSelectionForeground

protected Color sample code for java.awt.Color definition code for java.awt.Color  acceleratorSelectionForeground

defaultTextIconGap sample code for javax.swing.plaf.basic.BasicMenuItemUI.defaultTextIconGap

protected int defaultTextIconGap

acceleratorFont sample code for javax.swing.plaf.basic.BasicMenuItemUI.acceleratorFont

protected Font sample code for java.awt.Font definition code for java.awt.Font  acceleratorFont

mouseInputListener sample code for javax.swing.plaf.basic.BasicMenuItemUI.mouseInputListener

protected MouseInputListener sample code for javax.swing.event.MouseInputListener definition code for javax.swing.event.MouseInputListener  mouseInputListener

menuDragMouseListener sample code for javax.swing.plaf.basic.BasicMenuItemUI.menuDragMouseListener

protected MenuDragMouseListener sample code for javax.swing.event.MenuDragMouseListener definition code for javax.swing.event.MenuDragMouseListener  menuDragMouseListener

menuKeyListener sample code for javax.swing.plaf.basic.BasicMenuItemUI.menuKeyListener

protected MenuKeyListener sample code for javax.swing.event.MenuKeyListener definition code for javax.swing.event.MenuKeyListener  menuKeyListener

arrowIcon sample code for javax.swing.plaf.basic.BasicMenuItemUI.arrowIcon

protected Icon sample code for javax.swing.Icon definition code for javax.swing.Icon  arrowIcon

checkIcon sample code for javax.swing.plaf.basic.BasicMenuItemUI.checkIcon

protected Icon sample code for javax.swing.Icon definition code for javax.swing.Icon  checkIcon

oldBorderPainted sample code for javax.swing.plaf.basic.BasicMenuItemUI.oldBorderPainted

protected boolean oldBorderPainted
Constructor Detail

BasicMenuItemUI sample code for javax.swing.plaf.basic.BasicMenuItemUI() definition code for javax.swing.plaf.basic.BasicMenuItemUI()

public BasicMenuItemUI()
Method Detail

createUI sample code for javax.swing.plaf.basic.BasicMenuItemUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.createUI(javax.swing.JComponent)

public static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI  createUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)

installUI sample code for javax.swing.plaf.basic.BasicMenuItemUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.installUI(javax.swing.JComponent)

public void installUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent)
Configures the specified component appropriate for the look and feel. This method is invoked when the ComponentUI instance is being installed as the UI delegate on the specified component. This method should completely configure the component for the look and feel, including the following:
  1. Install any default property values for color, fonts, borders, icons, opacity, etc. on the component. Whenever possible, property values initialized by the client program should not be overridden.
  2. Install a LayoutManager on the component if necessary.
  3. Create/add any required sub-components to the component.
  4. Create/install event listeners on the component.
  5. Create/install a PropertyChangeListener on the component in order to detect and respond to component property changes appropriately.
  6. Install keyboard UI (mnemonics, traversal, etc.) on the component.
  7. Initialize any appropriate instance data.

Overrides:
installUI sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component where this UI delegate is being installed
See Also:
ComponentUI.uninstallUI(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) , JComponent.setUI(javax.swing.plaf.ComponentUI) sample code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) definition code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) , JComponent.updateUI() sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI()

installDefaults sample code for javax.swing.plaf.basic.BasicMenuItemUI.installDefaults() definition code for javax.swing.plaf.basic.BasicMenuItemUI.installDefaults()

protected void installDefaults()

installComponents sample code for javax.swing.plaf.basic.BasicMenuItemUI.installComponents(javax.swing.JMenuItem) definition code for javax.swing.plaf.basic.BasicMenuItemUI.installComponents(javax.swing.JMenuItem)

protected void installComponents(JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  menuItem)
Since:
1.3

getPropertyPrefix sample code for javax.swing.plaf.basic.BasicMenuItemUI.getPropertyPrefix() definition code for javax.swing.plaf.basic.BasicMenuItemUI.getPropertyPrefix()

protected String sample code for java.lang.String definition code for java.lang.String  getPropertyPrefix()

installListeners sample code for javax.swing.plaf.basic.BasicMenuItemUI.installListeners() definition code for javax.swing.plaf.basic.BasicMenuItemUI.installListeners()

protected void installListeners()

installKeyboardActions sample code for javax.swing.plaf.basic.BasicMenuItemUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicMenuItemUI.installKeyboardActions()

protected void installKeyboardActions()

uninstallUI sample code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallUI(javax.swing.JComponent)

public void uninstallUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent)
Reverses configuration which was done on the specified component during installUI. This method is invoked when this UIComponent instance is being removed as the UI delegate for the specified component. This method should undo the configuration performed in installUI, being careful to leave the JComponent instance in a clean state (no extraneous listeners, look-and-feel-specific property objects, etc.). This should include the following:
  1. Remove any UI-set borders from the component.
  2. Remove any UI-set layout managers on the component.
  3. Remove any UI-added sub-components from the component.
  4. Remove any UI-added event/property listeners from the component.
  5. Remove any UI-installed keyboard UI from the component.
  6. Nullify any allocated instance data objects to allow for GC.

Overrides:
uninstallUI sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component from which this UI delegate is being removed; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
ComponentUI.installUI(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) , JComponent.updateUI() sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI()

uninstallDefaults sample code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallDefaults()

protected void uninstallDefaults()

uninstallComponents sample code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallComponents(javax.swing.JMenuItem) definition code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallComponents(javax.swing.JMenuItem)

protected void uninstallComponents(JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  menuItem)
Since:
1.3

uninstallListeners sample code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallListeners()

protected void uninstallListeners()

uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallKeyboardActions() definition code for javax.swing.plaf.basic.BasicMenuItemUI.uninstallKeyboardActions()

protected void uninstallKeyboardActions()

createMouseInputListener sample code for javax.swing.plaf.basic.BasicMenuItemUI.createMouseInputListener(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.createMouseInputListener(javax.swing.JComponent)

protected MouseInputListener sample code for javax.swing.event.MouseInputListener definition code for javax.swing.event.MouseInputListener  createMouseInputListener(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)

createMenuDragMouseListener sample code for javax.swing.plaf.basic.BasicMenuItemUI.createMenuDragMouseListener(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.createMenuDragMouseListener(javax.swing.JComponent)

protected MenuDragMouseListener sample code for javax.swing.event.MenuDragMouseListener definition code for javax.swing.event.MenuDragMouseListener  createMenuDragMouseListener(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)

createMenuKeyListener sample code for javax.swing.plaf.basic.BasicMenuItemUI.createMenuKeyListener(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.createMenuKeyListener(javax.swing.JComponent)

protected MenuKeyListener sample code for javax.swing.event.MenuKeyListener definition code for javax.swing.event.MenuKeyListener  createMenuKeyListener(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)

getMinimumSize sample code for javax.swing.plaf.basic.BasicMenuItemUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.getMinimumSize(javax.swing.JComponent)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMinimumSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent)
Returns the specified component's minimum size appropriate for the look and feel. If null is returned, the minimum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes getPreferredSize and returns that value.

Overrides:
getMinimumSize sample code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component whose minimum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
Returns:
a Dimension object or null
See Also:
JComponent.getMinimumSize() sample code for javax.swing.JComponent.getMinimumSize() definition code for javax.swing.JComponent.getMinimumSize() , LayoutManager.minimumLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) , ComponentUI.getPreferredSize(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent)

getPreferredSize sample code for javax.swing.plaf.basic.BasicMenuItemUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.getPreferredSize(javax.swing.JComponent)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getPreferredSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent)
Returns the specified component's preferred size appropriate for the look and feel. If null is returned, the preferred size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method returns null.

Overrides:
getPreferredSize sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component whose preferred size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
JComponent.getPreferredSize() sample code for javax.swing.JComponent.getPreferredSize() definition code for javax.swing.JComponent.getPreferredSize() , LayoutManager.preferredLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container)

getMaximumSize sample code for javax.swing.plaf.basic.BasicMenuItemUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.getMaximumSize(javax.swing.JComponent)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMaximumSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent)
Returns the specified component's maximum size appropriate for the look and feel. If null is returned, the maximum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes getPreferredSize and returns that value.

Overrides:
getMaximumSize sample code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component whose maximum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
Returns:
a Dimension object or null
See Also:
JComponent.getMaximumSize() sample code for javax.swing.JComponent.getMaximumSize() definition code for javax.swing.JComponent.getMaximumSize() , LayoutManager2.maximumLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager2.maximumLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager2.maximumLayoutSize(java.awt.Container)

getPreferredMenuItemSize sample code for javax.swing.plaf.basic.BasicMenuItemUI.getPreferredMenuItemSize(javax.swing.JComponent, javax.swing.Icon, javax.swing.Icon, int) definition code for javax.swing.plaf.basic.BasicMenuItemUI.getPreferredMenuItemSize(javax.swing.JComponent, javax.swing.Icon, javax.swing.Icon, int)

protected Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getPreferredMenuItemSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c,
                                             Icon sample code for javax.swing.Icon definition code for javax.swing.Icon  checkIcon,
                                             Icon sample code for javax.swing.Icon definition code for javax.swing.Icon  arrowIcon,
                                             int defaultTextIconGap)

update sample code for javax.swing.plaf.basic.BasicMenuItemUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.update(java.awt.Graphics, javax.swing.JComponent)

public void update(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                   JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
We draw the background in paintMenuItem() so override update (which fills the background of opaque components by default) to just call paint().

Overrides:
update sample code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
g - the Graphics context in which to paint
c - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) , JComponent.paintComponent(java.awt.Graphics) sample code for javax.swing.JComponent.paintComponent(java.awt.Graphics) definition code for javax.swing.JComponent.paintComponent(java.awt.Graphics)

paint sample code for javax.swing.plaf.basic.BasicMenuItemUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicMenuItemUI.paint(java.awt.Graphics, javax.swing.JComponent)

public void paint(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                  JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)
Paints the specified component appropriate for the look and feel. This method is invoked from the ComponentUI.update method when the specified component is being painted. Subclasses should override this method and use the specified Graphics object to render the content of the component.

Overrides:
paint sample code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
g - the Graphics context in which to paint
c - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)

paintMenuItem sample code for javax.swing.plaf.basic.BasicMenuItemUI.paintMenuItem(java.awt.Graphics, javax.swing.JComponent, javax.swing.Icon, javax.swing.Icon, java.awt.Color, java.awt.Color, int) definition code for javax.swing.plaf.basic.BasicMenuItemUI.paintMenuItem(java.awt.Graphics, javax.swing.JComponent, javax.swing.Icon, javax.swing.Icon, java.awt.Color, java.awt.Color, int)

protected void paintMenuItem(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                             JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c,
                             Icon sample code for javax.swing.Icon definition code for javax.swing.Icon  checkIcon,
                             Icon sample code for javax.swing.Icon definition code for javax.swing.Icon  arrowIcon,
                             Color sample code for java.awt.Color definition code for java.awt.Color  background,
                             Color sample code for java.awt.Color definition code for java.awt.Color  foreground,
                             int defaultTextIconGap)

paintBackground sample code for javax.swing.plaf.basic.BasicMenuItemUI.paintBackground(java.awt.Graphics, javax.swing.JMenuItem, java.awt.Color) definition code for javax.swing.plaf.basic.BasicMenuItemUI.paintBackground(java.awt.Graphics, javax.swing.JMenuItem, java.awt.Color)

protected void paintBackground(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                               JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  menuItem,
                               Color sample code for java.awt.Color definition code for java.awt.Color  bgColor)
Draws the background of the menu item.

Parameters:
g - the paint graphics
menuItem - menu item to be painted
bgColor - selection background color
Since:
1.4

paintText sample code for javax.swing.plaf.basic.BasicMenuItemUI.paintText(java.awt.Graphics, javax.swing.JMenuItem, java.awt.Rectangle, java.lang.String) definition code for javax.swing.plaf.basic.BasicMenuItemUI.paintText(java.awt.Graphics, javax.swing.JMenuItem, java.awt.Rectangle, java.lang.String)

protected void paintText(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                         JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem  menuItem,
                         Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  textRect,
                         String sample code for java.lang.String definition code for java.lang.String  text)
Renders the text of the current menu item.

Parameters:
g - graphics context
menuItem - menu item to render
textRect - bounding rectangle for rendering the text
text - string to render
Since:
1.4

getPath sample code for javax.swing.plaf.basic.BasicMenuItemUI.getPath() definition code for javax.swing.plaf.basic.BasicMenuItemUI.getPath()

public MenuElement sample code for javax.swing.MenuElement definition code for javax.swing.MenuElement [] getPath()

doClick sample code for javax.swing.plaf.basic.BasicMenuItemUI.doClick(javax.swing.MenuSelectionManager) definition code for javax.swing.plaf.basic.BasicMenuItemUI.doClick(javax.swing.MenuSelectionManager)

protected void doClick(MenuSelectionManager sample code for javax.swing.MenuSelectionManager definition code for javax.swing.MenuSelectionManager  msm)
Call this method when a menu item is to be activated. This method handles some of the details of menu item activation such as clearing the selected path and messaging the JMenuItem's doClick() method.

Parameters:
msm - A MenuSelectionManager. The visual feedback and internal bookkeeping tasks are delegated to this MenuSelectionManager. If null is passed as this argument, the MenuSelectionManager.defaultManager is used.
Since:
1.4
See Also:
MenuSelectionManager sample code for javax.swing.MenuSelectionManager definition code for javax.swing.MenuSelectionManager , AbstractButton.doClick(int) sample code for javax.swing.AbstractButton.doClick(int) definition code for javax.swing.AbstractButton.doClick(int)