Class SelectionEvent

  • All Implemented Interfaces:
    java.io.Serializable

    public class SelectionEvent
    extends java.util.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.5.2.1 2007/09/02 11:56:18 reynal Exp $
    Author:
    Sylvain Reynal
    See Also:
    Serialized Form
    • 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
        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
        the - event type
    • Method Detail

      • getElements

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

        public java.lang.String toString()
        a textual representation of this event
        Overrides:
        toString in class java.util.EventObject