Package com.ribs.helpers
Class JMenuItemHpr
- java.lang.Object
- 
- com.ribs.RJHelper
- 
- com.ribs.helpers.JMenuItemHpr
 
 
- 
 public class JMenuItemHpr extends RJHelper A RJHelper implementation for JMenuItem (with specific support for subclasses: JMenu, JCheckBoxMenuItem).
- 
- 
Constructor SummaryConstructors Constructor Description JMenuItemHpr()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfromXML(javax.swing.JComponent aComponent, RXArchiver anArchiver, RXElement anElement)XML unarchival.booleangetBoolValue(javax.swing.JComponent aComponent)Returns whether menu item is selected (or state if check box menu item).javax.swing.JComponentgetComponent(javax.swing.JComponent aComponent, int anIndex)Returns the Ribs-relevant child component at the given index.intgetComponentCount(javax.swing.JComponent aComponent)Returns the Ribs-relevant child component count.floatgetFloatValue(javax.swing.JComponent aComponent)Returns the menu item's text as an int.java.lang.StringgetImageName(javax.swing.JComponent aComponent)Returns the image name for this button's icon.intgetIntValue(javax.swing.JComponent aComponent)Returns the menu item's text as an int.static javax.swing.KeyStrokegetKeyStroke(java.lang.String aString)This utility method tries to get a keystroke from a string and tries to be more forgiving than KeyStroke.getKeyStroke().static java.lang.StringgetKeyText(javax.swing.KeyStroke aKeyStroke)This utility method returns key text for a key stroke and tries to make it more conforming.java.lang.StringgetStringValue(javax.swing.JComponent aComponent)Returns the menu item's text.voidinitInstance(javax.swing.JComponent aComponent)Initializes the given instance (actually called the first time an owner is set).java.lang.ObjectnewInstance(RXElement anElement)Creates a new instance of class for given element.voidsetImageName(javax.swing.JComponent aComponent, java.lang.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(javax.swing.JComponent aComponent, boolean aValue)Sets whether the menu item is selected (or state if check box menu item).voidsetValue(javax.swing.JComponent aComponent, java.lang.String aValue)Sets the menu item's text.RXElementtoXML(javax.swing.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
 
- 
 
- 
- 
- 
Method Detail- 
newInstancepublic java.lang.Object newInstance(RXElement anElement) Creates a new instance of class for given element.- Overrides:
- newInstancein class- RJHelper
 
 - 
initInstancepublic void initInstance(javax.swing.JComponent aComponent) Initializes the given instance (actually called the first time an owner is set).- Overrides:
- initInstancein class- RJHelper
 
 - 
getComponentCountpublic int getComponentCount(javax.swing.JComponent aComponent) Returns the Ribs-relevant child component count.- Overrides:
- getComponentCountin class- RJHelper
 
 - 
getComponentpublic javax.swing.JComponent getComponent(javax.swing.JComponent aComponent, int anIndex)Returns the Ribs-relevant child component at the given index.- Overrides:
- getComponentin class- RJHelper
 
 - 
getImageNamepublic java.lang.String getImageName(javax.swing.JComponent aComponent) Returns the image name for this button's icon.
 - 
setImageNamepublic void setImageName(javax.swing.JComponent aComponent, java.lang.String aName)Sets the image name for this button's icon and tries to set the icon by asking Ribs for the named icon.
 - 
getStringValuepublic java.lang.String getStringValue(javax.swing.JComponent aComponent) Returns the menu item's text.- Overrides:
- getStringValuein class- RJHelper
 
 - 
setValuepublic void setValue(javax.swing.JComponent aComponent, java.lang.String aValue)Sets the menu item's text.
 - 
getBoolValuepublic boolean getBoolValue(javax.swing.JComponent aComponent) Returns whether menu item is selected (or state if check box menu item).- Overrides:
- getBoolValuein class- RJHelper
 
 - 
setValuepublic void setValue(javax.swing.JComponent aComponent, boolean aValue)Sets whether the menu item is selected (or state if check box menu item).
 - 
getIntValuepublic int getIntValue(javax.swing.JComponent aComponent) Returns the menu item's text as an int.- Overrides:
- getIntValuein class- RJHelper
 
 - 
getFloatValuepublic float getFloatValue(javax.swing.JComponent aComponent) Returns the menu item's text as an int.- Overrides:
- getFloatValuein class- RJHelper
 
 - 
toXMLpublic RXElement toXML(javax.swing.JComponent aComponent, RXArchiver anArchiver) XML archival.
 - 
fromXMLpublic void fromXML(javax.swing.JComponent aComponent, RXArchiver anArchiver, RXElement anElement)XML unarchival.
 - 
getKeyTextpublic static java.lang.String getKeyText(javax.swing.KeyStroke aKeyStroke) This utility method returns key text for a key stroke and tries to make it more conforming.
 - 
getKeyStrokepublic static javax.swing.KeyStroke getKeyStroke(java.lang.String aString) This utility method tries to get a keystroke from a string and tries to be more forgiving than KeyStroke.getKeyStroke().
 
- 
 
-