All Packages Class Hierarchy This Package Previous Next Index
Interface com.ibm.webrunner.bab.Selection
- public interface Selection
- extends Serializable, Transferable, Cloneable, ClipboardOwner
A BAB View may optionally define a selection object for its data by
subclassing this class.
This class is the specification of selection data.
It can specify some or all of the data contained in a bean. It has a
state: EMPTY or NOT EMPTY. Selections are cloneable. It also implements the
Transferable interface so that it can be transferred to/from the
clipboard.
Modification(s) History :
05/21/98 - created
- Version:
- 0.1
- See Also:
- AbstractSelection
-
EMPTY
- selection is defined but empty.
-
NOT_EMPTY
- selection is defined and not empty.
-
addSelectionChangeListener(SelectionChangeListener)
- Add a listener to subscribe for SelectionChange Events.
-
canDelete()
- Can the selection be deleted?
-
canPasteFrom(Transferable)
- Can objects be pasted into the selection?
-
clone()
- Clone the current selection.
-
delete()
- Delete the selection.
-
deselectAll()
- Deselect all data.
-
getData()
- Return the data.
-
getPresentationName()
- Return the selection's presentation name
-
getState()
- Return the selection's state: EMPTY, NOT_EMPTY
-
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?
-
isStringSelection()
- Temporary workaround for JDK 1.1 beta bug.
-
notify(Selection)
- Notify of new selection.
-
pasteFrom(Transferable)
- Paste objects into the selection.
-
removeSelectionChangeListener(SelectionChangeListener)
- Remove a listener to un-subscribe for SelectionChange Events.
-
selectAll()
- Select all data.
-
undoDelete(Object)
- Undo the delete operation.
-
undoPaste(Object)
- Undo paste operation.
EMPTY
public static final int EMPTY
- selection is defined but empty.
NOT_EMPTY
public static final int NOT_EMPTY
- selection is defined and not empty.
getState
public abstract int getState()
- Return the selection's state: EMPTY, NOT_EMPTY
getPresentationName
public abstract String getPresentationName()
- Return the selection's presentation name
clone
public abstract Object clone()
- Clone the current selection.
- Overrides:
- clone in class Object
notify
public abstract void notify(Selection selection)
- Notify of new selection.
getData
public abstract Object getData()
- Return the data.
isStringSelection
public abstract 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.
selectAll
public abstract void selectAll()
- Select all data.
deselectAll
public abstract void deselectAll()
- Deselect all data.
isEmpty
public abstract boolean isEmpty()
- Is the model selection empty?
canDelete
public abstract boolean canDelete()
- Can the selection be deleted?
delete
public abstract Object delete()
- Delete the selection.
- Returns:
- Return data that allows the delete to be undone.
undoDelete
public abstract void undoDelete(Object undoData)
- Undo the delete operation.
- Parameters:
- undoData - data for undoing the previous delete.
canPasteFrom
public abstract boolean canPasteFrom(Transferable contents)
- Can objects be pasted into the selection?
- Parameters:
- contents - clipboard contents
pasteFrom
public abstract Object pasteFrom(Transferable contents)
- Paste objects into the selection.
- Parameters:
- contents - clipboard contents
- Returns:
- Return data that allows the paste to be undone.
undoPaste
public abstract void undoPaste(Object undoData)
- Undo paste operation.
- Parameters:
- undoData - data for undoing the previous paste.
getTransferDataFlavors
public abstract 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 abstract 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 abstract 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
addSelectionChangeListener
public abstract void addSelectionChangeListener(SelectionChangeListener l)
- Add a listener to subscribe for SelectionChange Events.
removeSelectionChangeListener
public abstract void removeSelectionChangeListener(SelectionChangeListener l)
- Remove a listener to un-subscribe for SelectionChange Events.
All Packages Class Hierarchy This Package Previous Next Index