Documentation of 'org.jfree.chart.block.AbstractBlock' Java class
AbstractBlock
org.jfree.chart.block

Class AbstractBlock

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      org.jfree.ui.Size2D arrange(java.awt.Graphics2D g2)
      Arranges the contents of the block, with no constraints, and returns the block size.
      org.jfree.ui.Size2D arrange(java.awt.Graphics2D g2, RectangleConstraint constraint)
      Arranges the contents of the block, within the given constraints, and returns the block size.
      java.lang.Object clone()
      Returns a clone of this block.
      boolean equals(java.lang.Object obj)
      Tests this block for equality with an arbitrary object.
      BlockBorder getBorder()
      Deprecated. 
      Use getFrame() instead.
      java.awt.geom.Rectangle2D getBounds()
      Returns the current bounds of the block.
      double getContentXOffset()
      Returns the x-offset for the content within the block.
      double getContentYOffset()
      Returns the y-offset for the content within the block.
      BlockFrame getFrame()
      Returns the current frame (border).
      double getHeight()
      Returns the natural height of the block, if this is known in advance.
      java.lang.String getID()
      Returns the id.
      org.jfree.ui.RectangleInsets getMargin()
      Returns the margin.
      org.jfree.ui.RectangleInsets getPadding()
      Returns the padding.
      double getWidth()
      Returns the natural width of the block, if this is known in advance.
      void setBorder(BlockBorder border)
      Deprecated. 
      void setBorder(double top, double left, double bottom, double right)
      Sets a black border with the specified line widths.
      void setBounds(java.awt.geom.Rectangle2D bounds)
      Sets the bounds of the block.
      void setFrame(BlockFrame frame)
      Sets the frame (or border).
      void setHeight(double height)
      Sets the natural width of the block, if this is known in advance.
      void setID(java.lang.String id)
      Sets the id for the block.
      void setMargin(double top, double left, double bottom, double right)
      Sets the margin.
      void setMargin(org.jfree.ui.RectangleInsets margin)
      Sets the margin (use RectangleInsets.ZERO_INSETS for no padding).
      void setPadding(double top, double left, double bottom, double right)
      Sets the padding.
      void setPadding(org.jfree.ui.RectangleInsets padding)
      Sets the padding (use RectangleInsets.ZERO_INSETS for no padding).
      void setWidth(double width)
      Sets the natural width of the block, if this is known in advance.
      • Methods inherited from class java.lang.Object

        getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getID

        public java.lang.String getID()
        Returns the id.
        Returns:
        The id (possibly null).
        See Also:
        setID(String)
      • setID

        public void setID(java.lang.String id)
        Sets the id for the block.
        Parameters:
        id - the id (null permitted).
        See Also:
        getID()
      • getWidth

        public double getWidth()
        Returns the natural width of the block, if this is known in advance. The actual width of the block may be overridden if layout constraints make this necessary.
        Returns:
        The width.
        See Also:
        setWidth(double)
      • setWidth

        public void setWidth(double width)
        Sets the natural width of the block, if this is known in advance.
        Parameters:
        width - the width (in Java2D units)
        See Also:
        getWidth()
      • getHeight

        public double getHeight()
        Returns the natural height of the block, if this is known in advance. The actual height of the block may be overridden if layout constraints make this necessary.
        Returns:
        The height.
        See Also:
        setHeight(double)
      • setHeight

        public void setHeight(double height)
        Sets the natural width of the block, if this is known in advance.
        Parameters:
        height - the width (in Java2D units)
        See Also:
        getHeight()
      • getMargin

        public org.jfree.ui.RectangleInsets getMargin()
        Returns the margin.
        Returns:
        The margin (never null).
        See Also:
        getMargin()
      • setMargin

        public void setMargin(org.jfree.ui.RectangleInsets margin)
        Sets the margin (use RectangleInsets.ZERO_INSETS for no padding).
        Parameters:
        margin - the margin (null not permitted).
        See Also:
        getMargin()
      • setMargin

        public void setMargin(double top,
                              double left,
                              double bottom,
                              double right)
        Sets the margin.
        Parameters:
        top - the top margin.
        left - the left margin.
        bottom - the bottom margin.
        right - the right margin.
        See Also:
        getMargin()
      • getBorder

        public BlockBorder getBorder()
        Deprecated. Use getFrame() instead.
        Returns the border.
        Returns:
        The border (never null).
      • setBorder

        public void setBorder(double top,
                              double left,
                              double bottom,
                              double right)
        Sets a black border with the specified line widths.
        Parameters:
        top - the top border line width.
        left - the left border line width.
        bottom - the bottom border line width.
        right - the right border line width.
      • setFrame

        public void setFrame(BlockFrame frame)
        Sets the frame (or border).
        Parameters:
        frame - the frame (null not permitted).
        Since:
        1.0.5
        See Also:
        getFrame()
      • getPadding

        public org.jfree.ui.RectangleInsets getPadding()
        Returns the padding.
        Returns:
        The padding (never null).
        See Also:
        setPadding(RectangleInsets)
      • setPadding

        public void setPadding(org.jfree.ui.RectangleInsets padding)
        Sets the padding (use RectangleInsets.ZERO_INSETS for no padding).
        Parameters:
        padding - the padding (null not permitted).
        See Also:
        getPadding()
      • setPadding

        public void setPadding(double top,
                               double left,
                               double bottom,
                               double right)
        Sets the padding.
        Parameters:
        top - the top padding.
        left - the left padding.
        bottom - the bottom padding.
        right - the right padding.
      • getContentXOffset

        public double getContentXOffset()
        Returns the x-offset for the content within the block.
        Returns:
        The x-offset.
        See Also:
        getContentYOffset()
      • getContentYOffset

        public double getContentYOffset()
        Returns the y-offset for the content within the block.
        Returns:
        The y-offset.
        See Also:
        getContentXOffset()
      • arrange

        public org.jfree.ui.Size2D arrange(java.awt.Graphics2D g2)
        Arranges the contents of the block, with no constraints, and returns the block size.
        Parameters:
        g2 - the graphics device.
        Returns:
        The block size (in Java2D units, never null).
      • arrange

        public org.jfree.ui.Size2D arrange(java.awt.Graphics2D g2,
                                           RectangleConstraint constraint)
        Arranges the contents of the block, within the given constraints, and returns the block size.
        Parameters:
        g2 - the graphics device.
        constraint - the constraint (null not permitted).
        Returns:
        The block size (in Java2D units, never null).
      • getBounds

        public java.awt.geom.Rectangle2D getBounds()
        Returns the current bounds of the block.
        Returns:
        The bounds.
        See Also:
        setBounds(Rectangle2D)
      • setBounds

        public void setBounds(java.awt.geom.Rectangle2D bounds)
        Sets the bounds of the block.
        Parameters:
        bounds - the bounds (null not permitted).
        See Also:
        getBounds()
      • equals

        public boolean equals(java.lang.Object obj)
        Tests this block for equality with an arbitrary object.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the object (null permitted).
        Returns:
        A boolean.
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Returns a clone of this block.
        Overrides:
        clone in class java.lang.Object
        Returns:
        A clone.
        Throws:
        java.lang.CloneNotSupportedException - if there is a problem creating the clone.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.