T
- The type of the list of objects associated to the combobox.public class GObjectComboBoxWithLabel<T> extends GComboBoxWithLabel
GComboBoxWithLabel
linked to a list of objects of a generic type T. setObject(Object)
,setObjectList(Object, Object[], String...)
,setObjectList(Object, Object[], String[], String[])
,setDefaultObject(Object)
,setDefaultObjectList(Object, Object[], String[])
,setDefaultObjectList(Object, Object[], String[], String[])
,setSavedObject(Object)
setValue(int)
,setValue(Enum)
,setValueList(Enum, Enum...)
,setValueList(int, int[], String...)
,setValueList(int, int[], String[], String[])
,setDefaultValue(Enum)
,setDefaultValue(int)
,setDefaultValueList(Enum, Enum[])
,setDefaultValueList(int, int[], String[])
,setDefaultValueList(int, int[], String[], String[])
,setSavedValue(Enum)
,setSavedValue(int)
Index | Class | Item | Constraint |
toto | (undefined) | (undefined) | (undefined) |
GComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.Operation
NAME_ATTRIBUTE
Constructor and Description |
---|
GObjectComboBoxWithLabel(String widgetId,
String label,
T object,
T[] objects)
Constructor.
|
GObjectComboBoxWithLabel(String widgetId,
String label,
T object,
T[] objects,
String... labels)
Constructor.
|
GObjectComboBoxWithLabel(String widgetId,
String label,
T object,
T[] objects,
String[] labels,
String[] toolTips)
Constructor.
|
GObjectComboBoxWithLabel(String label,
T object,
T[] objects)
Constructor.
|
GObjectComboBoxWithLabel(String label,
T object,
T[] objects,
String... labels)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Called when the element is to be cleared, so it can perform the actions required to return to the last
saved/loaded values.
|
T |
getDefaultObject()
Get the default object.
|
T |
getObject()
Return the selected object.
|
T[] |
getObjectList()
Get the list of objects of the combobox.
|
T |
getSavedObject()
Get the saved object.
|
void |
setDefaultObject(T defaultObject)
Change the default object of the list.
|
void |
setDefaultObjectList(T defaultObject,
T[] defaultObjects,
String[] defaultLabels)
Change the default list of objects, the object and labels of the combobox.
|
void |
setDefaultObjectList(T defaultObject,
T[] defaultObjects,
String[] defaultLabels,
String[] defaultTooltips)
Change the default list of objects, the object and labels of the combobox.
|
void |
setDefaultValue(Enum<?> value)
Unsupported method! Change the default value of the list.
|
void |
setDefaultValue(int value)
Unsupported method! Change the default value of the list.
|
void |
setDefaultValueList(Enum<?> enumItem,
Enum<?>[] enumItemList)
Unsupported method! Change the default list of values, the value and labels of the combobox.
|
void |
setDefaultValueList(int value,
int[] valueList,
String[] labels)
Unsupported method! Change the default list of values, the value and labels of the combobox.
|
void |
setDefaultValueList(int value,
int[] valueList,
String[] labels,
String[] tooltips)
Unsupported method! Change the default list of values, the value and labels of the combobox.
|
void |
setObject(T object)
Set a new object.
|
void |
setObjectList(T object,
T[] objects,
String... labels)
Change the list of objects, the selected object and the labels of the combobox.
|
void |
setObjectList(T object,
T[] objects,
String[] labels,
String[] tooltips)
Change the list of objects, the selected object and the labels of the combobox.
|
void |
setSavedObject(T savedObject)
Change the saved object.
|
void |
setSavedValue(Enum<?> value)
Unsupported method! Change the saved value.
|
void |
setSavedValue(int value)
Unsupported method! Change the saved value.
|
void |
setValue(Enum<?> value)
Unsupported method! Set a new value.
|
void |
setValue(int value)
Unsupported method! Set a new value.
|
void |
setValueList(Enum<?> enumItem,
Enum<?>... enumItemList)
Unsupported method! Change the list of values, the selected value and the labels of the combobox by means of an enumerate.
|
void |
setValueList(int value,
int[] valueList,
String... labels)
Unsupported method! Change the list of values, the selected value and the labels of the combobox.
|
void |
setValueList(int value,
int[] valueList,
String[] labels,
String[] tooltips)
Unsupported method! Change the list of values, the selected value and the labels of the combobox.
|
after, attachCopyPasteMenu, before, display, generic, getDefaultValue, getDefaultValueEnum, getErrorLabelsList, getGComboBox, getGLabelWithIndicator, getSavedValue, getSavedValueEnum, getSelectedItem, getSubComponent, getValue, getValueEnum, getWarningLabelsList, isCopyPasteEvent, isEnabled, isModified, read, setEnabled, setErrorLabelsList, setStringConstraint, setTooltipsList, setToolTipText, setWarningLabelsList, setWidgetId, updateIsModifiedIndicator, updateStatus, write
put
activateConstraintsByType, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, clearAllInnerDescendantConstraint, clearConstraint, clearInnerDescendantContraint, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, getComponent, getConstraint, getCurrentOperation, getDisplayIndicatorStatus, getDisplayIsModifiedIndicator, getElement, getGClassName, getGPanel, getGParent, getGUnitInConfigFile, getInnerDescendantConstraint, getName, getNameInConfigFile, getOperationSaveValue, getPathInConfigFile, getSimpleWidgetId, getStatus, getStringConstraint, getWidgetId, handleCopyPasteEvent, handleCopyPasteEvent, handleProcessEventException, isForcedStatus, launchInvalidPositionException, mouseWheelMoved, parseSimpleConstraint, processGEvent, processMouseWheelEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDefaultConstraints, setDisplayIsModifiedIndicator, setElement, setForcedStatus, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setNameInConfigFile, setPathInConfigFile, setStatus, setWidth, setWindowBusyCursor, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem
public GObjectComboBoxWithLabel(String label, T object, T[] objects, String... labels)
label
- to display on the side of the combobox.object
- selected object.objects
- objects for the different choices.labels
- labels of the choices.public GObjectComboBoxWithLabel(String label, T object, T[] objects)
Object.toString()
method.label
- to display on the side of the combobox.object
- selected object.objects
- objects for the different choices.public GObjectComboBoxWithLabel(String widgetId, String label, T object, T[] objects, String... labels)
widgetId
- widget identifier.label
- to display on the side of the combobox.object
- selected object.objects
- objects for the different choices.labels
- labels for the different choices.public GObjectComboBoxWithLabel(String widgetId, String label, T object, T[] objects)
Object.toString()
method.widgetId
- widget identifier.label
- to display on the side of the combobox.object
- selected object.objects
- objects for the different choices.public GObjectComboBoxWithLabel(String widgetId, String label, T object, T[] objects, String[] labels, String[] toolTips)
widgetId
- widget identifier.label
- to display on the side of the combobox.object
- selected object (might be null, then the first object is selected). It must be one of the
objects argument.objects
- object for the different choices.labels
- labels for the different choices.toolTips
- tooltips for the different choices.public void setObject(T object) throws GException
object
- to set.GException
- if the object is not available in the widgetpublic T getObject()
public void setObjectList(T object, T[] objects, String... labels) throws GException
object
- new object to select.objects
- new objects list.labels
- new labels list.GException
- if the object is not available in the widgetpublic final void setObjectList(T object, T[] objects, String[] labels, String[] tooltips) throws GException
object
- new object to select (might be null, then the first object is selected).objects
- new objects list.labels
- new labels list.tooltips
- new tooltips list.GException
- if the object is not available in the widgetpublic T[] getObjectList()
public void setDefaultObject(T defaultObject) throws GException
defaultObject
- new default object.GException
- if the object is not available in the default listpublic T getDefaultObject()
public void setDefaultObjectList(T defaultObject, T[] defaultObjects, String[] defaultLabels) throws GException
defaultObject
- new default object.defaultObjects
- new default objects list.defaultLabels
- new default labels list.GException
- if the object is not available in the default listpublic final void setDefaultObjectList(T defaultObject, T[] defaultObjects, String[] defaultLabels, String[] defaultTooltips) throws GException
defaultObject
- new default object.defaultObjects
- new default objects list.defaultLabels
- new default labels list.defaultTooltips
- new default tooltips list.GException
- if the object is not available in the default listpublic void setSavedObject(T savedObject) throws GException
savedObject
- new saved object.GException
- if the object is not available in the widgetpublic T getSavedObject()
public void clear() throws GException
clear
in interface GClear
clear
in class GComboBoxWithLabel
GException
- in case of problem while clearing the values.public void setValue(int value)
setValue
in class GComboBoxWithLabel
value
- to set.public void setValue(Enum<?> value)
setValue
in class GComboBoxWithLabel
value
- to set.public void setValueList(Enum<?> enumItem, Enum<?>... enumItemList)
setValueList
in class GComboBoxWithLabel
enumItem
- new enumerate item to select.enumItemList
- new enumerate items list.public void setValueList(int value, int[] valueList, String... labels)
setValueList
in class GComboBoxWithLabel
value
- new value to select.valueList
- new value list, it can be null if the values are the indexes of the elements in the
combobox.labels
- to display in the combobox.public void setValueList(int value, int[] valueList, String[] labels, String[] tooltips)
setValueList
in class GComboBoxWithLabel
value
- new value to select.valueList
- new value list, it can be null if the values are the indexes of the elements in the
combobox.labels
- to display in the combobox.tooltips
- to display for each element in the combobox.public void setDefaultValue(Enum<?> value)
setDefaultValue
in class GComboBoxWithLabel
value
- default value to set.public void setDefaultValue(int value)
setDefaultValue
in class GComboBoxWithLabel
value
- default value to set.public void setDefaultValueList(Enum<?> enumItem, Enum<?>[] enumItemList)
setDefaultValueList
in class GComboBoxWithLabel
enumItem
- new enumerate item to be set as default one.enumItemList
- new enumerate items list to be set as default one.public void setDefaultValueList(int value, int[] valueList, String[] labels)
setDefaultValueList
in class GComboBoxWithLabel
value
- new default value.valueList
- new default value list.labels
- new default value list.public void setDefaultValueList(int value, int[] valueList, String[] labels, String[] tooltips)
setDefaultValueList
in class GComboBoxWithLabel
value
- new default value.valueList
- new default value list.labels
- new default value list.tooltips
- new default tooltips list.public void setSavedValue(Enum<?> value)
setSavedValue
in class GComboBoxWithLabel
value
- new saved value.public void setSavedValue(int value)
setSavedValue
in class GComboBoxWithLabel
value
- new saved value.Copyright © 2024. All rights reserved.