Package com.iizix.term.ee
Class EEMaster
- java.lang.Object
- com.iizix.term.ee.EEMaster
public class EEMaster extends java.lang.ObjectLoad the EEM file and appropriate EE files.- Author:
- Christopher Mindus
Field Summary
Fields Modifier and Type Field Description static intFA_3270ISPDHIstatic intFA_3270ISPDMASKstatic intFA_3270ISPDNODISPstatic intFA_3270NUMstatic intFA_5250FTALPHAstatic intFA_5250FTDIGITSstatic intFA_5250FTMASKstatic intFA_5250FTNUMstatic intFA_5250FTNUMSHstatic intFA_5250FTSIGNNUMstatic intFA_5250HIstatic intFA_5250NODISPstatic intFA_PROTstatic intIBIT0static intIBIT1static intIBIT2static intK_ATTENTIONstatic intK_BACKSPACEstatic intK_BACKWARDWORDTABstatic intK_BLUEstatic intK_CAPSLOCKstatic intK_CLEARstatic intK_CMDKEYstatic intK_CURSORDOWNFASTstatic intK_CURSORLEFTFASTstatic intK_CURSORRIGHTFASTstatic intK_CURSORSELECTstatic intK_CURSORUPFASTstatic intK_DBCSstatic intK_DELETEstatic intK_DESTRUCTBACKSPACEstatic intK_DEVICECANCELstatic intK_DOWNstatic intK_EEOFstatic intK_ENDstatic intK_ENTERstatic intK_ERASEINPUTstatic intK_FIELDEXITstatic intK_FIELDMINUSstatic intK_FIELDPLUSstatic intK_FORWARWORDTABstatic intK_GETCURSORstatic intK_GOTOSESS1static intK_GOTOSESS2static intK_GOTOSESS3static intK_GOTOSESS4static intK_GOTOSESS5static intK_GREENstatic intK_HELPstatic intK_HEXADECIMALstatic intK_HOMEstatic intK_INSERTstatic intK_INSERTTOGGLEstatic intK_JUMPstatic intK_LEFTstatic intK_LEFTTABstatic intK_LOCATECURSORstatic intK_NEWLINEstatic intK_NUMLOCKstatic intK_OVERRUNQUEUEstatic intK_PA1static intK_PA2static intK_PA3static intK_PCPRINTstatic intK_PF1static intK_PF10static intK_PF11static intK_PF12static intK_PF13static intK_PF14static intK_PF15static intK_PF16static intK_PF17static intK_PF18static intK_PF19static intK_PF2static intK_PF20static intK_PF21static intK_PF22static intK_PF23static intK_PF24static intK_PF3static intK_PF4static intK_PF5static intK_PF6static intK_PF7static intK_PF8static intK_PF9static intK_PGDOWNstatic intK_PGUPstatic intK_PINKstatic intK_PLUSKEYstatic intK_PMALTCURSORstatic intK_PRINTstatic intK_PRINTPSstatic intK_RECORDBACKSPCEstatic intK_REDstatic intK_RESETstatic intK_RESETHOSTCOLORSstatic intK_RESETREVVIDEOstatic intK_REVERSEVIDEOstatic intK_RIGHTstatic intK_RIGHTTABstatic intK_SCRLKstatic intK_SPACEstatic intK_SYSTEMREQUESTstatic intK_TESTstatic intK_TURQUOISEstatic intK_UNDERSCOREstatic intK_UPstatic intK_WHITEstatic intK_WORDDELETEstatic intK_YELLOW
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddScreen(EEScreen screen)Adds a new EEScreen to the table.booleancanEdit()Checks if this master file can be edited for screen captures, i.e.static voidcatchScreenAsEE(HostSession hostSession, java.io.ByteArrayOutputStream bos, java.lang.String screenName)Catch a screen as EE.static booleancatchScreenAsEE(HostSession hostSession, java.lang.String fileName, java.lang.String screenName, boolean doAppend)Catch a screen as EE.static booleancreateNewEEMFile(java.lang.String newFileName)Create a new, empty EEM file.java.util.ArrayList<EEScreen>getAllScreens()Gets all the screens.intgetDelay()Gets the delay defined for the EEM file.static EEFilegetEEFile(java.lang.String fn)Gets or loads an EE file.static EEMastergetEEMaster(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.StringgetFileName()Gets the name of the EEM file.EEScreengetFirstScreen()Gets the first screen.intgetFlags()Gets the flags defined for the EEM file.EEScreengetInitialScreen()Gets the initial EE screen.EEScreengetLastScreen()Gets the last screen.EELogic[]getLogic()Gets the logic statements for the EEM file.EEScreengetPreviousNextScreen(EEScreen current, int dir)Gets the previous or next screen.EEScreengetScreen(java.lang.String name)Gets the EE screen from a name.voidloadCapture(java.lang.String fn)Loads a captured EE file into the EEM.voidsetDelay(int newDelay)Sets the delay defined for the EEM file.voidsetEEFileNames(java.lang.String[] newNames)Sets the EE file names array defined for the EEM file.voidsetFileName(java.lang.String newName)Sets the name of the EEM file.voidsetFlags(int newFlags)Sets the delay defined for the EEM file.voidsetInitialScreen(int newScreen)Sets the initial screen defined for the EEM file.voidsetLogic(EELogic[] newLogic)Sets the logic statements for the EEM file.voidwrite()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.IOExceptionSets 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.IOExceptionCreate a new, empty EEM file.- Throws:
java.io.IOException
write
public void write() throws java.io.IOExceptionWrite 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.IOExceptionLoads 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.