Skip navigation links
org.gvsig.gui.beans.comboboxconfigurablelookup

Class DefaultComboBoxConfigurableLookUpModel

    • Field Detail

      • MAINTAIN_AGENT_POSITIONS

        public static final int MAINTAIN_AGENT_POSITIONS
        See Also:
        Constant Field Values
      • DEFAULT_ITEMS_ORDER_CONFIGURATION

        public static final int DEFAULT_ITEMS_ORDER_CONFIGURATION
        See Also:
        Constant Field Values
      • DEFAULT_SHOW_ALL_ITEMS_IN_LIST_BOX_CONFIGURATION

        public static final boolean DEFAULT_SHOW_ALL_ITEMS_IN_LIST_BOX_CONFIGURATION
        See Also:
        Constant Field Values
      • DEFAULT_LANGUAGE_RULES_CONFIGURATION

        public static final java.lang.String DEFAULT_LANGUAGE_RULES_CONFIGURATION
        See Also:
        Constant Field Values
      • DEFAULT_CASE_SENSITIVE_CONFIGURATION

        public static final boolean DEFAULT_CASE_SENSITIVE_CONFIGURATION
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultComboBoxConfigurableLookUpModel

        public DefaultComboBoxConfigurableLookUpModel()
        See Also:
        DefaultComboBoxModel.DefaultComboBoxModel()
      • DefaultComboBoxConfigurableLookUpModel

        public DefaultComboBoxConfigurableLookUpModel(java.lang.Object[] items)
        See Also:
        DefaultComboBoxModel.DefaultComboBoxModel(java.lang.Object[])
      • DefaultComboBoxConfigurableLookUpModel

        public DefaultComboBoxConfigurableLookUpModel(java.util.Vector<java.lang.Object> vector)
        See Also:
        DefaultComboBoxModel.DefaultComboBoxModel(java.util.Vector)
    • Method Detail

      • addElement

        public void addElement(java.lang.Object object)
        Specified by:
        addElement in interface javax.swing.MutableComboBoxModel
        See Also:
        DefaultComboBoxModel.addElement(java.lang.Object)
      • removeElementAt

        public void removeElementAt(int index)
        Specified by:
        removeElementAt in interface javax.swing.MutableComboBoxModel
        See Also:
        DefaultComboBoxModel.removeElementAt(int)
      • insertElementAt

        public void insertElementAt(java.lang.Object object,
                                    int index)
        Specified by:
        insertElementAt in interface javax.swing.MutableComboBoxModel
        See Also:
        DefaultComboBoxModel.insertElementAt(java.lang.Object, int)
      • removeElement

        public void removeElement(java.lang.Object object)
        Specified by:
        removeElement in interface javax.swing.MutableComboBoxModel
        See Also:
        DefaultComboBoxModel.removeElement(java.lang.Object)
      • removeAllElements

        public void removeAllElements()
        See Also:
        DefaultComboBoxModel.removeAllElements()
      • getSize

        public int getSize()
        Specified by:
        getSize in interface javax.swing.ListModel
        See Also:
        DefaultComboBoxModel.getSize()
      • setSelectedItem

        public void setSelectedItem(java.lang.Object anObject)
        Specified by:
        setSelectedItem in interface javax.swing.ComboBoxModel
        See Also:
        DefaultComboBoxModel.setSelectedItem(java.lang.Object)
      • getSelectedItem

        public java.lang.Object getSelectedItem()
        Specified by:
        getSelectedItem in interface javax.swing.ComboBoxModel
        See Also:
        DefaultComboBoxModel.getSelectedItem()
      • getElementAt

        public java.lang.Object getElementAt(int index)
        Specified by:
        getElementAt in interface javax.swing.ListModel
        See Also:
        DefaultComboBoxModel.getElementAt(int)
      • getIndexOf

        public int getIndexOf(java.lang.Object object)
        See Also:
        DefaultComboBoxModel.getIndexOf(java.lang.Object)
      • getItemsOrder

        public int getItemsOrder()

        Returns the 'itemsOrder' configuration value of this component. Configuration values are:

        • MAINTAIN_POSITION: all items will be shown in the order programmer did.
        • ALPHABETICAL_ORDERED: all items will be shown in alphabetical order.
        • MAINTAIN_AGENT_POSITIONS: all items will be shown in the order the look up agent did.

        Returns:
        'itemsOrder' configuration
      • setItemsOrder

        public void setItemsOrder(int itemsOrder)

        Sets the 'itemsOrder' configuration value for this component. Configuration values are:

        • MAINTAIN_POSITION: all items will be shown in the order programmer did.
        • ALPHABETICAL_ORDERED: all items will be shown in alphabetical order.
        • MAINTAIN_AGENT_POSITIONS: all items will be shown in the order the look up agent did.

        Parameters:
        An - integer value for 'itemsOrder' configuration flag
      • isShowAllItemsInListBox

        public boolean isShowAllItemsInListBox()

        Returns the 'showAllItemsInListBox' configuration value of this component. Configuration values are:

        • SHOW_ALL_ITEMS: shows all items in the list box.
        • SHOW_ONLY_MATCHES: shows only the items that match with the text written according the ILookUp agent.

        Returns:
        'showAllItemsInListBox' configuration
      • setShowAllItemsInListBox

        public void setShowAllItemsInListBox(boolean itemsShownInListBox)

        Sets the 'showAllItemsInListBox' configuration value for this component. Configuration values are:

        • SHOW_ALL_ITEMS: shows all items in the list box.
        • SHOW_ONLY_MATCHES: shows only the items that match with the text written according the ILookUp agent.

        Parameters:
        A - boolean value for 'showAllItemsInListBox' configuration flag
      • isCaseSensitive

        public boolean isCaseSensitive()

        Returns the 'caseSensitive' configuration value of this component. Configuration values are:

        • CASE_SENSITIVE: discriminates between small letters and capital letters.
        • CASE_INSENSITIVE: doesn't discriminates between small letters and capital letters.

        Returns:
        'caseSensitive' configuration
      • setCaseSensitive

        public void setCaseSensitive(boolean caseSensitive)

        Sets the 'caseSensitive' configuration value for this component. Configuration values are:

        • CASE_SENSITIVE: discriminates between small letters and capital letters.
        • CASE_INSENSITIVE: doesn't discriminates between small letters and capital letters.

        Parameters:
        A - boolean value for 'caseSensitive' configuration flag
      • initialize

        protected void initialize()

        Initializes some attributes.

      • setDefaultBehaviorFlagsConfiguration

        protected void setDefaultBehaviorFlagsConfiguration()

        Sets the default values of the flags.

      • getData

        public java.util.Vector<java.lang.Object> getData()

        Returns all elements stored in this model, according the order they were added.

        Returns:
        data stored in this model.
      • getDataAccordingItemsOrder

        public java.util.Vector<java.lang.Object> getDataAccordingItemsOrder()

        Gets the data stored in this model according the criterion of the itemsOrder parameter.

        Always returns all items stored.

        Returns:
        data stored in this model according the criterion of the itemsOrder parameter
      • updateVisibleList

        protected void updateVisibleList()

        Updates the list with the results of the look up by the agent, and its configuration.

      • lookUp

        protected java.util.List<java.lang.Object> lookUp()

        Invokes the agent to execute its search on all items alphabetically sort ordered, considering the text written and the case sensitive configuration. The agent will use a

        Comparator

        that includes the locale language rules and the case sensitive in the rule that uses to compare.

        .
        Returns:
        java.util.List
      • getLookUpAgent

        public ILookUp getLookUpAgent()

        Gets the agent used with the logic for looking up the items of this model, considering the text written.

        Returns:
        the agent used with the logic for looking up the items of this model
      • setLookUpAgent

        public void setLookUpAgent(ILookUp agent)

        Sets the agent with the logic for looking up the items of this model, considering the text written.

        Parameters:
        agent - the agent used with the logic for looking up the items of this model
      • setEventNotificationEnabled

        public void setEventNotificationEnabled(boolean b)

        Sets enabled or disabled the notification of events in this model.

        Parameters:
        b - true to enable, false to disable
      • getEventNotificationEnabled

        public boolean getEventNotificationEnabled()

        Gets if the notification of events in this model is enabled.

        Returns:
        true is its enabled; false otherwise