public class ColSizeEvent
extends org.zkoss.zk.ui.event.Event
When an 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).
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
ColSizeEvent(String evtnm,
org.zkoss.zk.ui.Component target,
int icol,
org.zkoss.zk.ui.Component col,
int keys)
Constructs an instance of
ColSizeEvent. |
ColSizeEvent(String evtnm,
org.zkoss.zk.ui.Component target,
int icol,
org.zkoss.zk.ui.Component col,
String[] widths,
int keys)
Constructs an instance of
ColSizeEvent that 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 of
ColSizeEvent. |
| Modifier and Type | Method and Description |
|---|---|
int |
getColIndex()
Return the column index of the first column whose width is changed.
|
static ColSizeEvent |
getColSizeEvent(org.zkoss.zk.au.AuRequest request)
Converts an AU request to a size event.
|
org.zkoss.zk.ui.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.
|
String |
getPreviousWidth()
Returns the previous column width
|
String |
getPreviousWidth(int col)
Returns the previous column width of the specified column index.
|
String |
getWidth()
Returns the column width
|
String |
getWidth(int col)
Returns the column width of the specified column index.
|
public static final int ALT_KEY
getKeys().public static final int CTRL_KEY
getKeys().public static final int SHIFT_KEY
getKeys().public ColSizeEvent(String evtnm, org.zkoss.zk.ui.Component target, int icol, org.zkoss.zk.ui.Component col, int keys)
ColSizeEvent.public ColSizeEvent(String evtnm, org.zkoss.zk.ui.Component target, int icol, org.zkoss.zk.ui.Component col, String width, int keys)
ColSizeEvent.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.public ColSizeEvent(String evtnm, org.zkoss.zk.ui.Component target, int icol, org.zkoss.zk.ui.Component col, String[] widths, int keys)
ColSizeEvent that provide width of all columns.icol - the index of the column whose width is changed and trigger this event.col - the component of the columnwidths - the width of all columnspublic static final ColSizeEvent getColSizeEvent(org.zkoss.zk.au.AuRequest request)
public String getWidth()
public String getWidth(int col)
col - the column indexpublic String getPreviousWidth()
public String getPreviousWidth(int col)
col - the column indexpublic int getColIndex()
In other words, it is the index (starting from 0) of getColumn().
public org.zkoss.zk.ui.Component getColumn()
public final int getKeys()
Copyright © 2026. All rights reserved.