|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.zkoss.zk.ui.event.Event
org.zkoss.zk.ui.event.SelectEvent
public class SelectEvent
Represents an event cause by user's the list selection is changed at the client.
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 | |
---|---|
SelectEvent(java.lang.String name,
Component target,
java.util.Set selectedItems)
Constructs a selection event. |
|
SelectEvent(java.lang.String name,
Component target,
java.util.Set selectedItems,
Component ref)
Constructs a selection event. |
|
SelectEvent(java.lang.String name,
Component target,
java.util.Set selectedItems,
Component ref,
int keys)
Constructs a selection event. |
Method Summary | |
---|---|
int |
getKeys()
Returns what keys were pressed when the mouse is clicked, or 0 if none of them was pressed. |
Component |
getReference()
Returns the reference item that is the component causing the onSelect event(select or deselect) to be fired. |
java.util.Set |
getSelectedItems()
Returns the selected items (never null). |
static SelectEvent |
getSelectEvent(AuRequest request)
Converts an AU request to a select event. |
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 |
---|
public static final int ALT_KEY
getKeys()
.
public static final int CTRL_KEY
getKeys()
.
public static final int SHIFT_KEY
getKeys()
.
Constructor Detail |
---|
public SelectEvent(java.lang.String name, Component target, java.util.Set selectedItems)
selectedItems
- a set of items that shall be selected.public SelectEvent(java.lang.String name, Component target, java.util.Set selectedItems, Component ref)
selectedItems
- a set of items that shall be selected.public SelectEvent(java.lang.String name, Component target, java.util.Set selectedItems, Component ref, int keys)
selectedItems
- a set of items that shall be selected.keys
- a combination of CTRL_KEY
, SHIFT_KEY
and ALT_KEY
.Method Detail |
---|
public static final SelectEvent getSelectEvent(AuRequest request)
public final java.util.Set getSelectedItems()
public Component getReference()
It is null, if the onSelect event is not caused by listbox or tree or combobox.
Note: if not multiple, the getReference()
is the same with the first item of getSelectedItems()
.
public final int getKeys()
CTRL_KEY
, SHIFT_KEY
and ALT_KEY
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |