Back to index

moin  1.9.0~rc2
Public Member Functions | Static Public Attributes
CH.ifa.draw.framework.Handle Interface Reference

Handles are used to change a figure by direct manipulation. More...

List of all members.

Public Member Functions

abstract Point locate ()
 Locates the handle on the figure.
void invokeStart (int x, int y, Drawing drawing)
void invokeStart (int x, int y, DrawingView view)
void invokeStep (int dx, int dy, Drawing drawing)
void invokeStep (int x, int y, int anchorX, int anchorY, DrawingView view)
 Tracks a step of the interaction.
void invokeEnd (int x, int y, int anchorX, int anchorY, DrawingView view)
 Tracks the end of the interaction.
void invokeEnd (int dx, int dy, Drawing drawing)
Figure owner ()
 Gets the handle's owner.
Rectangle displayBox ()
 Gets the display box of the handle.
boolean containsPoint (int x, int y)
 Tests if a point is contained in the handle.
void draw (Graphics g)
 Draws this handle.

Static Public Attributes

static final int HANDLESIZE = 8

Detailed Description

Handles are used to change a figure by direct manipulation.

Handles know their owning figure and they provide methods to locate the handle on the figure and to track changes.


Design Patterns

 o

Adapter
Handles adapt the operations to manipulate a figure to a common interface.

See also:
Figure

Definition at line 22 of file Handle.java.


Member Function Documentation

boolean CH.ifa.draw.framework.Handle.containsPoint ( int  x,
int  y 
)

Tests if a point is contained in the handle.

Gets the display box of the handle.

void CH.ifa.draw.framework.Handle.draw ( Graphics  g)

Draws this handle.

void CH.ifa.draw.framework.Handle.invokeEnd ( int  x,
int  y,
int  anchorX,
int  anchorY,
DrawingView  view 
)

Tracks the end of the interaction.

Parameters:
xthe current x position
ythe current y position
anchorXthe x position where the interaction started
anchorYthe y position where the interaction started
void CH.ifa.draw.framework.Handle.invokeEnd ( int  dx,
int  dy,
Drawing  drawing 
)
Deprecated:
As of version 4.1, use invokeEnd(x, y, anchorX, anchorY, drawingView).

Tracks the end of the interaction.

void CH.ifa.draw.framework.Handle.invokeStart ( int  x,
int  y,
Drawing  drawing 
)
Deprecated:
As of version 4.1, use invokeStart(x, y, drawingView) Tracks the start of the interaction.

The default implementation does nothing.

Parameters:
xthe x position where the interaction started
ythe y position where the interaction started
void CH.ifa.draw.framework.Handle.invokeStart ( int  x,
int  y,
DrawingView  view 
)
Deprecated:
As of version 4.1, use invokeStart(x, y, drawingView) Tracks the start of the interaction.

The default implementation does nothing.

Parameters:
xthe x position where the interaction started
ythe y position where the interaction started
viewthe handles container
void CH.ifa.draw.framework.Handle.invokeStep ( int  dx,
int  dy,
Drawing  drawing 
)
Deprecated:
As of version 4.1, use invokeStep(x, y, anchorX, anchorY, drawingView)

Tracks a step of the interaction.

Parameters:
dxx delta of this step
dyy delta of this step
void CH.ifa.draw.framework.Handle.invokeStep ( int  x,
int  y,
int  anchorX,
int  anchorY,
DrawingView  view 
)

Tracks a step of the interaction.

Parameters:
xthe current x position
ythe current y position
anchorXthe x position where the interaction started
anchorYthe y position where the interaction started
abstract Point CH.ifa.draw.framework.Handle.locate ( ) [pure virtual]

Locates the handle on the figure.

The handle is drawn centered around the returned point.

Gets the handle's owner.


Member Data Documentation

Definition at line 24 of file Handle.java.


The documentation for this interface was generated from the following file: