jbcl.model Package
java.lang.Object +----java.util.EventObject +----com.borland.jb.util.DispatchableEvent +----com.borland.jbcl.model.SelectionEvent +----com.borland.jbcl.model.MatrixSelectionEvent
Variables Constructors Properties Methods
Implements Serializable
MatrixSelectionEvent
object is created whenever a matrix-selection event occurs. Matrix-selection events occur when data objects are added or removed from the set of selected locations in a matrix. The ID
property specifies what creates the event. The possibilities can be any change in the selection set, a change at a specified location in the selection set, or a change of a range within a selection set.
public MatrixSelectionEvent(MatrixSelection selection, int change)Constructs a matrix-selection event object using the passed selection object and the type of change that occurred to that selection.
Parameters:
selection
change
public MatrixSelectionEvent(MatrixSelection selection, int change, MatrixLocation location)Constructs a matrix-selection event object using the passed selection object, the type of change that occurred to that selection, and the location where the change occurred. Such an event object is used when a data item at the specified location changes.
Parameters:
selection
change
location
MatrixLocation
object that identifies the location where the change occurred.
public MatrixSelectionEvent(MatrixSelection selection, int change, MatrixLocation rangeStart, MatrixLocation rangeEnd)Constructs a matrix-selection event object using the passed selection object , the type of change that occurred to that selection, the beginning of the range that changed, and the end of the range that changed. Such an event object is used when the range of selected locations changes.
Parameters:
selection
change
rangeStart
MatrixLocation
object that specifies the beginning of the range in the matrix.
rangeEnd
MatrixLocation
object that specifies the end of the range in the matrix.
public MatrixLocation getLocation()Returns the location where the matrix-selection event occurred.
public MatrixLocation getRangeEnd()Returns the final location in the range of locations where the matrix-selection event occurred.
public MatrixLocation getRangeStart()Returns the starting location in the range of locations where the matrix-selection event occurred.
public MatrixSelection getSelection()Returns the set of currently selected locations within the matrix.
public void dispatch(EventListener listener)Calls methods in the listening object passing this matrix-selection event object. Which method is called depends on the type of matrix-selection event that occurred. If the event
ID
is ITEM_CHANGE, selectionItemChanged()
is called. If the event ID is RANGE_CHANGE, selectionRangeChanged()
is called. If the event ID is SELECTION_CHANGE, selectionChanged()
is called.
Parameters:
listener
Overrides: com.borland.jb.util.DispatchableEvent.dispatch(EventListener)
protected String paramString()Appends the matrix-selection event object's parameter string to the parameter string of the superclass. The string that is appended is:
",selection=" + selection + ",location=" + location + ",rangeStart=" + rangeStart + ",rangeEnd=" + rangeEnd
See also com.borland.jbcl.model.SelectionEvent.paramString()