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
This class is used to provide Ribs functionality to Swing JComponents.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(JComponent aComponent, JComponent aChild) Adds a child into the parent's component heirarchy.void
focusGained
(JComponent aComponent, FocusEvent fe) Called by default focus listener when the component gains focus.void
focusLost
(JComponent aComponent, FocusEvent fe) Called by the default focus listener when focus is lost on a component, but before any action is fired.void
fromXML
(JComponent aComponent, RXArchiver anArchiver, RXElement anElement) XML unarchival utility method.void
fromXMLDeep
(JComponent aComponent, RXArchiver anArchiver, RXElement anElement) XML unarchival utility method.get
(JComponent aComponent, String aName) Returns the given component or any of its children that have the give name.Returns an action listener suitable for many controls.getAutoscrolls
(JComponent aComponent) Returns whether a component autoscrolls if explicitly set, null otherwise.getAutosizing
(JComponent aComponent) Returns the autosizing for the given component.getBackground
(JComponent aComponent) Returns the given component's background color if explicitly set, otherwise null.getBindKey
(JComponent aComponent) Returns this component's bind key chain.getBooleanValue
(JComponent aComponent) Returns a component's value as a Boolean.boolean
getBoolValue
(JComponent aComponent) Returns a component's value as a boolean.getCallback
(JComponent aComponent) Returns given component's callback method (respondUI is the default).Returns a change listener suitable for some controls.getColorValue
(JComponent aComponent) Returns a component's value as color.getComponent
(JComponent aComponent, int anIndex) Returns the Ribs-relevant child component at the given index.int
getComponentCount
(JComponent aComponent) Returns the Ribs-relevant child component count.float
getFloatValue
(JComponent aComponent) Returns a component's value as a float.Returns a focus listener suitable for the occasional control.getForeground
(JComponent aComponent) Returns the given component's foreground color if explicitly set, otherwise null.int
getIntValue
(JComponent aComponent) Returns a component's value as an int.getMaster
(JComponent aComponent) Returns the top level panel of the rib file (the one that given component was loaded from).getMaximumSize
(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.getMinimumSize
(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.getOwner
(JComponent aComponent) Returns given component's owner.int
getRibHeight
(JComponent aComponent) Returns the original height of the given component as defined in the rib file.int
getRibWidth
(JComponent aComponent) Returns the original width of the given component as defined in the rib file.int
getRibX
(JComponent aComponent) Returns the original X of the given component as defined in the rib file.int
getRibY
(JComponent aComponent) Returns the original Y of the given component as defined in the rib file.boolean
getSendActionOnFocusLost
(JComponent aComponent) Returns whether this component sends action when it loses focus.getStringValue
(JComponent aComponent) Returns a component's value as a string.getSubstitutionClassString
(JComponent aComponent) Returns the subclass string for the given component.getValue
(JComponent aComponent) Returns a component's value.void
initInstance
(JComponent aComponent) Initializes the given instance (actually called the first time an owner is set).isOpaque
(JComponent aComponent) Returns component's opacity if explicitly set, null otherwise.newInstance
(RXElement anElement) Creates a new instance of class for given element.void
performBindKeyGet
(JComponent aComponent) Performs bind key get.void
performBindKeySet
(JComponent aComponent) Performs bind key set.void
sendAction
(JComponent aComponent, RJAction anAction) Sends action for the given component.void
setAutoscrolls
(JComponent aComponent, Boolean aValue) Sets whether a component autoscrolls and client property (so we know it was explicitly set).void
setAutosizing
(JComponent aComponent, String aValue) Sets the autosizing for the given component.void
setBackground
(JComponent aComponent, Color aColor) Sets the given component's background color and client property (so we know it was explicitly set).void
setBindKey
(JComponent aComponent, String aBindKey) Sets this component's bind key chain.void
setCallback
(JComponent aComponent, String aCallback) Sets given component's callback method (respondUI is the default).void
setForeground
(JComponent aComponent, Color aColor) Sets the given component's foreground color and client property (so we know it was explicitly set).void
setMaster
(JComponent aComponent, RJPanel aMaster) Sets the top level panel of this rib file (the one that the given component was loaded from).void
setMaximumSize
(JComponent aComponent, Dimension max) Sets the maximum size for a component and records the fact that we've changed it.void
setMinimumSize
(JComponent aComponent, Dimension min) Sets the minimum size for a component and records the fact that we've changed it.void
setOpaque
(JComponent aComponent, Boolean aValue) Set component's opacity and client property (so we know it was explicitly set).void
setOwner
(JComponent aComponent, Object anOwner) Sets given component's owner.void
setSendActionOnFocusLost
(JComponent aComponent, boolean aValue) Sets whether this text field sends action when it loses focus.void
setSubstitutionClassString
(JComponent aComponent, String aClassString) Sets the subclass string for the given component.void
setValue
(JComponent aComponent, boolean aValue) Sets a component's value from given boolean.void
setValue
(JComponent aComponent, float aValue) Sets a component's value from given float.void
setValue
(JComponent aComponent, int aValue) Sets a component's value from given int.void
setValue
(JComponent aComponent, Color aValue) Sets a component's value from given Color.void
setValue
(JComponent aComponent, Boolean aValue) Sets a component's value from given Boolean.void
setValue
(JComponent aComponent, Object aValue) Sets a component's value.void
setValue
(JComponent aComponent, String aValue) Sets a component's value from given string.void
takeFloatValue
(JComponent aComponent, JComponent aCaller) A generic callback method for component to component callbacks.void
takeIntValue
(JComponent aComponent, JComponent aCaller) A generic callback method for component to component callbacks.void
toXML
(JComponent aComponent, RXArchiver anArchiver) XML archival utility method.void
toXMLDeep
(JComponent aComponent, RXArchiver anArchiver, RXElement anElement) XML archival utility method.
-
Constructor Details
-
RJHelper
public RJHelper()
-
-
Method Details
-
newInstance
Creates a new instance of class for given element. -
initInstance
Initializes the given instance (actually called the first time an owner is set). -
getComponentCount
Returns the Ribs-relevant child component count. -
getComponent
Returns the Ribs-relevant child component at the given index. -
get
Returns the given component or any of its children that have the give name. -
add
Adds a child into the parent's component heirarchy. -
getOwner
Returns given component's owner. -
setOwner
Sets given component's owner. -
getMaster
Returns the top level panel of the rib file (the one that given component was loaded from). -
setMaster
Sets the top level panel of this rib file (the one that the given component was loaded from). -
getCallback
Returns given component's callback method (respondUI is the default). -
setCallback
Sets given component's callback method (respondUI is the default). -
getBindKey
Returns this component's bind key chain. -
setBindKey
Sets this component's bind key chain. -
sendAction
Sends action for the given component. -
performBindKeyGet
Performs bind key get. -
performBindKeySet
Performs bind key set. -
getSubstitutionClassString
Returns the subclass string for the given component. -
setSubstitutionClassString
Sets the subclass string for the given component. -
getAutosizing
Returns the autosizing for the given component. -
setAutosizing
Sets the autosizing for the given component. -
getRibX
Returns the original X of the given component as defined in the rib file. -
getRibY
Returns the original Y of the given component as defined in the rib file. -
getRibWidth
Returns the original width of the given component as defined in the rib file. -
getRibHeight
Returns the original height of the given component as defined in the rib file. -
setMinimumSize
Sets the minimum size for a component and records the fact that we've changed it. -
getMinimumSize
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. -
setMaximumSize
Sets the maximum size for a component and records the fact that we've changed it. -
getMaximumSize
Returns null unless the maximum size has explicitly been set by the user, in which case it uses the component's maximum size. -
getValue
Returns a component's value. -
setValue
Sets a component's value. -
getStringValue
Returns a component's value as a string. -
setValue
Sets a component's value from given string. -
getBooleanValue
Returns a component's value as a Boolean. -
setValue
Sets a component's value from given Boolean. -
getBoolValue
Returns a component's value as a boolean. -
setValue
Sets a component's value from given boolean. -
getIntValue
Returns a component's value as an int. -
setValue
Sets a component's value from given int. -
getFloatValue
Returns a component's value as a float. -
setValue
Sets a component's value from given float. -
getColorValue
Returns a component's value as color. -
setValue
Sets a component's value from given Color. -
getActionListener
Returns an action listener suitable for many controls. -
getChangeListener
Returns a change listener suitable for some controls. -
getFocusListener
Returns a focus listener suitable for the occasional control. -
getAutoscrolls
Returns whether a component autoscrolls if explicitly set, null otherwise. -
setAutoscrolls
Sets whether a component autoscrolls and client property (so we know it was explicitly set). -
getForeground
Returns the given component's foreground color if explicitly set, otherwise null. -
setForeground
Sets the given component's foreground color and client property (so we know it was explicitly set). -
getBackground
Returns the given component's background color if explicitly set, otherwise null. -
setBackground
Sets the given component's background color and client property (so we know it was explicitly set). -
isOpaque
Returns component's opacity if explicitly set, null otherwise. -
setOpaque
Set component's opacity and client property (so we know it was explicitly set). -
focusGained
Called by default focus listener when the component gains focus. -
focusLost
Called by the default focus listener when focus is lost on a component, but before any action is fired. -
getSendActionOnFocusLost
Returns whether this component sends action when it loses focus. -
setSendActionOnFocusLost
Sets whether this text field sends action when it loses focus. -
takeIntValue
A generic callback method for component to component callbacks. -
takeFloatValue
A generic callback method for component to component callbacks. -
toXML
XML archival utility method. -
toXMLDeep
XML archival utility method. -
fromXML
XML unarchival utility method. -
fromXMLDeep
XML unarchival utility method. -
testOutBeanBag
-