com.l2fprod.common.application.selection
Class DefaultSelection
java.lang.Object
com.l2fprod.common.application.selection.DefaultSelection
- All Implemented Interfaces:
- Selection
public class DefaultSelection
- extends java.lang.Object
- implements Selection
DefaultSelection.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DefaultSelection
public DefaultSelection(javax.swing.JList list)
DefaultSelection
public DefaultSelection(javax.swing.JTree tree)
DefaultSelection
public DefaultSelection(javax.swing.JTree tree,
boolean onlyLastPathComponent)
DefaultSelection
public DefaultSelection(javax.swing.tree.TreeSelectionModel tree,
boolean onlyLastPathComponent)
DefaultSelection
public DefaultSelection(java.lang.Object[] objects)
getSelection
public java.lang.Object[] getSelection()
- Description copied from interface:
Selection
- Returns an array of the selected objects
- Specified by:
getSelection
in interface Selection
- Returns:
- the selected objects
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Selection
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
findSelection
public static Selection findSelection(java.awt.Component component)
- Find the selection out of a Component. Return an empty selection if there
are not selected objects.
- Parameters:
component
-
- Returns:
- the selection for the given component