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 SummaryConstructors
- 
Method SummaryModifier 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- 
RJHelperpublic RJHelper()
 
- 
- 
Method Details- 
newInstanceCreates a new instance of class for given element.
- 
initInstanceInitializes the given instance (actually called the first time an owner is set).
- 
getComponentCountReturns the Ribs-relevant child component count.
- 
getComponentReturns the Ribs-relevant child component at the given index.
- 
getReturns the given component or any of its children that have the give name.
- 
addAdds a child into the parent's component heirarchy.
- 
getOwnerReturns given component's owner.
- 
setOwnerSets given component's owner.
- 
getMasterReturns the top level panel of the rib file (the one that given component was loaded from).
- 
setMasterSets the top level panel of this rib file (the one that the given component was loaded from).
- 
getCallbackReturns given component's callback method (respondUI is the default).
- 
setCallbackSets given component's callback method (respondUI is the default).
- 
getBindKeyReturns this component's bind key chain.
- 
setBindKeySets this component's bind key chain.
- 
sendActionSends action for the given component.
- 
performBindKeyGetPerforms bind key get.
- 
performBindKeySetPerforms bind key set.
- 
getSubstitutionClassStringReturns the subclass string for the given component.
- 
setSubstitutionClassStringSets the subclass string for the given component.
- 
getAutosizingReturns the autosizing for the given component.
- 
setAutosizingSets the autosizing for the given component.
- 
getRibXReturns the original X of the given component as defined in the rib file.
- 
getRibYReturns the original Y of the given component as defined in the rib file.
- 
getRibWidthReturns the original width of the given component as defined in the rib file.
- 
getRibHeightReturns the original height of the given component as defined in the rib file.
- 
setMinimumSizeSets the minimum size for a component and records the fact that we've changed it.
- 
getMinimumSizeReturns 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.
- 
setMaximumSizeSets the maximum size for a component and records the fact that we've changed it.
- 
getMaximumSizeReturns null unless the maximum size has explicitly been set by the user, in which case it uses the component's maximum size.
- 
getValueReturns a component's value.
- 
setValueSets a component's value.
- 
getStringValueReturns a component's value as a string.
- 
setValueSets a component's value from given string.
- 
getBooleanValueReturns a component's value as a Boolean.
- 
setValueSets a component's value from given Boolean.
- 
getBoolValueReturns a component's value as a boolean.
- 
setValueSets a component's value from given boolean.
- 
getIntValueReturns a component's value as an int.
- 
setValueSets a component's value from given int.
- 
getFloatValueReturns a component's value as a float.
- 
setValueSets a component's value from given float.
- 
getColorValueReturns a component's value as color.
- 
setValueSets a component's value from given Color.
- 
getActionListenerReturns an action listener suitable for many controls.
- 
getChangeListenerReturns a change listener suitable for some controls.
- 
getFocusListenerReturns a focus listener suitable for the occasional control.
- 
getAutoscrollsReturns whether a component autoscrolls if explicitly set, null otherwise.
- 
setAutoscrollsSets whether a component autoscrolls and client property (so we know it was explicitly set).
- 
getForegroundReturns the given component's foreground color if explicitly set, otherwise null.
- 
setForegroundSets the given component's foreground color and client property (so we know it was explicitly set).
- 
getBackgroundReturns the given component's background color if explicitly set, otherwise null.
- 
setBackgroundSets the given component's background color and client property (so we know it was explicitly set).
- 
isOpaqueReturns component's opacity if explicitly set, null otherwise.
- 
setOpaqueSet component's opacity and client property (so we know it was explicitly set).
- 
focusGainedCalled by default focus listener when the component gains focus.
- 
focusLostCalled by the default focus listener when focus is lost on a component, but before any action is fired.
- 
getSendActionOnFocusLostReturns whether this component sends action when it loses focus.
- 
setSendActionOnFocusLostSets whether this text field sends action when it loses focus.
- 
takeIntValueA generic callback method for component to component callbacks.
- 
takeFloatValueA generic callback method for component to component callbacks.
- 
toXMLXML archival utility method.
- 
toXMLDeepXML archival utility method.
- 
fromXMLXML unarchival utility method.
- 
fromXMLDeepXML unarchival utility method.
- 
testOutBeanBag
 
-