APIdia Launch Partner
Top Description Fields Methods
java.awt.peer

public Interface ChoicePeer

extends ComponentPeer
Known Direct Implementers
sun.awt.X11.XChoicePeer
Imports
java.awt.Choice

The peer interface for Choice. The peer interfaces are intended only for use in porting the AWT. They are not intended for use by application developers, and developers should not implement peers nor invoke any of the peer methods directly on the peer instances.

Field Summary

Inherited from java.awt.peer.ComponentPeer:
DEFAULT_OPERATIONNO_EMBEDDED_CHECKRESET_OPERATIONSET_BOUNDSSET_CLIENT_SIZESET_LOCATIONSET_SIZE

Method Summary

Modifier and TypeMethod and Description
public void
add(String
the label to be added to the list
item
,
int
the index where to add the item
index
)

Adds an item with the string item to the combo box list at index index.

public void
remove(int
the index where to remove the item
index
)

Removes the item at index index from the combo box list.

public void
removeAll()

Removes all items from the combo box list.

public void
select(int
the index which should be selected
index
)

Selects the item at index index.

Inherited from java.awt.peer.ComponentPeer:
applyShapecanDetermineObscuritycoalescePaintEventcreateBufferscreateImagecreateVolatileImagedestroyBuffersdisposeflipgetBackBuffergetColorModelgetFontMetricsgetGraphicsgetGraphicsConfigurationgetLocationOnScreengetMinimumSizegetPreferredSizehandleEventhandlesWheelScrollingisFocusableisObscuredisReparentSupportedlayoutpaintprintreparentrequestFocussetBackgroundsetBoundssetEnabledsetFontsetForegroundsetVisiblesetZOrderupdateCursorImmediatelyupdateGraphicsData

Method Detail

addback to summary
public void add(String item, int index)

Adds an item with the string item to the combo box list at index index.

Parameters
item:String

the label to be added to the list

index:int

the index where to add the item

See Also
Choice#add(String)
removeback to summary
public void remove(int index)

Removes the item at index index from the combo box list.

Parameters
index:int

the index where to remove the item

See Also
Choice#remove(int)
removeAllback to summary
public void removeAll()

Removes all items from the combo box list.

See Also
Choice#removeAll()
selectback to summary
public void select(int index)

Selects the item at index index.

Parameters
index:int

the index which should be selected

See Also
Choice#select(int)