bea.jolt.beans.swing
Class JoltList

java.lang.Object
  java.awt.Component
      java.awt.Container
          com.sun.java.swing.JComponent
              com.sun.java.swing.JList
                  bea.jolt.beans.swing.JoltList
All Implemented Interfaces:
com.sun.java.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, JoltOutputListener, com.sun.java.swing.event.ListSelectionListener, java.awt.MenuContainer, com.sun.java.swing.Scrollable, java.io.Serializable

public class JoltList
extends com.sun.java.swing.JList
implements JoltOutputListener, com.sun.java.swing.event.ListSelectionListener

This is a Jolt-aware extension of java.awt.List, which 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, a JoltServiceBean is listening to events raised by a JoltList. JoltList sends JoltInputEvents to its listeners (typically JoltServiceBeans) when the selection in the listbox changes. In this case, the JoltInputEvent is populated with the single value of the selected item.

If JoltList is used to display the output of a service JoltList listens to JoltOutputEvents from JoltServiceBeans and updates its contents accordingly with the occurrences of the Jolt field it is linked to.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.sun.java.swing.JComponent
com.sun.java.swing.JComponent.AccessibleJComponent
 
Field Summary
 
Fields inherited from class com.sun.java.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
JoltList()
          Constructor
 
Method Summary
 void addJoltInputListener(JoltInputListener l)
          Registration method for JoltInput listeners.
 java.lang.String[] getItems()
          Get the selected items corresponding to this JoltList.
 java.lang.String getJoltFieldName()
          Get the Jolt field name corresponding to this JoltList.
 JoltInputEvent getJoltInputEvent()
          Get the current JoltInputEvent object that was sent for serviceReturned.
 int getOccurrenceIndex()
          Get the occurrence index of the field represented by this JoltList.
 void itemStateChanged(java.awt.event.ItemEvent e)
          The state of the JoltList changed, generate a JoltInputEvent and notify event listeners.
 void removeJoltInputListener(JoltInputListener l)
          This method is used to unregister JoltInput listeners.
 void serviceReturned(JoltOutputEvent evt)
          Event handler for JoltOutputEvents.
 void setItems(java.lang.String[] values)
          Set the selected items corresponding to this JoltList.
 void setJoltFieldName(java.lang.String name)
          Set the Jolt field name corresponding to this JoltList.
 void setOccurrenceIndex(int occurrence)
          Set the occurrence index of the field represented by this JoltList.
 void valueChanged(com.sun.java.swing.event.ListSelectionEvent e)
           
 
Methods inherited from class com.sun.java.swing.JList
addListSelectionListener, addSelectionInterval, clearSelection, ensureIndexIsVisible, getAccessibleContext, getAnchorSelectionIndex, getCellBounds, getCellRenderer, getFirstVisibleIndex, getFixedCellHeight, getFixedCellWidth, getLastVisibleIndex, getLeadSelectionIndex, getMaxSelectionIndex, getMinSelectionIndex, getModel, getPreferredScrollableViewportSize, getPrototypeCellValue, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedIndex, getSelectedIndices, getSelectedValue, getSelectedValues, getSelectionBackground, getSelectionForeground, getSelectionMode, getSelectionModel, getUI, getUIClassID, getValueIsAdjusting, getVisibleRowCount, indexToLocation, isOpaque, isSelectedIndex, isSelectionEmpty, locationToIndex, removeListSelectionListener, removeSelectionInterval, setCellRenderer, setFixedCellHeight, setFixedCellWidth, setListData, setListData, setModel, setPrototypeCellValue, setSelectedIndex, setSelectedIndices, setSelectedValue, setSelectionBackground, setSelectionForeground, setSelectionInterval, setSelectionMode, setSelectionModel, setUI, setValueIsAdjusting, setVisibleRowCount, updateUI
 
Methods inherited from class com.sun.java.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setBounds, setDebugGraphicsOptions, setDoubleBuffered, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getListeners, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocusInWindow, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JoltList

public JoltList()
Constructor

Method Detail

getJoltInputEvent

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

Returns:
The JoltInputEvent.

serviceReturned

public void serviceReturned(JoltOutputEvent evt)
Event handler 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.

valueChanged

public void valueChanged(com.sun.java.swing.event.ListSelectionEvent e)
Specified by:
valueChanged in interface com.sun.java.swing.event.ListSelectionListener

itemStateChanged

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

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

Parameters:
occurrence - The occurrence number.

getOccurrenceIndex

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

Returns:
The occurrence index.

getJoltFieldName

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

Returns:
The Jolt field name.

setJoltFieldName

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

Parameters:
name - The Jolt field name.

getItems

public java.lang.String[] getItems()
Get the selected items corresponding to this JoltList.

Returns:
The array of selected items.

setItems

public void setItems(java.lang.String[] values)
Set the selected items corresponding to this JoltList.