All Packages Class Hierarchy This Package Previous Next Index
Class COM.ibm.desktop.ModelSelection
java.lang.Object
|
+----COM.ibm.desktop.ModelSelection
- public abstract class ModelSelection
- extends Object
- implements Serializable, Transferable, Cloneable
ModelSelection is an abstract class for the specification of model data.
It can specify some or all of the data contained in a model. It has a
state: empty or not empty. It is cloneable. It implements the
Transferable interface so that it can be transferred to/from the
clipboard.
Copyright (c) Taligent, Inc. 1996 - 1997.
Copyright (c) IBM Corporation 1996 - 1997.
All Rights Reserved.
- See Also:
- ModelSelectionOwner
-
ModelSelection(ModelSelection)
- Copy constructor.
-
ModelSelection(ModelSelectionOwner, IModel)
- Construct a model selection.
-
canDelete()
- Can the model selection be deleted?
-
canPasteFrom(Transferable)
- Can objects be pasted into the model selection?
-
clone()
- Return a clone of the model selection.
-
delete()
- Delete objects in the model selection.
-
deselectAll()
- Deselect all objects in the model.
-
getModel()
- Return the model.
-
getModelSelectionOwner()
- Return the owner of the model selection.
-
getTransferData(DataFlavor)
- Return an object which represents the data to be transferred.
-
getTransferDataFlavors()
- Return an array of DataFlavor objects indicating the flavors the
data can be provided in.
-
isDataFlavorSupported(DataFlavor)
- Return whether or not the specified data flavor is supported for
this object.
-
isEmpty()
- Is the model selection empty?
-
isNotEmpty()
- Is the model selection not empty?
-
isStringSelection()
- Temporary workaround for JDK 1.1 beta bug.
-
pasteFrom(Transferable)
- Paste objects into the model selection.
-
selectAll()
- Select all objects in the model.
-
setEmpty()
- Set the model selection state to empty.
-
setModel(IModel)
- Set the model selection's model object.
-
setModelSelectionOwner(ModelSelectionOwner)
- Set the owner of the model selection.
-
setNotEmpty()
- Set the model selection state to not empty.
-
undoDelete(Object)
- Undo the delete operation.
-
undoPaste(Object)
- Undo paste operation.
ModelSelection
public ModelSelection(ModelSelectionOwner owner,
IModel model)
- Construct a model selection.
- Parameters:
- owner - owner of the model selection
- model - the model upon which the selection operates
ModelSelection
public ModelSelection(ModelSelection selection)
- Copy constructor.
clone
public abstract Object clone()
- Return a clone of the model selection.
- Overrides:
- clone in class Object
setModel
public void setModel(IModel model)
- Set the model selection's model object.
selectAll
public void selectAll()
- Select all objects in the model.
deselectAll
public void deselectAll()
- Deselect all objects in the model.
setEmpty
public void setEmpty()
- Set the model selection state to empty.
setNotEmpty
public void setNotEmpty()
- Set the model selection state to not empty.
isEmpty
public boolean isEmpty()
- Is the model selection empty?
isNotEmpty
public boolean isNotEmpty()
- Is the model selection not empty?
getModel
public IModel getModel()
- Return the model.
getModelSelectionOwner
public ModelSelectionOwner getModelSelectionOwner()
- Return the owner of the model selection.
setModelSelectionOwner
public void setModelSelectionOwner(ModelSelectionOwner owner)
- Set the owner of the model selection.
canDelete
public boolean canDelete()
- Can the model selection be deleted?
delete
public Object delete()
- Delete objects in the model selection.
- Returns:
- Return data that allows the delete to be undone.
undoDelete
public void undoDelete(Object undoData)
- Undo the delete operation.
- Parameters:
- undoData - data for undoing the previous delete.
canPasteFrom
public boolean canPasteFrom(Transferable contents)
- Can objects be pasted into the model selection?
- Parameters:
- contents - clipboard contents
pasteFrom
public Object pasteFrom(Transferable contents)
- Paste objects into the model selection.
- Parameters:
- contents - clipboard contents
- Returns:
- Return data that allows the paste to be undone.
undoPaste
public void undoPaste(Object undoData)
- Undo paste operation.
- Parameters:
- undoData - data for undoing the previous paste.
getTransferDataFlavors
public synchronized DataFlavor[] getTransferDataFlavors()
- Return an array of DataFlavor objects indicating the flavors the
data can be provided in. The array should be ordered according to
preference for providing the data (from most richly descriptive to
least descriptive).
- Returns:
- an array of data flavors in which this data can be transferred
isDataFlavorSupported
public boolean isDataFlavorSupported(DataFlavor dataFlavor)
- Return whether or not the specified data flavor is supported for
this object.
- Parameters:
- flavor - the requested flavor for the data
- Returns:
- boolean indicating whether or not the data flavor is supported
getTransferData
public synchronized Object getTransferData(DataFlavor dataFlavor) throws IOException, UnsupportedFlavorException
- Return an object which represents the data to be transferred. The
class of the object returned is defined by the representation class
of the flavor. If the requested data flavor is not supported, an
UnsupportedFlavorException is thrown. If the data is no longer
available in the requested flavor, an IOException is thrown
- Parameters:
- flavor - the requested flavor for the data
- Throws: UnsupportedFlavorException
- if the requested data flavor
is not supported
isStringSelection
protected boolean isStringSelection()
- Temporary workaround for JDK 1.1 beta bug.
Determine if the model selection is a StringSelection, which is the
only Transferable that the clipboard accepts.
All Packages Class Hierarchy This Package Previous Next Index