spellcast.ui
Class GestureMenuItemUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ButtonUI
          extended by javax.swing.plaf.MenuItemUI
              extended by javax.swing.plaf.basic.BasicMenuItemUI
                  extended by spellcast.ui.GestureMenuItemUI

public class GestureMenuItemUI
extends javax.swing.plaf.basic.BasicMenuItemUI

This is the UI delegate that handles the displaying of the GestureChoicesMenuItem. It restricts the menu item to only display the icon with no border. Unfortunately this means that the menu items dont display which menu item is armed.

Author:
Barrie Treloar

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicMenuItemUI
javax.swing.plaf.basic.BasicMenuItemUI.MouseInputHandler
 
Field Summary
 
Fields inherited from class javax.swing.plaf.basic.BasicMenuItemUI
acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, selectionBackground, selectionForeground
 
Constructor Summary
GestureMenuItemUI()
           
 
Method Summary
 java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
          Override the maximum size to be the preferred size.
 java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
          Override the minimum size to be the preferred size.
 java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
           
protected  java.lang.String getPropertyPrefix()
          Override the property to use for UI defaults to be GestureChoicesMenuItem.
 void paint(java.awt.Graphics g, javax.swing.JComponent c)
          Override painting to just paint the icon with no borders or embellishments.
 
Methods inherited from class javax.swing.plaf.basic.BasicMenuItemUI
createMenuDragMouseListener, createMenuKeyListener, createMouseInputListener, createUI, doClick, getPath, getPreferredMenuItemSize, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, paintBackground, paintMenuItem, paintText, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GestureMenuItemUI

public GestureMenuItemUI()
Method Detail

getPropertyPrefix

protected java.lang.String getPropertyPrefix()
Override the property to use for UI defaults to be GestureChoicesMenuItem.

Overrides:
getPropertyPrefix in class javax.swing.plaf.basic.BasicMenuItemUI

getMinimumSize

public java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
Override the minimum size to be the preferred size.

Overrides:
getMinimumSize in class javax.swing.plaf.basic.BasicMenuItemUI

getMaximumSize

public java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
Override the maximum size to be the preferred size.

Overrides:
getMaximumSize in class javax.swing.plaf.basic.BasicMenuItemUI

getPreferredSize

public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
Overrides:
getPreferredSize in class javax.swing.plaf.basic.BasicMenuItemUI

paint

public void paint(java.awt.Graphics g,
                  javax.swing.JComponent c)
Override painting to just paint the icon with no borders or embellishments.

Overrides:
paint in class javax.swing.plaf.basic.BasicMenuItemUI


Copyright © 2001-2005 Spellcast. All Rights Reserved.