Class ScreenIdentificationProp

java.lang.Object
com.iizix.prop.GProp<GProp<?>[]>
com.iizix.prop.PropCnr
com.iizix.term.prop.ScreenIdentificationProp
All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, Cloneable, Comparable<ScreenIdentificationProp>
Direct Known Subclasses:
EditorScreenIdentificationProp

public class ScreenIdentificationProp extends PropCnr implements Comparable<ScreenIdentificationProp>
This Screen identification property container for a terminal host screen.
  • Field Details

    • NAME_TYPE

      public static final String NAME_TYPE
      The property name for "type" of identification.
      See Also:
    • NAME_MATCH

      public static final String NAME_MATCH
      The property name for "match" data string.
      See Also:
    • ID_EXACT

      public static final int ID_EXACT
      Identification type: Exact Rectangle contents.
      See Also:
    • ID_ALPHA

      public static final int ID_ALPHA
      Identification type: Alphanumeric.
      See Also:
    • ID_ALPHANOSPACE

      public static final int ID_ALPHANOSPACE
      Identification type: Alphanumeric Without Space.
      See Also:
    • ID_NUM

      public static final int ID_NUM
      Identification type: Numeric (0-9).
      See Also:
    • ID_VALUE

      public static final int ID_VALUE
      Identification type: Numeric (0-9, +-,.:).
      See Also:
    • ID_NOSPACE

      public static final int ID_NOSPACE
      Identification type: No Space.
      See Also:
    • ID_SPACE

      public static final int ID_SPACE
      Identification type: Only Space.
      See Also:
    • ID_FIELDLEN

      public static final int ID_FIELDLEN
      Identification type: Field: same position and length.
      See Also:
    • ID_NOTEXACT

      public static final int ID_NOTEXACT
      Identification type: Not rectangle contents.
      See Also:
    • ID_NOTPOPUPWIN

      public static final int ID_NOTPOPUPWIN
      Identification type: Not pop-up window.
      See Also:
    • TYPES

      public static final String[] TYPES
      The types.
  • Constructor Details

    • ScreenIdentificationProp

      public ScreenIdentificationProp()
      Creates the screen identification property container without a name. The name must be set in all cases using the setPropertyAtom call.
    • ScreenIdentificationProp

      public ScreenIdentificationProp(Atom propertyAtom)
      Creates the screen identification property container with the specified name. All system-reserved names for components begins with "$".
      Parameters:
      propertyAtom - the name of the component, unique within it's parent.
  • Method Details

    • getTypeDescription

      public static String getTypeDescription(int type)
      Gets the type string for an identification type.
      Parameters:
      type - The identification type as ID_* value.
      Returns:
      A descriptive text.
    • usesPropIndex

      public boolean usesPropIndex()
      This property is index based.
      Specified by:
      usesPropIndex in interface IPropCnr
      Overrides:
      usesPropIndex in class PropCnr
      Returns:
      true.
    • updateCachedValues

      protected void updateCachedValues()
      Updates the cached values.
    • getX

      public int getX()
      Gets the X position.
      Returns:
      X, zero based.
    • getY

      public int getY()
      Gets the Y position.
      Returns:
      Y, zero based.
    • getCX

      public int getCX()
      Gets the width.
      Returns:
      Character width.
    • getCY

      public int getCY()
      Gets the height.
      Returns:
      Character height.
    • getType

      public int getType()
      Gets the type.
      Returns:
      Value for the identification type ID_*.
    • getMatchString

      public String getMatchString()
      Gets the matching string for this identification. It should not be called if the type is not ID_EXACT or ID_NOTEXACT, otherwise the string returned is null.
      Returns:
      The match string or null for ID_EXACT or ID_NOTEXACT.
    • setMatchString

      public void setMatchString(String data)
      Sets the matching string for this identification.
      Parameters:
      data - Match string, not null.
    • isMatching

      public boolean isMatching(HostScreen screen, int xOffset, int yOffset)
      Checks if this identification matches the host screen.
      Parameters:
      screen - The screen.
      xOffset - Offset on screen for pop-up window, zero-based.
      yOffset - Offset on screen for pop-up window, zero-based.
      Returns:
      Match flag.
    • isMatchingLax

      public static boolean isMatchingLax(int type, String data, int x, int y, int cx, int cy, HostScreen screen, int xOffset, int yOffset)
      Checks if this identification matches the host screen.
    • compareTo

      public int compareTo(ScreenIdentificationProp id)
      Compares two screen identifications by type then rectangle positions and then size.
      Specified by:
      compareTo in interface Comparable<ScreenIdentificationProp>