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 vetoable PropertyChangeEvent 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)
Vetoable PropertyChangeEvent - 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)


Variable Index

 o CODE_PAGE
codePage property keyword
 o FONT_SIZE
font size property keyword
 o PAD
pad property keyword
 o PAD_1
pad property value - key pad 1
 o PAD_2
pad property value - key pad 2
 o RADIO_BUTTONS_VISIBLE
radioButtonsVisible property keyword
 o S11X2
shape property value - 11 rows by 2 columns
 o S2X11
shape property value - 2 rows by 11 columns
 o SESSION_TYPE
sessionType property keyword
 o SHAPE
shape property keyword

Constructor Index

 o KeyPad()
Constructor that uses the default values for all properties.
 o KeyPad(Properties)
Constructor that takes a Properties object containing the initial property settings.

Method Index

 o addSendKeyListener(SendKeyListener)
 o defaults()
Returns a Properties object containing the default properties for this Bean.
 o getCodePage()
Returns the value of the codePage property.
 o getFontSize()
Returns the current font size.
 o getPad()
Returns the value of the pad property.
 o getSessionType()
Returns the value of the sessionType property.
 o getShape()
Returns the value of the shape property.
 o getTraceName()
Returns the trace name for this object.
 o isRadioButtonsVisible()
Returns the value of the radioButtonsVisible property.
 o listPads()
Enumerates the list of pads.
 o listShapes()
Enumerates the list of valid shapes.
 o propertyChange(PropertyChangeEvent)
PropertyChangeListener interface method.
 o removeButtons(String[])
 o removeSendKeyListener(SendKeyListener)
Removes the specified SendKeyListener so that it no longer receives SendKeyEvents.
 o setCodePage(String)
Sets the codePage property.
 o setFont(Font)
Sets the font property.
 o setFontSize(int)
Sets the font size.
 o setPad(String)
Sets the pad property.
 o setRadioButtonsVisible(boolean)
Sets the radioButtonsVisible property.
 o setSessionType(String)
Sets the sessionType property.
 o setShape(String)
Sets the shape property.
 o setSize(Dimension)
Sets the size of KeyPad.
 o setSize(int, int)
Sets the size of KeyPad.

Variables

 o SESSION_TYPE
 public static final String SESSION_TYPE
sessionType property keyword

 o CODE_PAGE
 public static final String CODE_PAGE
codePage property keyword

 o SHAPE
 public static final String SHAPE
shape property keyword

 o S2X11
 public static final String S2X11
shape property value - 2 rows by 11 columns

 o S11X2
 public static final String S11X2
shape property value - 11 rows by 2 columns

 o PAD
 public static final String PAD
pad property keyword

 o PAD_1
 public static final String PAD_1
pad property value - key pad 1

 o PAD_2
 public static final String PAD_2
pad property value - key pad 2

 o RADIO_BUTTONS_VISIBLE
 public static final String RADIO_BUTTONS_VISIBLE
radioButtonsVisible property keyword

 o FONT_SIZE
 public static final String FONT_SIZE
font size property keyword

Constructors

 o KeyPad
 public KeyPad()
Constructor that uses the default values for all properties.

 o 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.

Methods

 o 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
 o getSessionType
 public String getSessionType()
Returns the value of the sessionType property.

See Also:
setSessionType
 o 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
 o getCodePage
 public String getCodePage()
Returns the value of the codePage property.

See Also:
setCodePage
 o 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
 o getShape
 public String getShape()
Returns the value of the shape property.

See Also:
setShape
 o listShapes
 public static Enumeration listShapes()
Enumerates the list of valid shapes.

See Also:
setShape
 o 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
 o getPad
 public String getPad()
Returns the value of the pad property.

See Also:
setPad
 o listPads
 public static Enumeration listPads()
Enumerates the list of pads.

See Also:
setPad
 o setSize
 public void setSize(Dimension d)
Sets the size of KeyPad.

Overrides:
setSize in class Component
 o setSize
 public void setSize(int w,
                     int h)
Sets the size of KeyPad.

Overrides:
setSize in class Component
 o 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
 o isRadioButtonsVisible
 public boolean isRadioButtonsVisible()
Returns the value of the radioButtonsVisible property.

See Also:
setRadioButtonsVisible
 o setFontSize
 public void setFontSize(int size)
Sets the font size.

Parameters:
size - The new font size.
See Also:
getFontSize
 o getFontSize
 public int getFontSize()
Returns the current font size.

See Also:
setFontSize
 o setFont
 public void setFont(Font font)
Sets the font property.

Parameters:
font - The new font.
Overrides:
setFont in class Component
 o 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
 o getTraceName
 public String getTraceName()
Returns the trace name for this object.

Overrides:
getTraceName in class HODPanelBean
 o defaults
 public static Properties defaults()
Returns a Properties object containing the default properties for this Bean.

 o addSendKeyListener
 public synchronized void addSendKeyListener(SendKeyListener listener)
 o 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
 o removeButtons
 public void removeButtons(String id[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index