ilog.webui.dhtml.components

Class IlxWTextField

  • All Implemented Interfaces:
    ilog.webui.dhtml.IlxWConstants, ilog.webui.dhtml.IlxWCSSModelProvider, ilog.webui.dhtml.IlxWDependencyProvider, ilog.webui.dhtml.IlxWJSObject, java.io.Serializable


    public class IlxWTextField
    extends ilog.webui.dhtml.components.IlxWLabelWrapper
    A text field component. This component is rendered as an <input type="text"> HTML element.
    See Also:
    Serialized Form
    • Constructor Detail

      • IlxWTextField

        public IlxWTextField()
        Constructs an empty text field.
      • IlxWTextField

        public IlxWTextField(int columns)
        Constructs a text field with the given number of columns and no text.
      • IlxWTextField

        public IlxWTextField(java.lang.String text)
        Constructs a text field with the given text. The number of columns is not set and is determined by the text length.
      • IlxWTextField

        public IlxWTextField(java.lang.String text,
                     int columns)
        Constructs a text field with the given text and number of columns.
    • Method Detail

      • getColumns

        public int getColumns()
        Returns:
        The number of columns.
      • setColumns

        public void setColumns(int columns)
        Parameters:
        columns - The number of columns.
      • setText

        public void setText(java.lang.String text)
        sets the text of this text field.
        Overrides:
        setText in class ilog.webui.dhtml.components.IlxWLabelWrapper
        Parameters:
        text - the displayed text
      • getText

        public java.lang.String getText()
        Gets the text of this text field.
        Overrides:
        getText in class ilog.webui.dhtml.components.IlxWLabelWrapper
        Returns:
        The displayed text.
      • setEmptyText

        public void setEmptyText(java.lang.String emptyText)
        Sets the text to display when no text has been set on this text field.
        Parameters:
        emptyText - The displayed text when no text has been set.
      • getEmptyText

        public java.lang.String getEmptyText()
        Gets the text to display when no text has been set on this text field.
        Returns:
        The displayed text when no text has been set.
      • setAction

        public void setAction(IlxWAction onChangeAction)
        Parameters:
        onChangeAction - the action to perform when the user enter some text in the text field.
      • getAction

        public IlxWAction getAction()
        Gets the action to perform when the user enter some text in the text field. By default, if setAction has no been called on this component, the action is a Java action which calls the fireActionPerformed() method.
        Returns:
        The associated action.
      • getOnKeyPressAction

        public IlxWAction getOnKeyPressAction()
        Gets the action that will be called when a key is pressed in the input field representing this textfield.
        Returns:
        the action. Null by default.
      • setOnKeyPressAction

        public void setOnKeyPressAction(IlxWAction onKeyPressAction)
        Sets the action that will be called when a key is pressed in the input field representing this textfield.
        Parameters:
        onKeyPressAction - an action.
      • getMenuItemUnSelectedClass

        public java.lang.String getMenuItemUnSelectedClass()
      • getMenuItemSelectedClass

        public java.lang.String getMenuItemSelectedClass()
      • setMenuItemSelectedClass

        public void setMenuItemSelectedClass(java.lang.String menuItemSelectedClass)
      • setMenuItemUnSelectedClass

        public void setMenuItemUnSelectedClass(java.lang.String menuItemUnSelectedClass)
      • getMenuClass

        public java.lang.String getMenuClass()
      • setMenuClass

        public void setMenuClass(java.lang.String menuClass)
      • addActionListener

        public void addActionListener(java.awt.event.ActionListener l)
        Adds the specified action listener to receive action events from this text field.
        Parameters:
        l - the action listener
      • removeActionListener

        public void removeActionListener(java.awt.event.ActionListener l)
        Removes the specified action listener so that it no longer receives action events from this text field.
        Parameters:
        l - the action listener
      • fireActionPerformed

        protected void fireActionPerformed()
        Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method. The listener list is processed in last to first order.
        See Also:
        EventListenerList
      • notifyDependencies

        public void notifyDependencies(IlxWPort port)
        Specified by:
        notifyDependencies in interface ilog.webui.dhtml.IlxWDependencyProvider
        Overrides:
        notifyDependencies in class IlxWComponent

© Copyright IBM Corp. 1987, 2017