Package com.iizix.api.ui
Class UISelectionEvent
- All Implemented Interfaces:
- IMessageBox
The UI Selection Event is fired when the UI selection changes for a component, or when connected to the panel, for every child item in it.
- Author:
- Christopher Mindus
- Nested Class Summary- Nested classes/interfaces inherited from interface com.iizix.gyro.IMessageBox- IMessageBox.Icon
- Field Summary- Fields inherited from interface com.iizix.gyro.IMessageBox- ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNING
- Constructor SummaryConstructorsConstructorDescription- UISelectionEvent- (UIComp source, IUISelection selection) Constructs the event for a change without a trigger source.- UISelectionEvent- (UIComp source, IUISelection selection, GProp<?> trigger) Constructs the event for a change event with a property being the trigger source, e.g.
- Method SummaryModifier and TypeMethodDescriptionGets the selection as an animated single indexed selection.Gets the selection as a boolean selection.- intGets the check state.- intGets the first selected index.Gets the selection as an indexed selection.- int[]Gets the selected indicies, if the selection is index based.Gets the selection.Gets the selection as a single indexed selection.Gets the UI component that is the source of the event.- GProp<?>Gets the trigger property being the source of the event.Gets the selection as a tri-state selection.- booleanReturns if the state is checked.- boolean- isOFF()Returns if the selection is "off".- boolean- isON()Returns if the selection is "on".- booleanReturns the selection state.- booleanReturns if the state is third state, i.e.- booleanReturns if the boolean-based selection is not set.- booleanReturns if the tri-state-based selection state is unselected.- protected StringGets the parameter string.- Methods inherited from class com.iizix.api.ui.UIBaseEvent- getAppSessionGyro, getClientSessionGyro, getContainerFirstUIComponent, getContainerFirstUIComponentNull, getFirstUIComponent, getFirstUIComponentNull, getPanelUIComponent, getPanelUIComponentNull, getUIPanel, getVirtualSpace- Methods inherited from class com.iizix.api.BaseEvent- getAction, getAction2, getActionNull, getActionNull2, getField, getField2, getFieldNull, getFieldNull2, getGroup, getGroup2, getGroupNull, getGroupNull2, getTable, getTable2, getTableNull, getTableNull2, getTime, getVirtualizedVirtualSpace, getVSComponent, getVSComponent2, getVSComponentNull, getVSComponentNull2, messageBox, toString- Methods inherited from class java.lang.Object- clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait- Methods inherited from interface com.iizix.gyro.IMessageBox- messageBox, messageBox, messageBox
- Constructor Details- UISelectionEventConstructs the event for a change without a trigger source.- Parameters:
- source- The source.
- selection- The selection.
- Throws:
- NullPointerException- If the source or selection is null.
 
- UISelectionEventConstructs the event for a change event with a property being the trigger source, e.g. an UIGrid or UICheckBox.- Parameters:
- source- The source.
- selection- The selection.
- trigger- The trigger property.
- Throws:
- NullPointerException- If the source or selection is null.
 
 
- Method Details- getTriggerGets the trigger property being the source of the event.- Returns:
- An instance of e.g. an UIButton, UICheckBox, a VS component or null if the trigger is not a property.
 
- getSourceGets the UI component that is the source of the event.
- getSelectionGets the selection.- Returns:
- The selection.
 
- getFirstSelectedIndexpublic int getFirstSelectedIndex()Gets the first selected index.- Returns:
- The first index in the current selection, or -1 for none or if selection is not index based.
 
- getSelectedIndiciespublic int[] getSelectedIndicies()Gets the selected indicies, if the selection is index based.- Returns:
- A new array of the selected indices (that may be modified to your liking), or a static zero in length array for no selection (or selection is not index based).
 
- getIndexedSelectionGets the selection as an indexed selection.- Returns:
- The selection instance, or null if the selection is not an indexed selection.
 
- getSingleIndexedSelectionGets the selection as a single indexed selection.- Returns:
- The selection instance, or null if the selection is not a single indexed selection.
 
- getAnimatedSingleIndexedSelectionGets the selection as an animated single indexed selection.- Returns:
- The selection instance, or null if the selection is not an animated single indexed selection.
 
- isSelectedpublic boolean isSelected()Returns the selection state.- Returns:
- true if selected, false if unselected or not boolean-based selection.
 
- isUnselectedBooleanpublic boolean isUnselectedBoolean()Returns if the boolean-based selection is not set.- Returns:
- true if unselected, false if selected or not boolean-based selection.
 
- isONpublic boolean isON()Returns if the selection is "on".- Returns:
- true if on, false if off or not boolean-based selection.
 
- isOFFpublic boolean isOFF()Returns if the selection is "off".- Returns:
- true if off, false if on or not boolean-based selection.
 
- getBooleanSelectionGets the selection as a boolean selection.- Returns:
- The selection instance, or null if the selection is not a boolean selection.
 
- getCheckStatepublic int getCheckState()Gets the check state.- Returns:
- Returns 0={$link #UNSELECTED}, 1={$link #CHECKED}, 2={$link #THIRD_STATE} or -1 if the selection is not a tri-state-based selection.
 
- isCheckedpublic boolean isChecked()Returns if the state is checked.- Returns:
- true if checked, false if unselected, in third state or the selection is not a tri-state-based selection.
 
- isUnselectedTriStatepublic boolean isUnselectedTriState()Returns if the tri-state-based selection state is unselected.- Returns:
- true if unchecked, false if checked, in third state or the selection is not a tri-state-based selection.
 
- isThirdStatepublic boolean isThirdState()Returns if the state is third state, i.e. neither checked nor unselected.- Returns:
- true if third state, false if checked, unselected or the selection is not a tri-state-based selection.
 
- getTriStateSelectionGets the selection as a tri-state selection.- Returns:
- The selection instance, or null if the selection is not a tri-state selection.
 
- paramStringGets the parameter string.- Overrides:
- paramStringin class- BaseEvent<UIComp>