Package com.ribs
Class RJHelper
- java.lang.Object
- 
- com.ribs.RJHelper
 
- 
- Direct Known Subclasses:
- JButtonOrLabelHpr,- JComboBoxHpr,- JListHpr,- JMenuBarHpr,- JMenuItemHpr,- JPopupMenuHpr,- JProgressBarHpr,- JScrollPaneHpr,- JSeparatorHpr,- JSliderHpr,- JSpinnerHpr,- JSplitPaneHpr,- JTabbedPaneHpr,- JTableHpr,- JTextComponentHpr,- JTreeHpr,- RJColorWellHpr,- RJCustomViewHpr,- RJPanelHpr,- RJSwitchPaneHpr,- RJThumbWheelHpr
 
 public class RJHelper extends java.lang.ObjectThis class is used to provide Ribs functionality to Swing JComponents.
- 
- 
Constructor SummaryConstructors Constructor Description RJHelper()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(javax.swing.JComponent aComponent, javax.swing.JComponent aChild)Adds a child into the parent's component heirarchy.voidfocusGained(javax.swing.JComponent aComponent, java.awt.event.FocusEvent fe)Called by default focus listener when the component gains focus.voidfocusLost(javax.swing.JComponent aComponent, java.awt.event.FocusEvent fe)Called by the default focus listener when focus is lost on a component, but before any action is fired.voidfromXML(javax.swing.JComponent aComponent, RXArchiver anArchiver, RXElement anElement)XML unarchival utility method.voidfromXMLDeep(javax.swing.JComponent aComponent, RXArchiver anArchiver, RXElement anElement)XML unarchival utility method.javax.swing.JComponentget(javax.swing.JComponent aComponent, java.lang.String aName)Returns the given component or any of its children that have the give name.java.awt.event.ActionListenergetActionListener()Returns an action listener suitable for many controls.java.lang.BooleangetAutoscrolls(javax.swing.JComponent aComponent)Returns whether a component autoscrolls if explicitly set, null otherwise.java.lang.StringgetAutosizing(javax.swing.JComponent aComponent)Returns the autosizing for the given component.java.awt.ColorgetBackground(javax.swing.JComponent aComponent)Returns the given component's background color if explicitly set, otherwise null.java.lang.StringgetBindKey(javax.swing.JComponent aComponent)Returns this component's bind key chain.java.lang.BooleangetBooleanValue(javax.swing.JComponent aComponent)Returns a component's value as a Boolean.booleangetBoolValue(javax.swing.JComponent aComponent)Returns a component's value as a boolean.java.lang.StringgetCallback(javax.swing.JComponent aComponent)Returns given component's callback method (respondUI is the default).javax.swing.event.ChangeListenergetChangeListener()Returns a change listener suitable for some controls.java.awt.ColorgetColorValue(javax.swing.JComponent aComponent)Returns a component's value as color.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 a component's value as a float.java.awt.event.FocusListenergetFocusListener()Returns a focus listener suitable for the occasional control.java.awt.ColorgetForeground(javax.swing.JComponent aComponent)Returns the given component's foreground color if explicitly set, otherwise null.intgetIntValue(javax.swing.JComponent aComponent)Returns a component's value as an int.RJPanelgetMaster(javax.swing.JComponent aComponent)Returns the top level panel of the rib file (the one that given component was loaded from).java.awt.DimensiongetMaximumSize(javax.swing.JComponent aComponent)Returns null unless the maximum size has explicitly been set by the user, in which case it uses the component's maximum size.java.awt.DimensiongetMinimumSize(javax.swing.JComponent aComponent)Returns null unless the minimum size has explicitly been set by the user, in which case it uses the component's minimum size.java.lang.ObjectgetOwner(javax.swing.JComponent aComponent)Returns given component's owner.intgetRibHeight(javax.swing.JComponent aComponent)Returns the original height of the given component as defined in the rib file.intgetRibWidth(javax.swing.JComponent aComponent)Returns the original width of the given component as defined in the rib file.intgetRibX(javax.swing.JComponent aComponent)Returns the original X of the given component as defined in the rib file.intgetRibY(javax.swing.JComponent aComponent)Returns the original Y of the given component as defined in the rib file.booleangetSendActionOnFocusLost(javax.swing.JComponent aComponent)Returns whether this component sends action when it loses focus.java.lang.StringgetStringValue(javax.swing.JComponent aComponent)Returns a component's value as a string.java.lang.StringgetSubstitutionClassString(javax.swing.JComponent aComponent)Returns the subclass string for the given component.java.lang.ObjectgetValue(javax.swing.JComponent aComponent)Returns a component's value.voidinitInstance(javax.swing.JComponent aComponent)Initializes the given instance (actually called the first time an owner is set).java.lang.BooleanisOpaque(javax.swing.JComponent aComponent)Returns component's opacity if explicitly set, null otherwise.java.lang.ObjectnewInstance(RXElement anElement)Creates a new instance of class for given element.voidperformBindKeyGet(javax.swing.JComponent aComponent)Performs bind key get.voidperformBindKeySet(javax.swing.JComponent aComponent)Performs bind key set.voidsendAction(javax.swing.JComponent aComponent, RJAction anAction)Sends action for the given component.voidsetAutoscrolls(javax.swing.JComponent aComponent, java.lang.Boolean aValue)Sets whether a component autoscrolls and client property (so we know it was explicitly set).voidsetAutosizing(javax.swing.JComponent aComponent, java.lang.String aValue)Sets the autosizing for the given component.voidsetBackground(javax.swing.JComponent aComponent, java.awt.Color aColor)Sets the given component's background color and client property (so we know it was explicitly set).voidsetBindKey(javax.swing.JComponent aComponent, java.lang.String aBindKey)Sets this component's bind key chain.voidsetCallback(javax.swing.JComponent aComponent, java.lang.String aCallback)Sets given component's callback method (respondUI is the default).voidsetForeground(javax.swing.JComponent aComponent, java.awt.Color aColor)Sets the given component's foreground color and client property (so we know it was explicitly set).voidsetMaster(javax.swing.JComponent aComponent, RJPanel aMaster)Sets the top level panel of this rib file (the one that the given component was loaded from).voidsetMaximumSize(javax.swing.JComponent aComponent, java.awt.Dimension max)Sets the maximum size for a component and records the fact that we've changed it.voidsetMinimumSize(javax.swing.JComponent aComponent, java.awt.Dimension min)Sets the minimum size for a component and records the fact that we've changed it.voidsetOpaque(javax.swing.JComponent aComponent, java.lang.Boolean aValue)Set component's opacity and client property (so we know it was explicitly set).voidsetOwner(javax.swing.JComponent aComponent, java.lang.Object anOwner)Sets given component's owner.voidsetSendActionOnFocusLost(javax.swing.JComponent aComponent, boolean aValue)Sets whether this text field sends action when it loses focus.voidsetSubstitutionClassString(javax.swing.JComponent aComponent, java.lang.String aClassString)Sets the subclass string for the given component.voidsetValue(javax.swing.JComponent aComponent, boolean aValue)Sets a component's value from given boolean.voidsetValue(javax.swing.JComponent aComponent, float aValue)Sets a component's value from given float.voidsetValue(javax.swing.JComponent aComponent, int aValue)Sets a component's value from given int.voidsetValue(javax.swing.JComponent aComponent, java.awt.Color aValue)Sets a component's value from given Color.voidsetValue(javax.swing.JComponent aComponent, java.lang.Boolean aValue)Sets a component's value from given Boolean.voidsetValue(javax.swing.JComponent aComponent, java.lang.Object aValue)Sets a component's value.voidsetValue(javax.swing.JComponent aComponent, java.lang.String aValue)Sets a component's value from given string.voidtakeFloatValue(javax.swing.JComponent aComponent, javax.swing.JComponent aCaller)A generic callback method for component to component callbacks.voidtakeIntValue(javax.swing.JComponent aComponent, javax.swing.JComponent aCaller)A generic callback method for component to component callbacks.voidtestOutBeanBag(javax.swing.JComponent c)RXElementtoXML(javax.swing.JComponent aComponent, RXArchiver anArchiver)XML archival utility method.voidtoXMLDeep(javax.swing.JComponent aComponent, RXArchiver anArchiver, RXElement anElement)XML archival utility method.
 
