Class DefaultSelection<T>
java.lang.Object
com.bc.ceres.core.ExtensibleObject
com.bc.ceres.swing.selection.AbstractSelection
com.bc.ceres.swing.selection.support.DefaultSelection<T>
- All Implemented Interfaces:
- Extensible,- Selection,- ClipboardOwner,- Cloneable
A default implementation of the 
Selection interface.- Since:
- Ceres 0.10
- 
Field Summary
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionclone()Creates and returns a copy of this selection.createTransferable(boolean snapshot) The default implementation returnsnull.booleanThe default implementation returns an empty string.Gets the selected value.T[]Gets the selected values of a multiple selection.inthashCode()booleanisEmpty()toString()Methods inherited from class com.bc.ceres.swing.selection.AbstractSelectionlostOwnershipMethods inherited from class com.bc.ceres.core.ExtensibleObjectgetExtensionMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.bc.ceres.core.ExtensiblegetExtension
- 
Constructor Details- 
DefaultSelection
 
- 
- 
Method Details- 
getSelectedValueDescription copied from interface:SelectionGets the selected value. The method returnsnullif this selectionis empty.- Returns:
- The selected value, or null.
 
- 
getSelectedValuesDescription copied from interface:SelectionGets the selected values of a multiple selection. The method returns an empty array if this selectionis empty.- Specified by:
- getSelectedValuesin interface- Selection
- Overrides:
- getSelectedValuesin class- AbstractSelection
- Returns:
- The array of selected values.
 
- 
isEmptypublic boolean isEmpty()- Specified by:
- isEmptyin interface- Selection
- Overrides:
- isEmptyin class- AbstractSelection
- Returns:
- trueif this selection is empty.
 
- 
getPresentationNameDescription copied from class:AbstractSelectionThe default implementation returns an empty string.- Specified by:
- getPresentationNamein interface- Selection
- Overrides:
- getPresentationNamein class- AbstractSelection
- Returns:
- An empty string.
 
- 
createTransferableDescription copied from class:AbstractSelectionThe default implementation returnsnull.- Specified by:
- createTransferablein interface- Selection
- Overrides:
- createTransferablein class- AbstractSelection
- Parameters:
- snapshot- If- true, the returned- Transferableshould hold a copy-of rather than a reference-to the selection.
- Returns:
- nullby default.
 
- 
cloneDescription copied from interface:SelectionCreates and returns a copy of this selection.- Specified by:
- clonein interface- Selection
- Overrides:
- clonein class- AbstractSelection
- Returns:
- A clone of this selection instance.
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-