Class 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 Detail

      • JButtonOrLabelHpr

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

      • getImageName

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

        public void setImageName​(javax.swing.JComponent aComponent,
                                 java.lang.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 javax.swing.Icon getIcon​(javax.swing.JComponent aComponent)
        Returns the button or label icon.
      • setIcon

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

        public java.lang.String getText​(javax.swing.JComponent aComponent)
        Returns the text for the button or label.
      • setText

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

        public int getHorizontalAlignment​(javax.swing.JComponent aComponent)
        Standard button or label property
      • setHorizontalAlignment

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

        public int getVerticalAlignment​(javax.swing.JComponent aComponent)
        Standard button or label property
      • setVerticalAlignment

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

        public int getHorizontalTextPosition​(javax.swing.JComponent aComponent)
        Standard button or label property
      • setHorizontalTextPosition

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

        public int getVerticalTextPosition​(javax.swing.JComponent aComponent)
        Standard button or label property
      • setVerticalTextPosition

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

        public int getIconTextGap​(javax.swing.JComponent aComponent)
        Standard button or label property
      • setIconTextGap

        public void setIconTextGap​(javax.swing.JComponent aComponent,
                                   int val)
        Standard button or label property
      • fromXML

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