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

Class ComponentImpl

    • Constructor Detail

      • ComponentImpl

        public ComponentImpl()
    • Method Detail

      • addPropertyChangeListener

        public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
      • removePropertyChangeListener

        public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
      • getMooringMap

        public java.util.Map<Element,Element> getMooringMap()
        Description copied from interface: ComponentEx
        Returns a map to tell why this component cannot be removed from its container. The key is the moored element, required by its value.
        Specified by:
        getMooringMap in interface ComponentEx
        Returns:
        a map. The key is the element required by its value.
      • 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
        Returns:
        the indicator
      • isVisible

        public boolean isVisible()
        Description copied from interface: PComponent
        Determines whether this component should be visible when its parent is visible. Components are initially visible.
        Specified by:
        isVisible in interface PComponent
        Returns:
        true if the component is visible, false otherwise
        See Also:
        PComponent.setVisible(boolean)
      • 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
        Parameters:
        visible - if true, shows this component; otherwise, hides this component
        See Also:
        PComponent.isVisible()
      • isCacheable

        public boolean isCacheable()
        Description copied from interface: PComponent
        Returns true if this component has its own rendering cache.
        Specified by:
        isCacheable in interface PComponent
        Returns:
        the cache mode of this component
      • setCacheable

        public void setCacheable(boolean cacheMode)
        Description copied from interface: PComponent
        Sets if this component has its own rendering cache.
        Specified by:
        setCacheable in interface PComponent
        Parameters:
        cacheMode - the cache mode
      • isSelectable

        public boolean isSelectable()
        Description copied from interface: PComponent
        Returns true if the component is selectable by mouse. Only selectable component can be movable.
        Specified by:
        isSelectable in interface PComponent
        Returns:
        true if selectable
      • setSelectable

        public void setSelectable(boolean selectable)
        Description copied from interface: PComponent
        Set the selectable property.
        Specified by:
        setSelectable in interface PComponent
      • setMovable

        public void setMovable(boolean movable)
        Description copied from interface: ComponentEx
        Set the movable property.
        Specified by:
        setMovable in interface ComponentEx
      • getZOrder

        public int getZOrder()
        Description copied from interface: PComponent
        Returns the z-order of this component.
        Specified by:
        getZOrder in interface PComponent
        Returns:
        the z-order of this component
      • setZOrder

        public void setZOrder(int z)
        Description copied from interface: PComponent
        Sets the z-order of this component. The component with higher z-order is on top.
        Specified by:
        setZOrder in interface PComponent
        Parameters:
        z - the z-order value
      • getColor

        public java.awt.Color getColor()
        Description copied from interface: PComponent
        Gets the foreground color of this component.
        Specified by:
        getColor in interface PComponent
        Returns:
        this component's foreground color; if this component does not have a foreground color, the foreground color of its parent is returned
        See Also:
        PComponent.setColor(java.awt.Color)
      • setColor

        public void setColor(java.awt.Color color)
        Description copied from interface: PComponent
        Sets the foreground color of this component.
        Specified by:
        setColor in interface PComponent
        Parameters:
        color - the color to become this component's foreground color; if this parameter is null then this component will inherit the foreground color of its parent
        See Also:
        PComponent.getColor()
      • getEffectiveColor

        public java.awt.Color getEffectiveColor()
        Description copied from interface: ComponentEx
        Returns the effective color of this component.
        Specified by:
        getEffectiveColor in interface ComponentEx
        Returns:
        the effective color of this component
      • getFontName

        public java.lang.String getFontName()
        Description copied from interface: PComponent
        Returns the name of the font.
        Specified by:
        getFontName in interface PComponent
        Returns:
        the name of the font.
      • setFontName

        public void setFontName(java.lang.String name)
        Description copied from interface: PComponent
        Apply the new font with the given name
        Specified by:
        setFontName in interface PComponent
        Parameters:
        name - the font name.
      • getFontStyle

        public int getFontStyle()
        Description copied from interface: PComponent
        Returns the style of the font. The style can be PLAIN, BOLD, ITALIC, or BOLD+ITALIC.
        Specified by:
        getFontStyle in interface PComponent
        Returns:
        the style of the font
        See Also:
        Font
      • setFontStyle

        public void setFontStyle(int style)
        Description copied from interface: PComponent
        Apply a new style to the font. The style can be PLAIN, BOLD, ITALIC, or BOLD+ITALIC.
        Specified by:
        setFontStyle in interface PComponent
        Parameters:
        style - the style to apply
        See Also:
        Font
      • getFontSize

        public float getFontSize()
        Description copied from interface: PComponent
        Returns the Font size.
        Specified by:
        getFontSize in interface PComponent
        Returns:
        the font size.
      • setFontSize

        public void setFontSize(float size)
        Description copied from interface: PComponent
        Sets a new size of the string.
        Specified by:
        setFontSize in interface PComponent
        Parameters:
        size - the new size of the font.
      • getFontScale

        public float getFontScale()
        Description copied from interface: PComponent
        Returns the scale apply to parent's font size when font size is NaN.
        Specified by:
        getFontScale in interface PComponent
        Returns:
        the font scale.
      • setFontScale

        public void setFontScale(float scale)
        Description copied from interface: PComponent
        Sets the scale apply to parent's font size when font size is NaN.
        Specified by:
        setFontScale in interface PComponent
        Parameters:
        scale - the scale
      • setFont

        public void setFont(java.awt.Font font)
        Description copied from interface: PComponent
        Sets the font name, style and size for this component.
        Specified by:
        setFont in interface PComponent
        Parameters:
        font - the desired Font for this component
      • getEffectiveFont

        public java.awt.Font getEffectiveFont()
        Description copied from interface: PComponent
        Returns the effective font of this component.
        Specified by:
        getEffectiveFont in interface PComponent
        Returns:
        the effective font of this component
      • 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
        Returns:
        the paper transform of this component
      • 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
        Returns:
        the paper bounds of this component.
      • getSelectableBounds

        public java.awt.geom.Rectangle2D getSelectableBounds()
        Description copied from interface: PComponent
        Returns the selectable bounds relative to its location. The selectable bound may be slightly larger than the bounds, for easy selection by mouse. The units of bounds is pt (1/72 inch)
        Specified by:
        getSelectableBounds in interface PComponent
        Returns:
        the paper bounds of this component.
      • isRedrawNeeded

        public boolean isRedrawNeeded()
        Description copied from interface: ComponentEx
        Returns true when this component need to be redrawn. The result only apply to cacheable component.
        Specified by:
        isRedrawNeeded in interface ComponentEx
        Returns:
        the redraw status
      • setRedrawNeeded

        public void setRedrawNeeded(boolean flag)
        Description copied from interface: ComponentEx
        Mark or clear the flag that indicate this component need to be redrawn, eg. when color changed.
        Specified by:
        setRedrawNeeded in interface ComponentEx
        Parameters:
        flag - the flag that indicate this component need to be redrawn
      • copyStructure

        public ComponentEx copyStructure(java.util.Map<ElementEx,ElementEx> orig2copyMap)
        Description copied from interface: ElementEx
        Create a structural copy of this element and put them into orig2copyMap. All properties are not copied. The parent of the copy are not set by this method.
        Specified by:
        copyStructure in interface ComponentEx
        Specified by:
        copyStructure in interface ElementEx
        Overrides:
        copyStructure in class ElementImpl
        Parameters:
        orig2copyMap - original element to copy map
        Returns:
        the structural copy of this element
      • 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 ElementImpl
        Parameters:
        src - the src

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.