|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.html.XHtmlWidget
net.xoetrope.html.XComboBox
public class XComboBox
A wrapper for the Swing JComboBox class
Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt
| Field Summary | |
|---|---|
protected netscape.javascript.JSObject |
obj
|
| Fields inherited from class net.xoetrope.html.XHtmlWidget |
|---|
currentProject, divElement, htmlDoc, imageElement, inputElement, labelElement, metaElement, olElement, selectElement, tableElement, textareaElement, ulElement |
| Constructor Summary | |
|---|---|
XComboBox()
Create a new combo box |
|
XComboBox(org.w3c.dom.html.HTMLSelectElement select)
Create a new XCComboBox based on an existing HTML combobox element. |
|
XComboBox(java.lang.String id,
java.lang.String[] elements)
Create a new combo box with an id and filled with elements. |
|
| Method Summary | |
|---|---|
void |
addElement(java.lang.String element)
Add an element at the end of the combo box |
void |
addItem(java.lang.String s)
Add an item to the list |
void |
deleteElement(int index)
Delete the current XComboBox. |
java.lang.String |
getBackgroundColor()
Get the background color of the XComboBox. |
java.lang.String |
getFontColor()
Get the font color of the XComboBox's elements. |
int |
getFontSize()
Get the size of the XComboBox's text. |
org.w3c.dom.html.HTMLSelectElement |
getHTMLElement()
Get the HTML element at which refers the XComboBox. |
int |
getItemCount()
Get the number of items in the list |
int |
getSelectedIndex()
Get the selected index |
java.lang.Object |
getSelectedObject()
Get the selected object |
java.lang.Object[] |
getSelectedObjects()
Get the selected objects |
int |
getSelectionMode()
Get the list selection mode. |
int |
getSize()
Get the size of the combo box, ie the number of elements |
void |
insertElement(java.lang.String element,
int index)
Insert an element at the specified index. |
void |
removeAll()
Remove all items from the list |
void |
select(int i)
Select an item in the list |
void |
select(java.lang.Object object)
Select an item |
void |
setBackgroundColor(java.lang.String hexColor)
Set the background color of the XComboBox. |
void |
setDefaultSelection()
Set the list to its default selection state |
void |
setEnabled(boolean enabled)
Set the XComboBox enabled or disabled. |
void |
setFontColor(java.lang.String hexColor)
Set the font color of the XComboBox's elements. |
void |
setFontSize(int fontsize)
Set the size of the XComboBox's text. |
void |
setSelectedObject(java.lang.Object object)
Select an item in the list |
void |
setSelectedObjects(java.lang.Object[] values)
Set the selected objects |
void |
setVisible(boolean visible)
Set the XComboBox visible or invisible. |
| Methods inherited from class net.xoetrope.html.XHtmlWidget |
|---|
addEvent, setObject, setObject, setObject, setObject, setObject, setObject, setObject, setObject, setObject, setObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected netscape.javascript.JSObject obj
| Constructor Detail |
|---|
public XComboBox()
public XComboBox(java.lang.String id,
java.lang.String[] elements)
id - the combo box idelements - the elements contained in the combo boxpublic XComboBox(org.w3c.dom.html.HTMLSelectElement select)
select - the HTML select tag the XComboBox refers to| Method Detail |
|---|
public void select(int i)
select in interface XListHolderi - the selected item's indexpublic void setDefaultSelection()
setDefaultSelection in interface XListHolderpublic void setSelectedObject(java.lang.Object object)
setSelectedObject in interface XListHolderobject - the item to selectpublic java.lang.Object getSelectedObject()
getSelectedObject in interface XListHolderpublic java.lang.Object[] getSelectedObjects()
getSelectedObjects in interface XListHolderpublic void setSelectedObjects(java.lang.Object[] values)
setSelectedObjects in interface XListHoldervalues - the selected objectpublic int getSize()
public void addElement(java.lang.String element)
element - the element to be added to the list
public void insertElement(java.lang.String element,
int index)
element - the element to insert in the listindex - the index where to insert the element (starting at 1)public void deleteElement(int index)
public int getFontSize()
public void setFontSize(int fontsize)
fontsize - the int value of the font sizepublic java.lang.String getBackgroundColor()
public void setBackgroundColor(java.lang.String hexColor)
hexColor - the hexadecimal value of the background colorpublic java.lang.String getFontColor()
public void setFontColor(java.lang.String hexColor)
hexColor - the hexadecimal value of the font colorpublic void setVisible(boolean visible)
visible - true if visible, false otherwisepublic void setEnabled(boolean enabled)
enabled - true if enabled, false otherwisepublic org.w3c.dom.html.HTMLSelectElement getHTMLElement()
public int getItemCount()
getItemCount in interface XListHolderpublic void removeAll()
removeAll in interface XListHolderpublic void addItem(java.lang.String s)
addItem in interface XListHolders - the new Itempublic void select(java.lang.Object object)
select in interface XListHolderobject - The object to selectpublic int getSelectedIndex()
getSelectedIndex in interface XListHolderpublic int getSelectionMode()
getSelectionMode in interface XListHolder
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||