Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package org.litesoft.GWT.forms.client.components;

import org.litesoft.GWT.client.widgets.*;

import com.google.gwt.event.dom.client.*;
import com.google.gwt.event.shared.*;
import com.google.gwt.user.client.ui.*;

public interface FormComboBoxFocusWidget extends IFocusWidget
{
    /**
     * Adds a listener interface to receive change events.
     *
     * @param listener the listener interface to add
     */
    @Deprecated
    public void addChangeListener( ChangeListener listener );

    public HandlerRegistration addChangeHandler( ChangeHandler handler );

    /**
     * Gets the number of items present in the list box.
     *
     * @return the number of items
     */
    public int getItemCount();

    /**
     * Adds an item to the list box, specifying an initial value for the item.
     *
     * @param item  the text of the item to be added
     * @param value the item's value, to be submitted if it is part of a
     *              {@link FormPanel}; cannot be <code>null</code>
     */
    public void addItem( String item, String value );

    /**
     * Removes the item at the specified index.
     *
     * @param index the index of the item to be removed
     *
     * @throws IndexOutOfBoundsException if the index is out of range
     */
    public void removeItem( int index );

    /**
     * Gets the currently-selected item. If multiple items are selected, this
     * method will return the first selected item.
     *
     * @return the selected index, or <code>-1</code> if none is selected
     */
    public int getSelectedIndex();

    /**
     * Sets the currently selected index.
     * <p/>
     * <p/>
     * Note that setting the selected index programmatically does <em>not</em>
     * cause the {@link ChangeListener#onChange(Widget)} event to be fired.
     * </p>
     *
     * @param index the index of the item to be selected
     */
    public void setSelectedIndex( int index );

    /**
     * Gets the value associated with the item at a given index.
     *
     * @param index the index of the item to be retrieved
     *
     * @return the item's associated value
     *
     * @throws IndexOutOfBoundsException if the index is out of range
     */
    public String getValue( int index );
}

Commits for litesoft/trunk/Java/GWT/Client/src/org/litesoft/GWT/forms/client/components/FormComboBoxFocusWidget.java

Diff revisions: vs.
Revision Author Commited Message
2 GeorgeS picture GeorgeS Sun 07 Feb, 2010 12:50:58 +0000