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 TypeMethodDescriptionvoidadd(JComponent aComponent, JComponent aChild) Adds a child into the parent's component heirarchy.voidfocusGained(JComponent aComponent, FocusEvent fe) Called by default focus listener when the component gains focus.voidfocusLost(JComponent aComponent, FocusEvent fe) Called by the default focus listener when focus is lost on a component, but before any action is fired.voidfromXML(JComponent aComponent, RXArchiver anArchiver, RXElement anElement) XML unarchival utility method.voidfromXMLDeep(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.booleangetBoolValue(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.intgetComponentCount(JComponent aComponent) Returns the Ribs-relevant child component count.floatgetFloatValue(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.intgetIntValue(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.intgetRibHeight(JComponent aComponent) Returns the original height of the given component as defined in the rib file.intgetRibWidth(JComponent aComponent) Returns the original width of the given component as defined in the rib file.intgetRibX(JComponent aComponent) Returns the original X of the given component as defined in the rib file.intgetRibY(JComponent aComponent) Returns the original Y of the given component as defined in the rib file.booleangetSendActionOnFocusLost(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.voidinitInstance(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.voidperformBindKeyGet(JComponent aComponent) Performs bind key get.voidperformBindKeySet(JComponent aComponent) Performs bind key set.voidsendAction(JComponent aComponent, RJAction anAction) Sends action for the given component.voidsetAutoscrolls(JComponent aComponent, Boolean aValue) Sets whether a component autoscrolls and client property (so we know it was explicitly set).voidsetAutosizing(JComponent aComponent, String aValue) Sets the autosizing for the given component.voidsetBackground(JComponent aComponent, Color aColor) Sets the given component's background color and client property (so we know it was explicitly set).voidsetBindKey(JComponent aComponent, String aBindKey) Sets this component's bind key chain.voidsetCallback(JComponent aComponent, String aCallback) Sets given component's callback method (respondUI is the default).voidsetForeground(JComponent aComponent, Color aColor) Sets the given component's foreground color and client property (so we know it was explicitly set).voidsetMaster(JComponent aComponent, RJPanel aMaster) Sets the top level panel of this rib file (the one that the given component was loaded from).voidsetMaximumSize(JComponent aComponent, Dimension max) Sets the maximum size for a component and records the fact that we've changed it.voidsetMinimumSize(JComponent aComponent, Dimension min) Sets the minimum size for a component and records the fact that we've changed it.voidsetOpaque(JComponent aComponent, Boolean aValue) Set component's opacity and client property (so we know it was explicitly set).voidsetOwner(JComponent aComponent, Object anOwner) Sets given component's owner.voidsetSendActionOnFocusLost(JComponent aComponent, boolean aValue) Sets whether this text field sends action when it loses focus.voidsetSubstitutionClassString(JComponent aComponent, String aClassString) Sets the subclass string for the given component.voidsetValue(JComponent aComponent, boolean aValue) Sets a component's value from given boolean.voidsetValue(JComponent aComponent, float aValue) Sets a component's value from given float.voidsetValue(JComponent aComponent, int aValue) Sets a component's value from given int.voidsetValue(JComponent aComponent, Color aValue) Sets a component's value from given Color.voidsetValue(JComponent aComponent, Boolean aValue) Sets a component's value from given Boolean.voidsetValue(JComponent aComponent, Object aValue) Sets a component's value.voidsetValue(JComponent aComponent, String aValue) Sets a component's value from given string.voidtakeFloatValue(JComponent aComponent, JComponent aCaller) A generic callback method for component to component callbacks.voidtakeIntValue(JComponent aComponent, JComponent aCaller) A generic callback method for component to component callbacks.voidtoXML(JComponent aComponent, RXArchiver anArchiver) XML archival utility method.voidtoXMLDeep(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
-