org.apache.batik.gvt.event

Class SelectionEvent

public class SelectionEvent extends Object

An event which indicates that a selection is being made or has been made.
Field Summary
protected ShapehighlightShape
The shape enclosing the selection
protected intid
The event type of the current selection event
protected Objectselection
The object which composes the selection
static intSELECTION_CHANGED
The id for the "selection changing" event.
static intSELECTION_CLEARED
The id for the "selection cleared" event.
static intSELECTION_DONE
The id for the "selection completed" event.
static intSELECTION_STARTED
The id for the "selection started" event.
Constructor Summary
SelectionEvent(Object selection, int id, Shape highlightShape)
Constructs a new graphics node paint event.
Method Summary
ShapegetHighlightShape()
Returns a shape in user space that encloses the current selection.
intgetID()
Returns the event's selection event type.
ObjectgetSelection()
Returns the selection associated with this event.

Field Detail

highlightShape

protected Shape highlightShape
The shape enclosing the selection

id

protected int id
The event type of the current selection event

selection

protected Object selection
The object which composes the selection

SELECTION_CHANGED

public static final int SELECTION_CHANGED
The id for the "selection changing" event. (Selection process is under way)

SELECTION_CLEARED

public static final int SELECTION_CLEARED
The id for the "selection cleared" event.

SELECTION_DONE

public static final int SELECTION_DONE
The id for the "selection completed" event. (Selection process is complete).

SELECTION_STARTED

public static final int SELECTION_STARTED
The id for the "selection started" event.

Constructor Detail

SelectionEvent

public SelectionEvent(Object selection, int id, Shape highlightShape)
Constructs a new graphics node paint event.

Parameters: selection the selection id the id of this event highlightShape a user-space shape enclosing the selection.

Method Detail

getHighlightShape

public Shape getHighlightShape()
Returns a shape in user space that encloses the current selection.

getID

public int getID()
Returns the event's selection event type.

See Also: SELECTION_CHANGED SELECTION_CLEARED SELECTION_DONE

getSelection

public Object getSelection()
Returns the selection associated with this event. Only guaranteed current for events of type SELECTION_DONE.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.