Class LabeledShape

All Implemented Interfaces:
Archivable, DeepChangeListener, RMPropertyChanger, RMTypes, PropertyChangeListener, Cloneable, EventListener
Direct Known Subclasses:
AbstractButtonShape, JLabelShape

public class LabeledShape extends JComponentShape
A JComponentShape subclass for Labeled JComponents (JLabel, AbstractButton).
  • Constructor Details

    • LabeledShape

      public LabeledShape()
  • Method Details

    • getText

      public String getText()
      Returns the text.
    • setText

      public void setText(String aString)
      Sets the text.
    • getImageName

      public String getImageName()
      Returns the image name.
    • setImageName

      public void setImageName(String aName)
      Sets the image name.
    • getImageFile

      public WebFile getImageFile()
      Returns the image WebFile.
    • getImageFile

      public WebFile getImageFile(String aName)
      Returns the image WebFile.
    • getHorizontalAlignment

      public int getHorizontalAlignment()
      Returns the HorizontalAlignment.
    • setHorizontalAlignment

      public void setHorizontalAlignment(int aValue)
      Sets the HorizontalAlignment.
    • getHorizontalAlignmentDefault

      public int getHorizontalAlignmentDefault()
      Returns the default HorizontalAlignment.
    • getAlignmentX

      public RMTypes.AlignX getAlignmentX()
      Returns the horizontal alignment.
      Overrides:
      getAlignmentX in class RMShape
    • setAlignmentX

      public void setAlignmentX(RMTypes.AlignX anAlignX)
      Sets the alignment x.
      Overrides:
      setAlignmentX in class RMShape
    • getVerticalAlignment

      public int getVerticalAlignment()
      Returns the VerticalAlignment.
    • setVerticalAlignment

      public void setVerticalAlignment(int aValue)
      Sets the VerticalAlignment.
    • getVerticalAlignmentDefault

      public int getVerticalAlignmentDefault()
      Returns the default VerticalAlignment.
    • getAlignmentY

      public RMTypes.AlignY getAlignmentY()
      Returns the vertical alignment.
      Overrides:
      getAlignmentY in class RMShape
    • setAlignmentY

      public void setAlignmentY(RMTypes.AlignY anAlignY)
      Sets the alignment x.
      Overrides:
      setAlignmentY in class RMShape
    • getHorizontalTextPosition

      public int getHorizontalTextPosition()
      Returns the HorizontalTextPosition.
    • setHorizontalTextPosition

      public void setHorizontalTextPosition(int aValue)
      Sets the HorizontalTextPosition.
    • getVerticalTextPosition

      public int getVerticalTextPosition()
      Returns the VerticalTextPosition.
    • setVerticalTextPosition

      public void setVerticalTextPosition(int aValue)
      Sets the VerticalTextPosition.
    • getIconTextGap

      public int getIconTextGap()
      Returns the IconTextGap.
    • setIconTextGap

      public void setIconTextGap(int aValue)
      Sets the IconTextGap.
    • getHorizontalAlignmentString

      public static String getHorizontalAlignmentString(int anInt)
      Returns the horizontal alignment of the given component as a string ("left", "center" or "right").
    • getHorizontalAlignmentInt

      public static Integer getHorizontalAlignmentInt(String aString)
      Sets the horizontal alignment of the given component as a string ("left", "center" or "right").
    • getVerticalAlignmentString

      public static String getVerticalAlignmentString(int anInt)
      Returns the vertical alignment of the given component as a string ("top", "center" or "bottom").
    • getVerticalAlignmentInt

      public static Integer getVerticalAlignmentInt(String aString)
      Sets the vertical alignment of the given component as a string ("top", "center" or "bottom").
    • getHorizontalTextPositionString

      public static String getHorizontalTextPositionString(int anInt)
      Returns the labels horizontal text position as a string.
    • getHorizontalTextPositionInt

      public static Integer getHorizontalTextPositionInt(String aString)
      Sets the label's horizontal text position as a string.
    • getVerticalTextPositionString

      public static String getVerticalTextPositionString(int anInt)
      Returns the labels vertical text position as a string.
    • getVerticalTextPositionInt

      public static Integer getVerticalTextPositionInt(String aString)
      Sets the label's vertical text position as a string.
    • getIcon

      public Icon getIcon()
      Returns the icon.
    • setIcon

      public void setIcon(Icon anIcon)
      Sets the icon.
    • configureComponent

      protected void configureComponent(JBuilder aBldr, JComponent aComp)
      Override to apply subclass attributes.
      Overrides:
      configureComponent in class JComponentShape
    • getIcon

      @Nullable protected Icon getIcon(String aName)
      Returns an icon for given name.
    • childrenSuperSelectImmediately

      public boolean childrenSuperSelectImmediately()
      Declare this for editing.
      Overrides:
      childrenSuperSelectImmediately in class RMShape
    • toXMLShape

      protected RXElement toXMLShape(RXArchiver anArchiver)
      XML archival.
      Overrides:
      toXMLShape in class JComponentShape
    • fromXMLShape

      protected void fromXMLShape(RXArchiver anArchiver, RXElement anElement)
      XML unarchival.
      Overrides:
      fromXMLShape in class JComponentShape