All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.eNetwork.beans.HOD.KeyPad
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----com.ibm.eNetwork.beans.HOD.HODPanelBean
|
+----com.ibm.eNetwork.beans.HOD.KeyPad
- public class KeyPad
- extends HODPanelBean
KeyPad is a Bean that allows users to execute keyboard functions
and send aid keys to the host with the click of a mouse.
The KeyPad can be represented as either two horizontal rows of buttons
or two vertical rows of buttons on a single panel depending upon how
it is configured. The KeyPad is comprised of two pads that are both
accessible via the 'NextPad' button on the pad itself. Clicking the
'NextPad' button swaps the current pad for the next one. The KeyPad
can also be displayed with radio buttons for switching between the
pads.
KeyPad is sensitive to both the session type and codepage and will
display a different pad for 3270/5250/CICS and VT sessions and for
single-byte, double-byte, and bi-directional codepages.
The KeyPad Bean has a set of public properties that can be accessed
through the standard bean accessor methods. For example, KeyPad has
a shape property that controls the appearance of the Bean. Shape
is a read/write property and correspondingly has a getShape() method
and a setShape() method that provide access to the property.
The properties can also be initialized when the bean is constructed using
a java.util.Properties object with the appropriate keyword/value pairs.
In the java.util.Properties object, the keyword for properties
is the same as the property name. For example, the keyword for the
shape property is "shape"--the constant, SHAPE, is provided for convenience.
The shape property is an enumeration for which the valid values are S2X11
or S11X2.
Properties
* - Properties with type "enum" are String types that accept a specific set
of string values. The valid values for an enum property can be obtained by calling the list<property name>
method. The set method for enum properties will validate the value before any changes are accepted, and a PropertyVetoException
will be thrown if an incorrect value is given.
Note: All properties are bound and vetoable. A PropertyChangeEvent is fired
to all PropertyChangeListeners after a property is changed. A VetoableChangeEvent is fired to all VetoableChangeListeners
before a property is changed. VetoableChangeListeners can veto a property change by throwing a PropertyVetoException.
Property Name |
Type |
Default
|
Access |
sessionType |
enum* |
See Session |
read/write |
codePage |
enum* |
See Session |
read/write |
shape |
enum* |
S2X11 |
read/write |
radioButtonsVisible |
Boolean |
false |
read/write |
pad |
enum* |
PAD_1 |
read/write |
Events Fired
Event Type |
Fired To |
Event Handler Method |
SendKeyEvent - Fired
when a button on the KeyPad is clicked. Contains the keystroke or function specified by the button formatted as
an ECLPS.SendKeys() style mnemonic keyword. |
Terminal, Screen,
Session |
sendKeys(SendKeyEvent) |
FocusEvent - Fired when the KeyPad Bean gains focus. |
Any FocusListener |
focusGained(FocusEvent) |
PropertyChangeEvent - Fired when a property of the Bean is changed. |
Any PropertyChangeListener |
propertyChange(propertyChangeEvent) |
VetoableChangeEvent - Fired when a vetoable property of the Bean is changed. |
Any VetoableChangeListener |
vetoableChange(PropertyChangeEvent) |
Events Accepted
Event Type |
Fired From |
Event Handler Method |
PropertyChangeEvent |
Terminal, Session |
propertyChange(propertyChangeEvent) |
-
CODE_PAGE
- codePage property keyword
-
PAD
- pad property keyword
-
PAD_1
- pad property value - key pad 1
-
PAD_2
- pad property value - key pad 2
-
RADIO_BUTTONS_VISIBLE
- radioButtonsVisible property keyword
-
S11X2
- shape property value - 11 rows by 2 columns
-
S2X11
- shape property value - 2 rows by 11 columns
-
SESSION_TYPE
- sessionType property keyword
-
SHAPE
- shape property keyword
-
KeyPad()
- Constructor that uses the default values for all properties.
-
KeyPad(Properties)
- Constructor that takes a Properties object containing the initial
property settings.
-
addSendKeyListener(SendKeyListener)
-
-
defaults()
- Returns a Properties object containing the default properties
for this Bean.
-
getCodePage()
- Returns the value of the codePage property.
-
getFontSize()
- Returns the current font size.
-
getPad()
- Returns the value of the pad property.
-
getSessionType()
- Returns the value of the sessionType property.
-
getShape()
- Returns the value of the shape property.
-
getTraceName()
- Returns the trace name for this object.
-
isRadioButtonsVisible()
- Returns the value of the radioButtonsVisible property.
-
listPads()
- Enumerates the list of pads.
-
listShapes()
- Enumerates the list of valid shapes.
-
propertyChange(PropertyChangeEvent)
- PropertyChangeListener interface method.
-
removeSendKeyListener(SendKeyListener)
- Removes the specified SendKeyListener so that it no longer receives
SendKeyEvents.
-
setCodePage(String)
- Sets the codePage property.
-
setFont(Font)
- Sets the font property.
-
setFontSize(int)
- Sets the font size.
-
setPad(String)
- Sets the pad property.
-
setRadioButtonsVisible(boolean)
- Sets the radioButtonsVisible property.
-
setSessionType(String)
- Sets the sessionType property.
-
setShape(String)
- Sets the shape property.
-
setSize(Dimension)
- Sets the size of KeyPad.
-
setSize(int, int)
- Sets the size of KeyPad.
SESSION_TYPE
public static final String SESSION_TYPE
- sessionType property keyword
CODE_PAGE
public static final String CODE_PAGE
- codePage property keyword
SHAPE
public static final String SHAPE
- shape property keyword
S2X11
public static final String S2X11
- shape property value - 2 rows by 11 columns
S11X2
public static final String S11X2
- shape property value - 11 rows by 2 columns
PAD
public static final String PAD
- pad property keyword
PAD_1
public static final String PAD_1
- pad property value - key pad 1
PAD_2
public static final String PAD_2
- pad property value - key pad 2
RADIO_BUTTONS_VISIBLE
public static final String RADIO_BUTTONS_VISIBLE
- radioButtonsVisible property keyword
KeyPad
public KeyPad()
- Constructor that uses the default values for all properties.
KeyPad
public KeyPad(Properties p) throws PropertyVetoException
- Constructor that takes a Properties object containing the initial
property settings. Any properties that are not specified in the
Properties object are defaulted.
- Parameters:
- p - Properties for the Bean.
- Throws: PropertyVetoException
- Fired if an incorrect property value
is given.
setSessionType
public void setSessionType(String type) throws PropertyVetoException
- Sets the sessionType property.
- Parameters:
- type - The session type to use. Valid values for sessionType
are the same as those for the
Session
Bean.
- Throws: PropertyVetoException
- Thrown if an incorrect
parameter is specified.
- See Also:
- getSessionType
getSessionType
public String getSessionType()
- Returns the value of the sessionType property.
- See Also:
- setSessionType
setCodePage
public void setCodePage(String codePage) throws PropertyVetoException
- Sets the codePage property.
- Parameters:
- codePage - The code page to use. Valid values for codePage
are the same as those for the
Session
Bean.
- Throws: PropertyVetoException
- Thrown if an incorrect value is
specified.
- See Also:
- getCodePage
getCodePage
public String getCodePage()
- Returns the value of the codePage property.
- See Also:
- setCodePage
setShape
public synchronized void setShape(String shape) throws PropertyVetoException
- Sets the shape property.
- Parameters:
- shape - The shape to use. The valid values are S2X11 for a KeyPad
with 2 rows and 11 columns or S11X2 for one with 11 rows
and 2 columns.
- Throws: PropertyVetoException
- Thrown if an incorrect value is
specified.
- See Also:
- getShape, listShapes, S2X11, S11X2
getShape
public String getShape()
- Returns the value of the shape property.
- See Also:
- setShape
listShapes
public static Enumeration listShapes()
- Enumerates the list of valid shapes.
- See Also:
- setShape
setPad
public synchronized void setPad(String pad) throws PropertyVetoException
- Sets the pad property.
- Parameters:
- pad - The pad to display. The valid values are PAD_1 or PAD_2.
- Throws: PropertyVetoException
- Thrown if an incorrect value is
specified.
- See Also:
- getPad, listPads, PAD_1, PAD_2
getPad
public String getPad()
- Returns the value of the pad property.
- See Also:
- setPad
listPads
public static Enumeration listPads()
- Enumerates the list of pads.
- See Also:
- setPad
setSize
public void setSize(Dimension d)
- Sets the size of KeyPad.
- Overrides:
- setSize in class Component
setSize
public void setSize(int w,
int h)
- Sets the size of KeyPad.
- Overrides:
- setSize in class Component
setRadioButtonsVisible
public void setRadioButtonsVisible(boolean show) throws PropertyVetoException
- Sets the radioButtonsVisible property.
- Parameters:
- show - Whether the KeyPad will show the radio buttons for the
different pads.
- Throws: PropertyVetoException
- Thrown if a
VetoableChangeListener rejects the change.
- See Also:
- isRadioButtonsVisible
isRadioButtonsVisible
public boolean isRadioButtonsVisible()
- Returns the value of the radioButtonsVisible property.
- See Also:
- setRadioButtonsVisible
setFontSize
public void setFontSize(int size)
- Sets the font size.
- Parameters:
- size - The new font size.
- See Also:
- getFontSize
getFontSize
public int getFontSize()
- Returns the current font size.
- See Also:
- setFontSize
setFont
public void setFont(Font font)
- Sets the font property.
- Parameters:
- font - The new font.
- Overrides:
- setFont in class Component
propertyChange
public synchronized void propertyChange(PropertyChangeEvent evt)
- PropertyChangeListener interface method. This method is called when
other Beans that KeyPad is listening to fire PropertyChangeEvents.
KeyPad is sensitive to both sessionType and codePage properties of
other Beans such as the Terminal or Session Beans. When the sessionType
or codePage changes on a Bean that KeyPad is listening to, KeyPad will
change it's own property to match. This can cause KeyPad to
re-initialize itself based on the new settings.
- Overrides:
- propertyChange in class HODPanelBean
getTraceName
public String getTraceName()
- Returns the trace name for this object.
- Overrides:
- getTraceName in class HODPanelBean
defaults
public static Properties defaults()
- Returns a Properties object containing the default properties
for this Bean.
addSendKeyListener
public synchronized void addSendKeyListener(SendKeyListener listener)
removeSendKeyListener
public synchronized void removeSendKeyListener(SendKeyListener listener)
- Removes the specified SendKeyListener so that it no longer receives
SendKeyEvents.
- Parameters:
- listener - The SendKeyListener to be removed.
- See Also:
- addSendKeyListener
All Packages Class Hierarchy This Package Previous Next Index