JHotDraw 6.0b1

org.jhotdraw.standard
Class NullHandle

java.lang.Object
  extended by org.jhotdraw.standard.AbstractHandle
      extended by org.jhotdraw.standard.LocatorHandle
          extended by org.jhotdraw.standard.NullHandle
All Implemented Interfaces:
Handle

public class NullHandle
extends LocatorHandle

A handle that doesn't change the owned figure. Its only purpose is to show feedback that a figure is selected.


Design Patterns

 o NullObject
NullObject enables to treat handles that don't do anything in the same way as other handles.


Field Summary
protected  Locator fLocator
          The handle's locator.
 
Fields inherited from class org.jhotdraw.standard.AbstractHandle
HANDLESIZE
 
Constructor Summary
NullHandle(Figure owner, Locator locator)
           
 
Method Summary
 void draw(java.awt.Graphics g)
          Draws the NullHandle.
 Cursor getCursor()
          Returns the preferred Cursor for this Handle.
 
Methods inherited from class org.jhotdraw.standard.LocatorHandle
getLocator, locate
 
Methods inherited from class org.jhotdraw.standard.AbstractHandle
containsPoint, displayBox, getUndoActivity, invokeEnd, invokeEnd, invokeStart, invokeStart, invokeStep, invokeStep, owner, setUndoActivity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fLocator

protected Locator fLocator
The handle's locator.

Constructor Detail

NullHandle

public NullHandle(Figure owner,
                  Locator locator)
Method Detail

draw

public void draw(java.awt.Graphics g)
Draws the NullHandle. NullHandles are drawn as a red framed rectangle.

Specified by:
draw in interface Handle
Overrides:
draw in class AbstractHandle
See Also:
Handle.draw(java.awt.Graphics)

getCursor

public Cursor getCursor()
Description copied from interface: Handle
Returns the preferred Cursor for this Handle.

Specified by:
getCursor in interface Handle
Overrides:
getCursor in class LocatorHandle
Returns:
Cursor
See Also:
Handle.getCursor()

JHotDraw 6.0b1