/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* The default model for combo boxes.
*
* @param <E> the type of the elements of this model
*
* @author Arnaud Weber
* @author Tom Santos
*/
public class DefaultComboBoxModel<E> extends AbstractListModel<E> implements MutableComboBoxModel<E>, Serializable {
/**
* Constructs an empty DefaultComboBoxModel object.
*/
public DefaultComboBoxModel() {
}
/**
* Constructs a DefaultComboBoxModel object initialized with
* an array of objects.
*
* @param items an array of Object objects
*/
int i,c;
if ( getSize() > 0 ) {
}
}
/**
* Constructs a DefaultComboBoxModel object initialized with
* a vector.
*
* @param v a Vector object ...
*/
objects = v;
if ( getSize() > 0 ) {
}
}
// implements javax.swing.ComboBoxModel
/**
* Set the value of the selected item. The selected item may be null.
* <p>
* @param anObject The combo box value or null for no selection.
*/
}
}
// implements javax.swing.ComboBoxModel
return selectedObject;
}
// implements javax.swing.ListModel
public int getSize() {
}
// implements javax.swing.ListModel
else
return null;
}
/**
* Returns the index-position of the specified object in the list.
*
* @param anObject
* @return an int representing the index position, where 0 is
* the first position
*/
}
// implements javax.swing.MutableComboBoxModel
}
}
// implements javax.swing.MutableComboBoxModel
}
// implements javax.swing.MutableComboBoxModel
if ( index == 0 ) {
}
else {
}
}
}
// implements javax.swing.MutableComboBoxModel
if ( index != -1 ) {
}
}
/**
* Empties the list.
*/
public void removeAllElements() {
int firstIndex = 0;
} else {
}
}
}