|
CICS® Transaction Gateway Programming Reference V3.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--com.ibm.ctg.epi.EPIBasicScreenHandler
This class is an all-purpose screen handler that deals with any screen by displaying the fields as Textfields and Labels in a Panel.
Inner Class Summary | |
(package private) class |
EPIBasicScreenHandler.GeneralScreenHandler
This is the ScreenHandler inner class. |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AWTTreeLock |
Field Summary | |
protected java.awt.GridBagConstraints |
c
GridBagConstraints used when inserting new components into the display panel, which has a GridBagLayout. |
protected Field |
cursored
the Field which currently contains the screen cursor. |
protected AID |
exitKey
the AID key that will be used to try to exit a running transaction. |
protected ScreenHandler |
handler
Reference to ScreenHandler inner class. |
protected int |
minHeight
minimum height of this panel. |
protected int |
minWidth
minimum width of this panel. |
protected int |
screenWidth
the width of the screen in columns |
Fields inherited from class java.awt.Container |
component,
containerListener,
layoutMgr,
ncomponents |
Fields inherited from class java.awt.Component |
actionListenerK,
adjustmentListenerK,
appContext,
background,
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
componentListener,
componentListenerK,
componentOrientation,
containerListenerK,
cursor,
dropTarget,
enabled,
eventMask,
focusListener,
focusListenerK,
font,
foreground,
hasFocus,
height,
incRate,
inputMethodListener,
inputMethodListenerK,
isInc,
isPacked,
itemListenerK,
keyListener,
keyListenerK,
LEFT_ALIGNMENT,
locale,
LOCK,
minSize,
mouseListener,
mouseListenerK,
mouseMotionListener,
mouseMotionListenerK,
newEventsOnly,
ownedWindowK,
parent,
peer,
peerFont,
popups,
prefSize,
RIGHT_ALIGNMENT,
textListenerK,
TOP_ALIGNMENT,
valid,
visible,
width,
windowListenerK,
x,
y |
Constructor Summary | |
EPIBasicScreenHandler()
Constructs the EPIBasicScreenHandler. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent evt)
Handle an actionPerfomed event. |
protected void |
addField(Field f)
Creates a component for a new field and add it to the user interface. |
void |
addScreenEventListener(ScreenEventListener l)
The specified ScreenEventListener will be called when this ScreenHandler gains control of the screen and again when it loses control. |
protected void |
clearDisplay()
Clears the display |
protected java.awt.Component |
createComponent(Field f)
Returns a new component to be mapped to the field, or null if none is required. |
void |
exceptionOccurred(TerminalEvent evt)
Handles a terminal exception event. |
void |
exitScreen()
Exit the screen. |
void |
focusGained(java.awt.event.FocusEvent foc)
Handles the focus gained event by setting the screen cursor to the relevant field. |
void |
focusLost(java.awt.event.FocusEvent foc)
Handles the focus lost event by doing nothing. |
AID |
getAID()
Returns the AID that will be sent to CICS. |
Field |
getCursorPosition()
Returns the Field which contains the screen cursor. |
AID |
getExitKey()
Returns the AID that will be used to exit any transaction that is running when the terminal is disconnected. |
protected Field |
getField(java.awt.Component comp)
Returns the field associated with a component |
java.awt.Dimension |
getMaximumSize()
Returns the maximum dimensions of this panel, ensuring that the width and height are at least as large as the minimum width and height settings. |
int |
getMinimumHeight()
Returns the minimum height setting |
java.awt.Dimension |
getMinimumSize()
Returns the minimum dimensions of this panel, ensuring that the width and height are at least as large as the minimum width and height settings. |
int |
getMinimumWidth()
Returns the minimum width setting |
java.awt.Dimension |
getPreferredSize()
Returns the preferred dimensions of this panel, ensuring that the width and height are at least as large as the minimum width and height settings. |
void |
handleScreen(TerminalEvent evt)
Handle a newly arrived screen. |
boolean |
isHandling()
Returns true if the ScreenHandler is handling. |
void |
removeScreenEventListener(ScreenEventListener l)
Remove this ScreenEventListener from the internal list. |
void |
send()
Send the screen to CICS. |
void |
setAID(AID aid)
Set the AID to send back to CICS. |
void |
setCursorPosition(Field f)
Sets the screen cursor to the beginning of this Field. |
void |
setExitKey(AID aid)
Sets the AID that will be used to exit any transaction that is running when the terminal is disconnected. |
protected void |
setField(java.awt.Component comp,
Field f)
Sets the field associated with a component |
void |
setMinimumHeight(int h)
Sets the minimum height setting |
void |
setMinimumWidth(int w)
Sets the minimum width setting |
void |
terminalConnected(TerminalEvent evt)
Handles a terminal connect event. |
void |
terminalDisconnected(TerminalEvent evt)
Handles a terminal disconnect event. |
void |
textValueChanged(java.awt.event.TextEvent evt)
Handles the text value changed event by setting the text in the relevant field. |
protected void |
updateField(java.awt.Component comp,
Field f)
Update the field on the basis of it's associated component, eg: for a TextField, the field's text is set from the TextField's contents. |
Methods inherited from class java.awt.Panel |
|
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
applyOrientation,
countComponents,
deliverEvent,
dispatchEventImpl,
dispatchEventToSelf,
doLayout,
eventEnabled,
findComponentAt,
findComponentAt,
getAlignmentX,
getAlignmentY,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents_NoClientCode,
getComponents,
getInsets,
getLayout,
getMouseEventTarget,
getWindow,
insets,
invalidate,
invalidateTree,
isAncestorOf,
layout,
lightweightPrint,
list,
list,
locate,
minimumSize,
nextFocus,
paint,
paintComponents,
paramString,
postProcessKeyEvent,
postsOldMouseEvents,
preferredSize,
preProcessKeyEvent,
print,
printComponents,
processContainerEvent,
processEvent,
proxyEnableEvents,
proxyRequestFocus,
remove,
remove,
removeAll,
removeContainerListener,
removeNotify,
setFocusOwner,
setFont,
setLayout,
transferFocus,
update,
validate,
validateTree |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
areInputMethodsEnabled,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont_NoClientCode,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getNativeContainer,
getParent_NoClientCode,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getToolkitImpl,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isEnabledImpl,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
printAll,
processComponentEvent,
processFocusEvent,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected int screenWidth
protected java.awt.GridBagConstraints c
protected ScreenHandler handler
protected int minWidth
protected int minHeight
protected AID exitKey
protected Field cursored
Constructor Detail |
public EPIBasicScreenHandler()
Method Detail |
public int getMinimumWidth()
public int getMinimumHeight()
public void setMinimumWidth(int w)
w
- the minimum widthpublic void setMinimumHeight(int h)
h
- the minimum heightpublic java.awt.Dimension getMinimumSize()
public java.awt.Dimension getPreferredSize()
public java.awt.Dimension getMaximumSize()
public void setExitKey(AID aid)
aid
- the AIDpublic AID getExitKey()
public void addScreenEventListener(ScreenEventListener l)
l
- the ScreenEventListenerremoveScreenEventListener(com.ibm.ctg.epi.ScreenEventListener)
public void removeScreenEventListener(ScreenEventListener l)
l
- the ScreenEventListeneraddScreenEventListener(com.ibm.ctg.epi.ScreenEventListener)
public void terminalConnected(TerminalEvent evt)
evt
- the terminal eventpublic void terminalDisconnected(TerminalEvent evt)
evt
- the terminal eventpublic void exceptionOccurred(TerminalEvent evt)
evt
- the terminal eventpublic void handleScreen(TerminalEvent evt)
evt
- the terminal eventpublic boolean isHandling()
public void setAID(AID aid)
aid
- the AIDpublic AID getAID()
public void send()
public Field getCursorPosition()
public void setCursorPosition(Field f)
f
- the field where the cursor should be moved toprotected final Field getField(java.awt.Component comp)
comp
- the componentprotected final void setField(java.awt.Component comp, Field f)
comp
- the componentf
- the fieldprotected java.awt.Component createComponent(Field f)
f
- the fieldprotected void updateField(java.awt.Component comp, Field f)
comp
- the componentpublic void focusGained(java.awt.event.FocusEvent foc)
foc
- the focus eventpublic void focusLost(java.awt.event.FocusEvent foc)
foc
- the focus eventpublic void textValueChanged(java.awt.event.TextEvent evt)
evt
- the text eventprotected void clearDisplay()
protected void addField(Field f)
createComponent
is called to create a component to map to the field.
This method then places the new component into the panel.f
- the fieldpublic void actionPerformed(java.awt.event.ActionEvent evt)
updateField
, the AID set
to enter, and the screen sent to CICS.
Otherwise the action command received is assumed to be an AID, which is set if
valid, then the screen is sent to CICS.evt
- the action eventpublic void exitScreen()
|
© Copyright IBM Corp. 1994, 1999 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |