SilverStream
Application Server 3.5

com.sssw.rt.form
Class AgcComboBox

java.lang.Object
 |
 +--java.awt.Component
       |
       +--java.awt.Container
             |
             +--javax.swing.JComponent
                   |
                   +--javax.swing.JPanel
                         |
                         +--com.sssw.rt.atlas.AtPanel
                               |
                               +--com.sssw.rt.form.PvBasePanel
                                     |
                                     +--com.sssw.rt.form.AgcComboBox
All Implemented Interfaces:
Accessible, AgiControl, AgiHelpInfo, AgiRowSetManager, AgiTabstopHandler, EventListener, FocusListener, ImageObserver, KeyListener, MenuContainer, MouseListener, MouseMotionListener, PropertyChangeListener, Serializable, TextListener

public class AgcComboBox
extends PvBasePanel
implements AgiRowSetManager, KeyListener, MouseListener, MouseMotionListener, FocusListener, TextListener, PropertyChangeListener, AgiTabstopHandler

The AgcComboBox control is a data-bound list control that displays a list of values to users who can browse the list of values and select a value from the list.

When the control is bound to a database column via the Data Column property, the value in the database sets the initially selected item in the list. If the user makes a different selection, that value becomes the value associated with the current row. The selected value is saved to the database when you call updateRows() for the form.

In addition to being data-bound, the control is a data-loaded control in which a database table or other data source can provide the list of values. You can use methods of AgiRowSetManager to navigate the list. However, changes to the list items do not affect the underlying data; therefore, calling updateRows() is not allowed. If you call it for the control, updateRows() throws AgoUnsupportedOperationException.

Properties:
Automatic Query, Choices, Control Type, Data Column, Display Value, Distinct, Editable, Enabled, Font Name, Font Size, Font Style, Height, Help Page, Left, Limit Rows, Load Choices, Maximum Rows, Name, Order By, Storage Value, Table, Tool Tip, Top, Values, Visible, Where Clause, Width
Events:
focusGained, focusLost, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, validationFailed, validationTest, valueChanged, valueChanging
See Also:
Serialized Form

Inner classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Fields inherited from class com.sssw.rt.atlas.AtPanel
BGIMAGE_DRAW_CENTERED, BGIMAGE_DRAW_NORMAL, BGIMAGE_DRAW_STRETCH, BGIMAGE_DRAW_TILED
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
AgcComboBox()
           
 
Method Summary
 AgoTreeControlNode add(AgoTreeControlNode relative, int relationship, String text)
          Adds a new node to the control.
 AgoTreeControlNode add(AgoTreeControlNode relative, int relationship, String text, Object userData, Image image)
          Adds a new node with an associated object or image.
 void addAgiValueChangingListener(AgiValueChangingListener listener)
           
 void collapseNode(AgoTreeControlNode node)
          Collapses (hides) the children of a specified node.
 void expandNode(AgoTreeControlNode node)
          Expands (shows) the children of a specified node.
 AgoTreeControlNode findNode(String text, Object userData, boolean recurse)
          Finds a node with the specified text and/or user data.
 boolean getEditable()
          Returns a boolean that indicates whether or not the user can edit the control's text.
 AgoFontIdentifier getFontIdentifier()
          Returns the SilverStream font object (AgoFontIdentifier) for the control's text.
 AgoTreeControlNode getRootNode()
          Returns the control's root node.
 AgoTreeControlNode getSelectedNode()
          Returns the control's currently selected node.
 String getSelectedText()
          Returns a String that contains the currently selected text.
 int getSelectionEnd()
          Returns the ending character index of the current selection.
 int getSelectionStart()
          Returns the starting character index of the current selection.
 String getText()
          Returns a String that contains the control's text.
 Object getValue()
          Returns the control's value.
 void remove(AgoTreeControlNode node)
          Removes a specified node from the control.
 void removeAgiValueChangingListener(AgiValueChangingListener listener)
           
 void removeAll()
          Removes all nodes from the control.
 void select(int start, int end)
          Select a range of characters.
 void selectAll()
          Selects the control's contents.
 void setBackground(Color color)
          Sets the background color of the combo box.
 void setEditable(boolean editable)
          Assigns a boolean value that determines whether the user can edit the control.
 void setFontIdentifier(AgoFontIdentifier fontidentifier)
          Assigns the SilverStream font object (AgoFontIdentifier) to the control's text.
 void setForeground(Color color)
          Sets the text color of the combo box.
 void setSelectedNode(AgoTreeControlNode node)
          Sets the selection to the specified node.
 void setText(String text)
          Assigns the control's text.
 void setValue(Object value)
          Selects the row whose value is equal to the specified value.
 
