Class ScreenFieldProp
- java.lang.Object
- com.iizix.prop.GProp<GProp<?>[]>
- com.iizix.prop.PropCnr
- com.iizix.term.prop.ScreenFieldProp
- All Implemented Interfaces:
EventListener
,IGProp<GProp<?>[]>
,IPropCnr
,IVSColumnBestValueListener
,IVSColumnListener
,IVSComponentListener
,IVSComponentReferenceProvider
,IVSComponentState
,IVSFieldListener
,java.lang.Cloneable
- Direct Known Subclasses:
EditorScreenFieldProp
public class ScreenFieldProp extends PropCnr implements IVSComponentReferenceProvider, IVSFieldListener, IVSColumnListener
This Screen Field property container for a terminal host screen.
Nested Class Summary
Nested classes/interfaces inherited from interface com.iizix.prop.vs.IVSComponentState
IVSComponentState.State
Field Summary
Fields Modifier and Type Field Description static int
ADJ_LEFT
Left justification.static int
ADJ_NONE
No justification.static int
ADJ_RIGHT
Right justification.static int
FT_Alphanumeric
Field type: Alphanumeric characters only.static int
FT_AlphaOnly
Field type: Alpha characters only.static int
FT_AnyCharacter
Field type: Any character allowed.static int
FT_DigitsOnly
Field type: Digits only.static int
FT_ImpliedDecimal
Field type: Implied decimal number.static int
FT_KatakanaShift
Field type: Katakana shift.static int
FT_Marked
Field type: Marked field.static int
FT_NumericOnly
Field type: Numeric only.static int
FT_NumericShift
Field type: Numeric shift.static int
FT_SignedNumeric
Field type: Signed numeric.static int
FT_UpperOnly
Field type: Upper case any character.static java.lang.String
NO_MATCH
static java.lang.String
RELATIVE_VIRTUALSPACE
Name for the relative VirtualSpace connection property.static java.lang.String
SCREEN_NULL
Fields inherited from class com.iizix.prop.PropCnr
EMPTY, EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_ID
Fields inherited from class com.iizix.prop.GProp
GPDEBUG, PROP_ATTR_STRING_EDITOR_PROP, PROP_ATTR_STRING_ERRORED_NAME, PROP_ATTR_STRING_EXTENDS, PROP_ATTR_STRING_EXTENDS_FINAL, PROP_ATTR_STRING_EXTENDS_PRIVATE, PROP_ATTR_STRING_NULLABLE, PROP_ATTR_STRING_PRIVATE, PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT, PROP_ATTR_STRING_READ_ONLY, PROP_USER_1, PROP_USER_2
Fields inherited from interface com.iizix.prop.IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATE
Constructor Summary
Constructors Constructor Description ScreenFieldProp()
Creates the Screen Field property container without a name.ScreenFieldProp(Atom propertyAtom)
Creates the Screen Field property container with the specified name.
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ScreenFieldProp
clone()
Creates a clone out of this property.boolean
doesScreenMatch(HostScreen screen)
Checks if this host field belongs to a screen that is currently matching or not.boolean
doesScreenMatch(HostSession hostSession)
Checks if this host field belongs to a screen that is currently matching or not.Value.Type
getBestVSColumnHeaderValueType(VSRelativeReference<?> reference)
Requests the value type that would best suit the listener.Value.Type
getBestVSFieldValueType(VSRelativeReference<?> reference)
Requests the value type that would best suit the listener.int
getColor(HostScreen screen)
Gets the CGA color of this field.int
getColor(HostScreen screen, boolean isDynamic)
Gets the CGA color of this field.int
getColor(HostScreen screen, int line)
Gets the CGA color of a line in this field.int
getColor(HostScreen screen, int line, boolean doCheckMatch)
Gets the CGA color of a line in this field.int
getColor2(HostScreen screen, boolean doCheckMatch)
Gets the CGA color of this field.HostSession
getCurrentHostSession(java.lang.String logMsg)
Gets the current host session from the Application properties.int
getCX()
Get the width.int
getCY()
Get the height.ClassReference
getFieldClassReference()
Gets the class reference for the field processing used to getting/setting host field and providing conversion/mapping/translation support.HostFieldColumnCell[]
getHiddenHostFieldColumn(HostScreen screen)
Gets an array of all host field cells in a column.java.lang.String
getHiddenHostString(HostScreen screen)
Gets the contents of this host field.java.lang.String
getHiddenHostString(HostScreen screen, boolean isDynamic)
Gets the contents of this host field.java.lang.String
getHiddenHostString(HostScreen screen, boolean isDynamic, boolean dontWrap)
Gets the contents of this host field.java.lang.String
getHiddenHostString(HostScreen screen, int line)
Gets the contents of this host field.HostField
getHostField(HostScreen screen)
Gets the corresponding host field on the current host screen.HostField
getHostField(HostScreen screen, boolean isDynamic)
Gets the corresponding host field on the current host screen.HostField
getHostField(HostScreen screen, int line)
Gets the corresponding host field on the current host screen.HostFieldColumnCell[]
getHostFieldColumn(HostScreen screen)
Gets an array of all host field cells in a column.HostFieldColumnCell[]
getHostFieldColumn(HostScreen screen, boolean doGetHidden)
Gets an array of all host field cells in a column.java.lang.String
getHostString(HostScreen screen)
Gets the contents of this host field.java.lang.String
getHostString(HostScreen screen, boolean doGetHidden)
Gets the contents of this host field.java.lang.String
getHostString(HostScreen screen, boolean doGetHidden, boolean isDynamic)
Gets the contents of this host field.java.lang.String
getHostString(HostScreen screen, boolean doGetHidden, boolean isDynamic, boolean dontWrap, boolean doCheckMatch)
Gets the contents of this host field.java.lang.String
getHostString(HostScreen screen, boolean doGetHidden, int line)
Gets the contents of this host field at a certain line.java.lang.String
getHostString(HostScreen screen, boolean doGetHidden, int line, boolean doCheckMatch)
Gets the contents of this host field at a certain line.java.lang.String
getHostString(HostScreen screen, int line)
Gets the contents of this host field.IHostFieldData
getIHostFieldData()
Gets the IHostFieldData instance.int
getLineCount()
Gets the line count in this host field.ScreenFieldProp
getNextContinued()
Gets the next continued field.ScreenProp
getScreen()
Gets the screen property.int
getTotalWidth()
Get this field total width.int
getTotalWidth(HostScreen screen, boolean isDynamic)
Get this field total width.int
getTotalWidth(HostScreen screen, boolean isDynamic, boolean dontWrap)
Get this field total width.int
getType()
Gets the type.java.lang.String
getTypeString()
Gets the field type string.static java.lang.String
getTypeString(int type)
Gets the string for a field type.VSColumnHeader
getVSColumnHeader()
Gets the VS Column Header connected to the screen field.VSComponentReference
getVSComponentReference()
Gets the VSComponentReference.java.lang.Class<?>[]
getVSComponentReferenceClasses(VSComponentReference ref)
Gets the possible component classes for the references, i.e.java.lang.String
getVSComponentReferenceDescription(VSComponentReference ref)
Gets a short description of this reference.VSField
getVSField()
Gets the VS Field connected to the screen field.VSRelativeReference<?>
getVSRelativeReference()
Gets the relative VS connection.int
getWidth(int line)
Gets the with of a specific line in the host field.int
getX()
Get the horizontal position.int
getY()
Get the vertical position.boolean
hasRelateVirtualSpaceConnection()
Checks for connection to VS.boolean
isContinuation()
Checks if this field is a continuation of a field, i.e.boolean
isContinued()
Checks if the field is continued, i.e.boolean
isDynamic()
Gets the definition of the dynamic property "snap".boolean
isScreenNonCurrentPopup()
Check if data is to be retrieved from this screen and it's not the current pop-up screen, rather a "main screen" behind, then methods fetching data using "relative" methods should use "absolute" ones instead.boolean
isVSComponentReferenceValid(Atom refAtom, VSComponent component)
Validates the VS component reference that has been looked up when the reference property doesn't exist.boolean
isWrappingAllowed()
Gets the definition of the dynamic property "wrap".void
onBroken(VSRelativeReference<?> reference, VSColumnHeader column)
Called when the property reference has been broken, i.e.void
onBroken(VSRelativeReference<?> reference, VSField field)
Called when the property reference has been broken, i.e.void
onCellValueChanged(VSColumnHeader column, VSField cell, Value value, GProp<?> trigger, IPostEventProcessing postProcessing)
Called when the cell value is set in the column.void
onParentStateChanged(IVSComponent parent, IVSComponentState.State state, boolean on)
Called when the column changes state.void
onResolved(VSRelativeReference<?> reference, VSColumnHeader column)
Called when the property reference has been resolved.void
onResolved(VSRelativeReference<?> reference, VSField field)
Called when the property reference has been resolved.void
onRowAdded(VSColumnHeader column, VSRow row, int rowIndex)
Called when a row has been added to the table.void
onRowRemoved(VSColumnHeader column, VSRow row, int rowIndex)
Called when a row has been removed from the table.void
onSelectionChanged(VSColumnHeader column, VSRow row, int rowIndex, boolean isSelected)
Called when the row selection is changed to forward to column listeners.void
onSingleSelectionChanged(VSColumnHeader column, int rowIndex)
Called when the row selection in table single-selection mode is changed to forward to column listeners.void
onStateChanged(VSColumnHeader table, IVSComponentState.State state, boolean on)
Called when the table changes state.void
onStateChanged(VSColumnHeader column, VSField cell, IVSComponentState.State state, boolean on)
Called when a cell in the column changes state.void
onStateChanged(VSField field, IVSComponentState.State state, boolean on)
Called when the field changes state.void
onValueChanged(VSField field, Value value, GProp<?> trigger, IPostEventProcessing postProcessing)
Called when the field value is set.boolean
setCursor(HostSession hostSession)
Set cursor to the position of this field, first line.boolean
setCursor(HostSession hostSession, boolean isDynamic)
Set cursor to the position of this field, first line.boolean
setCursor(HostSession hostSession, int line)
Set cursor to the position of this field with line offset.boolean
setCursor(HostSession hostSession, int line, int charpos)
Set cursor to the position of this field with line offset and the character offset.java.lang.String
setHostField(HostSession hostSession, java.lang.String text)
Sets the corresponding host field on the current host screen to the specified string.java.lang.String
setHostField(HostSession hostSession, java.lang.String text, boolean isDynamic)
Sets the corresponding host field on the current host screen to the specified string.java.lang.String
setHostField(HostSession hostSession, java.lang.String text, int line)
Sets the corresponding host field on the current host screen to the specified string.protected void
updateCachedValues()
Updates the cached values.boolean
usesPropIndex()
This property is index based.Methods inherited from class com.iizix.prop.PropCnr
__transferChildProps, addPredefinedProps, addProp, addProp, addProp2, addProp2, appendPropValue, canRequestFocus, completeVirtualize, containsProp, containsProp, convertLoadedProp, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, createVSReference, doPropEqualsArrayValues, doVirtualizePropCnr, enablePropCommunication, enablePropHashMap, equalsTree, equalsTree, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsContainer, getExtendsError, getExtendsName, getExtendsOverride, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getPredefinedProps, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropBaseReference, getPropCnr, getPropCount, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue0, getReferences, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, getVSReference, hasFocus, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializeValue, initPropCnr, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, isSibling, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropDispose, onPropRemoved, onPropTreeInitialized, onReferenceEvent, paramString, prepare, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, replaceProps, requestFocus, requestFocus, requestFocusEx, requestFocusEx, resolveReferences, resolveRuntimeReferences, setBool, setBool, setBool, setBool, setCreateRequiredProp, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, shouldCreateProps, shouldSerializeToXML, toElementString, toNativeValue0, usePropHashMap, validateChildPropInValue, validateClassInstances, validatePropType, validatePropValue, verify, verifyInternalUseOnly, verifyTree, virtualize
Methods inherited from class com.iizix.prop.GProp
addPropError, addPropListener, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalValues, extendsClone, finalize, fine, fine, finer, finer, finest, finest, fromElementString, getAliasName, getAppSessionGyro, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientSessionGyro, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropError, getPropError, getPropErroredName, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromPath, getPropFromReference, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropReferenceTarget, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getPropValueObject, getReferencePropName, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParent, getTreeLock, hasChanged, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropNullable, isPropPrivate, isPropPrivateAtCreation, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onEventSelf, onPrepare, onPropInvalidateCache, onPropParentChanged, onPropValueSet, onRemoteEvent, onVirtualizationCompleted, onVirtualized, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toNativeValue, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, verifyHasPropertyItem, warning, warning, warning
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.iizix.prop.IGProp
addPropError, addPropListener, dispose, equals, fine, fine, finer, finer, finest, finest, fromElementString, getAppSessionGyro, getAtomPath, getClientSessionGyro, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropNameDebug, getModuleFolder, getModuleFolder, getParent, getParent, getPropAtom, getPropError, getPropError, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getReferencePropName, getRelativePropName, getRootParent, getTreeLock, hasChanged, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropVirtualized, list, list, list, mapAliasToReference, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onEventSelf, onRemoteEvent, removePropError, removePropListener, renameProp, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPropError, setPropExtendsFinal, setPropExtendsPrivate, setPropNullable, setPropPrivate, setPropReadOnly, setPropValue, setPropValue, severe, severe, severe, toNativeValue, triggerRemoteEvent, triggerRemoteEvent, validateProp, verifyHasPropertyItem, warning, warning, warning
Methods inherited from interface com.iizix.prop.IPropCnr
canRequestFocus, canRequestFocus, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized
Methods inherited from interface com.iizix.prop.vs.IVSComponentReferenceProvider
isVSComponentReferenceValid
Field Detail
RELATIVE_VIRTUALSPACE
public static final java.lang.String RELATIVE_VIRTUALSPACE
Name for the relative VirtualSpace connection property.- See Also:
- Constant Field Values
ADJ_LEFT
public static final int ADJ_LEFT
Left justification.- See Also:
- Constant Field Values
ADJ_RIGHT
public static final int ADJ_RIGHT
Right justification.- See Also:
- Constant Field Values
ADJ_NONE
public static final int ADJ_NONE
No justification.- See Also:
- Constant Field Values
FT_Marked
public static final int FT_Marked
Field type: Marked field.- See Also:
- Constant Field Values
FT_AnyCharacter
public static final int FT_AnyCharacter
Field type: Any character allowed.- See Also:
- Constant Field Values
FT_AlphaOnly
public static final int FT_AlphaOnly
Field type: Alpha characters only.- See Also:
- Constant Field Values
FT_Alphanumeric
public static final int FT_Alphanumeric
Field type: Alphanumeric characters only.- See Also:
- Constant Field Values
FT_UpperOnly
public static final int FT_UpperOnly
Field type: Upper case any character.- See Also:
- Constant Field Values
FT_NumericOnly
public static final int FT_NumericOnly
Field type: Numeric only.- See Also:
- Constant Field Values
FT_DigitsOnly
public static final int FT_DigitsOnly
Field type: Digits only.- See Also:
- Constant Field Values
FT_SignedNumeric
public static final int FT_SignedNumeric
Field type: Signed numeric.- See Also:
- Constant Field Values
FT_ImpliedDecimal
public static final int FT_ImpliedDecimal
Field type: Implied decimal number.- See Also:
- Constant Field Values
FT_NumericShift
public static final int FT_NumericShift
Field type: Numeric shift.- See Also:
- Constant Field Values
FT_KatakanaShift
public static final int FT_KatakanaShift
Field type: Katakana shift.- See Also:
- Constant Field Values
SCREEN_NULL
public static final java.lang.String SCREEN_NULL
- See Also:
- Constant Field Values
NO_MATCH
public static final java.lang.String NO_MATCH
- See Also:
- Constant Field Values
Constructor Detail
ScreenFieldProp
public ScreenFieldProp()
Creates the Screen Field property container without a name. The name must be set in all cases using thesetPropertyAtom
call.
ScreenFieldProp
public ScreenFieldProp(Atom propertyAtom)
Creates the Screen Field 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 Detail
getTypeString
public static java.lang.String getTypeString(int type)
Gets the string for a field type.
usesPropIndex
public boolean usesPropIndex()
This property is index based.- Specified by:
usesPropIndex
in interfaceIPropCnr
- Overrides:
usesPropIndex
in classPropCnr
- Returns:
- true.
clone
public ScreenFieldProp clone() throws java.lang.CloneNotSupportedException
Creates a clone out of this property. The cloning is overridden by the subclasses in order to handle cloning of its class variables appropriately.Cloning is used for "virtualization" of a property tree in the server. Client property classes will therefore throw
CloneNotSupportedException
.Once a tree has been cloned, the change-flag is reset, and the create-flag is set. All listeners are also removed! The new cloned property is an orphan, i.e. has no parent set. All children properties are also (deep) cloned.
Note that the cloning process is done WITHOUT thread synchronization for performance reasons, thus no modifications should be done to the tree!
updateCachedValues
protected void updateCachedValues()
Updates the cached values.
getType
public int getType()
Gets the type.
getTypeString
public java.lang.String getTypeString()
Gets the field type string.
isDynamic
public boolean isDynamic()
Gets the definition of the dynamic property "snap".- Returns:
- true if defined as dynamic screen field, false otherwise.
isWrappingAllowed
public boolean isWrappingAllowed()
Gets the definition of the dynamic property "wrap".- Returns:
- true if dynamic screen fields are allowed to wrap, false otherwise.
isContinued
public boolean isContinued()
Checks if the field is continued, i.e. if there is a next-continued field.
getNextContinued
public ScreenFieldProp getNextContinued()
Gets the next continued field.- Returns:
- null for none.
isContinuation
public boolean isContinuation()
Checks if this field is a continuation of a field, i.e. a "child" field.
getScreen
public ScreenProp getScreen()
Gets the screen property.
doesScreenMatch
public boolean doesScreenMatch(HostScreen screen)
Checks if this host field belongs to a screen that is currently matching or not.
doesScreenMatch
public boolean doesScreenMatch(HostSession hostSession)
Checks if this host field belongs to a screen that is currently matching or not.
getX
public int getX()
Get the horizontal position.
getY
public int getY()
Get the vertical position.
getCX
public int getCX()
Get the width.
getCY
public int getCY()
Get the height.
getWidth
public int getWidth(int line)
Gets the with of a specific line in the host field. If the index is negative, the total with is returned.- Returns:
- -1 if not found, otherwise the width.
- See Also:
getTotalWidth()
getTotalWidth
public int getTotalWidth()
Get this field total width. If the field is continued or has multiple lines, the entire size is calculated. This size is mostly used for e.g. an entry field that is connected to a host field that wraps over the screen (and is therefore continued).
getTotalWidth
public int getTotalWidth(HostScreen screen, boolean isDynamic)
Get this field total width. If the field is continued or has multiple lines, the entire size is calculated. This size is mostly used for e.g. an entry field that is connected to a host field that wraps over the screen (and is therefore continued).
getTotalWidth
public int getTotalWidth(HostScreen screen, boolean isDynamic, boolean dontWrap)
Get this field total width. If the field is continued or has multiple lines, the entire size is calculated. This size is mostly used for e.g. an entry field that is connected to a host field that wraps over the screen (and is therefore continued).The "dontWrap" flag is only valid when the flag "isDynamic" is true.
isScreenNonCurrentPopup
public boolean isScreenNonCurrentPopup()
Check if data is to be retrieved from this screen and it's not the current pop-up screen, rather a "main screen" behind, then methods fetching data using "relative" methods should use "absolute" ones instead.Typically his would be used when e,g, REXX used HostGetFld('MAINSCREEN','SOMEFLD') and without this method it wouldn't work.
- Returns:
- true if this PhantomScreen is not a pop-up.
getLineCount
public int getLineCount()
Gets the line count in this host field.
getHostString
public java.lang.String getHostString(HostScreen screen)
Gets the contents of this host field. Hidden characters are returned as spaces.- Returns:
- null if the host field is not inside screen (because there has been a screen change).
getHostString
public java.lang.String getHostString(HostScreen screen, int line)
Gets the contents of this host field. Hidden characters are returned as spaces.- Returns:
- null if the host field is not inside screen (because there has been a screen change).
getHostString
public java.lang.String getHostString(HostScreen screen, boolean doGetHidden)
Gets the contents of this host field.- Returns:
- null if the host field is not inside screen (because there has been a screen change).
getHostString
public java.lang.String getHostString(HostScreen screen, boolean doGetHidden, boolean isDynamic)
Gets the contents of this host field.- Returns:
- null if the host field is not inside screen (because there has been a screen change).
getHostString
public java.lang.String getHostString(HostScreen screen, boolean doGetHidden, boolean isDynamic, boolean dontWrap, boolean doCheckMatch)
Gets the contents of this host field.The "dontWrap" flag is only valid when "isDynamic" is true.
- Returns:
- null if the host field is not inside screen (because there has been a screen change).
getHostString
public java.lang.String getHostString(HostScreen screen, boolean doGetHidden, int line)
Gets the contents of this host field at a certain line.- Returns:
- null if the host field is not inside screen (because there has been a screen change).
getHostString
public java.lang.String getHostString(HostScreen screen, boolean doGetHidden, int line, boolean doCheckMatch)
Gets the contents of this host field at a certain line.- Returns:
- null if the host field is not inside screen (because there has been a screen change).
getHiddenHostString
public java.lang.String getHiddenHostString(HostScreen screen)
Gets the contents of this host field.- Returns:
- null if the host field is not inside screen (because there has been a screen change).
getHiddenHostString
public java.lang.String getHiddenHostString(HostScreen screen, boolean isDynamic)
Gets the contents of this host field.- Returns:
- null if the host field is not inside screen (because there has been a screen change).
getHiddenHostString
public java.lang.String getHiddenHostString(HostScreen screen, boolean isDynamic, boolean dontWrap)
Gets the contents of this host field.The "dontWrap" flag is only valid when "isDynamic" is true.
- Returns:
- null if the host field is not inside screen (because there has been a screen change).
getHiddenHostString
public java.lang.String getHiddenHostString(HostScreen screen, int line)
Gets the contents of this host field.- Returns:
- null if the host field is not inside screen (because there has been a screen change).
getColor
public int getColor(HostScreen screen)
Gets the CGA color of this field.- Returns:
- -1 if the host field is not inside screen (because there has been a screen change).
getColor2
public int getColor2(HostScreen screen, boolean doCheckMatch)
Gets the CGA color of this field.- Returns:
- -1 if the host field is not inside screen (because there has been a screen change).
getColor
public int getColor(HostScreen screen, boolean isDynamic)
Gets the CGA color of this field.- Returns:
- -1 if the host field is not inside screen (because there has been a screen change).
getColor
public int getColor(HostScreen screen, int line)
Gets the CGA color of a line in this field.- Returns:
- -1 if the host field is not inside screen (because there has been a screen change).
getColor
public int getColor(HostScreen screen, int line, boolean doCheckMatch)
Gets the CGA color of a line in this field.- Returns:
- -1 if the host field is not inside screen (because there has been a screen change).
getHostField
public HostField getHostField(HostScreen screen)
Gets the corresponding host field on the current host screen.- Returns:
- null if the host field is not found. or if the host field is not inside screen (because there has been a screen change).
getHostField
public HostField getHostField(HostScreen screen, boolean isDynamic)
Gets the corresponding host field on the current host screen.- Returns:
- null if the host field is not found. or if the host field is not inside screen (because there has been a screen change).
getHostField
public HostField getHostField(HostScreen screen, int line)
Gets the corresponding host field on the current host screen. The line number indicates the Y offset in the Phantom Host Field.- Returns:
- null if the host field is not found. or if the host field is not inside screen (because there has been a screen change).
setCursor
public boolean setCursor(HostSession hostSession, int line)
Set cursor to the position of this field with line offset. If line offset is larger than field height, search for continue field.- Returns:
- false if cursor cannot be set or if line is invalid.
setCursor
public boolean setCursor(HostSession hostSession, int line, int charpos)
Set cursor to the position of this field with line offset and the character offset. If line offset is larger than field height, search for continue field.- Returns:
- false if cursor cannot be set or if line is invalid.
setCursor
public boolean setCursor(HostSession hostSession)
Set cursor to the position of this field, first line.- Returns:
- false if cursor cannot be set in the host session.
setCursor
public boolean setCursor(HostSession hostSession, boolean isDynamic)
Set cursor to the position of this field, first line.- Returns:
- false if cursor cannot be set in the host session.
setHostField
public java.lang.String setHostField(HostSession hostSession, java.lang.String text)
Sets the corresponding host field on the current host screen to the specified string.- Returns:
- null for success, otherwise an error message.
setHostField
public java.lang.String setHostField(HostSession hostSession, java.lang.String text, boolean isDynamic)
Sets the corresponding host field on the current host screen to the specified string.- Returns:
- null for success, otherwise an error message.
setHostField
public java.lang.String setHostField(HostSession hostSession, java.lang.String text, int line)
Sets the corresponding host field on the current host screen to the specified string.The line number indicates the Y offset in the Phantom Host Field.
- Returns:
- null for success, otherwise an error message.
getHiddenHostFieldColumn
public HostFieldColumnCell[] getHiddenHostFieldColumn(HostScreen screen)
Gets an array of all host field cells in a column. This is typically used with list boxes and business graphics.- Returns:
- null if the host session is not the current one.
getHostFieldColumn
public HostFieldColumnCell[] getHostFieldColumn(HostScreen screen)
Gets an array of all host field cells in a column. This is typically used with list boxes and business graphics.- Returns:
- null if the host session is not the current one.
getHostFieldColumn
public HostFieldColumnCell[] getHostFieldColumn(HostScreen screen, boolean doGetHidden)
Gets an array of all host field cells in a column. This is typically used with list boxes and business graphics.- Returns:
- null if the host session is not the current one.
hasRelateVirtualSpaceConnection
public boolean hasRelateVirtualSpaceConnection()
Checks for connection to VS.
getVSRelativeReference
public VSRelativeReference<?> getVSRelativeReference()
Gets the relative VS connection.
getFieldClassReference
public ClassReference getFieldClassReference()
Gets the class reference for the field processing used to getting/setting host field and providing conversion/mapping/translation support. The class implements theIHostFieldData
interface.- Returns:
- The ClassReference, or null for none.
getIHostFieldData
public IHostFieldData getIHostFieldData()
Gets the IHostFieldData instance.The instance is created if one is present.
- Returns:
- The IHostFieldData instance or null for none.
getCurrentHostSession
public HostSession getCurrentHostSession(java.lang.String logMsg)
Gets the current host session from the Application properties.- Parameters:
logMsg
- Message to prepend an error in the host session, null to avoid logging.- Returns:
- The current host session, or null for none (always null when not running in Server or Server Development modes).
getVSComponentReferenceClasses
public java.lang.Class<?>[] getVSComponentReferenceClasses(VSComponentReference ref)
Gets the possible component classes for the references, i.e. combination of VSTable, VSColumnHeader, VSField.- Specified by:
getVSComponentReferenceClasses
in interfaceIVSComponentReferenceProvider
- Parameters:
ref
- The reference holder.- Returns:
- An array of the valid classes.
isVSComponentReferenceValid
public boolean isVSComponentReferenceValid(Atom refAtom, VSComponent component)
Validates the VS component reference that has been looked up when the reference property doesn't exist.- Specified by:
isVSComponentReferenceValid
in interfaceIVSComponentReferenceProvider
- Parameters:
refAtom
- The reference holder's atom.component
- The VS component to validate.- Returns:
- true if valid, false otherwise.
getVSComponentReferenceDescription
public java.lang.String getVSComponentReferenceDescription(VSComponentReference ref)
Gets a short description of this reference.- Specified by:
getVSComponentReferenceDescription
in interfaceIVSComponentReferenceProvider
- Parameters:
ref
- The reference holder.- Returns:
- E.g. "VS Field" for a VSField, etc...
getVSComponentReference
public VSComponentReference getVSComponentReference()
Gets the VSComponentReference.- Returns:
- The reference instance, or null for none.
getBestVSFieldValueType
public Value.Type getBestVSFieldValueType(VSRelativeReference<?> reference)
Requests the value type that would best suit the listener.- Specified by:
getBestVSFieldValueType
in interfaceIVSFieldListener
- Parameters:
reference
- The VSRelativeReference instance holding the reference.- Returns:
- null if none is available.
getVSField
public VSField getVSField()
Gets the VS Field connected to the screen field.- Returns:
- The field, or null for none.
onResolved
public void onResolved(VSRelativeReference<?> reference, VSField field)
Called when the property reference has been resolved. UI components use this method to set its state according to the field.- Specified by:
onResolved
in interfaceIVSFieldListener
- Parameters:
reference
- The VSRelativeReference instance holding the reference.field
- The target reference.
onBroken
public void onBroken(VSRelativeReference<?> reference, VSField field)
Called when the property reference has been broken, i.e. unresolved.- Specified by:
onBroken
in interfaceIVSFieldListener
- Parameters:
reference
- The VSRelativeReference instance holding the reference.field
- The target reference.
onStateChanged
public void onStateChanged(VSField field, IVSComponentState.State state, boolean on)
Called when the field changes state.- Specified by:
onStateChanged
in interfaceIVSFieldListener
- Parameters:
field
- The VS field.state
- The state change.on
- New state.
onValueChanged
public void onValueChanged(VSField field, Value value, GProp<?> trigger, IPostEventProcessing postProcessing)
Called when the field value is set.- Specified by:
onValueChanged
in interfaceIVSFieldListener
- Parameters:
field
- The VS field.value
- The value, never null, butvalue.isNull()
could be true.trigger
- The trigger property that may be null.postProcessing
- Post-processing instance.
getBestVSColumnHeaderValueType
public Value.Type getBestVSColumnHeaderValueType(VSRelativeReference<?> reference)
Requests the value type that would best suit the listener.- Specified by:
getBestVSColumnHeaderValueType
in interfaceIVSColumnBestValueListener
- Parameters:
reference
- The VSRelativeReference instance holding the reference.- Returns:
- null if none is available.
getVSColumnHeader
public VSColumnHeader getVSColumnHeader()
Gets the VS Column Header connected to the screen field.- Returns:
- The column header, or null for none.
onResolved
public void onResolved(VSRelativeReference<?> reference, VSColumnHeader column)
Called when the property reference has been resolved. UI components use this method to set its state according to the field.- Specified by:
onResolved
in interfaceIVSColumnListener
- Parameters:
reference
- The VSRelativeReference instance holding the reference.column
- The target reference.
onBroken
public void onBroken(VSRelativeReference<?> reference, VSColumnHeader column)
Called when the property reference has been broken, i.e. unresolved.- Specified by:
onBroken
in interfaceIVSColumnListener
- Parameters:
reference
- The VSRelativeReference instance holding the reference.column
- The target reference.
onStateChanged
public void onStateChanged(VSColumnHeader table, IVSComponentState.State state, boolean on)
Called when the table changes state.- Specified by:
onStateChanged
in interfaceIVSColumnListener
- Parameters:
table
- The VS table column.state
- The state change.on
- New state.
onParentStateChanged
public void onParentStateChanged(IVSComponent parent, IVSComponentState.State state, boolean on)
Called when the column changes state.- Specified by:
onParentStateChanged
in interfaceIVSComponentListener
- Parameters:
parent
- The parent who's state was changed.state
- The state change, possible values PARENT_ENABLED, PARENT_READONLY, PARENT_VISIBLE.on
- New state.
onSingleSelectionChanged
public void onSingleSelectionChanged(VSColumnHeader column, int rowIndex)
Called when the row selection in table single-selection mode is changed to forward to column listeners.- Specified by:
onSingleSelectionChanged
in interfaceIVSColumnListener
- Parameters:
column
- The column.rowIndex
- The row index selected, -1 for none.
onSelectionChanged
public void onSelectionChanged(VSColumnHeader column, VSRow row, int rowIndex, boolean isSelected)
Called when the row selection is changed to forward to column listeners.- Specified by:
onSelectionChanged
in interfaceIVSColumnListener
- Parameters:
column
- The column.row
- The row that was changed.rowIndex
- The row index.isSelected
- The selected state.
onRowAdded
public void onRowAdded(VSColumnHeader column, VSRow row, int rowIndex)
Called when a row has been added to the table.- Specified by:
onRowAdded
in interfaceIVSColumnListener
- Parameters:
column
- The column.row
- The row that was added.rowIndex
- The row index where it was inserted.
onRowRemoved
public void onRowRemoved(VSColumnHeader column, VSRow row, int rowIndex)
Called when a row has been removed from the table.- Specified by:
onRowRemoved
in interfaceIVSColumnListener
- Parameters:
column
- The column.row
- The row that was removed.rowIndex
- The row index before removal.
onStateChanged
public void onStateChanged(VSColumnHeader column, VSField cell, IVSComponentState.State state, boolean on)
Called when a cell in the column changes state.- Specified by:
onStateChanged
in interfaceIVSColumnListener
- Parameters:
column
- The VS column.cell
- The VS field.state
- The state change.on
- New state.
onCellValueChanged
public void onCellValueChanged(VSColumnHeader column, VSField cell, Value value, GProp<?> trigger, IPostEventProcessing postProcessing)
Called when the cell value is set in the column.- Specified by:
onCellValueChanged
in interfaceIVSColumnListener
- Parameters:
column
- The VS column.cell
- The VS field.value
- The value, never null, butvalue.isNull()
could be true.trigger
- The trigger property that may be null.postProcessing
- Post-processing instance.