Package org.zkoss.zul.event
Class ColSizeEvent
java.lang.Object
org.zkoss.zk.ui.event.Event
org.zkoss.zul.event.ColSizeEvent
- All Implemented Interfaces:
Serializable
public class ColSizeEvent
extends org.zkoss.zk.ui.event.Event
Used to notify that the width of a column is changed.
When a user drags the border of a sizable column, only the width of the column itself is changed, other columns are not affected.
The event is sent to the parent (e.g., Columns
and Treecols).
- Author:
- tomyeh
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionColSizeEvent(String evtnm, org.zkoss.zk.ui.Component target, int icol, org.zkoss.zk.ui.Component col, int keys) Constructs an instance ofColSizeEvent.ColSizeEvent(String evtnm, org.zkoss.zk.ui.Component target, int icol, org.zkoss.zk.ui.Component col, String[] widths, int keys) Constructs an instance ofColSizeEventthat provide width of all columns.ColSizeEvent(String evtnm, org.zkoss.zk.ui.Component target, int icol, org.zkoss.zk.ui.Component col, String width, int keys) Constructs an instance ofColSizeEvent. -
Method Summary
Modifier and TypeMethodDescriptionintReturn the column index of the first column whose width is changed.static final ColSizeEventgetColSizeEvent(org.zkoss.zk.au.AuRequest request) Converts an AU request to a size event.org.zkoss.zk.ui.ComponentReturns the column whose width is changed.final intgetKeys()Returns what keys were pressed when the column is resized, or 0 if none of them was pressed.Returns the previous column widthgetPreviousWidth(int col) Returns the previous column width of the specified column index.getWidth()Returns the column widthgetWidth(int col) Returns the column width of the specified column index.Methods inherited from class org.zkoss.zk.ui.event.Event
getData, getEvent, getName, getPage, getTarget, isPropagatable, stopPropagation, toString
-
Field Details
-
ALT_KEY
public static final int ALT_KEYIndicates whether the Alt key is pressed. It might be returned as part ofgetKeys().- See Also:
-
CTRL_KEY
public static final int CTRL_KEYIndicates whether the Ctrl key is pressed. It might be returned as part ofgetKeys().- See Also:
-
SHIFT_KEY
public static final int SHIFT_KEYIndicates whether the Shift key is pressed. It might be returned as part ofgetKeys().- See Also:
-
-
Constructor Details
-
ColSizeEvent
public ColSizeEvent(String evtnm, org.zkoss.zk.ui.Component target, int icol, org.zkoss.zk.ui.Component col, int keys) Constructs an instance ofColSizeEvent. -
ColSizeEvent
public ColSizeEvent(String evtnm, org.zkoss.zk.ui.Component target, int icol, org.zkoss.zk.ui.Component col, String width, int keys) Constructs an instance ofColSizeEvent.- Parameters:
icol- the index of the first column whose width is changed.col- the component of the columnwidth- the width of the column that trigger this event.- Since:
- 5.0.0
-
ColSizeEvent
public ColSizeEvent(String evtnm, org.zkoss.zk.ui.Component target, int icol, org.zkoss.zk.ui.Component col, String[] widths, int keys) Constructs an instance ofColSizeEventthat provide width of all columns.- Parameters:
icol- the index of the column whose width is changed and trigger this event.col- the component of the columnwidths- the width of all columns- Since:
- 5.0.6
-
-
Method Details
-
getColSizeEvent
Converts an AU request to a size event.- Since:
- 5.0.0
-
getWidth
Returns the column width- Since:
- 5.0.0
-
getWidth
Returns the column width of the specified column index.- Parameters:
col- the column index- Since:
- 5.0.6
-
getPreviousWidth
Returns the previous column width- Since:
- 5.0.4
-
getPreviousWidth
Returns the previous column width of the specified column index.- Parameters:
col- the column index- Since:
- 5.0.6
-
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 org.zkoss.zk.ui.Component getColumn()Returns the column whose width is changed.- Since:
- 3.0.0
-
getKeys
public final int getKeys()
-