Documentation of 'org.jhotdraw.draw.AbstractAttributedFigure' Java class
AbstractAttributedFigure
org.jhotdraw.draw

Class AbstractAttributedFigure

    • Constructor Detail

      • AbstractAttributedFigure

        public AbstractAttributedFigure()
        Creates a new instance.
    • Method Detail

      • setAttributeEnabled

        public void setAttributeEnabled(AttributeKey key,
                                        boolean b)
      • isAttributeEnabled

        public boolean isAttributeEnabled(AttributeKey key)
      • setAttributes

        public void setAttributes(java.util.Map<AttributeKey,java.lang.Object> map)
      • getAttributes

        public java.util.Map<AttributeKey,java.lang.Object> getAttributes()
        Description copied from interface: Figure
        Returns a view to all attributes of this figure. By convention, an unmodifiable map is returned.
        Specified by:
        getAttributes in interface Figure
      • getAttributesRestoreData

        public java.lang.Object getAttributesRestoreData()
        Description copied from interface: Figure
        Gets data which can be used to restore the attributes of the figure after a set has been applied to it.
        Specified by:
        getAttributesRestoreData in interface Figure
      • restoreAttributesTo

        public void restoreAttributesTo(java.lang.Object restoreData)
        Description copied from interface: Figure
        Restores the attributes of the figure to a previously stored state.
        Specified by:
        restoreAttributesTo in interface Figure
      • draw

        public void draw(java.awt.Graphics2D g)
        Description copied from interface: Figure
        Draws the figure.
        Specified by:
        draw in interface Figure
        Parameters:
        g - The Graphics2D to draw to.
      • getStroke

        public java.awt.Stroke getStroke()
      • getStrokeMiterLimitFactor

        public double getStrokeMiterLimitFactor()
      • getDrawingArea

        public java.awt.geom.Rectangle2D.Double getDrawingArea()
        Description copied from interface: Figure
        Returns the drawing area of the figure as a Rectangle.

        The drawing area is used to inform DrawingView about the area that is needed to draw this figure.

        The drawing area needs to be large enough, to take line width, line caps and other decorations into account that exceed the bounds of the Figure.

        Specified by:
        getDrawingArea in interface Figure
      • clone

        public AbstractAttributedFigure clone()
        Description copied from interface: Figure
        Returns a clone of the figure, with clones of all aggregated figures, such as children and decorators. The cloned figure does not clone the list of FigureListeners from its original.
        Specified by:
        clone in interface Figure
        Overrides:
        clone in class AbstractFigure
      • write

        public void write(DOMOutput out)
                   throws java.io.IOException
        Specified by:
        write in interface DOMStorable
        Throws:
        java.io.IOException
      • read

        public void read(DOMInput in)
                  throws java.io.IOException
        Specified by:
        read in interface DOMStorable
        Throws:
        java.io.IOException
      • removeAttribute

        public <T> void removeAttribute(AttributeKey<T> key)
      • hasAttribute

        public boolean hasAttribute(AttributeKey key)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.