jApp
Class SimpleSelection<T extends Selectable>
java.lang.Object
jApp.AbstractSelection<T>
jApp.SimpleSelection<T>
- All Implemented Interfaces:
- Selection<T>, java.lang.Iterable<T>
public class SimpleSelection<T extends Selectable>
- extends AbstractSelection<T>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleSelection
public SimpleSelection()
addItemsToRightClick
public void addItemsToRightClick(javax.swing.JPopupMenu popupMenu)
isEmpty
public boolean isEmpty()
- Description copied from interface:
Selection
- Returns true if the selection is empty (nothing selected).
- Returns:
- true if nothing selected.
size
public int size()
add
public void add(Selectable x)
remove
public void remove(Selectable x)
contains
public boolean contains(Selectable x)
clear
public void clear()
iterator
public java.util.ListIterator iterator()
setOutlineStroke
protected void setOutlineStroke(java.awt.Graphics2D g)
paint
public void paint(java.awt.Graphics2D g)
- Description copied from interface:
Selection
- The selection paints itself in the give graphics context.
- Parameters:
g
- the Graphics2D context to draw in.
paint
public void paint(java.awt.Graphics2D g,
java.awt.geom.AffineTransform tf,
T obj,
boolean selected)
- Description copied from interface:
Selection
- The selection paints itself in the given graphicss context through the given transformation.
getHatchPaint
protected java.awt.Paint getHatchPaint()
getEraseHatchPaint
protected java.awt.Paint getEraseHatchPaint()
restoreSelection
public void restoreSelection(java.util.List<T> list)
getSelected
public java.util.List<T> getSelected()
- Description copied from interface:
Selection
- Return a list of selected items. This list is a copy can be modified without changing the selection.
- Returns:
- a list of selected items.