bea.jolt.beans.awt
Class JoltTextField

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.TextComponent
          extended byjava.awt.TextField
              extended bybea.jolt.beans.awt.JoltTextField
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, JoltOutputListener, java.awt.MenuContainer, java.io.Serializable, java.awt.event.TextListener

public class JoltTextField
extends java.awt.TextField
implements JoltOutputListener, java.awt.event.TextListener

This is a Jolt-aware extension of java.awt.TextField that is linked to a specific Jolt field by its JoltFieldName property. It can be wired up with JoltServiceBeans in two ways:

In the first case JoltTextField sends JoltInputEvents to its listeners when its contents changes. In the second case a JoltTextField listens to JoltOutputEvents from JoltServiceBeans and updates its content accordingly.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JoltTextField()
          Constructor
 
Method Summary
 void addJoltInputListener(JoltInputListener l)
          Registration method for JoltInput listeners.
 java.lang.String getJoltFieldName()
          Get the Jolt field name corresponding to this JoltTextField.
 JoltInputEvent getJoltInputEvent()
          Get the current JoltInputEvent object that was sent for textValueChanged.
 int getOccurrenceIndex()
          Get the occurrence index of the field represented by this JoltTextField.
 void removeJoltInputListener(JoltInputListener l)
          This method is used to unregister JoltInput listeners.
 void serviceReturned(JoltOutputEvent evt)
          Handler method for JoltOutputEvents.
 void setJoltFieldName(java.lang.String name)
          Set the Jolt field name corresponding to this JoltTextField.
 void setOccurrenceIndex(int occurrence)
          Set the occurrence index of the field represented by this JoltTextField.
 void textValueChanged(java.awt.event.TextEvent e)
          Event handler for TextEvents.
 
Methods inherited from class java.awt.TextField
addActionListener, addNotify, echoCharIsSet, getAccessibleContext, getActionListeners, getColumns, getEchoChar, getListeners, getMinimumSize, getMinimumSize, getPreferredSize, getPreferredSize, minimumSize, minimumSize, preferredSize, preferredSize, removeActionListener, setColumns, setEchoChar, setEchoCharacter, setText
 
Methods inherited from class java.awt.TextComponent
addTextListener, enableInputMethods, getBackground, getCaretPosition, getSelectedText, getSelectionEnd, getSelectionStart, getText, getTextListeners, isEditable, removeNotify, removeTextListener, select, selectAll, setBackground, setCaretPosition, setEditable, setSelectionEnd, setSelectionStart
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, getAlignmentX, getAlignmentY, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JoltTextField

public JoltTextField()
Constructor

Method Detail

getJoltInputEvent

public JoltInputEvent getJoltInputEvent()
Get the current JoltInputEvent object that was sent for textValueChanged.

Returns:
The JoltInputEvent.

textValueChanged

public void textValueChanged(java.awt.event.TextEvent e)
Event handler for TextEvents. Should not be called directly by other objects.

Specified by:
textValueChanged in interface java.awt.event.TextListener
Parameters:
e - The event object.

setOccurrenceIndex

public void setOccurrenceIndex(int occurrence)
Set the occurrence index of the field represented by this JoltTextField.

Parameters:
occurrence - The occurrence number.

getOccurrenceIndex

public int getOccurrenceIndex()
Get the occurrence index of the field represented by this JoltTextField.

Returns:
The occurrence index.

addJoltInputListener

public void addJoltInputListener(JoltInputListener l)
Registration method for JoltInput listeners.

Parameters:
l - The listener to be added.

removeJoltInputListener

public void removeJoltInputListener(JoltInputListener l)
This method is used to unregister JoltInput listeners.

Parameters:
l - The listener to be removed.

serviceReturned

public void serviceReturned(JoltOutputEvent evt)
Handler method for JoltOutputEvents. This method should not be called directly; it is always called by the JoltServiceBean.

Specified by:
serviceReturned in interface JoltOutputListener
Parameters:
evt - The event object.

getJoltFieldName

public java.lang.String getJoltFieldName()
Get the Jolt field name corresponding to this JoltTextField.

Returns:
The Jolt field name.

setJoltFieldName

public void setJoltFieldName(java.lang.String name)
Set the Jolt field name corresponding to this JoltTextField.

Parameters:
name - The Jolt field name.