jApp
Interface Selection<T>

All Superinterfaces:
java.lang.Iterable<T>
All Known Implementing Classes:
AbstractSelection, SimpleSelection

public interface Selection<T>
extends java.lang.Iterable<T>


Method Summary
 void add(T obj)
           
 void addChangeListener(javax.swing.event.ChangeListener x)
           
 void addItemsToRightClick(javax.swing.JPopupMenu popupMenu)
           
 void clear()
           
 boolean contains(T obj)
           
 void fireSelectionChangedEvent()
           
 java.util.List<T> getSelected()
          Return a list of selected items.
 boolean isEmpty()
          Returns true if the selection is empty (nothing selected).
 void paint(java.awt.Graphics2D g)
          The selection paints itself in the give graphics context.
 void paint(java.awt.Graphics2D g, java.awt.geom.AffineTransform tf, T obj, boolean selected)
          The selection paints itself in the given graphicss context through the given transformation.
 void remove(T obj)
           
 void removeChangeListener(javax.swing.event.ChangeListener x)
           
 void restoreSelection(java.util.List<T> list)
           
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

isEmpty

boolean isEmpty()
Returns true if the selection is empty (nothing selected).

Returns:
true if nothing selected.

paint

void paint(java.awt.Graphics2D g)
The selection paints itself in the give graphics context.

Parameters:
g - the Graphics2D context to draw in.

paint

void paint(java.awt.Graphics2D g,
           java.awt.geom.AffineTransform tf,
           T obj,
           boolean selected)
The selection paints itself in the given graphicss context through the given transformation.

Parameters:
g -
tf -
obj -
selected -

clear

void clear()

contains

boolean contains(T obj)

add

void add(T obj)

remove

void remove(T obj)

addChangeListener

void addChangeListener(javax.swing.event.ChangeListener x)

removeChangeListener

void removeChangeListener(javax.swing.event.ChangeListener x)

fireSelectionChangedEvent

void fireSelectionChangedEvent()

addItemsToRightClick

void addItemsToRightClick(javax.swing.JPopupMenu popupMenu)

getSelected

java.util.List<T> getSelected()
Return a list of selected items. This list is a copy can be modified without changing the selection.

Returns:
a list of selected items.

restoreSelection

void restoreSelection(java.util.List<T> list)