Package org.silverpeas.core.clipboard
Class ClipboardSelection
- java.lang.Object
-
- org.silverpeas.core.clipboard.ClipboardSelection
-
- All Implemented Interfaces:
ClipboardOwner
,Transferable
,Serializable
- Direct Known Subclasses:
ComponentSelection
,NodeSelection
,PublicationSelection
,QuestionContainerSelection
,SpaceSelection
public abstract class ClipboardSelection extends Object implements Serializable, ClipboardOwner, Transferable
Class declaration- Author:
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static DataFlavor
IndexFlavor
protected boolean
selected
static DataFlavor
SilverpeasKeyDataFlavor
protected ArrayList<DataFlavor>
supportedFlavorsList
-
Constructor Summary
Constructors Constructor Description ClipboardSelection()
-------------------------------------------------------------------------- ------------------------------
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addFlavor(DataFlavor parFlavor)
Add a new DataFlavor to the list of supported DataFlavors.protected abstract IndexEntry
getIndexEntry()
-------------------------------------------------------------------------- ------------------------------protected abstract SilverpeasKeyData
getKeyData()
-------------------------------------------------------------------------- ------------------------------Object
getTransferData(DataFlavor parFlavor)
Return the data stored into the DataFlavor.DataFlavor[]
getTransferDataFlavors()
-------------------------------------------------------------------------- ------------------------------boolean
isCutted()
boolean
isDataFlavorSupported(DataFlavor parFlavor)
Indicates if a DataFlavor is in the list of supported DataFlavors.boolean
isSelected()
-------------------------------------------------------------------------- ------------------------------void
lostOwnership(Clipboard parClipboard, Transferable parTransferable)
Does nothing.void
setCutted(boolean isCutted)
void
setSelected(boolean setIt)
-------------------------------------------------------------------------- ------------------------------
-
-
-
Field Detail
-
IndexFlavor
public static final DataFlavor IndexFlavor
-
SilverpeasKeyDataFlavor
public static final DataFlavor SilverpeasKeyDataFlavor
-
supportedFlavorsList
protected ArrayList<DataFlavor> supportedFlavorsList
-
selected
protected boolean selected
-
-
Method Detail
-
addFlavor
protected void addFlavor(DataFlavor parFlavor)
Add a new DataFlavor to the list of supported DataFlavors.- Parameters:
parFlavor
-
-
isDataFlavorSupported
public boolean isDataFlavorSupported(DataFlavor parFlavor)
Indicates if a DataFlavor is in the list of supported DataFlavors.- Specified by:
isDataFlavorSupported
in interfaceTransferable
- Parameters:
parFlavor
-- Returns:
- true if the dataflavor is supported, false otherwise.
-
getTransferDataFlavors
public DataFlavor[] getTransferDataFlavors()
-------------------------------------------------------------------------- ------------------------------- Specified by:
getTransferDataFlavors
in interfaceTransferable
-
getTransferData
public Object getTransferData(DataFlavor parFlavor) throws UnsupportedFlavorException
Return the data stored into the DataFlavor.- Specified by:
getTransferData
in interfaceTransferable
- Parameters:
parFlavor
-- Returns:
- Throws:
UnsupportedFlavorException
-
isSelected
public boolean isSelected()
-------------------------------------------------------------------------- ------------------------------- Returns:
-
setSelected
public void setSelected(boolean setIt)
-------------------------------------------------------------------------- ------------------------------- Parameters:
setIt
-
-
lostOwnership
public void lostOwnership(Clipboard parClipboard, Transferable parTransferable)
Does nothing.- Specified by:
lostOwnership
in interfaceClipboardOwner
- Parameters:
parClipboard
-parTransferable
-
-
getIndexEntry
protected abstract IndexEntry getIndexEntry()
-------------------------------------------------------------------------- ------------------------------- Returns:
-
getKeyData
protected abstract SilverpeasKeyData getKeyData()
-------------------------------------------------------------------------- ------------------------------- Returns:
-
isCutted
public boolean isCutted()
-
setCutted
public void setCutted(boolean isCutted)
-
-