Class ComponentSelection
- java.lang.Object
-
- org.silverpeas.core.clipboard.ClipboardSelection
-
- org.silverpeas.core.admin.component.model.ComponentSelection
-
- All Implemented Interfaces:
ClipboardOwner
,Transferable
,Serializable
public class ComponentSelection extends ClipboardSelection implements Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static DataFlavor
ComponentDetailFlavor
-
Fields inherited from class org.silverpeas.core.clipboard.ClipboardSelection
IndexFlavor, selected, SilverpeasKeyDataFlavor, supportedFlavorsList
-
-
Constructor Summary
Constructors Constructor Description ComponentSelection(ComponentInst component)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IndexEntry
getIndexEntry()
Returns the IndexEntry for the component being copied.SilverpeasKeyData
getKeyData()
Transforms the data into a SilverpeasKeyData.Object
getTransferData(DataFlavor parFlavor)
Returns the transferred data.-
Methods inherited from class org.silverpeas.core.clipboard.ClipboardSelection
addFlavor, getTransferDataFlavors, isCutted, isDataFlavorSupported, isSelected, lostOwnership, setCutted, setSelected
-
-
-
-
Field Detail
-
ComponentDetailFlavor
public static final DataFlavor ComponentDetailFlavor
-
-
Constructor Detail
-
ComponentSelection
public ComponentSelection(ComponentInst component)
- Parameters:
component
- the component selected.
-
-
Method Detail
-
getTransferData
@Nonnull public Object getTransferData(DataFlavor parFlavor) throws UnsupportedFlavorException
Returns the transferred data.- Specified by:
getTransferData
in interfaceTransferable
- Overrides:
getTransferData
in classClipboardSelection
- Parameters:
parFlavor
- the DataFlavor.- Returns:
- the data copied.
- Throws:
UnsupportedFlavorException
- if the flavor isn't supported by the selection.
-
getIndexEntry
public IndexEntry getIndexEntry()
Returns the IndexEntry for the component being copied.- Specified by:
getIndexEntry
in classClipboardSelection
- Returns:
- an IndexEntry for this component
-
getKeyData
public SilverpeasKeyData getKeyData()
Transforms the data into a SilverpeasKeyData.- Specified by:
getKeyData
in classClipboardSelection
- Returns:
-
-