bea.jolt.beans.awt
Class JoltCheckbox

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Checkbox
          extended bybea.jolt.beans.awt.JoltCheckbox
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.ItemListener, java.awt.ItemSelectable, java.awt.MenuContainer, java.io.Serializable

public class JoltCheckbox
extends java.awt.Checkbox
implements java.awt.event.ItemListener

This is a Jolt-aware extension of java.awt.Checkbox, which is linked to a specific Jolt field by its JoltFieldName property. It can be wired up with JoltServiceBeans to contain parts of the input for a service. A JoltServiceBean is listening to events raised by a JoltCheckbox. JoltCheckbox sends JoltInputEvents to its listeners (typically JoltServiceBeans) when the selection in the checkbox changes. The JoltInputEvent in this case is populated with a "true" or "false" value if the box is checked or unchecked respectively.

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
JoltCheckbox()
          Constructor
 
Method Summary
 void addJoltInputListener(JoltInputListener l)
          Registration method for JoltInput listeners.
 java.lang.String getFalseValue()
          Get the String value which is represented by this JoltCheckbox if the box is unchecked.
 java.lang.String getJoltFieldName()
          Get the Jolt field name corresponding to this JoltCheckbox.
 JoltInputEvent getJoltInputEvent()
          Get the current JoltInputEvent object that was sent for itemStateChanged.
 int getOccurrenceIndex()
          Get the occurrence index of the field represented by this JoltCheckbox.
 java.lang.String getTrueValue()
          Get the String value which is represented by this JoltCheckbox if the box is checked.
 void itemStateChanged(java.awt.event.ItemEvent e)
          The state of the Checkbox changed, generate a JoltInputEvent and notify event listeners.
 void removeJoltInputListener(JoltInputListener l)
          This method is used to unregister JoltInput listeners.
 void setFalseValue(java.lang.String value)
          Set the field value if the box is unchecked.
 void setJoltFieldName(java.lang.String name)
          Set the Jolt field name corresponding to this JoltCheckbox.
 void setOccurrenceIndex(int occurrence)
          Set the occurrence index of the field represented by this JoltCheckbox.
 void setTrueValue(java.lang.String value)
          Set the field value if the box is checked.
 
Methods inherited from class java.awt.Checkbox
addItemListener, addNotify, getAccessibleContext, getCheckboxGroup, getItemListeners, getLabel, getListeners, getSelectedObjects, getState, removeItemListener, setCheckboxGroup, setLabel, setState
 
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, enableInputMethods, getAlignmentX, getAlignmentY, getBackground, 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, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, 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, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, 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

JoltCheckbox

public JoltCheckbox()
Constructor

Method Detail

getJoltInputEvent

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

Returns:
The JoltInputEvent.

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
The state of the Checkbox changed, generate a JoltInputEvent and notify event listeners.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
e - The ItemEvent.

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.

setOccurrenceIndex

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

Parameters:
occurrence - The occurrence number.

getOccurrenceIndex

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


getJoltFieldName

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

Returns:
The Jolt field name.

setJoltFieldName

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

Parameters:
name - The Jolt field name.

getTrueValue

public java.lang.String getTrueValue()
Get the String value which is represented by this JoltCheckbox if the box is checked.

Returns:
The true value.

setTrueValue

public void setTrueValue(java.lang.String value)
Set the field value if the box is checked.

Parameters:
value - The true value.

getFalseValue

public java.lang.String getFalseValue()
Get the String value which is represented by this JoltCheckbox if the box is unchecked.

Returns:
The false value.

setFalseValue

public void setFalseValue(java.lang.String value)
Set the field value if the box is unchecked.

Parameters:
value - The false value.