Documentation of 'org.jplot2d.element.Title' Java class
Title
org.jplot2d.element

Interface Title

    • Method Detail

      • getPosition

        TitlePosition getPosition()
        Gets the current position of this title in a layer.
        Returns:
        the position.
      • setPosition

        void setPosition(TitlePosition position)
        Sets the position of this title. Possible value is FREE, TOPLEFT, TOPCENTER, TOPRIGHT, BOTTOMLEFT, BOTTOMCENTER, BOTTOMRIGHT. Only when position is FREE, the title can be located by setLocation(Point2D), #setHAlign(), #setVAlign() .
        Parameters:
        position - the position of this title.
      • getLocation

        java.awt.geom.Point2D getLocation()
        Gets the location of this title.
        Specified by:
        getLocation in interface PComponent
        Returns:
        an instance of Point representing the base point of this title
      • setLocation

        void setLocation(java.awt.geom.Point2D loc)
        Moves this title to a new location.

        Notice: This method should be called when the position is null, otherwise the behavior is not defined.

        Specified by:
        setLocation in interface MovableComponent
        Parameters:
        loc - the base point of the title
      • getHAlign

        HAlign getHAlign()
        Get the horizontal alignment.
        Specified by:
        getHAlign in interface TextComponent
        Returns:
        the horizontal alignment.
      • setHAlign

        void setHAlign(HAlign halign)
        Set the horizontal alignment. The alignment can be LEFT, CENTER, or RIGHT. eg, LEFT means the base point is on the left of this title.

        Notice: This method should be called when the position is null, otherwise the behavior is not defined.

        Specified by:
        setHAlign in interface TextComponent
        Parameters:
        halign - horizontal alignment.
      • getVAlign

        VAlign getVAlign()
        Get the vertical alignment.
        Specified by:
        getVAlign in interface TextComponent
        Returns:
        the vertical alignment.
      • setVAlign

        void setVAlign(VAlign valign)
        Set the vertical alignment. The alignment can be TOP, MIDDLE, or BOTTOM. eg, TOP means the base point is on the top of this title.

        Notice: This method should be called when the position is null, otherwise the behavior is not defined.

        Specified by:
        setVAlign in interface TextComponent
        Parameters:
        valign - The vertical alignment.
      • getGapFactor

        double getGapFactor()
        Returns the ratio of gap to its height. The default value is 1/4.
        Returns:
        the gap factor
      • setGapFactor

        void setGapFactor(double factor)
        Sets the ratio of gap to its height. The gap is under the title when its position is TOPLEFT, TOPCENTER, TOPRIGHT. The gap is above the title when its position is BOTTOMLEFT, BOTTOMCENTER, BOTTOMRIGHT.
      • isMovable

        boolean isMovable()
        Description copied from interface: MovableComponent
        Returns true if the component is movable by mouse dragging. Only selectable component can be movable.
        Specified by:
        isMovable in interface MovableComponent
        Returns:
        true if movable
      • setMovable

        void setMovable(boolean movable)
        Description copied from interface: MovableComponent
        Set if the component is movable by mouse dragging.
        Specified by:
        setMovable in interface MovableComponent
        Parameters:
        movable - true if movable

DMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.