Package com.ribs.helpers
Class JMenuItemHpr
java.lang.Object
com.ribs.RJHelper
com.ribs.helpers.JMenuItemHpr
A RJHelper implementation for JMenuItem (with specific support for subclasses: JMenu, JCheckBoxMenuItem).
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidfromXML(JComponent aComponent, RXArchiver anArchiver, RXElement anElement) XML unarchival.booleangetBoolValue(JComponent aComponent) Returns whether menu item is selected (or state if check box menu item).getComponent(JComponent aComponent, int anIndex) Returns the Ribs-relevant child component at the given index.intgetComponentCount(JComponent aComponent) Returns the Ribs-relevant child component count.floatgetFloatValue(JComponent aComponent) Returns the menu item's text as an int.getImageName(JComponent aComponent) Returns the image name for this button's icon.intgetIntValue(JComponent aComponent) Returns the menu item's text as an int.static KeyStrokegetKeyStroke(String aString) This utility method tries to get a keystroke from a string and tries to be more forgiving than KeyStroke.getKeyStroke().static StringgetKeyText(KeyStroke aKeyStroke) This utility method returns key text for a key stroke and tries to make it more conforming.getStringValue(JComponent aComponent) Returns the menu item's text.voidinitInstance(JComponent aComponent) Initializes the given instance (actually called the first time an owner is set).newInstance(RXElement anElement) Creates a new instance of class for given element.voidsetImageName(JComponent aComponent, String aName) Sets the image name for this button's icon and tries to set the icon by asking Ribs for the named icon.voidsetValue(JComponent aComponent, boolean aValue) Sets whether the menu item is selected (or state if check box menu item).voidsetValue(JComponent aComponent, String aValue) Sets the menu item's text.toXML(JComponent aComponent, RXArchiver anArchiver) XML archival.Methods inherited from class com.ribs.RJHelperadd, focusGained, focusLost, fromXMLDeep, get, getActionListener, getAutoscrolls, getAutosizing, getBackground, getBindKey, getBooleanValue, getCallback, getChangeListener, getColorValue, getFocusListener, getForeground, getMaster, getMaximumSize, getMinimumSize, getOwner, getRibHeight, getRibWidth, getRibX, getRibY, getSendActionOnFocusLost, getSubstitutionClassString, getValue, isOpaque, performBindKeyGet, performBindKeySet, sendAction, setAutoscrolls, setAutosizing, setBackground, setBindKey, setCallback, setForeground, setMaster, setMaximumSize, setMinimumSize, setOpaque, setOwner, setSendActionOnFocusLost, setSubstitutionClassString, setValue, setValue, setValue, setValue, setValue, takeFloatValue, takeIntValue, testOutBeanBag, toXMLDeep
- 
Constructor Details- 
JMenuItemHprpublic JMenuItemHpr()
 
- 
- 
Method Details- 
newInstanceCreates a new instance of class for given element.- Overrides:
- newInstancein class- RJHelper
 
- 
initInstanceInitializes the given instance (actually called the first time an owner is set).- Overrides:
- initInstancein class- RJHelper
 
- 
getComponentCountReturns the Ribs-relevant child component count.- Overrides:
- getComponentCountin class- RJHelper
 
- 
getComponentReturns the Ribs-relevant child component at the given index.- Overrides:
- getComponentin class- RJHelper
 
- 
getImageNameReturns the image name for this button's icon.
- 
setImageNameSets the image name for this button's icon and tries to set the icon by asking Ribs for the named icon.
- 
getStringValueReturns the menu item's text.- Overrides:
- getStringValuein class- RJHelper
 
- 
setValueSets the menu item's text.
- 
getBoolValueReturns whether menu item is selected (or state if check box menu item).- Overrides:
- getBoolValuein class- RJHelper
 
- 
setValueSets whether the menu item is selected (or state if check box menu item).
- 
getIntValueReturns the menu item's text as an int.- Overrides:
- getIntValuein class- RJHelper
 
- 
getFloatValueReturns the menu item's text as an int.- Overrides:
- getFloatValuein class- RJHelper
 
- 
toXMLXML archival.
- 
fromXMLXML unarchival.
- 
getKeyTextThis utility method returns key text for a key stroke and tries to make it more conforming.
- 
getKeyStrokeThis utility method tries to get a keystroke from a string and tries to be more forgiving than KeyStroke.getKeyStroke().
 
-