public class SelectEvent<T extends Component,E> extends Event
Modifier and Type | Class and Description |
---|---|
static interface |
SelectEvent.SelectedObjectHandler<T extends Component>
A handle to retrieve selected objects from selected items (components)
if possible.
|
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 |
---|
SelectEvent(java.lang.String name,
Component target,
java.util.Set<T> selectedItems)
Constructs a selection event.
|
SelectEvent(java.lang.String name,
Component target,
java.util.Set<T> selectedItems,
java.util.Set<T> previousSelectedItems,
java.util.Set<T> unselectedItems,
java.util.Set<E> selectedObjects,
java.util.Set<E> prevSelectedObjects,
java.util.Set<E> unselectedObjects,
T ref,
java.lang.Object data,
int keys)
Constructs a selection event containing the data objects that model
provided.
|
SelectEvent(java.lang.String name,
Component target,
java.util.Set<T> selectedItems,
T ref)
Constructs a selection event.
|
SelectEvent(java.lang.String name,
Component target,
java.util.Set<T> selectedItems,
T ref,
int keys)
Constructs a selection event.
|
Modifier and Type | Method and Description |
---|---|
int |
getKeys()
Returns what keys were pressed when the mouse is clicked, or 0 if
none of them was pressed.
|
java.util.Set<T> |
getPreviousSelectedItems()
Returns the previous selected items (never null).
|
java.util.Set<E> |
getPreviousSelectedObjects()
Returns the previous selected objects.
|
T |
getReference()
Returns the reference item that is the component causing the onSelect
event(select or deselect) to be fired.
|
java.util.Set<T> |
getSelectedItems()
Returns the selected items (never null).
|
java.util.Set<E> |
getSelectedObjects()
Returns the selected objects (never null).
|
static <T extends Component,E> |
getSelectEvent(AuRequest request)
Converts an AU request to a select event.
|
static <T extends Component,E> |
getSelectEvent(AuRequest request,
SelectEvent.SelectedObjectHandler<T> handler)
Converts an AU request to a select event.
|
java.util.Set<T> |
getUnselectedItems()
Returns the unselected items.
|
java.util.Set<E> |
getUnselectedObjects()
Returns the unselected objects.
|
getData, getEvent, getName, getPage, getTarget, isPropagatable, stopPropagation, toString
public static final int ALT_KEY
getKeys()
.public static final int CTRL_KEY
getKeys()
.public static final int SHIFT_KEY
getKeys()
.public SelectEvent(java.lang.String name, Component target, java.util.Set<T> selectedItems)
selectedItems
- a set of items that shall be selected.public SelectEvent(java.lang.String name, Component target, java.util.Set<T> selectedItems, T ref)
selectedItems
- a set of items that shall be selected.public SelectEvent(java.lang.String name, Component target, java.util.Set<T> selectedItems, T ref, int keys)
public SelectEvent(java.lang.String name, Component target, java.util.Set<T> selectedItems, java.util.Set<T> previousSelectedItems, java.util.Set<T> unselectedItems, java.util.Set<E> selectedObjects, java.util.Set<E> prevSelectedObjects, java.util.Set<E> unselectedObjects, T ref, java.lang.Object data, int keys)
public static final <T extends Component,E> SelectEvent<T,E> getSelectEvent(AuRequest request)
public static final <T extends Component,E> SelectEvent<T,E> getSelectEvent(AuRequest request, SelectEvent.SelectedObjectHandler<T> handler)
public final java.util.Set<T> getSelectedItems()
public final java.util.Set<T> getPreviousSelectedItems()
public final java.util.Set<E> getPreviousSelectedObjects()
public final java.util.Set<T> getUnselectedItems()
public final java.util.Set<E> getUnselectedObjects()
public final java.util.Set<E> getSelectedObjects()
public T 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()
.
Copyright © 2005-2023 Potix Corporation. All Rights Reserved.