Package com.iizix.term.ee
Class EEMaster
- java.lang.Object
- com.iizix.term.ee.EEMaster
public class EEMaster extends java.lang.Object
Load the EEM file and appropriate EE files.- Author:
- Christopher Mindus
Field Summary
Fields Modifier and Type Field Description static int
FA_3270ISPDHI
static int
FA_3270ISPDMASK
static int
FA_3270ISPDNODISP
static int
FA_3270NUM
static int
FA_5250FTALPHA
static int
FA_5250FTDIGITS
static int
FA_5250FTMASK
static int
FA_5250FTNUM
static int
FA_5250FTNUMSH
static int
FA_5250FTSIGNNUM
static int
FA_5250HI
static int
FA_5250NODISP
static int
FA_PROT
static int
IBIT0
static int
IBIT1
static int
IBIT2
static int
K_ATTENTION
static int
K_BACKSPACE
static int
K_BACKWARDWORDTAB
static int
K_BLUE
static int
K_CAPSLOCK
static int
K_CLEAR
static int
K_CMDKEY
static int
K_CURSORDOWNFAST
static int
K_CURSORLEFTFAST
static int
K_CURSORRIGHTFAST
static int
K_CURSORSELECT
static int
K_CURSORUPFAST
static int
K_DBCS
static int
K_DELETE
static int
K_DESTRUCTBACKSPACE
static int
K_DEVICECANCEL
static int
K_DOWN
static int
K_EEOF
static int
K_END
static int
K_ENTER
static int
K_ERASEINPUT
static int
K_FIELDEXIT
static int
K_FIELDMINUS
static int
K_FIELDPLUS
static int
K_FORWARWORDTAB
static int
K_GETCURSOR
static int
K_GOTOSESS1
static int
K_GOTOSESS2
static int
K_GOTOSESS3
static int
K_GOTOSESS4
static int
K_GOTOSESS5
static int
K_GREEN
static int
K_HELP
static int
K_HEXADECIMAL
static int
K_HOME
static int
K_INSERT
static int
K_INSERTTOGGLE
static int
K_JUMP
static int
K_LEFT
static int
K_LEFTTAB
static int
K_LOCATECURSOR
static int
K_NEWLINE
static int
K_NUMLOCK
static int
K_OVERRUNQUEUE
static int
K_PA1
static int
K_PA2
static int
K_PA3
static int
K_PCPRINT
static int
K_PF1
static int
K_PF10
static int
K_PF11
static int
K_PF12
static int
K_PF13
static int
K_PF14
static int
K_PF15
static int
K_PF16
static int
K_PF17
static int
K_PF18
static int
K_PF19
static int
K_PF2
static int
K_PF20
static int
K_PF21
static int
K_PF22
static int
K_PF23
static int
K_PF24
static int
K_PF3
static int
K_PF4
static int
K_PF5
static int
K_PF6
static int
K_PF7
static int
K_PF8
static int
K_PF9
static int
K_PGDOWN
static int
K_PGUP
static int
K_PINK
static int
K_PLUSKEY
static int
K_PMALTCURSOR
static int
K_PRINT
static int
K_PRINTPS
static int
K_RECORDBACKSPCE
static int
K_RED
static int
K_RESET
static int
K_RESETHOSTCOLORS
static int
K_RESETREVVIDEO
static int
K_REVERSEVIDEO
static int
K_RIGHT
static int
K_RIGHTTAB
static int
K_SCRLK
static int
K_SPACE
static int
K_SYSTEMREQUEST
static int
K_TEST
static int
K_TURQUOISE
static int
K_UNDERSCORE
static int
K_UP
static int
K_WHITE
static int
K_WORDDELETE
static int
K_YELLOW
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addScreen(EEScreen screen)
Adds a new EEScreen to the table.boolean
canEdit()
Checks if this master file can be edited for screen captures, i.e.static void
catchScreenAsEE(HostSession hostSession, java.io.ByteArrayOutputStream bos, java.lang.String screenName)
Catch a screen as EE.static boolean
catchScreenAsEE(HostSession hostSession, java.lang.String fileName, java.lang.String screenName, boolean doAppend)
Catch a screen as EE.static boolean
createNewEEMFile(java.lang.String newFileName)
Create a new, empty EEM file.java.util.ArrayList<EEScreen>
getAllScreens()
Gets all the screens.int
getDelay()
Gets the delay defined for the EEM file.static EEFile
getEEFile(java.lang.String fn)
Gets or loads an EE file.static EEMaster
getEEMaster(java.lang.String fn)
Creates a shared instance or uses a previous one, reloading changed files if required, with weak memory references to allow smaller memory footprint.java.lang.String
getFileName()
Gets the name of the EEM file.EEScreen
getFirstScreen()
Gets the first screen.int
getFlags()
Gets the flags defined for the EEM file.EEScreen
getInitialScreen()
Gets the initial EE screen.EEScreen
getLastScreen()
Gets the last screen.EELogic[]
getLogic()
Gets the logic statements for the EEM file.EEScreen
getPreviousNextScreen(EEScreen current, int dir)
Gets the previous or next screen.EEScreen
getScreen(java.lang.String name)
Gets the EE screen from a name.void
loadCapture(java.lang.String fn)
Loads a captured EE file into the EEM.void
setDelay(int newDelay)
Sets the delay defined for the EEM file.void
setEEFileNames(java.lang.String[] newNames)
Sets the EE file names array defined for the EEM file.void
setFileName(java.lang.String newName)
Sets the name of the EEM file.void
setFlags(int newFlags)
Sets the delay defined for the EEM file.void
setInitialScreen(int newScreen)
Sets the initial screen defined for the EEM file.void
setLogic(EELogic[] newLogic)
Sets the logic statements for the EEM file.void
write()
Write the content of the instance to a file.
Field Detail
K_LEFTTAB
public static final int K_LEFTTAB
- See Also:
- Constant Field Values
K_CLEAR
public static final int K_CLEAR
- See Also:
- Constant Field Values
K_DELETE
public static final int K_DELETE
- See Also:
- Constant Field Values
K_ENTER
public static final int K_ENTER
- See Also:
- Constant Field Values
K_EEOF
public static final int K_EEOF
- See Also:
- Constant Field Values
K_HELP
public static final int K_HELP
- See Also:
- Constant Field Values
K_INSERT
public static final int K_INSERT
- See Also:
- Constant Field Values
K_JUMP
public static final int K_JUMP
- See Also:
- Constant Field Values
K_LEFT
public static final int K_LEFT
- See Also:
- Constant Field Values
K_NEWLINE
public static final int K_NEWLINE
- See Also:
- Constant Field Values
K_SPACE
public static final int K_SPACE
- See Also:
- Constant Field Values
K_PRINT
public static final int K_PRINT
- See Also:
- Constant Field Values
K_RESET
public static final int K_RESET
- See Also:
- Constant Field Values
K_RIGHTTAB
public static final int K_RIGHTTAB
- See Also:
- Constant Field Values
K_UP
public static final int K_UP
- See Also:
- Constant Field Values
K_DOWN
public static final int K_DOWN
- See Also:
- Constant Field Values
K_DBCS
public static final int K_DBCS
- See Also:
- Constant Field Values
K_CAPSLOCK
public static final int K_CAPSLOCK
- See Also:
- Constant Field Values
K_RIGHT
public static final int K_RIGHT
- See Also:
- Constant Field Values
K_HOME
public static final int K_HOME
- See Also:
- Constant Field Values
K_PF1
public static final int K_PF1
- See Also:
- Constant Field Values
K_PF2
public static final int K_PF2
- See Also:
- Constant Field Values
K_PF3
public static final int K_PF3
- See Also:
- Constant Field Values
K_PF4
public static final int K_PF4
- See Also:
- Constant Field Values
K_PF5
public static final int K_PF5
- See Also:
- Constant Field Values
K_PF6
public static final int K_PF6
- See Also:
- Constant Field Values
K_PF7
public static final int K_PF7
- See Also:
- Constant Field Values
K_PF8
public static final int K_PF8
- See Also:
- Constant Field Values
K_PF9
public static final int K_PF9
- See Also:
- Constant Field Values
K_PF10
public static final int K_PF10
- See Also:
- Constant Field Values
K_PF11
public static final int K_PF11
- See Also:
- Constant Field Values
K_PF12
public static final int K_PF12
- See Also:
- Constant Field Values
K_PF13
public static final int K_PF13
- See Also:
- Constant Field Values
K_PF14
public static final int K_PF14
- See Also:
- Constant Field Values
K_PF15
public static final int K_PF15
- See Also:
- Constant Field Values
K_PF16
public static final int K_PF16
- See Also:
- Constant Field Values
K_PF17
public static final int K_PF17
- See Also:
- Constant Field Values
K_PF18
public static final int K_PF18
- See Also:
- Constant Field Values
K_PF19
public static final int K_PF19
- See Also:
- Constant Field Values
K_PF20
public static final int K_PF20
- See Also:
- Constant Field Values
K_PF21
public static final int K_PF21
- See Also:
- Constant Field Values
K_PF22
public static final int K_PF22
- See Also:
- Constant Field Values
K_PF23
public static final int K_PF23
- See Also:
- Constant Field Values
K_PF24
public static final int K_PF24
- See Also:
- Constant Field Values
K_PLUSKEY
public static final int K_PLUSKEY
- See Also:
- Constant Field Values
K_END
public static final int K_END
- See Also:
- Constant Field Values
K_SCRLK
public static final int K_SCRLK
- See Also:
- Constant Field Values
K_NUMLOCK
public static final int K_NUMLOCK
- See Also:
- Constant Field Values
K_PGUP
public static final int K_PGUP
- See Also:
- Constant Field Values
K_PGDOWN
public static final int K_PGDOWN
- See Also:
- Constant Field Values
K_PA1
public static final int K_PA1
- See Also:
- Constant Field Values
K_PA2
public static final int K_PA2
- See Also:
- Constant Field Values
K_PA3
public static final int K_PA3
- See Also:
- Constant Field Values
K_TEST
public static final int K_TEST
- See Also:
- Constant Field Values
K_WORDDELETE
public static final int K_WORDDELETE
- See Also:
- Constant Field Values
K_FIELDEXIT
public static final int K_FIELDEXIT
- See Also:
- Constant Field Values
K_ERASEINPUT
public static final int K_ERASEINPUT
- See Also:
- Constant Field Values
K_SYSTEMREQUEST
public static final int K_SYSTEMREQUEST
- See Also:
- Constant Field Values
K_INSERTTOGGLE
public static final int K_INSERTTOGGLE
- See Also:
- Constant Field Values
K_CURSORSELECT
public static final int K_CURSORSELECT
- See Also:
- Constant Field Values
K_CURSORLEFTFAST
public static final int K_CURSORLEFTFAST
- See Also:
- Constant Field Values
K_GETCURSOR
public static final int K_GETCURSOR
- See Also:
- Constant Field Values
K_LOCATECURSOR
public static final int K_LOCATECURSOR
- See Also:
- Constant Field Values
K_ATTENTION
public static final int K_ATTENTION
- See Also:
- Constant Field Values
K_DEVICECANCEL
public static final int K_DEVICECANCEL
- See Also:
- Constant Field Values
K_PRINTPS
public static final int K_PRINTPS
- See Also:
- Constant Field Values
K_CURSORUPFAST
public static final int K_CURSORUPFAST
- See Also:
- Constant Field Values
K_CURSORDOWNFAST
public static final int K_CURSORDOWNFAST
- See Also:
- Constant Field Values
K_HEXADECIMAL
public static final int K_HEXADECIMAL
- See Also:
- Constant Field Values
K_CMDKEY
public static final int K_CMDKEY
- See Also:
- Constant Field Values
K_CURSORRIGHTFAST
public static final int K_CURSORRIGHTFAST
- See Also:
- Constant Field Values
K_UNDERSCORE
public static final int K_UNDERSCORE
- See Also:
- Constant Field Values
K_RESETREVVIDEO
public static final int K_RESETREVVIDEO
- See Also:
- Constant Field Values
K_RED
public static final int K_RED
- See Also:
- Constant Field Values
K_PINK
public static final int K_PINK
- See Also:
- Constant Field Values
K_GREEN
public static final int K_GREEN
- See Also:
- Constant Field Values
K_YELLOW
public static final int K_YELLOW
- See Also:
- Constant Field Values
K_BLUE
public static final int K_BLUE
- See Also:
- Constant Field Values
K_TURQUOISE
public static final int K_TURQUOISE
- See Also:
- Constant Field Values
K_WHITE
public static final int K_WHITE
- See Also:
- Constant Field Values
K_RESETHOSTCOLORS
public static final int K_RESETHOSTCOLORS
- See Also:
- Constant Field Values
K_GOTOSESS1
public static final int K_GOTOSESS1
- See Also:
- Constant Field Values
K_GOTOSESS2
public static final int K_GOTOSESS2
- See Also:
- Constant Field Values
K_GOTOSESS3
public static final int K_GOTOSESS3
- See Also:
- Constant Field Values
K_GOTOSESS4
public static final int K_GOTOSESS4
- See Also:
- Constant Field Values
K_GOTOSESS5
public static final int K_GOTOSESS5
- See Also:
- Constant Field Values
K_PCPRINT
public static final int K_PCPRINT
- See Also:
- Constant Field Values
K_FORWARWORDTAB
public static final int K_FORWARWORDTAB
- See Also:
- Constant Field Values
K_BACKWARDWORDTAB
public static final int K_BACKWARDWORDTAB
- See Also:
- Constant Field Values
K_FIELDMINUS
public static final int K_FIELDMINUS
- See Also:
- Constant Field Values
K_FIELDPLUS
public static final int K_FIELDPLUS
- See Also:
- Constant Field Values
K_RECORDBACKSPCE
public static final int K_RECORDBACKSPCE
- See Also:
- Constant Field Values
K_OVERRUNQUEUE
public static final int K_OVERRUNQUEUE
- See Also:
- Constant Field Values
K_PMALTCURSOR
public static final int K_PMALTCURSOR
- See Also:
- Constant Field Values
K_BACKSPACE
public static final int K_BACKSPACE
- See Also:
- Constant Field Values
K_REVERSEVIDEO
public static final int K_REVERSEVIDEO
- See Also:
- Constant Field Values
K_DESTRUCTBACKSPACE
public static final int K_DESTRUCTBACKSPACE
- See Also:
- Constant Field Values
FA_PROT
public static final int FA_PROT
- See Also:
- Constant Field Values
FA_3270NUM
public static final int FA_3270NUM
- See Also:
- Constant Field Values
FA_3270ISPDMASK
public static final int FA_3270ISPDMASK
- See Also:
- Constant Field Values
FA_3270ISPDHI
public static final int FA_3270ISPDHI
- See Also:
- Constant Field Values
FA_3270ISPDNODISP
public static final int FA_3270ISPDNODISP
- See Also:
- Constant Field Values
FA_5250NODISP
public static final int FA_5250NODISP
- See Also:
- Constant Field Values
FA_5250HI
public static final int FA_5250HI
- See Also:
- Constant Field Values
FA_5250FTMASK
public static final int FA_5250FTMASK
- See Also:
- Constant Field Values
FA_5250FTALPHA
public static final int FA_5250FTALPHA
- See Also:
- Constant Field Values
FA_5250FTNUMSH
public static final int FA_5250FTNUMSH
- See Also:
- Constant Field Values
FA_5250FTNUM
public static final int FA_5250FTNUM
- See Also:
- Constant Field Values
FA_5250FTDIGITS
public static final int FA_5250FTDIGITS
- See Also:
- Constant Field Values
FA_5250FTSIGNNUM
public static final int FA_5250FTSIGNNUM
- See Also:
- Constant Field Values
IBIT2
public static final int IBIT2
- See Also:
- Constant Field Values
IBIT1
public static final int IBIT1
- See Also:
- Constant Field Values
IBIT0
public static final int IBIT0
- See Also:
- Constant Field Values
Method Detail
getEEMaster
public static EEMaster getEEMaster(java.lang.String fn) throws java.io.IOException
Creates a shared instance or uses a previous one, reloading changed files if required, with weak memory references to allow smaller memory footprint.- Throws:
java.io.IOException
- for file failures.
getEEFile
public static EEFile getEEFile(java.lang.String fn) throws java.io.IOException
Gets or loads an EE file.- Throws:
java.io.IOException
- for file failures.
catchScreenAsEE
public static void catchScreenAsEE(HostSession hostSession, java.io.ByteArrayOutputStream bos, java.lang.String screenName) throws java.io.IOException
Catch a screen as EE.The screen name must be 1 through 20 characters long using the default ASCII (OEM) character set, otherwise an IOException is thrown.
- Throws:
java.io.IOException
- for file errors.
catchScreenAsEE
public static boolean catchScreenAsEE(HostSession hostSession, java.lang.String fileName, java.lang.String screenName, boolean doAppend) throws java.io.IOException
Catch a screen as EE.The screen name must be 1 through 20 characters long using the default ASCII (OEM) character set, otherwise an IOException is thrown.
The flag "doAppend" indicates if the screen name should be appended to the file name specified. If the file exists prior to calling this method with "doAppend=false", the file is overwritten.
- Returns:
- false if the screen name already exists, true for success.
- Throws:
java.io.IOException
- for file errors.
getFileName
public java.lang.String getFileName()
Gets the name of the EEM file.
setFileName
public void setFileName(java.lang.String newName)
Sets the name of the EEM file.
setEEFileNames
public void setEEFileNames(java.lang.String[] newNames) throws java.io.IOException
Sets the EE file names array defined for the EEM file.- Throws:
java.io.IOException
setInitialScreen
public void setInitialScreen(int newScreen)
Sets the initial screen defined for the EEM file.
getFlags
public int getFlags()
Gets the flags defined for the EEM file.
setFlags
public void setFlags(int newFlags)
Sets the delay defined for the EEM file.
getDelay
public int getDelay()
Gets the delay defined for the EEM file.
setDelay
public void setDelay(int newDelay)
Sets the delay defined for the EEM file.
setLogic
public void setLogic(EELogic[] newLogic)
Sets the logic statements for the EEM file.
createNewEEMFile
public static boolean createNewEEMFile(java.lang.String newFileName) throws java.io.IOException
Create a new, empty EEM file.- Throws:
java.io.IOException
write
public void write() throws java.io.IOException
Write the content of the instance to a file.- Throws:
java.io.IOException
addScreen
public void addScreen(EEScreen screen)
Adds a new EEScreen to the table.
getInitialScreen
public EEScreen getInitialScreen()
Gets the initial EE screen.- Returns:
- The initial screen, or null for none.
getScreen
public EEScreen getScreen(java.lang.String name)
Gets the EE screen from a name.- Returns:
- null if not found.
getAllScreens
public java.util.ArrayList<EEScreen> getAllScreens()
Gets all the screens.
getFirstScreen
public EEScreen getFirstScreen()
Gets the first screen.- Returns:
- The first screen, or null if none are present.
getLastScreen
public EEScreen getLastScreen()
Gets the last screen.- Returns:
- The last screen, or null if none are present.
getPreviousNextScreen
public EEScreen getPreviousNextScreen(EEScreen current, int dir)
Gets the previous or next screen.- Parameters:
dir
- direction to move, set to -1 for previous or 1 for next.- Returns:
- null if not found.
getLogic
public EELogic[] getLogic()
Gets the logic statements for the EEM file.- Returns:
- null if no logic statements are found.
loadCapture
public void loadCapture(java.lang.String fn) throws java.io.IOException
Loads a captured EE file into the EEM.- Parameters:
fn
- The file name.- Throws:
java.io.IOException
- For file errors.
canEdit
public boolean canEdit()
Checks if this master file can be edited for screen captures, i.e. just one file with one screen.