http://www.jpicedt.org

jpicedt.graphic.event
Class SelectionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by jpicedt.graphic.event.SelectionEvent
All Implemented Interfaces:
Serializable

public class SelectionEvent
extends EventObject

Class for notifications of changes that occured in a SelectionHandler (strongly mimics javax.swing.event.CaretEvent)

Since:
jpicedt 1.3.2
Version:
$Id: SelectionEvent.java,v 1.9 2013/03/27 07:06:02 vincentb1 Exp $
Author:
Sylvain Reynal
See Also:
Serialized Form

Nested Class Summary
static class SelectionEvent.EventType
          enumeration for SelectionEvent types
 
Field Summary
protected  Element[] elements
          the elements that were (un)selected
protected  SelectionEvent.EventType type
          the event type
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SelectionEvent(PECanvas source, Element[] elements, SelectionEvent.EventType type)
          a new SelectionEvent sourced from the given PECanvas Use this constructor when several elements were (un)selected.
SelectionEvent(PECanvas source, Element element, SelectionEvent.EventType type)
          a new SelectionEvent sourced from the given PECanvas.
 
Method Summary
 Element[] getElements()
          Return the graphic elements that got selected/unselected.
 SelectionEvent.EventType getType()
          Return the event type
 String toString()
          a textual representation of this event
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

protected SelectionEvent.EventType type
the event type


elements

protected Element[] elements
the elements that were (un)selected

Constructor Detail

SelectionEvent

public SelectionEvent(PECanvas source,
                      Element[] elements,
                      SelectionEvent.EventType type)
a new SelectionEvent sourced from the given PECanvas Use this constructor when several elements were (un)selected.

Parameters:
source - the originator of the event
elements - the elements that were (un)selected
type - the event type

SelectionEvent

public SelectionEvent(PECanvas source,
                      Element element,
                      SelectionEvent.EventType type)
a new SelectionEvent sourced from the given PECanvas. Use this constructor when only one element was (un)selected.

Parameters:
source - the originator of the event
element - the element that was (un)selected
type - the event type
Method Detail

getElements

public Element[] getElements()
Return the graphic elements that got selected/unselected.


getType

public SelectionEvent.EventType getType()
Return the event type


toString

public String toString()
a textual representation of this event

Overrides:
toString in class EventObject

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org