- 
- 
- 
Method Detail- 
newInstancepublic java.lang.Object newInstance(RXElement anElement) Creates a new instance of class for given element.
 - 
initInstancepublic void initInstance(javax.swing.JComponent aComponent) Initializes the given instance (actually called the first time an owner is set).
 - 
getComponentCountpublic int getComponentCount(javax.swing.JComponent aComponent) Returns the Ribs-relevant child component count.
 - 
getComponentpublic javax.swing.JComponent getComponent(javax.swing.JComponent aComponent, int anIndex)Returns the Ribs-relevant child component at the given index.
 - 
getpublic javax.swing.JComponent get(javax.swing.JComponent aComponent, java.lang.String aName)Returns the given component or any of its children that have the give name.
 - 
addpublic void add(javax.swing.JComponent aComponent, javax.swing.JComponent aChild)Adds a child into the parent's component heirarchy.
 - 
getOwnerpublic java.lang.Object getOwner(javax.swing.JComponent aComponent) Returns given component's owner.
 - 
setOwnerpublic void setOwner(javax.swing.JComponent aComponent, java.lang.Object anOwner)Sets given component's owner.
 - 
getMasterpublic RJPanel getMaster(javax.swing.JComponent aComponent) Returns the top level panel of the rib file (the one that given component was loaded from).
 - 
