borland Packages  Class Hierarchy  jbcl.view Package  Index 

HeaderEvent class

java.lang.Object
   +----java.util.EventObject
           +----borland.jbcl.util.DispatchableEvent
                   +----borland.jbcl.view.HeaderEvent

About the HeaderEvent class

Variables  Constructors  Properties  Methods  

Implements Serializable

A HeaderEvent object is created whenever a header event occurs. Header events occur when an item is clicked within the header, a cell is moved, or a cell is resized.

The id property specifies what created the event. The index property identifies the cell where the event occurred, and the x and y properties locate the exact spot within the cell where the event occurred.


HeaderEvent variables

Variables implemented in this class

Variables implemented in java.util.EventObject

HeaderEvent constructors

HeaderEvent properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in borland.jbcl.util.DispatchableEvent

Properties implemented in java.lang.Object

Properties implemented in java.util.EventObject

HeaderEvent methods

Methods implemented in this class

Methods implemented in borland.jbcl.util.DispatchableEvent

Methods implemented in java.lang.Object


HeaderEvent variables

ITEM_CLICKED

  public static final int ITEM_CLICKED = 0
A header item was clicked.

START_MOVE

  public static final int START_MOVE = 1
A header cell has begun moving.

START_RESIZE

  public static final int START_RESIZE = 4
A header cell has begun resizing.

STOP_MOVE

  public static final int STOP_MOVE = 3
A header cell stopped moving.

STOP_RESIZE

  public static final int STOP_RESIZE = 6
A header cell has completed resizing.

WHILE_MOVE

  public static final int WHILE_MOVE = 2
A header cell is being moved.

WHILE_RESIZE

  public static final int WHILE_RESIZE = 5
A header cell is being resized.


HeaderEvent constructors

HeaderEvent(java.lang.Object, int, int, int, int)

  public HeaderEvent(java.lang.Object source, int id, int index, int x, int y)
Constructs a HeaderEvent by calling jbcl.util.DispatchableEvent.DispatchableEvent(source) and passing along the specified source of the event, the event ID, the cell where the event occurred, and the position within the cell where the event occurred.

Parameters:

source
Identifies the Object that generated the event.
id
The type of event that occurred. Specify one of the HeaderEvent variables.
index
The position of the cell in the header where the event occurred. A value of 0 indicates the first cell in the header.
x
The x-coordinate within the cell where the event occurred.
y
The y-coordinate within the cell where the event occurred.

HeaderEvent properties

ID

 public int getID()
Returns an integer that identifies the type of header event. The returned value represents one of the header event variables.

index

 public int getIndex()
Returns the position of the cell in the header where the event occurred. A returned value of 0 indicates the first cell.

x

 public int getX()
Returns the x-coordinate of the location within the cell where the event occurred. For example, the location of a mouse click would have an x- and a y- coordinate.

y

 public int getY()
Returns the y-coordinate of the location within the cell where the event occurred. For example, the location of a mouse click would have an x- and a y- coordinate.

HeaderEvent methods

dispatch(java.util.EventListener)

  public void dispatch(java.util.EventListener listener)
If ITEM_CLICKED, calls HeaderListener.headerItemClicked().
If STOP_MOVE, calls HeaderListener.headerItemMoving().
If STOP_RESIZE, calls HeaderListener.headerItemResizing().

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

paramString()

  protected String paramString()
Appends the header event object's parameter string to the parameter string of the superclass. The string that is appended is:

"id=" + id + " index=" + index + " x=" + x + " y=" + y;

Overrides: borland.jbcl.util.DispatchableEvent.paramString()

See also: borland.jbcl.model.SelectionEvent.paramString()