Package com.ribs.helpers
Class AbstractButtonHpr
java.lang.Object
com.ribs.RJHelper
com.ribs.helpers.JButtonOrLabelHpr
com.ribs.helpers.AbstractButtonHpr
- Direct Known Subclasses:
RJCheckBoxHpr
This class is a simple JButton subclass to support Ribs archival and to support Ribs unified accessor model.
Copyright (c) 2004 ReportMill Software, Inc. All Rights Reserved. Contact ReportMill <info@reportmill.com>.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
fromXML
(JComponent aComponent, RXArchiver anArchiver, RXElement anElement) XML unarchival.boolean
getBoolValue
(JComponent aComponent) Returns the button's bool value.getButtonGroup
(JComponent aComponent) Returns the actual button group instance for this buttongetButtonGroupName
(JComponent aComponent) Returns the button group name for this button.getMarginString
(AbstractButton aButton) Returns the margin string for a button, if it's been explicity set in Ribs.getSelectedImageName
(JComponent aComponent) Returns the image name for this button's icon when selected.boolean
getSendActionOnClick
(AbstractButton aButton) Returns whether this button sends action when clicked.boolean
getSendActionOnDoubleClick
(AbstractButton aButton) Returns whether this button sends action when double-clicked.getStringValue
(JComponent aComponent) Returns the button's visible text.getValue
(JComponent aComponent) Returns the button's value.void
initInstance
(JComponent aComponent) Initializes the given instance (actually called the first time an owner is set).newInstance
(RXElement anElement) Creates a new instance of class for given element.void
setButtonGroupName
(JComponent aComponent, String aName) This method sets the button group name for this button and tries to set the button group by asking its parent RJPanel for the button group with the given name (the parent RJPanel will create one if necessary).void
setMarginString
(AbstractButton aButton, String aString) Sets the margin string for a button.void
setSelectedImageName
(JComponent aComponent, String aName) Sets the image name for this button's icon when selected.void
setSendActionOnClick
(AbstractButton aButton, boolean aValue) Sets whether this button sends action when clicked.void
setSendActionOnDoubleClick
(AbstractButton aButton, boolean aValue) Sets whether this button sends action when double-clicked.void
setValue
(JComponent aComponent, boolean aValue) Sets the button's boolean value.void
setValue
(JComponent aComponent, String aValue) Sets the visible button text.toXML
(JComponent aComponent, RXArchiver anArchiver) XML archival.Methods inherited from class com.ribs.helpers.JButtonOrLabelHpr
getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getImageName, getText, getVerticalAlignment, getVerticalTextPosition, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setImageName, setText, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class com.ribs.RJHelper
add, focusGained, focusLost, fromXMLDeep, get, getActionListener, getAutoscrolls, getAutosizing, getBackground, getBindKey, getBooleanValue, getCallback, getChangeListener, getColorValue, getComponent, getComponentCount, getFloatValue, getFocusListener, getForeground, getIntValue, getMaster, getMaximumSize, getMinimumSize, getOwner, getRibHeight, getRibWidth, getRibX, getRibY, getSendActionOnFocusLost, getSubstitutionClassString, 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
-
Constructor Details
-
AbstractButtonHpr
public AbstractButtonHpr()
-
-
Method Details
-
newInstance
Creates a new instance of class for given element.- Overrides:
newInstance
in classRJHelper
-
initInstance
Initializes the given instance (actually called the first time an owner is set).- Overrides:
initInstance
in classRJHelper
-
getSelectedImageName
Returns the image name for this button's icon when selected. -
setSelectedImageName
Sets the image name for this button's icon when selected. -
getButtonGroupName
Returns the button group name for this button. -
getButtonGroup
Returns the actual button group instance for this button -
setButtonGroupName
This method sets the button group name for this button and tries to set the button group by asking its parent RJPanel for the button group with the given name (the parent RJPanel will create one if necessary). -
getSendActionOnClick
Returns whether this button sends action when clicked. -
setSendActionOnClick
Sets whether this button sends action when clicked. -
getSendActionOnDoubleClick
Returns whether this button sends action when double-clicked. -
setSendActionOnDoubleClick
Sets whether this button sends action when double-clicked. -
getMarginString
Returns the margin string for a button, if it's been explicity set in Ribs. -
setMarginString
Sets the margin string for a button. -
getValue
Returns the button's value. -
getStringValue
Returns the button's visible text.- Overrides:
getStringValue
in classRJHelper
-
setValue
Sets the visible button text. -
getBoolValue
Returns the button's bool value.- Overrides:
getBoolValue
in classRJHelper
-
setValue
Sets the button's boolean value. -
toXML
XML archival.- Overrides:
toXML
in classJButtonOrLabelHpr
-
fromXML
XML unarchival.- Overrides:
fromXML
in classJButtonOrLabelHpr
-