Documentation of 'org.jplot2d.element.impl.TitleImpl' Java class
TitleImpl
org.jplot2d.element.impl

Class TitleImpl

    • Constructor Detail

      • TitleImpl

        public TitleImpl()
    • Method Detail

      • getId

        public java.lang.String getId()
        Description copied from interface: Element
        Returns the id string of this element
        Specified by:
        getId in interface Element
        Returns:
        the id string
      • getInvokeStepFormParent

        public InvokeStep getInvokeStepFormParent()
        Description copied from interface: ElementEx
        Return the invoke step to get this object from its parent.
        Specified by:
        getInvokeStepFormParent in interface ElementEx
        Returns:
        the invoke step
      • canContribute

        public boolean canContribute()
        Description copied from interface: ComponentEx
        Returns true if this component can contribute visible parts to plot rendering artifact when this component is visible. Subcomponents are not considered.
        Specified by:
        canContribute in interface ComponentEx
        Overrides:
        canContribute in class ComponentImpl
        Returns:
        the indicator
      • setVisible

        public void setVisible(boolean visible)
        Description copied from interface: PComponent
        Shows or hides this component depending on the value of parameter b.
        Specified by:
        setVisible in interface PComponent
        Overrides:
        setVisible in class ComponentImpl
        Parameters:
        visible - if true, shows this component; otherwise, hides this component
        See Also:
        PComponent.isVisible()
      • getLocation

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

        public final void setLocation(java.awt.geom.Point2D p)
        Description copied from interface: Title
        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
        Specified by:
        setLocation in interface Title
        Parameters:
        p - the base point of the title
      • setLocation

        public void setLocation(double locX,
                                double locY)
        Description copied from interface: MovableComponent
        Moves this component to a new location.
        Specified by:
        setLocation in interface MovableComponent
        Parameters:
        locX - the x-coordinate of the new location
        locY - the y-coordinate of the new location
      • thisEffectiveColorChanged

        public void thisEffectiveColorChanged()
        Description copied from interface: ComponentEx
        Called when setColor() or parentEffectiveColorChanged() change the effective color of this component.
        Specified by:
        thisEffectiveColorChanged in interface ComponentEx
      • thisEffectiveFontChanged

        public void thisEffectiveFontChanged()
        Description copied from interface: ComponentEx
        Called when setFontXxx() or parentEffectiveFontChanged() change the effective font of this component.
        Specified by:
        thisEffectiveFontChanged in interface ComponentEx
      • getText

        public java.lang.String getText()
        Description copied from interface: TextComponent
        Returns the text string.
        Specified by:
        getText in interface TextComponent
        Returns:
        a String
      • setText

        public void setText(java.lang.String text)
        Description copied from interface: TextComponent
        Defines the single line of text to be displayed. The string can be in TeX-like syntax. A pair of "$" mark into math mode and out math mode. In math mode, Greek letter can be inputed as \alpha, \beta, etc. Superscripts (up high) and subscripts (down low) can be inputed by using "^" and "_". Notice that ^ and _ apply only to the next single character. If you want several things to be superscripted or subscripted, just enclose them in braces. eg: "plain text $x_\alpha^{2y}$".
        Specified by:
        setText in interface TextComponent
      • setTextModel

        public void setTextModel(MathElement model)
      • getHAlign

        public HAlign getHAlign()
        Description copied from interface: Title
        Get the horizontal alignment.
        Specified by:
        getHAlign in interface TextComponent
        Specified by:
        getHAlign in interface Title
        Returns:
        the horizontal alignment.
      • setHAlign

        public void setHAlign(HAlign hAlign)
        Description copied from interface: Title
        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
        Specified by:
        setHAlign in interface Title
        Parameters:
        hAlign - horizontal alignment.
      • getVAlign

        public VAlign getVAlign()
        Description copied from interface: Title
        Get the vertical alignment.
        Specified by:
        getVAlign in interface TextComponent
        Specified by:
        getVAlign in interface Title
        Returns:
        the vertical alignment.
      • setVAlign

        public void setVAlign(VAlign vAlign)
        Description copied from interface: Title
        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
        Specified by:
        setVAlign in interface Title
        Parameters:
        vAlign - The vertical alignment.
      • getSize

        public java.awt.geom.Dimension2D getSize()
        Description copied from interface: PComponent
        Returns the paper size of this component.
        Specified by:
        getSize in interface PComponent
        Returns:
      • getPosition

        public TitlePosition getPosition()
        Description copied from interface: Title
        Gets the current position of this title in a layer.
        Specified by:
        getPosition in interface Title
        Returns:
        the position.
      • setPosition

        public void setPosition(TitlePosition position)
        Description copied from interface: Title
        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 Title.setLocation(Point2D), #setHAlign(), #setVAlign() .
        Specified by:
        setPosition in interface Title
        Parameters:
        position - the position of this title.
      • getGapFactor

        public double getGapFactor()
        Description copied from interface: Title
        Returns the ratio of gap to its height. The default value is 1/4.
        Specified by:
        getGapFactor in interface Title
        Returns:
        the gap factor
      • setGapFactor

        public void setGapFactor(double factor)
        Description copied from interface: Title
        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.
        Specified by:
        setGapFactor in interface Title
      • getBounds

        public java.awt.geom.Rectangle2D getBounds()
        Description copied from interface: PComponent
        Returns the paper bounds relative to its location. The units of bounds is pt (1/72 inch)
        Specified by:
        getBounds in interface PComponent
        Overrides:
        getBounds in class ComponentImpl
        Returns:
        the paper bounds of this component.
      • calcSize

        public void calcSize()
        Description copied from interface: TitleEx
        Called by plot to calculate size of this title.
        Specified by:
        calcSize in interface TitleEx
      • copyFrom

        public void copyFrom(ElementEx src)
        Description copied from interface: ElementEx
        Copies all properties from given src to this element. Notice properties of sub-elements are not copied over.
        Specified by:
        copyFrom in interface ElementEx
        Overrides:
        copyFrom in class ComponentImpl
        Parameters:
        src - the src
      • draw

        public void draw(java.awt.Graphics2D g)
        Description copied from interface: ComponentEx
        Draw this component only. All its children is not drawn.
        Specified by:
        draw in interface ComponentEx
        Parameters:
        g - to the Graphics2D drawing. The transformation of this component is not applied.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.