IBM Branch Transformation Toolkit Javadoc

com.ibm.dse.gui
Class DSEPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.ibm.dse.gui.SpPanel
                      extended bycom.ibm.dse.gui.DSECoordinatedPanel
                          extended bycom.ibm.dse.gui.DSEPanel
All Implemented Interfaces:
javax.accessibility.Accessible, javax.swing.event.AncestorListener, CoordinatedEventListener, CoordinatedEventSource, CoordinatedPanel, ErrorMessageListener, java.util.EventListener, Externalizable, java.io.Externalizable, GUIComponent, java.awt.image.ImageObserver, java.awt.event.KeyListener, java.awt.MenuContainer, OperationRepliedListener, java.io.Serializable

public class DSEPanel
extends DSECoordinatedPanel

The DSEPanel class represents the external panel that should be used in views. It can contain the visual components as SpTextField, SpLabel,... and also the embedded panels. The Context property is used to link the view with the model.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.ibm.dse.gui.SpPanel
SpPanel.ErrorBeanLabel
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class com.ibm.dse.gui.DSECoordinatedPanel
aExceptionInOperationListener, executeNextView, externalizer
 
Fields inherited from class com.ibm.dse.gui.SpPanel
NULL_VALUE, refreshing
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
 
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
DSEPanel()
          This constructor creates a DSEPanel object.
DSEPanel(boolean isDoubleBuffered)
          This constructor creates a DSEPanel object.
DSEPanel(Context Ctx)
          This constructor creates a DSEPanel object.
DSEPanel(java.awt.LayoutManager layout)
          This constructor creates a DSEPanel object.
DSEPanel(java.awt.LayoutManager layout, boolean isDoubleBuffered)
          This constructor creates a DSEPanel object.
 
Method Summary
 void chainTo(Context aContext)
          Sets the receiving context as a child of aContext and as the new current child.
 void chainToContextNamed(java.lang.String aContextName)
          Sets the context as a child of the context named aContextName in the hierarchy.
 void close(boolean unchainContext)
          close default operation and fires a DSECoordinationEvent (type ViewClosed)
protected  void close(DSECoordinationEvent event)
          close default operation and fires a DSECoordinationEvent (type ViewClosed)
 void dataChanged(DSECoordinationEvent dce)
          Manages the appropriate actions when a DSECoordinationEvent has been sent and refesh property is true.
 void executeOper(java.lang.String operation, int chaining, java.lang.String inputFormat, java.lang.String outputFormat)
          Execute an Operation
 Context getContext()
          Gets the context property (com.ibm.dse.base.Context) value.
 java.lang.String getContextName()
          Gets the contextName property (java.lang.String) value.
 boolean getInstanceContext()
          Gets the instanceContext property (boolean) value.
 java.lang.Object getValueAt(java.lang.String aCompositeKey)
          Returns the value of the element of its working context, or of the upper working contexts, which is located at
 void handleDSECoordinationEvent(DSECoordinationEvent event)
          Contains the appropriate actions to be executed when DSECoordinationEvent has been triggered.
 void instanceContextIfNecessary()
          makes an instance (if is necessary) of the context
 boolean isChained()
          Returns true if the context is chained to the hierarchy.
 boolean isCorrectStatus()
          Decides if the panel is in a correct status or not.
 void refreshDataExchangers()
          Updates the panel with the data exchangers context values.
 void setContext(Context context)
          Sets the context property (com.ibm.dse.base.Context) value.
 void setContextName(java.lang.String contextName)
          Sets the contextName property (java.lang.String) value.
 void setContextName(java.lang.String contextName, boolean mInstance)
          Sets the contextName property (java.lang.String) value.
 void setInstanceContext(boolean instanceContext)
          Sets the instanceContext property (boolean) value.
 void setValueAt(java.lang.String aCompositeKey, java.lang.Object aDataValue)
          Sets the value of the element of its context, or context parent, which is located at aCompositeKey path.
 void unchain()
          Removes the context from the context hierarchy.
 