Methods inherited from class com.sssw.rt.form.PvBasePanel
getBackgroundColor, setBackgroundColor
 
Methods inherited from class com.sssw.rt.atlas.AtPanel
addImpl, addNotify, clientPaint, clientPaint, deliverMouseEvent, deliverMouseMoveEvent, doAtCommand, drawTiledImage, enableAtCommands, getBackgroundImage, getBackgroundImageMode, getHelper, getTransparent, hide, hideToolTip, imageUpdate, isFocusTraversable, isOptimizedDrawingEnabled, ownedImage, paintBorder, paintComponent, paintImmediately, paintImmediately, paintNow, preprocessKeyEvent, processEvent, reshape, setBackgroundImage, setBackgroundImageMode, setTransparent, show, showToolTip
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isOpaque, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, print, printAll, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, remove, remove, removeContainerListener, setCursor, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods implemented from interface com.sssw.rt.form.AgiControl
getComponent, getHelpInfo, setHelpInfo
 
Methods implemented from interface com.sssw.rt.util.AgiRowSetManager
clearRows, haveRowsChanged, query, query, refreshRows, updateRows
 
Methods implemented from interface com.sssw.rt.util.AgiTabstopHandler
getTabOrder
 
Methods implemented from interface java.awt.event.FocusListener
focusGained, focusLost
 
Methods implemented from interface java.awt.event.KeyListener
keyPressed, keyReleased, keyTyped
 
Methods implemented from interface java.awt.event.MouseListener
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased
 
Methods implemented from interface java.awt.event.MouseMotionListener
mouseDragged, mouseMoved
 
Methods implemented from interface java.beans.PropertyChangeListener
propertyChange
 
Methods implemented from interface java.awt.event.TextListener
textValueChanged
 

Constructor Detail

AgcComboBox

public AgcComboBox()
Method Detail

getEditable

public boolean getEditable()
Returns a boolean that indicates whether or not the user can edit the control's text.
Usage:

When getEditable returns true, the user can edit the text. If the control is enabled but not editable, the user cannot change the value of the text, but can select, copy, and scroll the text.

For the ComboBox control, if the control is enabled, the user can always pick from the drop-down list, even if the control is not editable.

Example:

The following code fragment illustrates how to use the getEditable() method.

  boolean editable;
  editable = Combobox1.getEditable();
 
See Also:
AgcComboBox.setEditable(boolean)

setEditable

public void setEditable(boolean editable)
Assigns a boolean value that determines whether the user can edit the control.
Parameters:
editable - specifies whether the control is editable.
Usage:

When the value is true, the user can edit the control.

Example:

The following code fragment illustrates how to make a control editable.

 Combobox1.setEditable(true);
 
See Also:
AgcComboBox.getEditable()

getText

public String getText()
Returns a String that contains the control's text.
Example:

The following code fragment illustrates how to call getText().

   String s;
   s = Combobox1.getText();
 
See Also:
AgcComboBox.setText(String)

setText

public void setText(String text)
Assigns the control's text.
Parameters:
text - specifies the text for the currently selected item.
Usage:

For the AgcComboBox control, this method permits the selected row to be assigned programmatically. It does not update or modify the text.

If the text is changed (by the user or programmatically), then the combo box is searched for an item with the same text. If one is found, it is selected. Therefore, this method may change the selection.

Example:

The following code fragment illustrates how to use the setText() method.

 Combobox1.setText("Add");
 
See Also:
AgcComboBox.getText()

setForeground

public void setForeground(Color color)
Sets the text color of the combo box.
Overrides:
setForeground in class JComponent
Parameters:
color - a Color object.
See Also:
Component.getForeground()

setBackground

public void setBackground(Color color)
Sets the background color of the combo box.
Overrides:
setBackground in class JComponent
Parameters:
color - a Color object.
See Also:
Component.getBackground()

addAgiValueChangingListener

public void addAgiValueChangingListener(AgiValueChangingListener listener)
Parameters:
listener -  

