Package com.iizix.term.ee
Class EEScreen
- java.lang.Object
- com.iizix.term.ee.EEScreen
public class EEScreen extends java.lang.ObjectLoads the EE screen from the EE file. It also contains the routines required to edit the screen capture.- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description EEScreen(HostSession hostSession, java.lang.String fileName, java.lang.String screenName, boolean isSingleScreen)Creates a new EE screen for the current screen in a host session.EEScreen(java.lang.String fn, java.lang.String name, XFile f, int version, boolean isSingleScreen)Loads the EE screen containing the host screen definition and the host fields.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanareChanged(EEField[] fields)Checks if fields are changed.booleandeleteField(int pos)Delete a field at cursor.PositiongetCursorPos()Gets the initial cursor position.EEField[]getFields()Gets the fields.java.lang.StringgetFileName()Gets the file name where this screen is store in.intgetHeight()Gets the screen height.java.lang.StringgetName()Gets this screen name.voidgetScreenData(char[] chs, int[] cas)Gets the screen data in HostScreen format.intgetScreenLength()Gets the current screen length (width * height).SizegetScreenSize()Gets the screen size.intgetWidth()Gets the screen width.booleanhasUnderline(HostField f)Checks if the field has underline.booleanis3270()Checks if this screen is 3270 (it is 5250 otherwise).booleanisFieldFormatted()Checks if this host screen is field formatted.booleanisSingleScreen()Check if this screen is the single screen in a file.booleanisUnderlined(EEField field)Gets the underlined state of the field.voidrefreshHostFields(HostFields fields)Refreshes the host fields of the current session.voidsetBackground(int pos, int len, int color)Assigns background character color.voidsetCursorPos(int x, int y)Assigns the initial cursor position.voidsetForeground(int pos, int len, int index)Assigns foreground character color.voidsetRefreshedFields(EEField[] fields)Sets new fields after rebuild, removing previous underlines.voidsetUnderlined(int pos, boolean on)Applies underline.
Constructor Detail
EEScreen
public EEScreen(java.lang.String fn, java.lang.String name, XFile f, int version, boolean isSingleScreen) throws java.io.IOExceptionLoads the EE screen containing the host screen definition and the host fields.- Throws:
java.io.IOException- for file failures.
EEScreen
public EEScreen(HostSession hostSession, java.lang.String fileName, java.lang.String screenName, boolean isSingleScreen)
Creates a new EE screen for the current screen in a host session.
Method Detail
isSingleScreen
public boolean isSingleScreen()
Check if this screen is the single screen in a file.
getName
public java.lang.String getName()
Gets this screen name.
getFileName
public java.lang.String getFileName()
Gets the file name where this screen is store in.
is3270
public boolean is3270()
Checks if this screen is 3270 (it is 5250 otherwise).
getScreenSize
public Size getScreenSize()
Gets the screen size.
getScreenLength
public int getScreenLength()
Gets the current screen length (width * height).
getWidth
public int getWidth()
Gets the screen width.
getHeight
public int getHeight()
Gets the screen height.
getFields
public EEField[] getFields()
Gets the fields.
getCursorPos
public Position getCursorPos()
Gets the initial cursor position.
getScreenData
public void getScreenData(char[] chs, int[] cas)Gets the screen data in HostScreen format.
setUnderlined
public void setUnderlined(int pos, boolean on)Applies underline.
hasUnderline
public boolean hasUnderline(HostField f)
Checks if the field has underline.
isUnderlined
public boolean isUnderlined(EEField field)
Gets the underlined state of the field.
setForeground
public void setForeground(int pos, int len, int index)Assigns foreground character color.
setBackground
public void setBackground(int pos, int len, int color)Assigns background character color.
areChanged
public boolean areChanged(EEField[] fields)
Checks if fields are changed.
setRefreshedFields
public void setRefreshedFields(EEField[] fields)
Sets new fields after rebuild, removing previous underlines.
setCursorPos
public void setCursorPos(int x, int y)Assigns the initial cursor position.
deleteField
public boolean deleteField(int pos)
Delete a field at cursor. If a field ends in this position and another one starts there, merge them.- Returns:
- true for change, false for no change.
isFieldFormatted
public boolean isFieldFormatted()
Checks if this host screen is field formatted. This method is not like the one in HostScreen, this one checks directly to see if any fields are present.
refreshHostFields
public void refreshHostFields(HostFields fields)
Refreshes the host fields of the current session. The host session will add all available host fields sorted left to right, top to bottom.