setMasterpublic void setMaster(javax.swing.JComponent aComponent, RJPanel aMaster)Sets the top level panel of this rib file (the one that the given component was loaded from).
 - 
getCallbackpublic java.lang.String getCallback(@Nonnull javax.swing.JComponent aComponent)Returns given component's callback method (respondUI is the default).
 - 
setCallbackpublic void setCallback(javax.swing.JComponent aComponent, java.lang.String aCallback)Sets given component's callback method (respondUI is the default).
 - 
getBindKeypublic java.lang.String getBindKey(javax.swing.JComponent aComponent) Returns this component's bind key chain.
 - 
setBindKeypublic void setBindKey(javax.swing.JComponent aComponent, java.lang.String aBindKey)Sets this component's bind key chain.
 - 
sendActionpublic void sendAction(javax.swing.JComponent aComponent, RJAction anAction)Sends action for the given component.
 - 
performBindKeyGetpublic void performBindKeyGet(javax.swing.JComponent aComponent) Performs bind key get.
 - 
performBindKeySetpublic void performBindKeySet(javax.swing.JComponent aComponent) Performs bind key set.
 - 
getSubstitutionClassStringpublic java.lang.String getSubstitutionClassString(javax.swing.JComponent aComponent) Returns the subclass string for the given component.
 - 
setSubstitutionClassStringpublic void setSubstitutionClassString(javax.swing.JComponent aComponent, java.lang.String aClassString)Sets the subclass string for the given component.
 - 
getAutosizingpublic java.lang.String getAutosizing(javax.swing.JComponent aComponent) Returns the autosizing for the given component.
 - 
setAutosizingpublic void setAutosizing(javax.swing.JComponent aComponent, java.lang.String aValue)Sets the autosizing for the given component.
 - 
getRibXpublic int getRibX(javax.swing.JComponent aComponent) Returns the original X of the given component as defined in the rib file.
 - 
getRibYpublic int getRibY(javax.swing.JComponent aComponent) Returns the original Y of the given component as defined in the rib file.
 - 
getRibWidthpublic int getRibWidth(javax.swing.JComponent aComponent) Returns the original width of the given component as defined in the rib file.
 - 
getRibHeightpublic int getRibHeight(javax.swing.JComponent aComponent) Returns the original height of the given component as defined in the rib file.
 - 
setMinimumSizepublic void setMinimumSize(javax.swing.JComponent aComponent, java.awt.Dimension min)Sets the minimum size for a component and records the fact that we've changed it.
 - 
getMinimumSizepublic java.awt.Dimension getMinimumSize(javax.swing.JComponent aComponent) Returns null unless the minimum size has explicitly been set by the user, in which case it uses the component's minimum size. Note that some components may not let you change minimum size. What you do in that situation, I'm not sure.
 - 
setMaximumSizepublic void setMaximumSize(javax.swing.JComponent aComponent, java.awt.Dimension max)Sets the maximum size for a component and records the fact that we've changed it.
 - 
getMaximumSizepublic java.awt.Dimension getMaximumSize(javax.swing.JComponent aComponent) Returns null unless the maximum size has explicitly been set by the user, in which case it uses the component's maximum size.
 - 
getValuepublic java.lang.Object getValue(javax.swing.JComponent aComponent) Returns a component's value.
 - 
setValuepublic void setValue(javax.swing.JComponent aComponent, java.lang.Object aValue)Sets a component's value.
 - 
getStringValuepublic java.lang.String getStringValue(javax.swing.JComponent aComponent) Returns a component's value as a string.
 - 
setValuepublic void setValue(javax.swing.JComponent aComponent, java.lang.String aValue)Sets a component's value from given string.
 - 
getBooleanValuepublic java.lang.Boolean getBooleanValue(javax.swing.JComponent aComponent) Returns a component's value as a Boolean.
 - 
setValuepublic void setValue(javax.swing.JComponent aComponent, java.lang.Boolean aValue)Sets a component's value from given Boolean.
 - 
