org.zkoss.zul.event
Class ColSizeEvent

java.lang.Object
  extended by org.zkoss.zk.ui.event.Event
      extended by org.zkoss.zul.event.ColSizeEvent

public class ColSizeEvent
extends Event

Used to notify that the widths of two adjacent column are changed.

When an user drags the border of sizable columns, the width of the adjacent columns are changed accordingly - one is enlarged, the other is shrinked and the total width is not changed.

The event is sent to the parent (e.g., Columns and Treecols).

Author:
tomyeh

Field Summary
static int ALT_KEY
          Indicates whether the Alt key is pressed.
static int CTRL_KEY
          Indicates whether the Ctrl key is pressed.
static int SHIFT_KEY
          Indicates whether the Shift key is pressed.
 
Constructor Summary
ColSizeEvent(java.lang.String evtnm, Component target, int icol, Component col, int keys)
          Constructs an instance of ColSizeEvent.
ColSizeEvent(java.lang.String evtnm, Component target, int icol, Component col, java.lang.String width, int keys)
          Constructs an instance of ColSizeEvent.
 
Method Summary
 int getColIndex()
          Return the column index of the first column whose width is changed.
static ColSizeEvent getColSizeEvent(AuRequest request)
          Converts an AU request to a size event.
 Component getColumn()
          Returns the column whose width is changed.
 int getKeys()
          Returns what keys were pressed when the column is resized, or 0 if none of them was pressed.
 java.lang.String getWidth()
          Returns the column width
 
Methods inherited from class org.zkoss.zk.ui.event.Event
getData, getEvent, getName, getPage, getTarget, isPropagatable, stopPropagation, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALT_KEY

public static final int ALT_KEY
Indicates whether the Alt key is pressed. It might be returned as part of getKeys().

See Also:
Constant Field Values

CTRL_KEY

public static final int CTRL_KEY
Indicates whether the Ctrl key is pressed. It might be returned as part of getKeys().

See Also:
Constant Field Values

SHIFT_KEY

public static final int SHIFT_KEY
Indicates whether the Shift key is pressed. It might be returned as part of getKeys().

See Also:
Constant Field Values
Constructor Detail

ColSizeEvent

public ColSizeEvent(java.lang.String evtnm,
                    Component target,
                    int icol,
                    Component col,
                    int keys)
Constructs an instance of ColSizeEvent.

See Also:
ColSizeEvent(String, Component, int, Component, String, int)

ColSizeEvent

public ColSizeEvent(java.lang.String evtnm,
                    Component target,
                    int icol,
                    Component col,
                    java.lang.String width,
                    int keys)
Constructs an instance of ColSizeEvent.

Parameters:
icol - the index of the first colum whose width is changed.
col - the component of the column
width - the width of the column
Since:
5.0.0
Method Detail

getColSizeEvent

public static final ColSizeEvent getColSizeEvent(AuRequest request)
Converts an AU request to a size event.

Since:
5.0.0

getWidth

public java.lang.String getWidth()
Returns the column width

Since:
5.0.0

getColIndex

public int getColIndex()
Return the column index of the first column whose width is changed. The other column is the returned index plus one.

In other words, it is the index (starting from 0) of getColumn().


getColumn

public Component getColumn()
Returns the column whose width is changed.

Since:
3.0.0

getKeys

public final int getKeys()
Returns what keys were pressed when the column is resized, or 0 if none of them was pressed. It is a combination of CTRL_KEY, SHIFT_KEY and ALT_KEY.



Copyright © 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo