Class TreeSelectionContext
- java.lang.Object
-
- com.bc.ceres.core.ExtensibleObject
-
- com.bc.ceres.swing.selection.AbstractSelectionContext
-
- com.bc.ceres.swing.selection.support.TreeSelectionContext
-
- All Implemented Interfaces:
Extensible
,SelectionChangeEmitter
,SelectionContext
,SelectionSource
public class TreeSelectionContext extends AbstractSelectionContext
-
-
Constructor Summary
Constructors Constructor Description TreeSelectionContext(JTree tree)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Selection
getSelection()
JTree
getTree()
protected void
handleTreeSelectionChanged(TreeSelectionEvent event)
void
setSelection(Selection selection)
Sets a new selection.void
setTree(JTree tree)
-
Methods inherited from class com.bc.ceres.swing.selection.AbstractSelectionContext
addSelectionChangeListener, canDeleteSelection, canInsert, canSelectAll, deleteSelection, fireSelectionChange, getSelectionChangeListeners, insert, removeSelectionChangeListener, selectAll
-
Methods inherited from class com.bc.ceres.core.ExtensibleObject
getExtension
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.bc.ceres.core.Extensible
getExtension
-
-
-
-
Constructor Detail
-
TreeSelectionContext
public TreeSelectionContext(JTree tree)
-
-
Method Detail
-
getSelection
public Selection getSelection()
- Returns:
- The current selection. The selection may be empty, but never
null
. - See Also:
Selection.EMPTY
,Selection.isEmpty()
-
setSelection
public void setSelection(Selection selection)
Description copied from interface:SelectionContext
Sets a new selection.- Parameters:
selection
- The new selection.
-
getTree
public JTree getTree()
-
setTree
public void setTree(JTree tree)
-
handleTreeSelectionChanged
protected void handleTreeSelectionChanged(TreeSelectionEvent event)
-
-