Documentation of 'sgtplot.beans.Label' Java class
Label
sgtplot.beans

Class Label

  • All Implemented Interfaces:
    java.io.Serializable


    public class Label
    extends java.lang.Object
    implements java.io.Serializable
    Encapsulates SGLabel properties.
    Since:
    3.0
    See Also:
    Serialized Form
    • Constructor Detail

      • Label

        public Label()
        Default constructor. Width and height are set to 0.0, name and location are null.
      • Label

        public Label(java.lang.String id,
                     Point2D.Double loc,
                     double wid,
                     double hgt)
        Label constructor.
        Parameters:
        id - label identifier
        loc - location in physical coordinates
        wid - width in physical coordinates
        hgt - height in physical coorindates.
    • Method Detail

      • getId

        public java.lang.String getId()
        Get Label identifier.
        Returns:
        identification
      • setId

        public void setId(java.lang.String id)
        Set label identifier.
        Parameters:
        id - identifier
      • setBoundsP

        public void setBoundsP(Rectangle2D.Double bounds)
        Set Label bounds.
        Parameters:
        bounds - bounds in physical coordinates.
      • setLocationP

        public void setLocationP(Point2D.Double locationP)
        Set Label location. Updates x and y in bounds.
        Parameters:
        locationP - location in physical coordinates.
      • getLocationP

        public Point2D.Double getLocationP()
        Get Label location
        Returns:
        location in physical coordinates
      • setHeightP

        public void setHeightP(double heightP)
        Set Label height. Updates height in bounds.
        Parameters:
        heightP - height in physical coordinates
      • getHeightP

        public double getHeightP()
        Get Label height.
        Returns:
        height
      • setWidthP

        public void setWidthP(double widthP)
        Set label width. Updates width in bounds.
        Parameters:
        widthP - width in physcial coordinates
      • getWidthP

        public double getWidthP()
        Get label width.
        Returns:
        width
      • removeChangeListener

        public void removeChangeListener(javax.swing.event.ChangeListener l)
        Remove change listener.
        Parameters:
        l - change listener.
      • removeAllChangeListeners

        public void removeAllChangeListeners()
        Remove all change listeners.
      • addChangeListener

        public void addChangeListener(javax.swing.event.ChangeListener l)
      • removeDesignChangeListeners

        public void removeDesignChangeListeners()
        Remove change listeners that implement DesignListener.
      • setText

        public void setText(java.lang.String text)
        Set label text.
        Parameters:
        text - label text
      • getText

        public java.lang.String getText()
        Get label text.
        Returns:
        text
      • setVisible

        public void setVisible(boolean visible)
        Set label visiblity. Visible if true. Default = true.
        Parameters:
        visible - label visiblity
      • isVisible

        public boolean isVisible()
        Is Label visible?
        Returns:
        true, if label is visible
      • setInstantiated

        public void setInstantiated(boolean instantiated)
        Set instantiation for label. Used internally. Set when SGLabel is instantiated from Label.
        Parameters:
        instantiated - SGLabel instantiated
      • isInstantiated

        public boolean isInstantiated()
        Is SGLabel instatiated?
        Returns:
        true, if SGLabel is instantiated
      • setPanelHolder

        public void setPanelHolder(PanelHolder pHolder)
        Set panelholder.
        Parameters:
        pHolder - panel holder
      • getPanelHolder

        public PanelHolder getPanelHolder()
        Get panel holder.
        Returns:
        panel holder
      • getJustification

        public int getJustification()
        Get label justification.
        Returns:
        justification.
      • setJustification

        public void setJustification(int justification)
        Set label justification. Justification can be SGLabel.LEFT, SGLabel.RIGHT, or SGLabel.CENTER. Default = SGLabel.LEFT.
        Parameters:
        justification - label justification
        See Also:
        SGLabel
      • getColor

        public java.awt.Color getColor()
        Get label color.
        Returns:
        color
      • getFont

        public java.awt.Font getFont()
        Get label font.
        Returns:
        font
      • setColor

        public void setColor(java.awt.Color color)
        Set label color. Default = Color.black.
        Parameters:
        color - label color
      • setFont

        public void setFont(java.awt.Font font)
        Set label font. Default = Helvectia, PLAIN
        Parameters:
        font - label font
      • getOrientation

        public int getOrientation()
        Get label orientation.
        Returns:
        orientation
      • setOrientation

        public void setOrientation(int orientation)
        Set label orientation. Legal values are SGLabel.HORIZONTAL and SGLabel.VERTICAL. Default = SGLabel.HORIZONTAL.
        Parameters:
        orientation - label orientation
        See Also:
        SGLabel
      • isSelectable

        public boolean isSelectable()
        Is label selectable?
        Returns:
        true if label is selectable
      • setSelectable

        public void setSelectable(boolean selectable)
        Set label selectable.
        Parameters:
        selectable - true if label is selectable

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.