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

Class SymbolAnnotationImpl

    • Constructor Detail

      • SymbolAnnotationImpl

        public SymbolAnnotationImpl()
    • 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
        Overrides:
        getId in class PointAnnotationImpl
        Returns:
        the id string
      • getPaperTransform

        public PaperTransform getPaperTransform()
        Description copied from interface: PComponent
        Returns the paper transform of this component, which can be used to convert between device coordinate and paper coordinate of this component. The original point of paper coordinate is the location point of this component.

        Returns null if the component is not added to a plot or not laid out

        Specified by:
        getPaperTransform in interface PComponent
        Overrides:
        getPaperTransform in class ComponentImpl
        Returns:
        the paper transform of this component
      • 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 PointAnnotationImpl
        Parameters:
        src - the src
      • getSymbolSize

        public float getSymbolSize()
        Description copied from interface: SymbolAnnotation
        Returns the symbol size of this annotation
        Specified by:
        getSymbolSize in interface SymbolAnnotation
        Returns:
        the symbol size of this annotation
      • getSymbolScale

        public float getSymbolScale()
        Description copied from interface: SymbolAnnotation
        Returns the scale apply to effective font size to derive symbol size when symbol size is NaN.
        Specified by:
        getSymbolScale in interface SymbolAnnotation
        Returns:
        the font scale.
      • setSymbolScale

        public void setSymbolScale(float scale)
        Description copied from interface: SymbolAnnotation
        Sets the scale apply to effective font size to derive symbol size when symbol size is NaN.
        Specified by:
        setSymbolScale in interface SymbolAnnotation
        Parameters:
        scale - the scale
      • getTextOffsetFactorX

        public float getTextOffsetFactorX()
        Description copied from interface: SymbolAnnotation
        Returns the X offset factor of text. The offset is relative to the base point of this annotation. The factor apply to the half size of symbol.
        Specified by:
        getTextOffsetFactorX in interface SymbolAnnotation
        Returns:
        the X offset factor of text
      • setTextOffsetFactorX

        public void setTextOffsetFactorX(float offset)
        Description copied from interface: SymbolAnnotation
        Sets the X offset factor of text. The offset is relative to the base point of this annotation. The factor apply to the half size of symbol.
        Specified by:
        setTextOffsetFactorX in interface SymbolAnnotation
        Parameters:
        offset - the X offset factor of text
      • getTextOffsetFactorY

        public float getTextOffsetFactorY()
        Description copied from interface: SymbolAnnotation
        Returns the Y offset of text.The offset is relative to the base point of this annotation. The factor apply to the half size of symbol.
        Specified by:
        getTextOffsetFactorY in interface SymbolAnnotation
        Returns:
        the Y offset factor of text
      • setTextOffsetFactorY

        public void setTextOffsetFactorY(float offset)
        Description copied from interface: SymbolAnnotation
        Sets the Y offset of text.The offset is relative to the base point of this annotation. The factor apply to the half size of symbol.
        Specified by:
        setTextOffsetFactorY in interface SymbolAnnotation
        Parameters:
        offset - the Y offset factor of text
      • setHAlign

        public void setHAlign(HAlign hAlign)
        Description copied from interface: TextComponent
        Set the horizontal alignment. The alignment can be LEFT, CENTER, or RIGHT. eg, LEFT means the title is on the left of the base point.
        Specified by:
        setHAlign in interface TextComponent
        Parameters:
        hAlign - the horizontal alignment.
      • getVAlign

        public VAlign getVAlign()
        Specified by:
        getVAlign in interface TextComponent
        Returns:
        the vertical alignment or null if not set.
      • setVAlign

        public void setVAlign(VAlign vAlign)
        Description copied from interface: TextComponent
        Set the vertical alignment. The alignment can be TOP, MIDDLE, or BOTTOM. eg, TOP means the title is on the top of the base point
        Specified by:
        setVAlign in interface TextComponent
        Parameters:
        vAlign - the vertical alignment.
      • getAngle

        public double getAngle()
        Description copied from interface: SymbolAnnotation
        Returns the rotation angle of the text.
        Specified by:
        getAngle in interface SymbolAnnotation
        Returns:
        the rotation angle value
      • setAngle

        public void setAngle(double angle)
        Description copied from interface: SymbolAnnotation
        Set the rotation angle of the text. The angle start to count from horizontal direction and grow in counter-clock wise direction.
        Specified by:
        setAngle in interface SymbolAnnotation
        Parameters:
        angle - the rotation angle
      • 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)
      • 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.
      • 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.