JHotDraw 7.5.1

org.jhotdraw.samples.odg.figures
Class ODGAttributedFigure

java.lang.Object
  extended by org.jhotdraw.beans.AbstractBean
      extended by org.jhotdraw.draw.AbstractFigure
          extended by org.jhotdraw.draw.AbstractAttributedFigure
              extended by org.jhotdraw.samples.odg.figures.ODGAttributedFigure
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Figure, ODGFigure, DOMStorable
Direct Known Subclasses:
ODGEllipseFigure, ODGRectFigure

public abstract class ODGAttributedFigure
extends AbstractAttributedFigure
implements ODGFigure

ODGAttributedFigure.

Version:
$Id: ODGAttributedFigure.java 647 2010-01-24 22:52:59Z rawcoder $
Author:
Werner Randelshofer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jhotdraw.draw.AbstractFigure
changingDepth, listenerList
 
Fields inherited from class org.jhotdraw.beans.AbstractBean
propertySupport
 
Fields inherited from interface org.jhotdraw.draw.Figure
CONNECTABLE_PROPERTY, REMOVABLE_PROPERTY, SELECTABLE_PROPERTY, TRANSFORMABLE_PROPERTY
 
Constructor Summary
ODGAttributedFigure()
          Creates a new instance.
 
Method Summary
 void draw(java.awt.Graphics2D g)
          Draws the figure.
 void drawFigure(java.awt.Graphics2D g)
          This method is invoked before the rendered image of the figure is composited.
 java.util.Collection<javax.swing.Action> getActions(java.awt.geom.Point2D.Double p)
          Returns a collection of actions which are presented to the user in a popup menu.
<T> void
set(AttributeKey<T> key, T newValue)
          Sets an attribute of the figure.
 
Methods inherited from class org.jhotdraw.draw.AbstractAttributedFigure
applyAttributesTo, clone, drawFill, drawStroke, drawText, get, getAttributeKey, getAttributes, getAttributesRestoreData, getDrawingArea, getStroke, getStrokeMiterLimitFactor, hasAttribute, isAttributeEnabled, read, readAttributes, removeAttribute, restoreAttributesTo, setAttributeEnabled, setAttributes, write, writeAttributes
 
Methods inherited from class org.jhotdraw.draw.AbstractFigure
addFigureListener, addNotify, basicClone, changed, createHandles, findCompatibleConnector, findConnector, findFigureInside, fireAreaInvalidated, fireAreaInvalidated, fireAreaInvalidated, fireAttributeChanged, fireFigureAdded, fireFigureChanged, fireFigureChanged, fireFigureChanged, fireFigureHandlesChanged, fireFigureRemoved, fireFigureRequestRemove, fireUndoableEditHappened, getChangingDepth, getConnectors, getCursor, getDecomposition, getDrawing, getEndPoint, getFontRenderContext, getLayer, getLock, getPreferredSize, getStartPoint, getTool, getToolTipText, handleDrop, handleMouseClick, includes, invalidate, isChanging, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removeNotify, requestRemove, setBounds, setBounds, setConnectable, setRemovable, setSelectable, setTransformable, setVisible, toString, validate, willChange
 
Methods inherited from class org.jhotdraw.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jhotdraw.samples.odg.figures.ODGFigure
isEmpty
 
Methods inherited from interface org.jhotdraw.draw.Figure
addFigureListener, addNotify, addPropertyChangeListener, changed, clone, contains, createHandles, findCompatibleConnector, findConnector, findFigureInside, get, getAttributes, getAttributesRestoreData, getBounds, getConnectors, getCursor, getDecomposition, getDrawingArea, getEndPoint, getLayer, getPreferredSize, getStartPoint, getTool, getToolTipText, getTransformRestoreData, handleDrop, handleMouseClick, includes, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removeNotify, removePropertyChangeListener, requestRemove, restoreAttributesTo, restoreTransformTo, setBounds, transform, willChange
 

Constructor Detail

ODGAttributedFigure

public ODGAttributedFigure()
Creates a new instance.

Method Detail

draw

public void draw(java.awt.Graphics2D g)
Description copied from interface: Figure
Draws the figure.

Specified by:
draw in interface Figure
Overrides:
draw in class AbstractAttributedFigure
Parameters:
g - The Graphics2D to draw to.

drawFigure

public void drawFigure(java.awt.Graphics2D g)
This method is invoked before the rendered image of the figure is composited.


set

public <T> void set(AttributeKey<T> key,
                    T newValue)
Description copied from class: AbstractAttributedFigure
Sets an attribute of the figure. AttributeKey name and semantics are defined by the class implementing the figure interface.

Specified by:
set in interface Figure
Overrides:
set in class AbstractAttributedFigure
See Also:
AttributeKey.set(org.jhotdraw.draw.Figure, T)

getActions

public java.util.Collection<javax.swing.Action> getActions(java.awt.geom.Point2D.Double p)
Description copied from class: AbstractFigure
Returns a collection of actions which are presented to the user in a popup menu.

The collection may contain null entries. These entries are used interpreted as separators in the popup menu.

Specified by:
getActions in interface Figure
Overrides:
getActions in class AbstractFigure

Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.