Package com.rs.seagull.emulator.api
Interface Field
- All Superinterfaces:
Attributed
,BareField
,Control
,Defined
A Field represents a user-defined named control that has text content and attributes.
- Version:
- $Id$
-
Method Summary
Modifier and TypeMethodDescriptioncom.seagullsw.common.toolbox.geometry.Rectangle
Returns the area the field occupies.com.seagullsw.common.toolbox.geometry.Dimension
getSize()
Returns the dimensions of the field.getText()
Returns the entire text content of the field.getText
(int index) For multi-part fields, e.g.For multi-part fields, e.g.boolean
Returns true if the field is editable, i.e.void
For multi-part fields, e.g.void
For multi-part fields, e.g.void
Set the text content of the field.Methods inherited from interface com.rs.seagull.emulator.api.Attributed
getBackgroundColor, getForegroundColor, getHorizontalScale, getVerticalScale, hasAttribute, isAvailable, isBlink, isBold, isBright, isColumnSeparator, isDim, isInvisible, isReverse, isUnderline, isWriteProtect
Methods inherited from interface com.rs.seagull.emulator.api.BareField
getLength, getLocation
-
Method Details
-
getText
String getText()Returns the entire text content of the field. Note that for continued and column fields, the text returned is a concatenation of the individual component parts. -
setText
Set the text content of the field. For continued and column fields, the text is "flowed" from one component part to the next until all the text is used.- Specified by:
setText
in interfaceBareField
- Parameters:
value
- The text content to place into the field. If null or empty, the field is cleared.- Throws:
FieldException
- if the text cannot be set, because of it being the wrong format or not input capable.
-
isEditable
boolean isEditable()Returns true if the field is editable, i.e. has any input-capable regions.- Returns:
- true if the field is editable, i.e. has any input-capable regions.
-
getSize
com.seagullsw.common.toolbox.geometry.Dimension getSize()Returns the dimensions of the field.- Returns:
- the dimensions of the field.
-
getTextList
For multi-part fields, e.g. continued or column, returns a list of the contents of the individual parts.- Returns:
- a list of the contents of each part of a multi-part field.
-
getText
For multi-part fields, e.g. continued or column, returns the contents of the index'th part (zero-based indexing).- Parameters:
index
- the (zero-based) index- Returns:
- the contents of the index'th part (zero-based).
- Throws:
NoSuchFieldException
-
setText
For multi-part fields, e.g. continued or column, set the contents of the index'th part (zero-based indexing). If value is null or empty, the field is cleared.- Parameters:
index
- the (zero-based) indexvalue
- the value to set
-
setText
For multi-part fields, e.g. continued or column, set the contents of the index'th part (zero-based indexing). If value is null or empty, the field is cleared. If obeyHostAutoEnter is true, then the AutoEnterEnabled setting on the parent session is ignored and the auto-enter attribute of the underlying host field is obeyed, i.e. if the value fills the field and the field has the auto-enter attribute, then an Enter is sent. If obeyHostAutoEnter is false, then auto-enter is not performed.- Parameters:
index
- the (zero-based) indexvalue
- the value to setobeyHostAutoEnter
- a flag to indicate whether to follow session-wide AutoEnterEnabled setting
-
getRectangle
com.seagullsw.common.toolbox.geometry.Rectangle getRectangle()Returns the area the field occupies.- Returns:
- the rectangular area occupied by the field.
-