removeAgiValueChangingListener

public void removeAgiValueChangingListener(AgiValueChangingListener listener)
Parameters:
listener -  

getFontIdentifier

public AgoFontIdentifier getFontIdentifier()
Returns the SilverStream font object (AgoFontIdentifier) for the control's text.
Overrides:
getFontIdentifier in class PvBasePanel
Usage:

The AgoFontIdentifier object consists of three parts: a Font Name, a Font Style and a Font Size. The Font Name can be one of these values: Dialog, SansSerif, Serif, Monospaced, Helvetica, TimesRoman, Courier, DialogInput, Zapfdingbats. At runtime, Java translates this value to the appropriate font installed on the system.

The Font Style can be one of these values:

  • AgoFontIdentifier.PLAIN
  • AgoFontIdentifier.BOLD
  • AgoFontIdentifier.ITALIC
  • AgoFontIdentifier.BOLD + AgoFontIdentifier.ITALIC

The Font Size can be any integer.

Example:

The following code fragment illustrates how to construct a new AgoFontIdentifier object (called newFont) and how to call the getFontIdentifier() method:

  AgoFontIdentifier font;
  font = Combobox1.getFontIdentifier();
 
See Also:
AgcComboBox.setFontIdentifier(AgoFontIdentifier)

setFontIdentifier

public void setFontIdentifier(AgoFontIdentifier fontidentifier)
Assigns the SilverStream font object (AgoFontIdentifier) to the control's text.
Overrides:
setFontIdentifier in class PvBasePanel
Parameters:
fontidentifier - specifies the AgoFontIdentifier object that assigns the font for the control.
Usage:

The AgoFontIdentifier object consists of three parts: a Font Name, a Font Style and a Font Size. The Font Name can be one of these values: Dialog, SansSerif, Serif, Monospaced, Helvetica, TimesRoman, Courier, DialogInput, Zapfdingbats. At runtime, Java translates this value to the appropriate font installed on the system.

The Font Style can be one of these values:

  • AgoFontIdentifier.PLAIN
  • AgoFontIdentifier.BOLD
  • AgoFontIdentifier.ITALIC
  • AgoFontIdentifier.BOLD + AgoFontIdentifier.ITALIC

The Font Size can be any integer.

Example:

This code fragment illustrates how to construct a new AgoFontIdentifier object (called newFont) and how to call the setFontIdentifier() method:

  AgoFontIdentifier     newFont;
  String		           newName;
  int	               newSize;
  int		           newStyle;
 
  newName="TimesRoman";
  newSize=20;
  newStyle=AgoFontIdentifier.ITALIC;
  newFont=new AgoFontIdentifier(newName, newStyle, newSize);
 
  Combobox1.setFontIdentifier(newFont);
 
See Also:
AgcComboBox.getFontIdentifier()

add

public AgoTreeControlNode add(AgoTreeControlNode relative,
                              int relationship,
                              String text)
Adds a new node to the control.
Parameters:
relative - specifies an existing node. The new node is created relative to this object. When this object is null, the new node is added after the last top-level node, and relationship is ignored.
relationship - specifies the relationship the new node has to the node specified by relative.
text - specifies text to display at this node.
Usage:

The value of relationship can be one of the following:
Value Description
AgcComboBox.CHILD Adds the node after the current node. The new node is indented to reflect the parent-child relationship.
AgcComboBox.NEXT Adds the node underneath the current node. It is a sibling so it is not indented.
AgcComboBox.PREVIOUS Adds the node above the current node. It is a sibling so it is not indented.
AgcComboBox.LAST Adds the node as the last node in the current node's row. It is a sibling of the current node so it is not indented.

You may need to call the awt method validate() after calling add() in order to make the controls redraw correctly. Specifically, if you programmatically add a subform containing a tab control on which there are other controls, say, buttons. The tab control shows up but the buttons don't until you call validate() - or resize the designer, which has the same effect.

Example:

The following code fragment adds three top-level nodes, labeled A B and C. It also adds two child nodes to A, which are labeled one and two.

  AgoTreeControlNode node;
 
 	 // Add the first top-level node A.
  // If the first parameter is null, then the second parameter is
 	 // ignored, so we can just pass zero.
  node = ControlName1.add(null, 0, "A");
 	 // Add two child nodes under node A.
 	 ControlName1.add(node, AgcComboBox.CHILD, "one");
 	 ControlName1.add(node, AgcComboBox.CHILD, "two");
 	 // Add two more top-level nodes.
  ControlName1.add(null, 0, "B");
  ControlName1.add(null, 0, "C");
 
