Class HostFields

java.lang.Object
com.iizix.term.HostFields

public class HostFields extends Object
All host fields of a screen are accessed using this class.
Author:
Christopher Mindus
  • Constructor Details Link icon

    • HostFields Link icon

      public HostFields(HostScreen screen)
      Creates an array of all host fields.
      Parameters:
      screen - The host screen.
  • Method Details Link icon

    • add Link icon

      public void add(HostField field)
      Adds a host field definition. Zero-length fields are not added.
      Parameters:
      field - The field.
    • getCount Link icon

      public int getCount()
      Returns the count of host fields.
      Returns:
      The count.
    • getAll Link icon

      public HostField[] getAll()
      Gets a copy of the host fields array.
      Returns:
      The array of fields.
    • getFromIndex Link icon

      public HostField getFromIndex(int index)
      Gets a host field from an index.
      Parameters:
      index - The index.
      Returns:
      The host field.
    • get Link icon

      public HostField get(int x, int y)
      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 Link icon

      public HostField get(int pos)
      Gets a host field from a zero-based position.
      Parameters:
      pos - Position on screen.
      Returns:
      null if no host field is found.
    • getFirst Link icon

      public HostField getFirst(int x, int y)
      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 Link icon

      public HostField getFirst(int pos)
      Gets the first host field from a zero-based position.
      Parameters:
      pos - Position on screen.
      Returns:
      null if no host field is found.
    • getFirstUnprotected Link icon

      public HostField getFirstUnprotected()
      Gets the first unprotected host field.
      Returns:
      null if non is found.
    • getFirst Link icon

      public HostField getFirst(boolean unprotectedOnly)
      Gets the first unprotected host field.
      Parameters:
      unprotectedOnly - Flag for unprotected only, false for all.
      Returns:
      null if non is found.
    • getPreviousUnprotected Link icon

      public HostField getPreviousUnprotected(int x, int y)
      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 Link icon

      public HostField getPrevious(int x, int y, boolean unprotectedOnly)
      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 Link icon

      public HostField getNextUnprotected(int x, int y)
      Gets the next unprotected host field.
      Parameters:
      x - X position on screen.
      y - Y position on screen.
      Returns:
      null if non is found.
    • getNext Link icon

      public HostField getNext(int x, int y, boolean unprotectedOnly)
      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.