Class AbstractButtonHpr

Direct Known Subclasses:
RJCheckBoxHpr

public class AbstractButtonHpr extends JButtonOrLabelHpr
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 Details

    • AbstractButtonHpr

      public AbstractButtonHpr()
  • Method Details

    • newInstance

      public Object newInstance(RXElement anElement)
      Creates a new instance of class for given element.
      Overrides:
      newInstance in class RJHelper
    • initInstance

      public void initInstance(JComponent aComponent)
      Initializes the given instance (actually called the first time an owner is set).
      Overrides:
      initInstance in class RJHelper
    • getSelectedImageName

      public String getSelectedImageName(JComponent aComponent)
      Returns the image name for this button's icon when selected.
    • setSelectedImageName

      public void setSelectedImageName(JComponent aComponent, String aName)
      Sets the image name for this button's icon when selected.
    • getButtonGroupName

      public String getButtonGroupName(JComponent aComponent)
      Returns the button group name for this button.
    • getButtonGroup

      public ButtonGroup getButtonGroup(JComponent aComponent)
      Returns the actual button group instance for this button
    • setButtonGroupName

      public 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).
    • getSendActionOnClick

      public boolean getSendActionOnClick(AbstractButton aButton)
      Returns whether this button sends action when clicked.
    • setSendActionOnClick

      public void setSendActionOnClick(AbstractButton aButton, boolean aValue)
      Sets whether this button sends action when clicked.
    • getSendActionOnDoubleClick

      public boolean getSendActionOnDoubleClick(AbstractButton aButton)
      Returns whether this button sends action when double-clicked.
    • setSendActionOnDoubleClick

      public void setSendActionOnDoubleClick(AbstractButton aButton, boolean aValue)
      Sets whether this button sends action when double-clicked.
    • getMarginString

      public String getMarginString(AbstractButton aButton)
      Returns the margin string for a button, if it's been explicity set in Ribs.
    • setMarginString

      public void setMarginString(AbstractButton aButton, String aString)
      Sets the margin string for a button.
    • getValue

      public Object getValue(JComponent aComponent)
      Returns the button's value.
      Overrides:
      getValue in class RJHelper
    • getStringValue

      public String getStringValue(JComponent aComponent)
      Returns the button's visible text.
      Overrides:
      getStringValue in class RJHelper
    • setValue

      public void setValue(JComponent aComponent, String aValue)
      Sets the visible button text.
      Overrides:
      setValue in class RJHelper
    • getBoolValue

      public boolean getBoolValue(JComponent aComponent)
      Returns the button's bool value.
      Overrides:
      getBoolValue in class RJHelper
    • setValue

      public void setValue(JComponent aComponent, boolean aValue)
      Sets the button's boolean value.
      Overrides:
      setValue in class RJHelper
    • toXML

      public RXElement toXML(JComponent aComponent, RXArchiver anArchiver)
      XML archival.
      Overrides:
      toXML in class JButtonOrLabelHpr
    • fromXML

      public void fromXML(JComponent aComponent, RXArchiver anArchiver, RXElement anElement)
      XML unarchival.
      Overrides:
      fromXML in class JButtonOrLabelHpr