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

Variable Index

 o EMPTY
selection is defined but empty.
 o NOT_EMPTY
selection is defined and not empty.

Method Index

 o addSelectionChangeListener(SelectionChangeListener)
Add a listener to subscribe for SelectionChange Events.
 o canDelete()
Can the selection be deleted?
 o canPasteFrom(Transferable)
Can objects be pasted into the selection?
 o clone()
Clone the current selection.
 o delete()
Delete the selection.
 o deselectAll()
Deselect all data.
 o getData()
Return the data.
 o getPresentationName()
Return the selection's presentation name
 o getState()
Return the selection's state: EMPTY, NOT_EMPTY
 o getTransferData(DataFlavor)
Return an object which represents the data to be transferred.
 o getTransferDataFlavors()
Return an array of DataFlavor objects indicating the flavors the data can be provided in.
 o isDataFlavorSupported(DataFlavor)
Return whether or not the specified data flavor is supported for this object.
 o isEmpty()
Is the model selection empty?
 o isStringSelection()
Temporary workaround for JDK 1.1 beta bug.
 o notify(Selection)
Notify of new selection.
 o pasteFrom(Transferable)
Paste objects into the selection.
 o removeSelectionChangeListener(SelectionChangeListener)
Remove a listener to un-subscribe for SelectionChange Events.
 o selectAll()
Select all data.
 o undoDelete(Object)
Undo the delete operation.
 o undoPaste(Object)
Undo paste operation.

Variables

 o EMPTY
 public static final int EMPTY
selection is defined but empty.

 o NOT_EMPTY
 public static final int NOT_EMPTY
selection is defined and not empty.

Methods

 o getState
 public abstract int getState()
Return the selection's state: EMPTY, NOT_EMPTY

 o getPresentationName
 public abstract String getPresentationName()
Return the selection's presentation name

 o clone
 public abstract Object clone()
Clone the current selection.

Overrides:
clone in class Object
 o notify
 public abstract void notify(Selection selection)
Notify of new selection.

 o getData
 public abstract Object getData()
Return the data.

 o 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.

 o selectAll
 public abstract void selectAll()
Select all data.

 o deselectAll
 public abstract void deselectAll()
Deselect all data.

 o isEmpty
 public abstract boolean isEmpty()
Is the model selection empty?

 o canDelete
 public abstract boolean canDelete()
Can the selection be deleted?

 o delete
 public abstract Object delete()
Delete the selection.

Returns:
Return data that allows the delete to be undone.
 o undoDelete
 public abstract void undoDelete(Object undoData)
Undo the delete operation.

Parameters:
undoData - data for undoing the previous delete.
 o canPasteFrom
 public abstract boolean canPasteFrom(Transferable contents)
Can objects be pasted into the selection?

Parameters:
contents - clipboard contents
 o 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.
 o undoPaste
 public abstract void undoPaste(Object undoData)
Undo paste operation.

Parameters:
undoData - data for undoing the previous paste.
 o 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
 o 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
 o 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
 o addSelectionChangeListener
 public abstract void addSelectionChangeListener(SelectionChangeListener l)
Add a listener to subscribe for SelectionChange Events.

 o 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