|
JHotDraw 7.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jhotdraw.draw.AbstractHandle
public abstract class AbstractHandle
AbstractHandle.
| Field Summary | |
|---|---|
protected javax.swing.event.EventListenerList |
listenerList
|
protected DrawingView |
view
|
| Constructor Summary | |
|---|---|
AbstractHandle(Figure owner)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
addHandleListener(HandleListener l)
Adds a listener for this handle. |
void |
areaInvalidated(FigureEvent evt)
Sent when a region used by the figure needs to be repainted. |
void |
attributeChanged(FigureEvent e)
Sent when an attribute of the figure has changed. |
protected abstract java.awt.Rectangle |
basicGetBounds()
|
boolean |
contains(java.awt.Point p)
Tests if a point is contained in the handle. |
java.util.Collection<Handle> |
createSecondaryHandles()
Creates secondary handles. |
void |
dispose()
Disposes the resources aquired by the handler. |
void |
draw(java.awt.Graphics2D g)
Draws this handle. |
protected void |
drawCircle(java.awt.Graphics2D g,
java.awt.Color fill,
java.awt.Color stroke)
|
protected void |
drawDiamond(java.awt.Graphics2D g,
java.awt.Color fill,
java.awt.Color stroke)
|
protected void |
drawRectangle(java.awt.Graphics2D g,
java.awt.Color fill,
java.awt.Color stroke)
|
void |
figureAdded(FigureEvent e)
Sent when a figure was added. |
void |
figureChanged(FigureEvent evt)
Sent when the bounds or shape of a figure has changed. |
void |
figureHandlesChanged(FigureEvent e)
Sent when handles of a Figure have been added, removed or replaced. |
void |
figureRemoved(FigureEvent e)
Sent when a figure was removed. |
void |
figureRequestRemove(FigureEvent e)
Sent when a figure requests to be removed. |
protected void |
fireAreaInvalidated(java.awt.Rectangle invalidatedArea)
Notify all listenerList that have registered interest for notification on this event type. |
protected void |
fireHandleRequestRemove(java.awt.Rectangle invalidatedArea)
Notify all listenerList that have registered interest for notification on this event type. |
protected void |
fireHandleRequestSecondaryHandles()
Notify all listenerList that have registered interest for notification on this event type. |
protected void |
fireUndoableEditHappened(javax.swing.undo.UndoableEdit edit)
Notify all listenerList that have registered interest for notification on this event type. |
java.awt.Rectangle |
getBounds()
Returns the bounding box of the handle. |
java.awt.Cursor |
getCursor()
Returns a cursor for the handle. |
java.awt.Rectangle |
getDrawingArea()
Returns the drawing area of the handle. |
protected int |
getHandlesize()
FIXME - Get this form the drawing view. |
Figure |
getOwner()
Returns the owner of this handle. |
java.lang.String |
getToolTipText(java.awt.Point p)
Returns a tooltip for the specified location. |
DrawingView |
getView()
|
void |
invalidate()
Invalidates the handle. |
boolean |
isCombinableWith(Handle handle)
Returns true, if the given handle is an instance of the same class or of a subclass of this handle,. |
void |
keyPressed(java.awt.event.KeyEvent evt)
|
void |
keyReleased(java.awt.event.KeyEvent evt)
|
void |
keyTyped(java.awt.event.KeyEvent evt)
|
void |
removeHandleListener(HandleListener l)
Removes a listener for this handle. |
void |
setView(DrawingView view)
Sets the view of the handle. |
void |
trackDoubleClick(java.awt.Point p,
int modifiersEx)
Tracks a double click. |
protected void |
updateBounds()
|
void |
viewTransformChanged()
This method is invoked by the drawing view, when its transform has changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jhotdraw.draw.Handle |
|---|
trackEnd, trackStart, trackStep |
| Field Detail |
|---|
protected DrawingView view
protected javax.swing.event.EventListenerList listenerList
| Constructor Detail |
|---|
public AbstractHandle(Figure owner)
| Method Detail |
|---|
protected int getHandlesize()
public void addHandleListener(HandleListener l)
addHandleListener in interface Handlepublic void removeHandleListener(HandleListener l)
removeHandleListener in interface Handlepublic Figure getOwner()
Handle
getOwner in interface Handlepublic void setView(DrawingView view)
Handle
setView in interface Handlepublic DrawingView getView()
protected void fireAreaInvalidated(java.awt.Rectangle invalidatedArea)
protected void fireUndoableEditHappened(javax.swing.undo.UndoableEdit edit)
protected void fireHandleRequestRemove(java.awt.Rectangle invalidatedArea)
protected void fireHandleRequestSecondaryHandles()
public void draw(java.awt.Graphics2D g)
draw in interface Handle
protected void drawCircle(java.awt.Graphics2D g,
java.awt.Color fill,
java.awt.Color stroke)
protected void drawRectangle(java.awt.Graphics2D g,
java.awt.Color fill,
java.awt.Color stroke)
protected void drawDiamond(java.awt.Graphics2D g,
java.awt.Color fill,
java.awt.Color stroke)
public boolean contains(java.awt.Point p)
Handle
contains in interface Handlepublic void invalidate()
Handle
invalidate in interface Handlepublic void dispose()
Handle
dispose in interface Handlepublic void areaInvalidated(FigureEvent evt)
areaInvalidated in interface FigureListenerpublic void figureAdded(FigureEvent e)
figureAdded in interface FigureListenerpublic void figureRemoved(FigureEvent e)
figureRemoved in interface FigureListenerpublic void figureRequestRemove(FigureEvent e)
figureRequestRemove in interface FigureListenerpublic void figureChanged(FigureEvent evt)
figureChanged in interface FigureListenerpublic java.awt.Cursor getCursor()
getCursor in interface Handlepublic boolean isCombinableWith(Handle handle)
isCombinableWith in interface Handlepublic void keyTyped(java.awt.event.KeyEvent evt)
keyTyped in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent evt)
keyReleased in interface java.awt.event.KeyListenerpublic void keyPressed(java.awt.event.KeyEvent evt)
keyPressed in interface java.awt.event.KeyListenerpublic final java.awt.Rectangle getBounds()
Handle
getBounds in interface Handlepublic java.awt.Rectangle getDrawingArea()
Handle
getDrawingArea in interface Handleprotected abstract java.awt.Rectangle basicGetBounds()
protected void updateBounds()
public void trackDoubleClick(java.awt.Point p,
int modifiersEx)
trackDoubleClick in interface Handlepublic void attributeChanged(FigureEvent e)
FigureListener
attributeChanged in interface FigureListenerpublic void viewTransformChanged()
Handle
viewTransformChanged in interface Handlepublic java.util.Collection<Handle> createSecondaryHandles()
Handle
createSecondaryHandles in interface Handlepublic java.lang.String getToolTipText(java.awt.Point p)
Handle
getToolTipText in interface Handlepublic void figureHandlesChanged(FigureEvent e)
FigureListenerDrawingViews listen to this event to repopulate the Handles.
A Figure should not fire this event, if just the state or the location of Handle has changed.
figureHandlesChanged in interface FigureListener
|
Copyright 1996-2007 (c) JHotDraw.org. Some rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||