Package jpicedt.graphic.event
Class SelectionEvent
- java.lang.Object
-
- java.util.EventObject
-
- jpicedt.graphic.event.SelectionEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class SelectionEvent extends java.util.EventObjectClass for notifications of changes that occured in a SelectionHandler (strongly mimicsjavax.swing.event.CaretEvent)- Since:
- jpicedt 1.3.2
- Version:
- $Id: SelectionEvent.java,v 1.5.2.1 2007/09/02 11:56:18 reynal Exp $
- Author:
- Sylvain Reynal
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSelectionEvent.EventTypeenumeration for SelectionEvent types
-
Field Summary
Fields Modifier and Type Field Description protected Element[]elementsthe elements that were (un)selectedprotected SelectionEvent.EventTypetypethe event type
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Element[]getElements()Return the graphic elements that got selected/unselected.SelectionEvent.EventTypegetType()Return the event typejava.lang.StringtoString()a textual representation of this event
-
-
-
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 eventelements- the elements that were (un)selectedthe- 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 eventelement- the element that was (un)selectedthe- 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 java.lang.String toString()
a textual representation of this event- Overrides:
toStringin classjava.util.EventObject
-
-