See Also:
AgcComboBox.remove(AgoTreeControlNode), AgcComboBox.removeAll(), AgoTreeControlNode, AgcTreeControl

add

public AgoTreeControlNode add(AgoTreeControlNode relative,
                              int relationship,
                              String text,
                              Object userData,
                              Image image)
Adds a new node with an associated object or image.
Parameters:
relative - specifies an existing node. The new node is created relative to this object. When this object is null, the new node is added after the last top-level node, and relationship is ignored.
relationship - specifies the relationship the new node has to the node specified by relative.
text - specifies text to display at this node.
userData - specifies an Object. It can be any user-specified object. This can be null.
image - specifies the image to display at this node. This can be null.
Usage:

The value of relationship can be one of the following:
Value Description
AgcComboBox.CHILD Adds the node after the current node. The new node is indented to reflect the parent-child relationship.
AgcComboBox.NEXT Adds the node underneath the current node. It is a sibling so it is not indented.
AgcComboBox.PREVIOUS Adds the node above the current node. It is a sibling so it is not indented.
AgcComboBox.LAST Adds the node as the last node in the tree. It is a sibling of the current node so it is not indented.

You may need to call the awt method validate() after calling add() in order to make the controls redraw correctly. Specifically, if you programmatically add a subform containing a tab control on which there are other controls, say, buttons. The tab control shows up but the buttons don't until you call validate() - or resize the designer, which has the same effect.

See Also:
AgcComboBox.remove(AgoTreeControlNode), AgcComboBox.removeAll(), AgoTreeControlNode, AgcTreeControl

remove

public void remove(AgoTreeControlNode node)
Removes a specified node from the control.
Parameters:
node - the node to remove.
Example:

The following code fragment illustrates how to remove a node.

  AgoTreeControlNode nodeToRemove;
  nodeToRemove = Combobox1.findNode("customer1",null,true);
  Combobox1.removeNode(nodeToRemove);
 
See Also:
AgcComboBox.add(AgoTreeControlNode,int,String), AgcComboBox.removeAll(), AgoTreeControlNode

removeAll

public void removeAll()
Removes all nodes from the control.
Overrides:
removeAll in class Container
Example:

The following code fragment illustrates how to remove all of the rows from the AgcChoice control.

  Combobox1.removeAll();
 
See Also:
AgcComboBox.add(AgoTreeControlNode,int,String), AgcComboBox.remove(AgoTreeControlNode)

getRootNode

public AgoTreeControlNode getRootNode()
Returns the control's root node.
Usage:

The control's root node is the first node on the top level. For example, a tree control is populated with a list of customers. The customers are ordered by CustomerID. Assuming that the query contained customers 1-50, the root node in this case would be the node where the CustomerID = 1.

Returns null if the tree is empty.

Example:

The following code fragment illustrates how to obtain the root node.

  AgoTreeControlNode root;
  root = Combobox1.getRootNode();
 
See Also:
AgoTreeControlNode

getSelectedNode

public AgoTreeControlNode getSelectedNode()
Returns the control's currently selected node.
Usage:

The node can be selected by the user, or programmatically using the setSelectedNode() method.

Example:

The following code fragment illustrates how to obtain the currently selected node.

     
  AgoTreeControlNode selectedNode;
  selectedNode = Combobox1.getSelectedNode();
 
See Also:
AgcComboBox.setSelectedNode(AgoTreeControlNode), AgoTreeControlNode

setSelectedNode

public void setSelectedNode(AgoTreeControlNode node)
Sets the selection to the specified node.
Parameters:
node - specifies the node to select.
Example:

The following code fragment illustrates how to find a node and then select it.

  AgoTreeControlNode node;
 
  node = Combobox1.findNode("customer1",null,true);
  Combobox1.setSelectedNode(node);
 
See Also:
AgcComboBox.getSelectedNode()

expandNode

public void expandNode(AgoTreeControlNode node)
Expands (shows) the children of a specified node.
Parameters:
node - specifies the node to expand.
Example:

