Documentation API of the 'jhplot.HMLabel' Java class

Class HMLabel

  • All Implemented Interfaces:

    public class HMLabelextends Objectimplements Serializable
    Create an interactive multi-line label in the USER or NDC coordinates. The label can be defined in the NDC (normalized coordinate system) or the user coordinate For more labels look at the shape package
    See Also:
    Serialized Form
    • Constructor Detail

      • HMLabel

        public HMLabel(String[] s,       Font f,       Color c)
        Make a multitext label
        s - Lines of a text
        f - Font
        c - Color
      • HMLabel

        public HMLabel(String[] s,       Font f)
        Make a multitext label (black color is used).
        s - Text
        f - Font
      • HMLabel

        public HMLabel(String[] s)
        Make a multitext label with default attributes.
        s - lines of the text
      • HMLabel

        public HMLabel(String[] s,       double x,       double y)
        Make a label with specific coordinated in the data system
        s - Text
        x - Position in X
        y - Position in Y
      • HMLabel

        public HMLabel(String[] s,       double x,       double y,       String howToSet)
        Make a label with specific coordinates.
        s - Text
        x - position in X
        y - position in Y
        howToSet - set it to "NDC" for normalized coordinates (in the range 0-1). This is a data independent position set it to "USER" for the user coordinates
    • Method Detail

      • setText

        public void setText(String[] s)
        Sets the text of the label.
        s - new text for the label
      • getText

        public String[] getText()
        Get text of the label.
        the current text of the label
      • setColor

        public void setColor(Color c)
        Sets the color to a specific value
        c - color used to draw the label
      • getColor

        public Color getColor()
        Get color of the label.
        the color used to draw the label
      • setFont

        public void setFont(Font f)
        Sets the font to a specific value
        f - font used to draw the label
      • getFont

        public Font getFont()
        Get the text font.
        the font used to draw the label
      • setRotation

        public void setRotation(double r)
        Sets the rotation angle. Although all kind of angles (in PI-units) are allowed, internally we only use the interval 0-2pi hence we take care of all other cases.
        r - angle for this label
      • getRotation

        public double getRotation()
        Returns the rotation angle.
        angle for this label
      • seLocation

        public void seLocation(double x,              double y)
        Sets the location of this label in data coordinates. Ones set this way, you cannot plot the label, it must first define the location in pixel-coordinates (setLocation(x,y));
        x - x-position of the lower-left corner of the text
        y - y-position of the lower-left corner of the text
      • getPositionCoordinate

        public int getPositionCoordinate()
        Is the position set?
        0 if location is not defined 1 if the position is defined in the NDC system 2 if the location is defined in the user coordinates
      • getX

        public double getX()
        Returns the X position of the text.
        the x-position of the text
      • getY

        public double getY()
        Returns the Y position of the text.
        the y-position of the text
      • getGraphLabel

        public jplot.GraphLabel getGraphLabel()
        Get a label with default attributes
        get GraphLabel
      • doc

        public void doc()
        Show online documentation.

SCaVis 2.2 © jWork.ORG

Warning: You see this message because an access to the SCaVis documentation for third-party Java classes is denied. Guests can only view jhplot Java API. To enable the description of all Java classes of SCaVis, please request the full SCaVis membership.

If you are already a full member, please login to the SCaVis member area before visiting this documentation.