borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.view
java.lang.Object +----java.awt.Component +----java.awt.Choice +----borland.jbcl.view.ChoiceView +----borland.jbcl.control.ChoiceControl
Variables Constructors Properties Methods Event Listeners
Implements SingletonModelListener, SingletonView, ItemSelectable, MenuContainer, ImageObserver, Serializable, EventListener
ChoiceView is a view element for developing new composite components. It provides a user interface element that is a drop-down menu of choices. The current choice (the selected item) displays as the title of the component.
ChoiceView requires a VectorModel data model and a VectorViewManager view manager.
public ChoiceView()Creates a ChoiceView component with default property values.
public synchronized String[] getItems() public synchronized void setItems(java.lang.String[] items)Stores an array of Strings, which represent the items in the choice list.
public SingletonModel getModel() public void setModel(borland.jbcl.model.SingletonModel p)Specifies the model object required for access to a list of choices. ChoiceView requires a VectorModel object.
public boolean isReadOnly() public void setReadOnly(boolean ro)Specifies whether the user can change the items in the list of choices at run time.
public SingletonViewManager getViewManager() public void setViewManager(borland.jbcl.model.SingletonViewManager vvm)Specifies the view manager object handling item painter and item editor selection for this choice component.
public WritableSingletonModel getWriteModel()A read-only property that returns the writable model object for this choice component. A writable model allows the items to be edited.
protected void processItemEvent(java.awt.event.ItemEvent e)If writable, and the model is settable, sets the selected item for the write model.
Parameters:
Overrides: java.awt.Choice.processItemEvent(ItemEvent)
public void select(java.lang.String s)
The item to select in the choice control, based on the string displayed.
If the ChoiceView is writable and the write model is settable, then the string is selected in the superclass, and the write model gets is set to the selected item. No item event is fired.
Parameters:
Overrides: java.awt.Choice.select(String)
protected void updateSelection()If the model is nonnull, calls select(model.toString()). If the model is null, calls select("").
public synchronized void addComponentListener(java.awt.event.ComponentListener l) public synchronized void removeComponentListener(java.awt.event.ComponentListener l)
public synchronized void addFocusListener(java.awt.event.FocusListener l) public synchronized void removeFocusListener(java.awt.event.FocusListener l)
public synchronized void addItemListener(java.awt.event.ItemListener l) public synchronized void removeItemListener(java.awt.event.ItemListener l)
public synchronized void addKeyListener(java.awt.event.KeyListener l) public synchronized void removeKeyListener(java.awt.event.KeyListener l)
public void addModelListener(borland.jbcl.model.SingletonModelListener listener) public void removeModelListener(borland.jbcl.model.SingletonModelListener listener)
public synchronized void addMouseListener(java.awt.event.MouseListener l) public synchronized void removeMouseListener(java.awt.event.MouseListener l)
public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener l) public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener l)