Methods inherited from class com.ibm.dse.gui.DSECoordinatedPanel
addCoordinatedEventListener, addExceptionInOperationListener, addToChildrenInErrorList, addToExecuteButtonsList, addToNextButtonsList, addToPrevButtonsList, addToRequiredNotFilledList, ancestor, ancestorAdded, ancestorMoved, ancestorRemoved, becomingActiveActions, becomingUnactiveActions, clearPanelContents, close, commit, convertFromEuros, convertToEuros, disposePanel, enableExecuteButton, enableNextButton, enableOkButton, enableOkButton, enablePreviousButton, externalizer, fireCoordinationEvent, fireCoordinationEvent, fireHandleExceptionInOperation, get_EMUCurrencyButton, get_EuroButton, get_HelpButton, get_OkButton, getCheckBoxesAndButtonGroupsInitialized, getChildrenInError, getChildrenNotFilled, getClassForHelpImplementation, getDataExchangers, getDisableWhileOperationRunning, getDSECoordinatedPanel, getDSECoordinatedPanelParent, getEMUCurrency, getExecuteButtons, getExecuteWhenOpen, getExternalizer, getFocusManager, getIconName, getInstanceOperation, getIsInEuros, getListOfCheckBoxes, getNextButtons, getOperation, getOperationName, getOutsiders, getPrevButtons, getReplyOperationName, getReplyOutputFormatName, getSavedData, getTitle, getValidationMethod, getViewName, handleErrorMessage, handleOperationRepliedEvent, initializeFrom, instanceOperationIfNecessary, isClosable, isFirstVisible, manageHelp, postInitialize, readExternal, readExternal, readObject, refresh, register, register, registerOutsider, removeCoordinatedEventListener, removeDataExchanger, removeExceptionInOperationListener, removeExternal, removeFromChildrenInErrorList, removeFromExecuteButtonsList, removeFromNextButtonsList, removeFromRequiredNotFilledList, rollBack, saveData, set_EMUCurrencyButton, set_EuroButton, set_HelpButton, set_OkButton, setCheckBoxesAndButtonGroupsInitialized, setChildrenInError, setChildrenNotFilled, setClassForHelpImplementation, setClosable, setDataExchangers, setDisableWhileOperationRunning, setEMUCurrency, setExecuteWhenOpen, setExternalizer, setFirstVisible, setIconName, setInstanceOperation, setIsInEuros, setListOfCheckBoxes, setOperation, setOperationName, setOperationName, setOutsiders, setReplyOperationName, setReplyOutputFormatName, setSavedData, setTitle, setValidationMethod, setViewName, toStrings, toTags, tryRunOperation, writeExternal, writeExternal
 
Methods inherited from class com.ibm.dse.gui.SpPanel
add, add, add, add, add, changeComponentOrientation, clear, clearDataDirection, clearDataExchangersScrolls, enableListScrolls, get_ClearButton, get_RepeatButton, getActivatedOkKey, getClearOutputData, getComponents, getEditable, getEnableStateElements, getErrorBean, getErrorLabel, getHelpID, getHelpID, getSpPanel, getSpPanelParent, init, key, keyPressed, keyReleased, keyTyped, manageHelp, repeat, repeatDataExchangersScrolls, saveEnabledStateComponents, set_ClearButton, set_RepeatButton, setActivatedOkKey, setClearOutputData, setEditable, setEnabled, setEnableStateElements, setErrorBean, setErrorLabel, setHelpID, setVisible
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, 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, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.dse.gui.CoordinatedPanel
setName
 
Methods inherited from interface com.ibm.dse.base.Externalizable
getName, setName
 

Constructor Detail

DSEPanel

public DSEPanel()
This constructor creates a DSEPanel object.


DSEPanel

public DSEPanel(java.awt.LayoutManager layout)
This constructor creates a DSEPanel object.

Parameters:
layout - java.awt.LayoutManager

DSEPanel

public DSEPanel(java.awt.LayoutManager layout,
                boolean isDoubleBuffered)
This constructor creates a DSEPanel object.

Parameters:
layout - java.awt.LayoutManager
isDoubleBuffered - boolean

DSEPanel

public DSEPanel(Context Ctx)
This constructor creates a DSEPanel object.

Parameters:
Ctx - com.ibm.dse.base.Context

DSEPanel

public DSEPanel(boolean isDoubleBuffered)
This constructor creates a DSEPanel object.

Parameters:
isDoubleBuffered - boolean
Method Detail

chainTo

public void chainTo(Context aContext)
             throws DSEInvalidRequestException
Sets the receiving context as a child of aContext and as the new current child. Refer to the Context class chainTo method for an example of implementing this method.

This method throws a DSEInvalidRequestException.

Throws:
DSEInvalidRequestException

chainToContextNamed

public void chainToContextNamed(java.lang.String aContextName)
                         throws DSEInvalidRequestException,
                                DSEObjectNotFoundException
Sets the context as a child of the context named aContextName in the hierarchy. The receiving context is set as the new curent child. If there is more than one context with this name, one of them is choosen at random. Refer to the Context class chainToContextNamed method for an example of implementing this method.

This method throws a DSEInvalidRequestException generated by the chainTo method and throws a DSEObjectNotFoundException if context parent is not found.

Throws:
DSEInvalidRequestException
DSEObjectNotFoundException

close

protected void close(DSECoordinationEvent event)
close default operation and fires a DSECoordinationEvent (type ViewClosed)

