Class IlxWComboBox
- java.lang.Object
-
- ilog.webui.dhtml.IlxWContainer
-
- ilog.webui.dhtml.IlxWComponent
-
- ilog.webui.dhtml.components.IlxWComboBox
-
- All Implemented Interfaces:
IlxWConstants,IlxWCSSModelProvider,IlxWDependencyProvider,IlxWJSObject,ActionListener,ItemSelectable,Serializable,EventListener,ListDataListener
@Deprecated public class IlxWComboBox extends IlxWComponent implements ListDataListener, ItemSelectable, ActionListener
Deprecated.A combo box component.The combo box component relies on a model, instance of
javax.swing.ComboBoxModel. It may be rendered in several modes, determined by the value of the "mode" CSS style. Possible values for themodestyle are:system: renders the combo box as a <select> HTML element. This mode is not supported if the combo box has a renderer or an editor. In this case, the component tries to render itself in the "arrow" mode.link: renders the combo box as a hyperlink which, once clicked pops up a menu just under the link. If the combo box has an editor, this mode is not supported, and the component tries to render itself in "arrow" mode. The combo box may also not support this mode with some Web browsers (Netscape 3 & Netscape 4.7 for instance). In this case, the component tries render itself in the "linkdialog" mode.arrow: renders the combo box as Swing combo box: the current renderer or the current editor is displayed, and an arrow button is displayed to the right. A click on the arrow button pops up a menu with the possible items. The combo box may not support this mode with some Web browsers (Netscape 3 & Netscape 4.7 for instance). In this case, the component tries render itself in the "arrowdialog" mode.linkdialog: Same as thelinkmode but a dialog box is popped up displaying the available items, instead of a drop down list.arrowdialog: Same as thearrowmode but a dialog box is popped up displaying the available items, instead of a drop down list.
systemmode. To set the current mode, you can either write a CSS style sheet:ComboBox { mode: arrow; }... or dynamically set the style on the object:myComboBox.getStyle().set("mode", "arrow");- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ilog.webui.dhtml.IlxWComponent
IlxWComponent.DynamicStyleMap
-
-
Field Summary
Fields Modifier and Type Field Description static StringACTION_PROPERTYDeprecated.The action bound property name.protected StringactionCommandDeprecated.static StringEDITABLE_PROPERTYDeprecated.The editable bound property name.protected IlxWComboBoxEditoreditorDeprecated.static StringEDITOR_PROPERTYDeprecated.The editor bound property name.static StringENABLED_PROPERTYDeprecated.The enabled bound property name.protected booleanisEditableDeprecated.protected ComboBoxModelmodelDeprecated.static StringMODEL_PROPERTYDeprecated.The model bound property name.protected IlxWListCellRendererrendererDeprecated.static StringRENDERER_PROPERTYDeprecated.The renderer bound property name.protected IlxWComboBox.ComboBoxUIuiDeprecated.Access to allow another UI to the combo box (JSF)-
Fields inherited from class ilog.webui.dhtml.components.IlxWLabelWrapper
label
-
Fields inherited from class ilog.webui.dhtml.IlxWContainer
listenerList
-
Fields inherited from interface ilog.webui.dhtml.IlxWConstants
ATTR_CONFIG_RESNAME, ATTR_EXCEPTION, ATTR_IE5UPDATE, ATTR_MODIFIERS, ATTR_OPENPORT, ATTR_REQUESTPATH, ATTR_UPDATEREQUEST_LIST, ATTRIBUTE_SERVICE, CID_PREFIX, DATE_FORMAT_DATE, DATE_FORMAT_DATETIME, DATE_FORMAT_TIME, HTML_ESCAPE, ILRIFRAME, IMGID_PREFIX, MIME_APPLICATION_JAVASCRIPT, MIME_IMAGE_GIF, MIME_IMAGE_JPG, MIME_TEXT_HTML, NO_ESCAPE, PARAM_CONTROLLER_PATH, PARAM_DATA, PARAM_PORT, PARAM_RESOURCE_MANAGER_PATH, PARAM_SERVICE, PARAM_SERVLET_CONTEXT_DELEGATE, PARAM_VIEW_PATH, PROP_ACTION, PROP_AFTER, PROP_ALIGN, PROP_BACKGROUND_COLOR, PROP_BEFORE, PROP_BORDER, PROP_BORDER_BOTTOM, PROP_BORDER_COLOR, PROP_BORDER_LEFT, PROP_BORDER_RIGHT, PROP_BORDER_STYLE, PROP_BORDER_TOP, PROP_BORDER_WIDTH, PROP_BOTTOM_RIGHT_ICON, PROP_CELL_PADDING, PROP_CELL_SPACING, PROP_CHECKMENU_ICON, PROP_COLOR, PROP_COLS, PROP_COLUMNS, PROP_CURSOR, PROP_DATE_FORMAT, PROP_DHTML, PROP_EMPTY_TEXT, PROP_ENABLED, PROP_FILTER, PROP_FONT, PROP_FONT_FAMILY, PROP_FONT_SIZE, PROP_FONT_STYLE, PROP_FONT_WEIGHT, PROP_HEIGHT, PROP_ICON, PROP_ICON_TEXT_GAP, PROP_INNER_HTML, PROP_ITEM_HEIGHT, PROP_LINE_HEIGHT, PROP_MIME_TYPE, PROP_MINUS_SQUARE_ICON, PROP_NOWRAP, PROP_ONMOUSEOUT, PROP_ONMOUSEOVER, PROP_OVERFLOW, PROP_PADDING, PROP_PATH, PROP_PLUS_SQUARE_ICON, PROP_POSTPONED, PROP_RIGHT_ICON, PROP_ROOT_VISIBLE, PROP_ROWS, PROP_SELECTED, PROP_SELECTED_INDEX, PROP_SELECTION_BACKGROUND_COLOR, PROP_SELECTION_COLOR, PROP_SHOW_HORIZONTAL_LINES, PROP_SHOW_VERTICAL_LINES, PROP_SHOWS_ROOT_HANDLES, PROP_SQUARE_ICON, PROP_SUBMENU_ICON, PROP_TAB_PLACEMENT, PROP_TEXT, PROP_TEXT_DECORATION, PROP_TEXT_POSITION, PROP_TOOLTIP, PROP_TOP_BOTTOM_ICON, PROP_TOP_BOTTOM_RIGHT_ICON, PROP_TOP_RIGHT_ICON, PROP_TOP_ROW, PROP_TOTAL_ROW_COUNT, PROP_VALIGN, PROP_VISIBLE_ROW_COUNT, PROP_WIDTH, SERVICE_BLANKPAGE, SERVICE_BLANKPAGE_INT, SERVICE_COMMAND, SERVICE_COMMAND_INT, SERVICE_FORWARD, SERVICE_FORWARD_INT, SERVICE_SERIALIZE, SERVICE_SERIALIZE_INT, TARGET_IFRAME, TARGET_SELF, VAR_PREFIX, WEB_ALREADY_ATTACHED, WEB_MISSING_OPENPORT, WEB_NULL_MANAGER, XML_ESCAPE
-
-
Constructor Summary
Constructors Constructor Description IlxWComboBox()Deprecated.Creates anIlxWComboBoxwith a default data model.IlxWComboBox(Object[] items)Deprecated.Creates anIlxWComboBoxthat contains the elements in the specified array.IlxWComboBox(Vector items)Deprecated.Creates anIlxWComboBoxthat contains the elements in the specified Vector.IlxWComboBox(ComboBoxModel aModel)Deprecated.Creates anIlxWComboBoxthat takes its items from an existing ComboBoxModel.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidactionPerformed(ActionEvent e)Deprecated.voidaddActionListener(ActionListener l)Deprecated.Adds an action listener.voidaddItemListener(ItemListener listener)Deprecated.Adds an item listener.voidconfigureEditor(IlxWComboBoxEditor anEditor, Object anItem)Deprecated.Initializes the editor with the specified item.voidcontentsChanged(ListDataEvent e)Deprecated.protected voidfireActionEvent()Deprecated.Notify all listeners that have registered interest for notification on this event type.protected voidfireItemStateChanged(ItemEvent e)Deprecated.Notify all listeners that have registered interest for notification on this event type.IlxWActiongetAction()Deprecated.Gets the action that will be called when the user selects an item in the combo box.StringgetActionCommand()Deprecated.Returns the action command that is included in the event sent to action listeners.ActionListener[]getActionListeners()Deprecated.IlxWComboBoxEditorgetEditor()Deprecated.Returns the editor used to render and edit the selected item in theIlxWComboBoxfield.ObjectgetItemAt(int index)Deprecated.Returns the list item at the specified index.intgetItemCount()Deprecated.Returns the number of items in the list.ItemListener[]getItemListeners()Deprecated.ComboBoxModelgetModel()Deprecated.Returns the data model currently used by theIlxWComboBox.StringgetOnChangeJSAction()Deprecated.IlxWListCellRenderergetRenderer()Deprecated.Returns the renderer used to display the selected item in theIlxWComboBoxfield.intgetSelectedIndex()Deprecated.Returns the index of the currently selected item in the list.ObjectgetSelectedItem()Deprecated.Returns the currently selected item.Object[]getSelectedObjects()Deprecated.Returns an array containing the selected item.protected IlxWComboBox.ComboBoxUIgetUI()Deprecated.protected IlxWComboBox.ComboBoxUIgetUI(IlxWPort port)Deprecated.protected IlxWCSSRulesetgetUserAgentRules()Deprecated.Gets the "user-agent" CSS rules.voidintervalAdded(ListDataEvent e)Deprecated.voidintervalRemoved(ListDataEvent e)Deprecated.booleanisEditable()Deprecated.Returns True if theIlxWComboBoxis editable.booleanisEnabled()Deprecated.Determines whether this component is enabled.voidnotifyDependencies(IlxWPort port)Deprecated.protected voidprintComponent(IlxWPort port)Deprecated.Prints the HTML code that will display the graphical representation of this component.voidremoveActionListener(ActionListener l)Deprecated.Removes an action listener.voidremoveItemListener(ItemListener listener)Deprecated.Removes an item listener.protected voidselectedItemChanged()Deprecated.This method is called when the selected item changes.voidsetAction(IlxWAction action)Deprecated.Sets the action that will be called when the user selects an item in the combo box.voidsetActionCommand(String aCommand)Deprecated.Sets the action command that should be included in the event sent to action listeners.voidsetEditable(boolean aFlag)Deprecated.Determines whether theIlxWComboBoxfield is editable.voidsetEditor(IlxWComboBoxEditor editor)Deprecated.Sets the editor used to paint and edit the selected item in theIlxWComboBoxfield.voidsetEnabled(boolean b)Deprecated.Enables the combo box so that items can be selected.voidsetModel(ComboBoxModel model)Deprecated.Sets the data model that theIlxWComboBoxuses to obtain the list of items.voidsetOnChangeJSAction(String onChangeAction)Deprecated.voidsetRenderer(IlxWListCellRenderer renderer)Deprecated.Sets the renderer that paints the item selected from the list in theIlxWComboBoxfield.voidsetSelectedIndex(int index)Deprecated.Selects the item at indexanIndex.voidsetSelectedItem(Object anObject)Deprecated.Sets the selected item in theIlxWComboBoxby specifying the object in the list.voidupdate(Element elt)Deprecated.-
Methods inherited from class ilog.webui.dhtml.components.IlxWLabelWrapper
getIconPath, getIcoPath, getLabel, getText, setIconPath, setText
-
Methods inherited from class ilog.webui.dhtml.IlxWComponent
addPropertyChangeListener, addPropertyChangeListener, detach, doPrint, firePropertyChange, firePropertyChange, getName, getRealHtmlTagName, getStyle, invalidate, isInvalidated, print, removePropertyChangeListener, removePropertyChangeListener, setName, validate
-
Methods inherited from class ilog.webui.dhtml.IlxWContainer
add, add, getAttribute, getAttributeNames, getComponent, getComponentCount, getComponentNamed, getComponents, getManager, getParent, indexOf, isAncestorOf, remove, remove, removeAll, removeAttribute, setAttribute, setAuthorRules, setFinalizer
-
-
-
-
Field Detail
-
MODEL_PROPERTY
public static final String MODEL_PROPERTY
Deprecated.The model bound property name.- See Also:
- Constant Field Values
-
EDITOR_PROPERTY
public static final String EDITOR_PROPERTY
Deprecated.The editor bound property name.- See Also:
- Constant Field Values
-
EDITABLE_PROPERTY
public static final String EDITABLE_PROPERTY
Deprecated.The editable bound property name.- See Also:
- Constant Field Values
-
ENABLED_PROPERTY
public static final String ENABLED_PROPERTY
Deprecated.The enabled bound property name.- See Also:
- Constant Field Values
-
ACTION_PROPERTY
public static final String ACTION_PROPERTY
Deprecated.The action bound property name.- See Also:
- Constant Field Values
-
RENDERER_PROPERTY
public static final String RENDERER_PROPERTY
Deprecated.The renderer bound property name.- See Also:
- Constant Field Values
-
model
protected ComboBoxModel model
Deprecated.
-
renderer
protected IlxWListCellRenderer renderer
Deprecated.
-
editor
protected IlxWComboBoxEditor editor
Deprecated.
-
isEditable
protected boolean isEditable
Deprecated.
-
actionCommand
protected String actionCommand
Deprecated.
-
ui
protected IlxWComboBox.ComboBoxUI ui
Deprecated.Access to allow another UI to the combo box (JSF)
-
-
Constructor Detail
-
IlxWComboBox
public IlxWComboBox(ComboBoxModel aModel)
Deprecated.Creates anIlxWComboBoxthat takes its items from an existing ComboBoxModel.- Parameters:
aModel- The ComboBoxModel that provides the displayed list of items.
-
IlxWComboBox
public IlxWComboBox(Object[] items)
Deprecated.Creates anIlxWComboBoxthat contains the elements in the specified array.
-
IlxWComboBox
public IlxWComboBox(Vector items)
Deprecated.Creates anIlxWComboBoxthat contains the elements in the specified Vector.
-
IlxWComboBox
public IlxWComboBox()
Deprecated.Creates anIlxWComboBoxwith a default data model. UseaddItemto add items.
-
-
Method Detail
-
setModel
public void setModel(ComboBoxModel model)
Deprecated.Sets the data model that theIlxWComboBoxuses to obtain the list of items.- Parameters:
model- The combo box model that provides the displayed list of items.
-
getModel
public ComboBoxModel getModel()
Deprecated.Returns the data model currently used by theIlxWComboBox.- Returns:
- The combo box model that provides the displayed list of items.
-
setEditable
public void setEditable(boolean aFlag)
Deprecated.Determines whether theIlxWComboBoxfield is editable.An editable
IlxWComboBoxallows the user to type into the field or select an item from the list to initialize the field, after which it can be edited.A non editable
IlxWComboBoxdisplays the selected item in the field, but the selection cannot be modified.- Parameters:
aFlag- A boolean value, where true indicates that the field is editable.
-
isEditable
public boolean isEditable()
Deprecated.Returns True if theIlxWComboBoxis editable.- Returns:
trueif the combo box can be edited;falseotherwise.
-
setRenderer
public void setRenderer(IlxWListCellRenderer renderer)
Deprecated.Sets the renderer that paints the item selected from the list in theIlxWComboBoxfield.The renderer is used if the
IlxWComboBoxis not editable, otherwise the editor is used to render and edit the selected item.The default renderer displays a string, obtained by calling the selected object's
toStringmethod. Other renderers can handle graphic images and composite items.To display the selected item,
aRenderer.getListCellRendererComponentis called, passing the list object and an index of -1.- Parameters:
renderer- TheListCellRendererthat displays the selected item.- See Also:
setEditor(ilog.webui.dhtml.components.IlxWComboBoxEditor)
-
getRenderer
public IlxWListCellRenderer getRenderer()
Deprecated.Returns the renderer used to display the selected item in theIlxWComboBoxfield.- Returns:
- The list cell renderer that displays the selected item.
-
setEditor
public void setEditor(IlxWComboBoxEditor editor)
Deprecated.Sets the editor used to paint and edit the selected item in theIlxWComboBoxfield.The editor is used only if the receiving
IlxWComboBoxis editable. If not editable, the combo box uses the renderer to render the selected item.- Parameters:
editor- TheIlxWComboBoxEditorthat displays the selected item.- See Also:
setRenderer(ilog.webui.dhtml.components.IlxWListCellRenderer)
-
getEditor
public IlxWComboBoxEditor getEditor()
Deprecated.Returns the editor used to render and edit the selected item in theIlxWComboBoxfield.- Returns:
- The combo box editor that displays the selected item.
-
configureEditor
public void configureEditor(IlxWComboBoxEditor anEditor, Object anItem)
Deprecated.Initializes the editor with the specified item.- Parameters:
anEditor- TheIlxWComboBoxEditorthat displays the list item in the combo box field and allows it to be edited.anItem- The object to display and edit in the field.
-
setSelectedItem
public void setSelectedItem(Object anObject)
Deprecated.Sets the selected item in theIlxWComboBoxby specifying the object in the list.If
anObjectis in the list, the list displays withanObjectselected. If the object does not exist in the list, the default data model selects the first item in the list.- Parameters:
anObject- The list object to select.
-
getSelectedItem
public Object getSelectedItem()
Deprecated.Returns the currently selected item.- Returns:
- The currently selected object in the data model.
-
setSelectedIndex
public void setSelectedIndex(int index)
Deprecated.Selects the item at indexanIndex.- Parameters:
index- An int specifying the list item to select, where 0 specifies the first item in the list.
-
getSelectedIndex
public int getSelectedIndex()
Deprecated.Returns the index of the currently selected item in the list.The result is not always defined if the
IlxWComboBoxbox allows selected items that are not in the list. Returns -1 if there is no selected item or if the user specified an item which is not in the list.- Returns:
- An int specifying the list item that is currently selected 0 specifies the first item in the list, -1 indicates that no item is selected or that the currently selected item is not in the list.
-
addItemListener
public void addItemListener(ItemListener listener)
Deprecated.Adds an item listener.aListenerwill receive an event when the selected item changes.- Specified by:
addItemListenerin interfaceItemSelectable- Parameters:
listener- The item listener that is to be notified.
-
removeItemListener
public void removeItemListener(ItemListener listener)
Deprecated.Removes an item listener.- Specified by:
removeItemListenerin interfaceItemSelectable- Parameters:
listener- The item listener to remove.
-
addActionListener
public void addActionListener(ActionListener l)
Deprecated.Adds an action listener.The listener will receive an action event the user finishes making a selection.
- Parameters:
l- The action listener that is to be notified.
-
removeActionListener
public void removeActionListener(ActionListener l)
Deprecated.Removes an action listener.- Parameters:
l- The action listener to remove.
-
setActionCommand
public void setActionCommand(String aCommand)
Deprecated.Sets the action command that should be included in the event sent to action listeners.- Parameters:
aCommand- A string containing the "command" that is sent to action listeners. The same listener can then do different things depending on the command it receives.
-
getActionCommand
public String getActionCommand()
Deprecated.Returns the action command that is included in the event sent to action listeners.- Returns:
- the string containing the command that is sent to action listeners. This command is an arbitrary character string.
-
fireItemStateChanged
protected void fireItemStateChanged(ItemEvent e)
Deprecated.Notify all listeners that have registered interest for notification on this event type.- See Also:
EventListenerList
-
getItemListeners
public ItemListener[] getItemListeners()
Deprecated.
-
fireActionEvent
protected void fireActionEvent()
Deprecated.Notify all listeners that have registered interest for notification on this event type.
-
getActionListeners
public ActionListener[] getActionListeners()
Deprecated.
-
selectedItemChanged
protected void selectedItemChanged()
Deprecated.This method is called when the selected item changes.Its default implementation notifies the item listeners.
-
getSelectedObjects
public Object[] getSelectedObjects()
Deprecated.Returns an array containing the selected item.- Specified by:
getSelectedObjectsin interfaceItemSelectable- Returns:
- An array of objects containing one element -- the selected item.
-
actionPerformed
public void actionPerformed(ActionEvent e)
Deprecated.- Specified by:
actionPerformedin interfaceActionListener
-
getUI
protected IlxWComboBox.ComboBoxUI getUI(IlxWPort port)
Deprecated.- Parameters:
port- The current port.- Returns:
- the UI of the combo box.
-
getUI
protected IlxWComboBox.ComboBoxUI getUI()
Deprecated.- Returns:
- the UI of the combo box.
-
intervalAdded
public void intervalAdded(ListDataEvent e)
Deprecated.- Specified by:
intervalAddedin interfaceListDataListener
-
intervalRemoved
public void intervalRemoved(ListDataEvent e)
Deprecated.- Specified by:
intervalRemovedin interfaceListDataListener
-
contentsChanged
public void contentsChanged(ListDataEvent e)
Deprecated.- Specified by:
contentsChangedin interfaceListDataListener
-
setEnabled
public void setEnabled(boolean b)
Deprecated.Enables the combo box so that items can be selected.When the combo box is disabled, items cannot be selected and values cannot be typed into its field (if it is editable).
- Parameters:
b- A boolean value, where true enables the component and false disables it.
-
isEnabled
public boolean isEnabled()
Deprecated.Determines whether this component is enabled.- Returns:
trueif this component is enabled.- See Also:
setEnabled(boolean)
-
getItemCount
public int getItemCount()
Deprecated.Returns the number of items in the list.- Returns:
- an int equal to the number of items in the list.
-
getItemAt
public Object getItemAt(int index)
Deprecated.Returns the list item at the specified index.- Parameters:
index- An int indicating the list position, where the first item starts at zero.- Returns:
- the Object at that list position.
-
getAction
public IlxWAction getAction()
Deprecated.Gets the action that will be called when the user selects an item in the combo box.By default, this action is a Java action (
IlxWJavaAction) of which theperformmethod callssetSelectedItemon the combo box.If the given action is a Java action (
IlxWJavaAction), the argument array passed to theperformmethod is a 1-length array containing the selected item. If the given action is a JS action (IlxWJSAction), the argument array passed when calling the associated function is a 1-length array containing the string representation of the selected item.- Returns:
- the action to perform when the user selects an item.
- See Also:
setAction(ilog.webui.dhtml.components.IlxWAction)
-
setAction
public void setAction(IlxWAction action)
Deprecated.Sets the action that will be called when the user selects an item in the combo box.- Parameters:
action- The action to perform when the user selects an item from the list.- See Also:
getAction()
-
setOnChangeJSAction
public void setOnChangeJSAction(String onChangeAction)
Deprecated.
-
getOnChangeJSAction
public String getOnChangeJSAction()
Deprecated.
-
update
public void update(Element elt)
Deprecated.
-
printComponent
protected void printComponent(IlxWPort port) throws IOException
Deprecated.Description copied from class:IlxWComponentPrints the HTML code that will display the graphical representation of this component. This method is called by theIlxWComponent.print(ilog.webui.dhtml.IlxWPort)method.- Overrides:
printComponentin classIlxWLabelWrapper- Parameters:
port- The port on which the component will be printed.- Throws:
IOException- See Also:
IlxWComponent.print(ilog.webui.dhtml.IlxWPort)
-
getUserAgentRules
protected IlxWCSSRuleset getUserAgentRules()
Deprecated.Description copied from class:IlxWContainerGets the "user-agent" CSS rules.
User agent rules are a set of CSS rules which will apply by default to each instance of this container. They may be completed or overridden by the author rules, set via thesetAuthorRulesmethod.This method returns
nullby default but is intended to be redefined by subclasses.- Overrides:
getUserAgentRulesin classIlxWContainer- Returns:
- a CSS ruleset.
- See Also:
IlxWContainer.setAuthorRules(ilog.webui.dhtml.IlxWCSSRuleset)
-
notifyDependencies
public void notifyDependencies(IlxWPort port)
Deprecated.- Specified by:
notifyDependenciesin interfaceIlxWDependencyProvider- Overrides:
notifyDependenciesin classIlxWComponent
-
-