|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--amber.server.component.ComponentHandler
|
+--amber.server.component.ChoiceHandler
This class handles the requirements for the manipulation of the packets moving to and from a choice component. It is designed to look like a standard choice control and interacts with the ApplicationInterface as if the choice were running on the server rather than the Browser.
The remote client class also responds to information stored in the parameters field of the XYConstraints object when this handler is added to a panel. The allowed parameters are separated in the string by '|' characters. Any unused trailing parameters are optional and will assume default values, however the parameter order is fixed.
For example, if the component takes 4 parameters which are ints, a valid parameter string would be:
"1|2|3"
In this case the fourth parameter would assume the default value.
The parameter elements for this component are:
| Name | Type | Description | Repeats | Default |
|---|---|---|---|---|
| Item | String | An item in the list | Yes |
ApplicationInterface,
ComponentHandler,
XYConstraints, Serialized Form| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
static byte |
AddStrings
|
static byte |
ChangeSelection
|
static byte |
ClearAndFillChoice
|
static byte |
ClearChoice
|
static byte |
DeleteString
|
static byte |
GetSelectedIndex
|
static byte |
GetSelectedIndexResponse
|
static byte |
GetSelectedString
|
static byte |
GetSelectedStringResponse
|
static byte |
InsertString
|
protected java.util.Vector |
items
|
static byte |
SelectString
|
| Fields inherited from class amber.server.component.ComponentHandler |
actionCommand, active, ApplicationId, CancelReturn, dataEncoder, DefaultTimeout, enabledState, encoderBytes, id, InvalidId, MaximumId, NoReturn, OkCancelType, OkReturn, OkType, OkYesReturn, parentPage, responsePackets, timeoutValue, UnchangeableInvalidId, visibleState, YesNoCancelType, YesNoType, YesReturn |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
ChoiceHandler()
Default constructor. |
|
ChoiceHandler(ApplicationInterface pageHandler)
The initialising constructor. |
|
ChoiceHandler(int id,
ApplicationInterface pageHandler)
The initialising constructor. |
|
| Method Summary | |
void |
add(java.lang.String item)
Adds a string to the items in the choice. |
void |
addItem(java.lang.String item)
Adds a string to the items in the choice. |
java.lang.String |
getItem(int index)
Returns the item associated with the specified index. |
int |
getItemCount()
Returns the number of items in the list. |
java.lang.String[] |
getItems()
Returns the items in the list as an array of strings. |
java.lang.String |
getPanelType()
This function returns the panel component to use with this class. |
int |
getSelectedIndex()
Returns the index of the selected item in the choice. |
java.lang.String |
getSelectedItem()
Returns the selected item in the choice. |
void |
insert(java.lang.String item,
int index)
Adds a string to the items in the choice. |
void |
remove(int position)
Remove the specified item from the list in the choice. |
void |
removeAll()
Remove all items from the list in the choice. |
void |
select(int index)
Selects the specified index in the choice. |
void |
select(java.lang.String value)
Selects the specified item in the choice. |
void |
setSelectedItem(java.lang.String item)
Selects the specified string in the list. |
| Methods inherited from class java.awt.Component |
action, add, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getToolkit, getTreeLock, getWidth, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, remove, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, update, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final byte ClearChoice
public static final byte AddStrings
public static final byte ClearAndFillChoice
public static final byte GetSelectedIndex
public static final byte GetSelectedIndexResponse
public static final byte GetSelectedString
public static final byte GetSelectedStringResponse
public static final byte InsertString
public static final byte DeleteString
public static final byte ChangeSelection
public static final byte SelectString
protected java.util.Vector items
| Constructor Detail |
public ChoiceHandler()
public ChoiceHandler(ApplicationInterface pageHandler)
pageHandler - The handle to the main ApplicationInterface which handles the functions of page overall.
residing on the browser.
public ChoiceHandler(int id,
ApplicationInterface pageHandler)
id - The int containing the id of the corresponding remote component
residing on the browser.pageHandler - The handle to the main ApplicationInterface which handles the functions of page overall.| Method Detail |
public void add(java.lang.String item)
throws ComponentHandlerException
item - String to add to the list.ComponentHandlerException - with any messaging errors.
public void insert(java.lang.String item,
int index)
throws ComponentHandlerException
item - String to add to the list.index - int index of where to add the string to the list.ComponentHandlerException - with any messaging errors.
public void addItem(java.lang.String item)
throws ComponentHandlerException
item - String to add to the list.ComponentHandlerException - with any messaging errors.
public void removeAll()
throws ComponentHandlerException
ComponentHandlerException - with any messaging errors.
public void remove(int position)
throws ComponentHandlerException
index - int position of the string to remove in the list.ComponentHandlerException - with any messaging errors.
public int getSelectedIndex()
throws ComponentHandlerException
ComponentHandlerException - with any messaging errors.
public java.lang.String getSelectedItem()
throws ComponentHandlerException
ComponentHandlerException - with any messaging errors.
public void select(int index)
throws ComponentHandlerException
index - int item number of the item to select.ComponentHandlerException - with any messaging errors.
public void select(java.lang.String value)
throws ComponentHandlerException
value - String which matches the item to select.ComponentHandlerException - with any messaging errors.public int getItemCount()
public java.lang.String getItem(int index)
index - int index of the item to get.public java.lang.String[] getItems()
public void setSelectedItem(java.lang.String item)
throws ComponentHandlerException
item - String item to select in the list.ComponentHandlerException - containing the error information.public java.lang.String getPanelType()
getPanelType in class ComponentHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||