The following code fragment illustrates how to find a node and then expand it.

  AgoTreeControlNode node;
  node = Combobox1.findNode("customer1",null,true);
  Combobox1.expandNode(node);
 
See Also:
AgcComboBox.collapseNode(AgoTreeControlNode), AgoTreeControlNode

collapseNode

public void collapseNode(AgoTreeControlNode node)
Collapses (hides) the children of a specified node.
Parameters:
node - specifies the node to collapse.
Example:

The following code fragment illustrates how to find a node then collapse it.

  AgoTreeControlNode node;
 
  node = Combobox1.findNode("customer1",null,true);
  Combobox1.collapseNode(node);
 
See Also:
AgcComboBox.expandNode(AgoTreeControlNode), AgoTreeControlNode

findNode

public AgoTreeControlNode findNode(String text,
                                   Object userData,
                                   boolean recurse)
Finds a node with the specified text and/or user data.
Parameters:
text - specifies text to search for.
userData - specifies an Object to search for. The userData values are compared by the equals() method.
recursive - specifies whether to search for the text or userData recursively.
Usage:

If text is null, then the control returns the first node that matches the userData (and vise versa). If recursive is false, the control only searches the top-level node. If recursive is true, the control searches all levels beginning with the root node.

Example:

The following code fragment illustrates how to find a node recursively.

  AgoTreeControlNode node;
  node = Combobox1.findNode("Smith",null,true);
 

getValue

public Object getValue()
Returns the control's value. This is the internal value associated with the selected node.
Usage:

If the internal value is null, then the selected node's text is returned as a String. If no node is selected, then null is returned.

Example:
  Object value;
  value = ControlName1.getValue();
 
See Also:
AgcComboBox.setValue(Object)

setValue

public void setValue(Object value)
Selects the row whose value is equal to the specified value.
Parameters:
value - specifies an internal value that specifies which row to select.
Usage:

At design time the contents of the internal value can be set using the Property Inspector. The contents can be static or retrieved from the database. Each row can have its own internal value.

If the control is populated from a static list of data (that is the Load Choices property is set to Statically), the internal values can be specified using the Values property.

If the control is populated from the database (that is the Load Choices property is set to From Table), the internal values can be set using the Storage value property.

Example:

Suppose a control is loaded statically:

  • The displayed text values are: Apple, Banana, Orange
  • The internal values are: 1, 2, 3

The following code fragment illustrates how to make Orange the selected item using setValue().

  int x=3;
  ControlName1.setValue(new Integer(x));
 

Note that this example uses the Integer class instead of the int primitive data type because an Object can not be cast to an int.

See Also:
AgcComboBox.getValue()

getSelectionStart

public int getSelectionStart()
Returns the starting character index of the current selection.
Example:

The following code fragment illustrates how to obtain the start of the currently selected text.

  int start;
  start = Combobox1.getSelectionStart();
 
See Also:
AgcComboBox.getSelectionEnd(), AgcComboBox.select(int,int)

getSelectionEnd

public int getSelectionEnd()
Returns the ending character index of the current selection.
Example:

The following code fragment illustrates how to obtain the end of the currently selected text.

  int end;
  end = Combobox1.getSelectionEnd();
 
See Also:
AgcComboBox.getSelectionStart(), AgcComboBox.select(int,int)

getSelectedText

public String getSelectedText()
Returns a String that contains the currently selected text.
Usage:

The getSelectedText() method affects the textbox portion of the control only. For drop-down or combobox style controls, it does not affect the listbox portion.

Example:

The following code fragment illustrates how to obtain the currently selected text.

  String s;
  s = Combobox1.getSelectedText();
 
See Also:
AgcComboBox.getSelectionStart(), AgcComboBox.getSelectionEnd()

select

public void select(int start,
                   int end)
Select a range of characters.
Parameters:
start - specifies the start of the text selection.
end - specifies the end of the text selection.
Usage:

The select() method can be useful to require a user to replace some invalid text.

See Also:
AgcComboBox.selectAll(), Component.requestFocus(), AgcComboBox.getSelectionStart(), AgcComboBox.getSelectionEnd()

selectAll

public void selectAll()
Selects the control's contents.
Example:

The following code fragment illustrates how to use the selectAll() method.

  Combobox1.selectAll();
 
See Also:
AgcComboBox.select(int,int)

SilverStream
Application Server 3.5