getBoolValuepublic boolean getBoolValue(javax.swing.JComponent aComponent) Returns a component's value as a boolean.
 - 
setValuepublic void setValue(javax.swing.JComponent aComponent, boolean aValue)Sets a component's value from given boolean.
 - 
getIntValuepublic int getIntValue(javax.swing.JComponent aComponent) Returns a component's value as an int.
 - 
setValuepublic void setValue(javax.swing.JComponent aComponent, int aValue)Sets a component's value from given int.
 - 
getFloatValuepublic float getFloatValue(javax.swing.JComponent aComponent) Returns a component's value as a float.
 - 
setValuepublic void setValue(javax.swing.JComponent aComponent, float aValue)Sets a component's value from given float.
 - 
getColorValuepublic java.awt.Color getColorValue(javax.swing.JComponent aComponent) Returns a component's value as color.
 - 
setValuepublic void setValue(javax.swing.JComponent aComponent, java.awt.Color aValue)Sets a component's value from given Color.
 - 
getActionListenerpublic java.awt.event.ActionListener getActionListener() Returns an action listener suitable for many controls.
 - 
getChangeListenerpublic javax.swing.event.ChangeListener getChangeListener() Returns a change listener suitable for some controls.
 - 
getFocusListenerpublic java.awt.event.FocusListener getFocusListener() Returns a focus listener suitable for the occasional control.
 - 
getAutoscrollspublic java.lang.Boolean getAutoscrolls(javax.swing.JComponent aComponent) Returns whether a component autoscrolls if explicitly set, null otherwise.
 - 
setAutoscrollspublic void setAutoscrolls(javax.swing.JComponent aComponent, java.lang.Boolean aValue)Sets whether a component autoscrolls and client property (so we know it was explicitly set).
 - 
getForegroundpublic java.awt.Color getForeground(javax.swing.JComponent aComponent) Returns the given component's foreground color if explicitly set, otherwise null.
 - 
setForegroundpublic void setForeground(javax.swing.JComponent aComponent, java.awt.Color aColor)Sets the given component's foreground color and client property (so we know it was explicitly set).
 - 
getBackgroundpublic java.awt.Color getBackground(javax.swing.JComponent aComponent) Returns the given component's background color if explicitly set, otherwise null.
 - 
setBackgroundpublic void setBackground(javax.swing.JComponent aComponent, java.awt.Color aColor)Sets the given component's background color and client property (so we know it was explicitly set).
 - 
isOpaquepublic java.lang.Boolean isOpaque(javax.swing.JComponent aComponent) Returns component's opacity if explicitly set, null otherwise.
 - 
setOpaquepublic void setOpaque(javax.swing.JComponent aComponent, java.lang.Boolean aValue)Set component's opacity and client property (so we know it was explicitly set).
 - 
focusGainedpublic void focusGained(javax.swing.JComponent aComponent, java.awt.event.FocusEvent fe)Called by default focus listener when the component gains focus.
 - 
focusLostpublic void focusLost(javax.swing.JComponent aComponent, java.awt.event.FocusEvent fe)Called by the default focus listener when focus is lost on a component, but before any action is fired.
 - 
getSendActionOnFocusLostpublic boolean getSendActionOnFocusLost(javax.swing.JComponent aComponent) Returns whether this component sends action when it loses focus.
 - 
setSendActionOnFocusLostpublic void setSendActionOnFocusLost(javax.swing.JComponent aComponent, boolean aValue)Sets whether this text field sends action when it loses focus.
 - 
takeIntValuepublic void takeIntValue(javax.swing.JComponent aComponent, javax.swing.JComponent aCaller)A generic callback method for component to component callbacks.
 - 
takeFloatValuepublic void takeFloatValue(javax.swing.JComponent aComponent, javax.swing.JComponent aCaller)A generic callback method for component to component callbacks.
 - 
toXMLpublic RXElement toXML(javax.swing.JComponent aComponent, RXArchiver anArchiver) XML archival utility method.
 - 
toXMLDeeppublic void toXMLDeep(javax.swing.JComponent aComponent, RXArchiver anArchiver, RXElement anElement)XML archival utility method.
 - 
fromXMLpublic void fromXML(javax.swing.JComponent aComponent, RXArchiver anArchiver, RXElement anElement)XML unarchival utility method.
 - 
fromXMLDeeppublic void fromXMLDeep(javax.swing.JComponent aComponent, RXArchiver anArchiver, RXElement anElement)XML unarchival utility method.
 - 
testOutBeanBagpublic void testOutBeanBag(javax.swing.JComponent c) 
 
- 
 
-