|
||||||||||
| 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.ComplexListHandler
This class handles the requirements for the manipulation of the packets moving to and from a complex list component. It is designed to look like a multicolumnar list and interacts with the ApplicationInterface as if the list 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 |
|---|
ApplicationInterface,
ComponentHandler,
PComplexList,
ComplexList,
XYConstraints, Serialized Form| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
static byte |
AddLine
|
static byte |
ChangeSelection
|
static byte |
ClearList
|
static byte |
ColumnEvent
|
static byte |
DeleteLine
|
static byte |
Display
|
static byte |
GetIndexAtPoint
|
static byte |
GetIndexAtPointResponse
|
static byte |
GetSelectedColumn
|
static byte |
GetSelectedColumnResponse
|
static byte |
GetSelectedIndex
|
static byte |
GetSelectedIndexes
|
static byte |
GetSelectedIndexesResponse
|
static byte |
GetSelectedIndexResponse
|
static byte |
HeaderHeight
|
static byte |
InsertLine
|
static byte |
NextAvailableCommand
|
static byte |
ReplaceItem
|
static byte |
ReplaceLine
|
static byte |
SetAlignment
|
static byte |
SetAlignments
|
static byte |
SetColumnSizes
|
static byte |
SetHeaders
|
static byte |
SetLineHeight
|
static byte |
SetMultipleMode
|
static byte |
SetSelectedColumn
|
static byte |
ShowHeader
|
| 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 | |
ComplexListHandler()
Default constructor. |
|
ComplexListHandler(ApplicationInterface pageHandler)
The initialising constructor. |
|
ComplexListHandler(int id,
ApplicationInterface pageHandler)
The initialising constructor. |
|
| Method Summary | |
void |
add(ComplexLine item)
This adds a line at the end of the list. |
void |
add(java.util.Vector item)
Deprecated. The correct interface now uses the ComplexLine class. |
void |
add(java.util.Vector item,
int type)
Deprecated. The correct interface now uses the ComplexLine class. |
void |
addColumn(ComplexColumn column)
This function adds a column to the end of the columns in the list. |
void |
addComplexColumnListener(ComplexColumnListener l)
Add a complex column listener to this component. |
void |
addItem(ComplexLine item)
This adds a line at the end of the list. |
void |
addItem(java.util.Vector item)
Deprecated. The correct interface now uses the ComplexLine class. |
void |
addItem(java.util.Vector item,
int type)
Deprecated. The correct interface now uses the ComplexLine class. |
protected byte[] |
convertDataVector(java.util.Vector items)
Converts a Vector of ComplexItems into the corresponding coded information which is to be sent to the remote component. |
protected byte[] |
convertIntegerVector(java.util.Vector items)
Converts a Vector of Integers into the corresponding coded information which is to be sent to the remote component. |
void |
deselect(int index)
Deselects a specific line in the list. |
protected ComplexColumnEvent |
generateColumnEvent(PacketData packet)
Generates a complex column event from the specified packet. |
ComplexColumn[] |
getColumns()
This returns the headers for a complex list. |
boolean |
getDrawHeader()
This returns the list title header drawing state. |
ComplexLine |
getItem(int index)
This returns the specified item in the complex list. |
int |
getItemCount()
This returns the number of lines in the complex list. |
java.util.Vector |
getItems()
This returns the lines in the complex list. |
int |
getLineHeight()
Normally the line item height is specified by the size of the font. |
java.lang.String |
getPanelType()
This function returns the panel component to use with this class. |
ColumnState |
getSelectedColumn()
Return the index of the column selected in the list. |
int |
getSelectedIndex()
Return the index of the item selected in the list. |
int[] |
getSelectedIndexes()
Gets the multiple selected indexes of the list. |
ComplexLine |
getSelectedItem()
Return the item selected in the list. |
ComplexLine[] |
getSelectedItems()
Gets the multiple selected items of the list. |
protected void |
handlePacket(PacketData packet)
This function handles the incoming packets from the component residing on the browser. |
void |
insert(ComplexLine item,
int index)
Inserts the line at the location specified by the index in the list. |
void |
insert(java.util.Vector item,
int index)
Deprecated. The correct interface now uses the ComplexLine class. |
void |
insert(java.util.Vector item,
int index,
int type)
Deprecated. The correct interface now uses the ComplexLine class. |
void |
insertItem(ComplexLine item,
int index)
Inserts the line at the location specified by the index in the list. |
void |
insertItem(java.util.Vector item,
int index)
Deprecated. The correct interface now uses the ComplexLine class. |
void |
insertItem(java.util.Vector item,
int index,
int type)
Deprecated. The correct interface now uses the ComplexLine class. |
boolean |
isMultipleMode()
This returns what the handler thinks is the mode of the list. |
int |
locationToIndex(java.awt.Point pointInList)
This function converts a physical point location in the list into a line index. |
protected void |
processComplexColumnEvent(ComplexColumnEvent e)
Processes complex column events occurring on this component by dispatching them to any registered listeners. |
protected void |
processEvent(java.awt.AWTEvent e)
Processes events on this button. |
void |
remove(int position)
Removes an item in the list. |
void |
removeAll()
Removes all items in the list. |
void |
removeComplexColumnListener(ComplexColumnListener l)
Remove a specified complex column listener. |
void |
replaceItem(ComplexLine newValue,
int index)
Replaces the line specified by the index in the list. |
void |
replaceItem(java.util.Vector newValue,
int index)
Deprecated. The correct interface now uses the ComplexLine class. |
void |
replaceItem(java.util.Vector newValue,
int index,
int type)
Deprecated. The correct interface now uses the ComplexLine class. |
void |
replaceSubItem(ComplexItem newValue,
int row,
int column)
Replaces the a column item in the line specified by the row in the list. |
void |
resetState()
This function resets the component to a default state. |
void |
select(int index)
Selects a specific line in the list. |
void |
setColumnAlignment(int index,
int alignment)
This sets the text alignment for an individual column in a complex list. |
protected void |
setColumnAlignments(java.util.Vector alignments)
This sets the alignments for the columns in a complex list. |
void |
setColumnHeaders(java.util.Vector headers)
Deprecated. The correct interface is now the setColumns function. |
void |
setColumns(ComplexColumn[] headers)
This sets the headers for a complex list. |
void |
setColumnSizes(java.util.Vector sizes)
Deprecated. The correct interface is now the setColumns function. |
void |
setDrawHeader(boolean state)
This turns the list title header on and off. |
void |
setHeaderHeight(int height)
Normally the header height is specified by the size of the font. |
void |
setLineHeight(int height)
Normally the line item height is specified by the size of the font. |
void |
setMultipleMode(boolean mode)
Sets the list to or from multiple select mode. |
void |
setSelectedColumn(int index,
int state)
Specifies which column is selected in the list. |
protected void |
setSelection(int index,
boolean state)
Sets the selection state of a line in the list. |
protected void |
show(int index,
boolean type)
Shows the specified line or column. |
void |
showColumn(int index)
Displays the specified column number. |
void |
showLine(int index)
Displays the specified line number. |
void |
updateNode(ComplexLine line)
Updates the contents of the node 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 ClearList
public static final byte SetHeaders
public static final byte SetColumnSizes
public static final byte GetSelectedIndex
public static final byte GetSelectedIndexResponse
public static final byte AddLine
public static final byte InsertLine
public static final byte DeleteLine
public static final byte ChangeSelection
public static final byte SetMultipleMode
public static final byte GetSelectedIndexes
public static final byte GetSelectedIndexesResponse
public static final byte ReplaceLine
public static final byte ReplaceItem
public static final byte GetIndexAtPoint
public static final byte GetIndexAtPointResponse
public static final byte GetSelectedColumn
public static final byte GetSelectedColumnResponse
public static final byte SetAlignment
public static final byte SetAlignments
public static final byte SetSelectedColumn
public static final byte SetLineHeight
public static final byte ShowHeader
public static final byte HeaderHeight
public static final byte Display
public static final byte ColumnEvent
public static final byte NextAvailableCommand
| Constructor Detail |
public ComplexListHandler()
public ComplexListHandler(ApplicationInterface pageHandler)
pageHandler - The handle to the main ApplicationInterface which handles the functions of page overall.
residing on the browser.
public ComplexListHandler(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 |
protected void handlePacket(PacketData packet)
throws ComponentHandlerException
handlePacket in class ComponentHandlerpacket - PacketData containing the packet to handle.ComponentHandlerException - containing the error information.public void resetState()
resetState in class ComponentHandler
public void add(java.util.Vector item)
throws ComponentHandlerException
item - Vector containing the ComplexItems defining the type of items.ComponentHandlerException - containing messaging error information.
public void add(ComplexLine item)
throws ComponentHandlerException
item - ComplexLine containing the information for the line.ComponentHandlerException - containing messaging error information.
public void addColumn(ComplexColumn column)
throws ComponentHandlerException
title - ComplexColumn containing the information about the column.size - int containing the size of the column in pixels.ComponentHandlerException - with any messaging errors.
public void setColumns(ComplexColumn[] headers)
throws ComponentHandlerException
headers - array containing the ComplexColumns defining the type of column.ComponentHandlerException - containing messaging error information.public ComplexColumn[] getColumns()
protected void setColumnAlignments(java.util.Vector alignments)
throws ComponentHandlerException
alignments - Vector containing the Integers defining the column alignments.ComponentHandlerException - containing messaging error information.
public void setColumnHeaders(java.util.Vector headers)
throws ComponentHandlerException
headers - Vector containing the ComplexItems defining the type of items.ComponentHandlerException - containing messaging error information.
public void setColumnSizes(java.util.Vector sizes)
throws ComponentHandlerException
sizes - Vector containing the Integers defining the Integer sizes.ComponentHandlerException - containing messaging error information.
public void add(java.util.Vector item,
int type)
throws ComponentHandlerException
item - Vector containing the ComplexItems defining the type of items.type - int containing the type of line. Major lines are 0, increasing values for
type decrease the size of the string.ComponentHandlerException - containing messaging error information.
public void addItem(ComplexLine item)
throws ComponentHandlerException
item - ComplexLine containing the information for the line.ComponentHandlerException - containing messaging error information.
public void addItem(java.util.Vector item)
throws ComponentHandlerException
item - Vector of ColumnItems containing the columns of items.ComponentHandlerException - containing messaging error information.
public void addItem(java.util.Vector item,
int type)
throws ComponentHandlerException
item - Vector of ColumnItems containing the columns of items.type - int containing the indentation of the line in the list.
Higher numbers are greater indentations. In effect higher numbers
are child lines of lower numbers.ComponentHandlerException - containing messaging error information.
public void insert(java.util.Vector item,
int index)
throws ComponentHandlerException
item - Vector of ColumnItems containing the columns of items.index - int line number of the line to insert.ComponentHandlerException - containing messaging error information.
public void insert(java.util.Vector item,
int index,
int type)
throws ComponentHandlerException
item - Vector of ColumnItems containing the columns of items.index - int line number of the line to insert.type - int containing the indentation of the line in the list.
Higher numbers are greater indentations. In effect higher numbers
are child lines of lower numbers.ComponentHandlerException - containing messaging error information.
public void insert(ComplexLine item,
int index)
throws ComponentHandlerException
item - ComplexLine to insert into the list.index - int line number of the line to insert.ComponentHandlerException - containing messaging error information.
public void insertItem(ComplexLine item,
int index)
throws ComponentHandlerException
item - ComplexLine to insert into the list.index - int line number of the line to insert.ComponentHandlerException - containing messaging error information.
public void insertItem(java.util.Vector item,
int index)
throws ComponentHandlerException
item - Vector of ColumnItems containing the columns of items.index - int line number of the line to insert.ComponentHandlerException - containing messaging error information.
public void insertItem(java.util.Vector item,
int index,
int type)
throws ComponentHandlerException
item - Vector of ColumnItems containing the columns of items.index - int line number of the line to insert.type - int containing the indentation of the line in the list.
Higher numbers are greater indentations. In effect higher numbers
are child lines of lower numbers.ComponentHandlerException - containing messaging error information.
public void replaceItem(java.util.Vector newValue,
int index)
throws ComponentHandlerException
newValue - Vector containing the columns of items.index - int line number of the line to replace.ComponentHandlerException - containing messaging error information.
public void replaceItem(java.util.Vector newValue,
int index,
int type)
throws ComponentHandlerException
newValue - Vector of ColumnItems containing the columns of items.index - int line number of the line to replace.type - int containing the indentation of the line in the list.
Higher numbers are greater indentations. In effect higher numbers
are child lines of lower numbers.ComponentHandlerException - containing messaging error information.
public void replaceItem(ComplexLine newValue,
int index)
throws ComponentHandlerException
newValue - ComplexLine containing the new line.index - int line number of the line to replace.ComponentHandlerException - containing messaging error information.
public void replaceSubItem(ComplexItem newValue,
int row,
int column)
throws ComponentHandlerException
newValue - ComplexItem containing the new column item.row - int line number of the line to replace.column - int number of the column within the line to replace.ComponentHandlerException - containing messaging error information.
public void removeAll()
throws ComponentHandlerException
ComponentHandlerException - containing messaging error information.
public void remove(int position)
throws ComponentHandlerException
position - int position of the line to remove.ComponentHandlerException - containing messaging error information.
public ColumnState getSelectedColumn()
throws ComponentHandlerException
ComponentHandlerException - containing messaging error information.
public int getSelectedIndex()
throws ComponentHandlerException
ComponentHandlerException - containing messaging error information.
public ComplexLine getSelectedItem()
throws ComponentHandlerException
ComponentHandlerException - containing messaging error information.
public int locationToIndex(java.awt.Point pointInList)
throws ComponentHandlerException
pointInList - Point containing the location to convert.ComponentHandlerException - containing messaging error information.
public void setSelectedColumn(int index,
int state)
throws ComponentHandlerException
index - int index of the column to select.state - int state of the selected column.ComponentHandlerException - containing messaging error information.
public void setHeaderHeight(int height)
throws ComponentHandlerException
height - int size of each header vertically. The function accepts
the following type of variables:ComponentHandlerException - containing messaging error information.
public void setLineHeight(int height)
throws ComponentHandlerException
height - int size of each line vertically. Setting the height to a
negative value reverts to the font height.ComponentHandlerException - containing messaging error information.public int getLineHeight()
public void setDrawHeader(boolean state)
throws ComponentHandlerException
height - int size of each line vertically. Setting the height to a
negative value reverts to the font height.ComponentHandlerException - containing messaging error information.public boolean getDrawHeader()
public void setColumnAlignment(int index,
int alignment)
throws ComponentHandlerException
index - int index of the column to set the alignment of.alignment - int alignment for the column. This matches values in
amber.awt.ComplexList.ComponentHandlerException - containing messaging error information.ComplexList.LEFT,
ComplexList.CENTER,
ComplexList.RIGHT
public void select(int index)
throws ComponentHandlerException
index - int line number to select.ComponentHandlerException - containing messaging error information.
public void deselect(int index)
throws ComponentHandlerException
index - int line number to deselect.ComponentHandlerException - containing messaging error information.
public void showLine(int index)
throws ComponentHandlerException
index - int the line number to display.ComponentHandlerException - with messaging errors.
public void showColumn(int index)
throws ComponentHandlerException
index - int the column number to display.ComponentHandlerException - with messaging errors.
public void updateNode(ComplexLine line)
throws ComponentHandlerException
node - ComplexLine containing the new information.ComponentHandlerException - with messaging errors.ComponentHandlerException - containing messaging error information.
protected void setSelection(int index,
boolean state)
throws ComponentHandlerException
index - int line number to select/deselect.state - boolean state to set the line to.ComponentHandlerException - containing messaging error information.
protected void show(int index,
boolean type)
throws ComponentHandlerException
index - int item number to show.type - boolean type of item to display.ComponentHandlerException - containing messaging error information.
public void setMultipleMode(boolean mode)
throws ComponentHandlerException
mode - boolean true if multiselection required.ComponentHandlerException - containing messaging error information.public boolean isMultipleMode()
public int getItemCount()
public java.util.Vector getItems()
public ComplexLine getItem(int index)
index - int specifying which line in the list to get.
public int[] getSelectedIndexes()
throws ComponentHandlerException
ComponentHandlerException - containing messaging error information.
public ComplexLine[] getSelectedItems()
throws ComponentHandlerException
ComponentHandlerException - containing messaging error information.public void removeComplexColumnListener(ComplexColumnListener l)
l - ComplexColumnListener to remove.public void addComplexColumnListener(ComplexColumnListener l)
l - ComplexColumnListener to respond to events on the column headers.protected void processEvent(java.awt.AWTEvent e)
processEvent in class ComponentHandlere - AWTEvent to process.protected void processComplexColumnEvent(ComplexColumnEvent e)
e - ComplexColumnEvent to process.
protected ComplexColumnEvent generateColumnEvent(PacketData packet)
throws ComponentHandlerException
packet - PacketData which sparked the event.ComponentHandlerException - with and conversion errors.
protected byte[] convertDataVector(java.util.Vector items)
throws java.io.IOException
items - Vector of ComplexItems which are to be coded.java.io.IOException - with encoding errors.
protected byte[] convertIntegerVector(java.util.Vector items)
throws java.io.IOException
items - Vector of Integers which are to be coded.java.io.IOException - with encoding errors.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 | |||||||||