Package com.rs.seagull.emulator.api
Interface Field
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.seagullsw.common.toolbox.geometry.Rectangle
getRectangle()
Returns the area the field occupies.com.seagullsw.common.toolbox.geometry.Dimension
getSize()
Returns the dimensions of the field.String
getText()
Returns the entire text content of the field.String
getText(int index)
For multi-part fields, e.g.List<String>
getTextList()
For multi-part fields, e.g.boolean
isEditable()
Returns true if the field is editable, i.e.void
setText(int index, String value)
For multi-part fields, e.g.void
setText(int index, String value, boolean obeyHostAutoEnter)
For multi-part fields, e.g.void
setText(String value)
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 Detail
-
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
void setText(String value) throws FieldException
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
List<String> 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
String getText(int index) throws NoSuchFieldException
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
void setText(int index, String value)
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
void setText(int index, String value, boolean obeyHostAutoEnter)
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.
-
-