Package com.iizix.term
Class HostFields
java.lang.Object
com.iizix.term.HostFields
All host fields of a screen are accessed using this class.
- Author:
- Christopher Mindus
Constructor Summary
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a host field definition.get
(int pos) Gets a host field from a zero-based position.get
(int x, int y) Gets a host field from a X/Y position.getAll()
Gets a copy of the host fields array.int
getCount()
Returns the count of host fields.getFirst
(boolean unprotectedOnly) Gets the first unprotected host field.getFirst
(int pos) Gets the first host field from a zero-based position.getFirst
(int x, int y) Gets the first host field from a X/Y position.Gets the first unprotected host field.getFromIndex
(int index) Gets a host field from an index.getNext
(int x, int y, boolean unprotectedOnly) Gets the next unprotected host field.getNextUnprotected
(int x, int y) Gets the next unprotected host field.getPrevious
(int x, int y, boolean unprotectedOnly) Gets the previous unprotected host field.getPreviousUnprotected
(int x, int y) Gets the previous unprotected host field.
Constructor Details
HostFields
Creates an array of all host fields.- Parameters:
screen
- The host screen.
Method Details
add
Adds a host field definition. Zero-length fields are not added.- Parameters:
field
- The field.
getCount
public int getCount()Returns the count of host fields.- Returns:
- The count.
getAll
Gets a copy of the host fields array.- Returns:
- The array of fields.
getFromIndex
Gets a host field from an index.- Parameters:
index
- The index.- Returns:
- The host field.
get
Gets a host field from a X/Y position.- Parameters:
x
- X position on screen.y
- Y position on screen.- Returns:
- null if no host field is found.
get
Gets a host field from a zero-based position.- Parameters:
pos
- Position on screen.- Returns:
- null if no host field is found.
getFirst
Gets the first host field from a X/Y position.- Parameters:
x
- X position on screen.y
- Y position on screen.- Returns:
- null if no host field exists in the position.
getFirst
Gets the first host field from a zero-based position.- Parameters:
pos
- Position on screen.- Returns:
- null if no host field is found.
getFirstUnprotected
Gets the first unprotected host field.- Returns:
- null if non is found.
getFirst
Gets the first unprotected host field.- Parameters:
unprotectedOnly
- Flag for unprotected only, false for all.- Returns:
- null if non is found.
getPreviousUnprotected
Gets the previous unprotected host field. If the position is not at the beginning of the field, the current field is returned.- Parameters:
x
- X position on screen.y
- Y position on screen.- Returns:
- null if non is found.
getPrevious
Gets the previous unprotected host field. If the position is not at the beginning of the field, the current field is returned.- Parameters:
x
- X position on screen.y
- Y position on screen.unprotectedOnly
- Flag for unprotected only, false for all.- Returns:
- null if non is found.
getNextUnprotected
Gets the next unprotected host field.- Parameters:
x
- X position on screen.y
- Y position on screen.- Returns:
- null if non is found.
getNext
Gets the next unprotected host field.- Parameters:
x
- X position on screen.y
- Y position on screen.unprotectedOnly
- Flag for unprotected only, false for all.- Returns:
- null if non is found.