Overrides:
close in class DSECoordinatedPanel

close

public void close(boolean unchainContext)
close default operation and fires a DSECoordinationEvent (type ViewClosed)

Specified by:
close in interface CoordinatedPanel
Overrides:
close in class DSECoordinatedPanel
Parameters:
unchainContext - boolean, if true context will be unchainded from the hierarchy

dataChanged

public void dataChanged(DSECoordinationEvent dce)
Manages the appropriate actions when a DSECoordinationEvent has been sent and refesh property is true.

Specified by:
dataChanged in class DSECoordinatedPanel
Parameters:
dce - com.ibm.dse.gui.DSECoordinationEvent

executeOper

public void executeOper(java.lang.String operation,
                        int chaining,
                        java.lang.String inputFormat,
                        java.lang.String outputFormat)
Execute an Operation


getContext

public Context getContext()
Gets the context property (com.ibm.dse.base.Context) value.

Specified by:
getContext in interface CoordinatedPanel
Overrides:
getContext in class DSECoordinatedPanel
Returns:
The context property value.
See Also:
setContext(com.ibm.dse.base.Context)

getContextName

public java.lang.String getContextName()
Gets the contextName property (java.lang.String) value.

Returns:
The contextName property value.
See Also:
setContextName(java.lang.String)

getInstanceContext

public boolean getInstanceContext()
Gets the instanceContext property (boolean) value.

Returns:
The instanceContext property value.
See Also:
setInstanceContext(boolean)

getValueAt

public java.lang.Object getValueAt(java.lang.String aCompositeKey)
                            throws DSEObjectNotFoundException
Returns the value of the element of its working context, or of the upper working contexts, which is located at

Specified by:
getValueAt in interface CoordinatedPanel
Overrides:
getValueAt in class DSECoordinatedPanel
Parameters:
aCompositeKey - String, path name in context.
Throws:
DSEObjectNotFoundException

handleDSECoordinationEvent

public void handleDSECoordinationEvent(DSECoordinationEvent event)
Contains the appropriate actions to be executed when DSECoordinationEvent has been triggered.

Specified by:
handleDSECoordinationEvent in interface CoordinatedEventListener
Overrides:
handleDSECoordinationEvent in class DSECoordinatedPanel
Parameters:
event - DSECoordinationEvent

instanceContextIfNecessary

public void instanceContextIfNecessary()
makes an instance (if is necessary) of the context


isChained

public boolean isChained()
Returns true if the context is chained to the hierarchy.


isCorrectStatus

public boolean isCorrectStatus()
Decides if the panel is in a correct status or not. An DSECoordinatedPanel is in a correct status when all of the required fields are filled with correct values. If there are validation methods, they are executed and must return true.

Specified by:
isCorrectStatus in class DSECoordinatedPanel

refreshDataExchangers

public void refreshDataExchangers()
Updates the panel with the data exchangers context values.

Specified by:
refreshDataExchangers in class DSECoordinatedPanel

setContext

public void setContext(Context context)
Sets the context property (com.ibm.dse.base.Context) value.

Specified by:
setContext in interface CoordinatedPanel
Overrides:
setContext in class DSECoordinatedPanel
Parameters:
context - The new value for the property.
See Also:
getContext()

setContextName

public void setContextName(java.lang.String contextName)
Sets the contextName property (java.lang.String) value.

Parameters:
contextName - The new value for the property.
See Also:
getContextName()

setContextName

public void setContextName(java.lang.String contextName,
                           boolean mInstance)
Sets the contextName property (java.lang.String) value.

Parameters:
contextName - String, the new value for the property
mInstance - boolean, if true makes an instance of the context.

setInstanceContext

public void setInstanceContext(boolean instanceContext)
Sets the instanceContext property (boolean) value.

Parameters:
instanceContext - The new value for the property.
See Also:
getInstanceContext()

setValueAt

public void setValueAt(java.lang.String aCompositeKey,
                       java.lang.Object aDataValue)
                throws DSEInvalidArgumentException,
                       DSEObjectNotFoundException
Sets the value of the element of its context, or context parent, which is located at aCompositeKey path.

Throws:
DSEInvalidArgumentException
DSEObjectNotFoundException

unchain

public void unchain()
             throws DSEInvalidRequestException,
                    DSEObjectNotFoundException
Removes the context from the context hierarchy. The parent attribute is set to null and the operation context is removed from the children list in the parent context. The receiving context cannot have children. Refer to the Context class unchain method for an example of implementing this method.

This method throws a DSEInvalidRequestException and throws a DSEObjectNotFoundException.

Throws:
DSEInvalidRequestException
DSEObjectNotFoundException

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005