|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.plaf.ComponentUI javax.swing.plaf.ButtonUI javax.swing.plaf.MenuItemUI com.jidesoft.plaf.vsnet.VsnetMenuItemUI
public class VsnetMenuItemUI
MenuItem UI implementation
Nested Class Summary | |
---|---|
protected class |
VsnetMenuItemUI.MouseInputHandler
|
Constructor Summary | |
---|---|
VsnetMenuItemUI()
|
Method Summary | |
---|---|
protected ActionMap |
createActionMap()
|
protected InputMap |
createInputMap(int condition)
|
protected MenuDragMouseListener |
createMenuDragMouseListener(JComponent c)
|
protected MenuKeyListener |
createMenuKeyListener(JComponent c)
|
protected MouseInputListener |
createMouseInputListener(JComponent c)
|
static ComponentUI |
createUI(JComponent c)
|
protected void |
doClick(MenuSelectionManager msm)
Call this method when a menu item is to be activated. |
protected ActionMap |
getActionMap()
|
protected Icon |
getIcon(AbstractButton b)
|
Dimension |
getMaximumSize(JComponent c)
|
Dimension |
getMinimumSize(JComponent c)
|
protected ThemePainter |
getPainter()
|
MenuElement[] |
getPath()
|
protected Dimension |
getPreferredMenuItemSize(JComponent c,
Icon checkIcon,
Icon arrowIcon,
int textIconGap)
|
Dimension |
getPreferredSize(JComponent c)
|
protected String |
getPropertyPrefix()
|
protected int |
getRightMargin()
|
protected void |
installComponents(JMenuItem menuItem)
|
protected void |
installDefaults()
|
protected void |
installKeyboardActions()
|
protected void |
installListeners()
|
void |
installUI(JComponent c)
|
protected boolean |
isDownArrowVisible(Container c)
|
protected boolean |
isFloatingIcon()
|
void |
paint(Graphics g,
JComponent c)
|
protected void |
paintBackground(Graphics g,
JMenuItem menuItem,
Color bgColor)
Draws the background of the menu item. |
protected void |
paintCheckBox(JMenuItem b,
Graphics g,
Icon checkIcon)
|
protected void |
paintIcon(JMenuItem b,
Graphics g)
|
protected void |
paintMenuItem(Graphics g,
JComponent c,
Icon checkIcon,
Icon arrowIcon,
Color background,
Color foreground,
int defaultTextIconGap)
|
protected void |
paintText(Graphics g,
JMenuItem menuItem,
Rectangle textRect,
String text)
Method which renders the text of the current menu item. |
protected void |
uninstallComponents(JMenuItem menuItem)
|
protected void |
uninstallDefaults()
|
protected void |
uninstallKeyboardActions()
|
protected void |
uninstallListeners()
|
void |
uninstallUI(JComponent c)
|
void |
update(Graphics g,
JComponent c)
We draw the background in paintMenuItem() so override update (which fills the background of opaque components by default) to just call paint(). |
protected boolean |
useCheckAndArrow()
|
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected JMenuItem menuItem
protected Color selectionBackground
protected Color selectionForeground
protected Color disabledForeground
protected Color acceleratorForeground
protected Color acceleratorSelectionForeground
protected int defaultTextIconGap
protected Font acceleratorFont
protected MouseInputListener mouseInputListener
protected MenuDragMouseListener menuDragMouseListener
protected MenuKeyListener menuKeyListener
protected Icon arrowIcon
protected Icon checkIcon
protected boolean oldBorderPainted
protected InputMap windowInputMap
protected Color shadowColor
protected int defaultAccelEndGap
protected int defaultShadowWidth
protected Color borderColor
protected Color backgroundColor
protected boolean _isFloatingIcon
protected static Rectangle zeroRect
protected static Rectangle iconRect
protected static Rectangle textRect
protected static Rectangle acceleratorRect
protected static Rectangle checkIconRect
protected static Rectangle arrowIconRect
protected static Rectangle viewRect
Constructor Detail |
---|
public VsnetMenuItemUI()
Method Detail |
---|
public static ComponentUI createUI(JComponent c)
public void installUI(JComponent c)
installUI
in class ComponentUI
protected void installDefaults()
protected void installComponents(JMenuItem menuItem)
menuItem
- the menu itemprotected String getPropertyPrefix()
protected void installListeners()
protected void installKeyboardActions()
public void uninstallUI(JComponent c)
uninstallUI
in class ComponentUI
protected void uninstallDefaults()
protected void uninstallComponents(JMenuItem menuItem)
menuItem
- the menu itemprotected void uninstallListeners()
protected void uninstallKeyboardActions()
protected MouseInputListener createMouseInputListener(JComponent c)
protected MenuDragMouseListener createMenuDragMouseListener(JComponent c)
protected MenuKeyListener createMenuKeyListener(JComponent c)
protected ActionMap getActionMap()
protected ActionMap createActionMap()
protected InputMap createInputMap(int condition)
public Dimension getMinimumSize(JComponent c)
getMinimumSize
in class ComponentUI
public Dimension getPreferredSize(JComponent c)
getPreferredSize
in class ComponentUI
public Dimension getMaximumSize(JComponent c)
getMaximumSize
in class ComponentUI
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int textIconGap)
public void update(Graphics g, JComponent c)
update
in class ComponentUI
public void paint(Graphics g, JComponent c)
paint
in class ComponentUI
protected void paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap)
protected void paintCheckBox(JMenuItem b, Graphics g, Icon checkIcon)
protected void paintIcon(JMenuItem b, Graphics g)
protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor)
g
- the paint graphicsmenuItem
- menu item to be paintedbgColor
- selection background colorprotected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text)
g
- Graphics contextmenuItem
- Current menu item to rendertextRect
- Bounding rectangle to render the text.text
- String to renderprotected boolean useCheckAndArrow()
public MenuElement[] getPath()
protected void doClick(MenuSelectionManager msm)
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.MenuSelectionManager
,
AbstractButton.doClick(int)
protected ThemePainter getPainter()
protected boolean isDownArrowVisible(Container c)
protected boolean isFloatingIcon()
protected Icon getIcon(AbstractButton b)
protected int getRightMargin()
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |