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

Interface PComponent

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      java.awt.geom.Rectangle2D getBounds()
      Returns the paper bounds relative to its location.
      java.awt.Color getColor()
      Gets the foreground color of this component.
      java.awt.Font getEffectiveFont()
      Returns the effective font of this component.
      java.lang.String getFontName()
      Returns the name of the font.
      float getFontScale()
      Returns the scale apply to parent's font size when font size is NaN.
      float getFontSize()
      Returns the Font size.
      int getFontStyle()
      Returns the style of the font.
      java.awt.geom.Point2D getLocation()
      Returns the location of this component.
      PaperTransform getPaperTransform()
      Returns the paper transform of this component, which can be used to convert between device coordinate and paper coordinate of this component.
      PComponent getParent()
      Gets the parent of this component.
      java.awt.geom.Rectangle2D getSelectableBounds()
      Returns the selectable bounds relative to its location.
      java.awt.geom.Dimension2D getSize()
      Returns the paper size of this component.
      int getZOrder()
      Returns the z-order of this component.
      boolean isCacheable()
      Returns true if this component has its own rendering cache.
      boolean isSelectable()
      Returns true if the component is selectable by mouse.
      boolean isVisible()
      Determines whether this component should be visible when its parent is visible.
      void setCacheable(boolean mode)
      Sets if this component has its own rendering cache.
      void setColor(java.awt.Color c)
      Sets the foreground color of this component.
      void setFont(java.awt.Font font)
      Sets the font name, style and size for this component.
      void setFontName(java.lang.String name)
      Apply the new font with the given name
      void setFontScale(float scale)
      Sets the scale apply to parent's font size when font size is NaN.
      void setFontSize(float size)
      Sets a new size of the string.
      void setFontStyle(int style)
      Apply a new style to the font.
      void setSelectable(boolean selectable)
      Set the selectable property.
      void setVisible(boolean b)
      Shows or hides this component depending on the value of parameter b.
      void setZOrder(int z)
      Sets the z-order of this component.
    • Method Detail

      • getParent

        PComponent getParent()
        Gets the parent of this component.
        Specified by:
        getParent in interface Element
        Returns:
        the parent of this component
      • isVisible

        boolean isVisible()
        Determines whether this component should be visible when its parent is visible. Components are initially visible.
        Returns:
        true if the component is visible, false otherwise
        See Also:
        setVisible(boolean)
      • setVisible

        void setVisible(boolean b)
        Shows or hides this component depending on the value of parameter b.
        Parameters:
        b - if true, shows this component; otherwise, hides this component
        See Also:
        isVisible()
      • isCacheable

        boolean isCacheable()
        Returns true if this component has its own rendering cache.
        Returns:
        the cache mode of this component
      • setCacheable

        void setCacheable(boolean mode)
        Sets if this component has its own rendering cache.
        Parameters:
        mode - the cache mode
      • isSelectable

        boolean isSelectable()
        Returns true if the component is selectable by mouse. Only selectable component can be movable.
        Returns:
        true if selectable
      • setSelectable

        void setSelectable(boolean selectable)
        Set the selectable property.
        Parameters:
        select - if true object is selectable
      • getZOrder

        int getZOrder()
        Returns the z-order of this component.
        Returns:
        the z-order of this component
      • setZOrder

        void setZOrder(int z)
        Sets the z-order of this component. The component with higher z-order is on top.
        Parameters:
        z - the z-order value
      • getColor

        java.awt.Color getColor()
        Gets the foreground color of this component.
        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:
        setColor(java.awt.Color)
      • setColor

        void setColor(java.awt.Color c)
        Sets the foreground color of this component.
        Parameters:
        c - 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:
        getColor()
      • getFontName

        java.lang.String getFontName()
        Returns the name of the font.
        Returns:
        the name of the font.
      • setFontName

        void setFontName(java.lang.String name)
        Apply the new font with the given name
        Parameters:
        name - the font name.
      • getFontStyle

        int getFontStyle()
        Returns the style of the font. The style can be PLAIN, BOLD, ITALIC, or BOLD+ITALIC.
        Returns:
        the style of the font
        See Also:
        Font
      • setFontStyle

        void setFontStyle(int style)
        Apply a new style to the font. The style can be PLAIN, BOLD, ITALIC, or BOLD+ITALIC.
        Parameters:
        style - the style to apply
        See Also:
        Font
      • getFontSize

        float getFontSize()
        Returns the Font size.
        Returns:
        the font size.
      • setFontSize

        void setFontSize(float size)
        Sets a new size of the string.
        Parameters:
        size - the new size of the font.
      • getFontScale

        float getFontScale()
        Returns the scale apply to parent's font size when font size is NaN.
        Returns:
        the font scale.
      • setFontScale

        void setFontScale(float scale)
        Sets the scale apply to parent's font size when font size is NaN.
        Parameters:
        scale - the scale
      • getEffectiveFont

        java.awt.Font getEffectiveFont()
        Returns the effective font of this component.
        Returns:
        the effective font of this component
      • setFont

        void setFont(java.awt.Font font)
        Sets the font name, style and size for this component.
        Parameters:
        font - the desired Font for this component
      • getLocation

        java.awt.geom.Point2D getLocation()
        Returns the location of this component.
        Returns:
        the base point in its parent's paper coordinate space
      • getSize

        java.awt.geom.Dimension2D getSize()
        Returns the paper size of this component.
        Returns:
      • getBounds

        java.awt.geom.Rectangle2D getBounds()
        Returns the paper bounds relative to its location. The units of bounds is pt (1/72 inch)
        Returns:
        the paper bounds of this component.
      • getSelectableBounds

        java.awt.geom.Rectangle2D getSelectableBounds()
        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)
        Returns:
        the paper bounds of this component.
      • getPaperTransform

        PaperTransform getPaperTransform()
        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

        Returns:
        the paper transform of this component

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.