Class JButtonOrLabelHpr

java.lang.Object
com.ribs.RJHelper
com.ribs.helpers.JButtonOrLabelHpr
Direct Known Subclasses:
AbstractButtonHpr, JLabelHpr

public class JButtonOrLabelHpr extends RJHelper
This class is the superclass for labels and buttons which handles attributes common to both classes.
  • Constructor Details

    • JButtonOrLabelHpr

      public JButtonOrLabelHpr()
      Creates a new JButtonOrLabelHpr.
  • Method Details

    • getImageName

      public String getImageName(JComponent aComponent)
      Returns the image name for this button's icon.
    • setImageName

      public void setImageName(JComponent aComponent, String aName)
      Sets the image name for this button's icon and tries to set the icon by asking Ribs for the named icon.
    • getIcon

      public Icon getIcon(JComponent aComponent)
      Returns the button or label icon.
    • setIcon

      public void setIcon(JComponent aComponent, Icon anIcon)
      Sets the button or label icon.
    • getText

      public String getText(JComponent aComponent)
      Returns the text for the button or label.
    • setText

      public void setText(JComponent aComponent, String aString)
      Sets the text for the button or label.
    • getHorizontalAlignment

      public int getHorizontalAlignment(JComponent aComponent)
      Standard button or label property
    • setHorizontalAlignment

      public void setHorizontalAlignment(JComponent aComponent, int val)
      Standard button or label property
    • getVerticalAlignment

      public int getVerticalAlignment(JComponent aComponent)
      Standard button or label property
    • setVerticalAlignment

      public void setVerticalAlignment(JComponent aComponent, int val)
      Standard button or label property
    • getHorizontalTextPosition

      public int getHorizontalTextPosition(JComponent aComponent)
      Standard button or label property
    • setHorizontalTextPosition

      public void setHorizontalTextPosition(JComponent aComponent, int val)
      Standard button or label property
    • getVerticalTextPosition

      public int getVerticalTextPosition(JComponent aComponent)
      Standard button or label property
    • setVerticalTextPosition

      public void setVerticalTextPosition(JComponent aComponent, int val)
      Standard button or label property
    • getIconTextGap

      public int getIconTextGap(JComponent aComponent)
      Standard button or label property
    • setIconTextGap

      public void setIconTextGap(JComponent aComponent, int val)
      Standard button or label property
    • toXML

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

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