borland Packages  Class Hierarchy  jbcl.model Package  Index 

VectorSelectionEvent class

java.lang.Object
   +----java.util.EventObject
           +----borland.jbcl.util.DispatchableEvent
                   +----borland.jbcl.model.SelectionEvent
                           +----borland.jbcl.model.VectorSelectionEvent

About the VectorSelectionEvent class

Variables  Constructors  Properties  Methods  

Implements Serializable

A VectorSelectionEvent object is created whenever a vector-selection event occurs. Vector-selection events occur when data objects are added or removed from the set of selected locations in a vector model. 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.


VectorSelectionEvent variables

Variables implemented in borland.jbcl.model.SelectionEvent

Variables implemented in java.util.EventObject

VectorSelectionEvent constructors

VectorSelectionEvent properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in borland.jbcl.model.SelectionEvent

Properties implemented in borland.jbcl.util.DispatchableEvent

Properties implemented in java.lang.Object

Properties implemented in java.util.EventObject

VectorSelectionEvent methods

Methods implemented in this class

Methods implemented in borland.jbcl.util.DispatchableEvent

Methods implemented in java.lang.Object


VectorSelectionEvent constructors

VectorSelectionEvent(borland.jbcl.model.VectorSelection, int)

  public VectorSelectionEvent(borland.jbcl.model.VectorSelection selection, int change)
Constructs a vector-selection event object using the passed selection object and the type of change that occurred to that selection.

Parameters:

selection
The vector-selection object, the selection pool, in which a change occurred.
change
The type of change that occurred. The type of change can be one of the SelectionEvent variables.

VectorSelectionEvent(borland.jbcl.model.VectorSelection, int, int)

  public VectorSelectionEvent(borland.jbcl.model.VectorSelection selection, int change, int location)
Constructs a vector-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
The vector-selection object, the selection pool, in which a change occurred.
change
The type of change that occurred. The type of change can be one of the SelectionEvent constants.
location
A zero-based index that specifies the location in the vector.

VectorSelectionEvent(borland.jbcl.model.VectorSelection, int, int, int)

  public VectorSelectionEvent(borland.jbcl.model.VectorSelection selection, int change, int rangeStart, int rangeEnd)
Constructs a vector-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
The vector-selection object, the selection pool, in which a change occurred.
change
The type of change that occurred. The type of change can be one of the SelectionEvent variables.
rangeStart
A zero-based index that specifies the beginning of the range in the vector.
rangeEnd
A zero-based index that specifies the end of the range in the vector.

VectorSelectionEvent properties

location

 public int getLocation()
Returns the location where the vector-selection event occurred.

rangeEnd

 public int getRangeEnd()
Returns the final location in the range of locations where the vector-selection event occurred. The returned integer is a zero-based index into the vector.

rangeStart

 public int getRangeStart()
Returns the first location in the range of locations where the vector-selection event occurred. The returned integer is a zero-based index into the vector.

selection

 public VectorSelection getSelection()
Returns the set of currently selection locations within the vector.

VectorSelectionEvent methods

dispatch(java.util.EventListener)

  public void dispatch(java.util.EventListener listener)
Calls methods in the listening object passing this vector-selection event object. Which method is called depends on the type of vector-selection event 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
The object listening for vector-selection events.

Overrides: borland.jbcl.util.DispatchableEvent.dispatch(EventListener)

paramString()

  protected String paramString()
Appends the vector-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 borland.jbcl.model.SelectionEvent.paramString()