|
||||||||||
| 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.TextComponentHandler
This class handles the requirements for the manipulation of the packets moving to and from a Text Component. It is the base class for the text controls and corresponds to the TextComponent in normal Java.
ApplicationInterface,
ComponentHandler, Serialized Form| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
static byte |
GetCaret
|
static byte |
GetCaretResponse
|
static byte |
GetSelectedText
|
static byte |
GetSelectedTextResponse
|
static byte |
GetSelection
|
static byte |
GetSelectionResponse
|
static byte |
GetText
|
static byte |
GetTextResponse
|
static byte |
Select
|
static byte |
SelectAll
Constant defining which select operation will occur. |
static byte |
SelectBoth
Constant defining which select operation will occur. |
static byte |
SelectEnd
Constant defining which select operation will occur. |
static byte |
SelectStart
Constant defining which select operation will occur. |
static byte |
SetCaret
|
static byte |
SetEditable
|
static byte |
SetText
|
static byte |
TextComponentNextAvailableCommand
|
| 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 | |
TextComponentHandler()
Default constructor. |
|
TextComponentHandler(ApplicationInterface pageHandler)
The initialising constructor. |
|
TextComponentHandler(int id,
ApplicationInterface pageHandler)
The initialising constructor. |
|
| Method Summary | |
int |
getCaretPosition()
Gets the location of the text cursor in the text. |
java.lang.String |
getSelectedText()
Gets the selected text from the text component. |
int |
getSelectionEnd()
Gets the location of the last character selected in the text. |
protected Pair |
getSelectionPoints()
This function gets the selection start and end points. |
int |
getSelectionStart()
Gets the location of the first character selected in the text. |
java.lang.String |
getText()
Returns the text in the component. |
boolean |
isEditable()
Returns the state of whether the text field can be edited. |
void |
select(int start,
int end)
This function selects the text between the specified start and end positions. |
void |
selectAll()
Selects all the text in this text component. |
void |
setCaretPosition(int position)
Sets the position of the cursor in the text. |
void |
setEditable(boolean state)
Defines whether the text field can be edited. |
void |
setSelectionEnd(int end)
Sets the location of the last character selected in the text. |
protected void |
setSelectionPoints(int type,
int start,
int end)
This function gets the selection start and end points. |
void |
setSelectionStart(int start)
Sets the location of the first character selected in the text. |
void |
setText(java.lang.String item)
Sets the text in the control to the specified value. |
| 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 SetText
public static final byte GetText
public static final byte GetTextResponse
public static final byte GetCaret
public static final byte GetCaretResponse
public static final byte GetSelectedText
public static final byte GetSelectedTextResponse
public static final byte GetSelection
public static final byte GetSelectionResponse
public static final byte Select
public static final byte SetCaret
public static final byte SetEditable
public static final byte TextComponentNextAvailableCommand
public static final byte SelectStart
public static final byte SelectEnd
public static final byte SelectBoth
public static final byte SelectAll
| Constructor Detail |
public TextComponentHandler()
public TextComponentHandler(ApplicationInterface pageHandler)
pageHandler - The handle to the main ApplicationInterface which handles the functions of page overall.
residing on the browser.
public TextComponentHandler(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 setText(java.lang.String item)
throws ComponentHandlerException
item - String containing the text to set the control to.ComponentHandlerException - with any errors.public boolean isEditable()
public void setEditable(boolean state)
throws ComponentHandlerException
state - boolean sets the field to editable when true.ComponentHandlerException - contains any errors performing this command.
public java.lang.String getText()
throws ComponentHandlerException
ComponentHandlerException - with any errors.
public int getCaretPosition()
throws ComponentHandlerException
ComponentHandlerException - with errors.
public java.lang.String getSelectedText()
throws ComponentHandlerException
ComponentHandlerException - with errors.
public int getSelectionEnd()
throws ComponentHandlerException
ComponentHandlerException - with errors.
public int getSelectionStart()
throws ComponentHandlerException
ComponentHandlerException - with errors.
public void select(int start,
int end)
throws ComponentHandlerException
Should these criteria be violated they are silently corrected.
start - int starting location to select.end - int ending location to select.ComponentHandlerException - with errors.
public void selectAll()
throws ComponentHandlerException
public void setCaretPosition(int position)
throws ComponentHandlerException
position - int position to place the cursor.ComponentHandlerException - with errors.
public void setSelectionEnd(int end)
throws ComponentHandlerException
end - int containing the location of the end of the selected text.ComponentHandlerException - with errors.
public void setSelectionStart(int start)
throws ComponentHandlerException
start - int containing the location of the start of the selected text.ComponentHandlerException - with errors.
protected Pair getSelectionPoints()
throws ComponentHandlerException
ComponentHandlerException - with errors.
protected void setSelectionPoints(int type,
int start,
int end)
throws ComponentHandlerException
type - The type of selection operation to perform. This matches the selection
constants listed in this class.start - The int starting location of the selection, may be optional.end - The int ending location of the selection, may be optional.ComponentHandlerException - with errors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||