WebLogic Integration


com.bea.wlpi.common.plugin
Class PluginPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--com.bea.wlpi.common.plugin.PluginPanel
Direct Known Subclasses:
PluginActionPanel, PluginTriggerPanel, PluginVariablePanel

public abstract class PluginPanel
extends javax.swing.JPanel
implements java.lang.Cloneable

Defines a plugin-provided GUI component. The component is hosted in a dialog constructed by the design-time client.

Since:
WebLogic Process Integrator 2.0
Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
PluginData, Serialized Form

Inner classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
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.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
protected PluginPanel(java.util.Locale lc, java.lang.String helpID)
          Create a new PluginPanel.
 
Method Summary
 void exceptionHandlerRenamed(java.lang.String oldName, java.lang.String newName)
          Cascade updates to the specified exception handler.
 PluginPanelContext getContext()
          Return the parent component in which this panel is displayed.
 PluginData getData()
          Return the plugin-defined data.
 java.lang.String getHelpIDString()
          Return the help topic ID for the plugin panel.
 java.lang.String getString(java.lang.String key)
          Get a localized display string.
 java.lang.String getString(java.lang.String key, java.lang.Object[] args)
          Get a localized message, formatted with the supplied arguments.
abstract  void load()
          Instructs the panel to initialize its UI controls from the plugin-provided data.
 boolean referencesExceptionHandler(java.lang.String handler)
          Check whether the panel references the specified exception handler.
 boolean referencesVariable(java.lang.String var)
          Check whether the panel references the specified variable.
 void setContext(PluginPanelContext context, PluginData data)
          Set the operating context for the panel.
 void setResourceBundle(java.lang.String bundleName)
          Set the resource bundle to use when localizing strings and messages.
abstract  boolean validateAndSave()
          Instructs the panel to validate its UI control values and save them into the plugin-provided data.
 void variableRenamed(java.lang.String oldName, java.lang.String newName)
          Cascade updates to the specified workflow variable.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, 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, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PluginPanel

protected PluginPanel(java.util.Locale lc,
                      java.lang.String helpID)
Create a new PluginPanel.

Parameters:
lc - The locale for the panel. Can be retrieved later by calling getLocale().
helpID - The help topic ID for the panel. This must match one of the JavaHelp keys or HTML file names provided by the plugin's online help set.
Method Detail

getContext

public final PluginPanelContext getContext()
Return the parent component in which this panel is displayed.

Returns:
The parent component.

getData

public final PluginData getData()
Return the plugin-defined data.

Returns:
The plugin-defined data.

getHelpIDString

public java.lang.String getHelpIDString()
Return the help topic ID for the plugin panel.

Returns:
The help ID.

getString

public java.lang.String getString(java.lang.String key)
Get a localized display string. The resource bundle name must have been set by a prior call to setResourceBundle(java.lang.String).

Parameters:
key - The resource key.
Returns:
A localized display string matching the specified key.
Throws:
java.lang.IllegalStateException - if no resource bundle has been defined.
See Also:
getString(String, Object[]), setResourceBundle(java.lang.String)

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.Object[] args)
Get a localized message, formatted with the supplied arguments. The resource bundle name must have been set by a prior call to setResourceBundle(java.lang.String). This method uses this object's ClassLoader to retrieve the string resource from the nominated resource properties file in its plugin-ejb.jar file.

Parameters:
key - The resource key.
args - Arguments to be inserted into the message text.
Returns:
A localized, formatted message string matching the specified key and arguments.
Throws:
java.lang.IllegalStateException - if no resource bundle has been defined.
See Also:
getString(String), setResourceBundle(java.lang.String)

load

public abstract void load()
Instructs the panel to initialize its UI controls from the plugin-provided data. Implementations call getData() to access the plugin data, cast the result to the corresponding plugin-defined class, then call the appropriate getter methods to retrieve the display values. The framework ensures that this method is called exactly once per modal display cycle. Plugins must not call this method.

See Also:
validateAndSave()

setContext

public final void setContext(PluginPanelContext context,
                             PluginData data)
Set the operating context for the panel. The plugin framework calls this method before adding the plugin panel to its dialog. The implementation stores the owner and data parameters in the corresponding member variables. Plugins must not call this method.

Parameters:
context - The dialog context in which the panel is being displayed.
data - The plugin-supplied data.
Throws:
java.lang.IllegalArgumentException - if either parameter is null.

setResourceBundle

public void setResourceBundle(java.lang.String bundleName)
Set the resource bundle to use when localizing strings and messages.

Parameters:
bundleName - The name of the resource bundle from which to retrieve the localized strings and messages.
See Also:
getString(String), getString(String, Object[])

exceptionHandlerRenamed

public void exceptionHandlerRenamed(java.lang.String oldName,
                                    java.lang.String newName)
Cascade updates to the specified exception handler. Subclasses must override this method if they make reference to workflow exception handlers, and propagate updates to the exception handler so that the reference remains unbroken. Note that in plugin-customizable nodes where actions are supported by default (start, event, done, action), the framework takes care of propagating the change throughout these action list(s) automatically.

Parameters:
oldName - The exception handler's previous name.
newName - The exception handler's new name.
See Also:
referencesExceptionHandler(java.lang.String)

referencesExceptionHandler

public boolean referencesExceptionHandler(java.lang.String handler)
Check whether the panel references the specified exception handler. Subclasses must override this method if they make reference to workflow exception handlers, to prevent the inadvertent deletion of an exception handler to which references currently exist. Note that in plugin-customizable nodes where actions are supported by default (start, event, done, action), the framework takes care of checking these action list(s) automatically.

Parameters:
handler - The name of the exception handler.
Returns:
true if the panel references the handler.
See Also:
exceptionHandlerRenamed(java.lang.String, java.lang.String)

referencesVariable

public boolean referencesVariable(java.lang.String var)
Check whether the panel references the specified variable. Subclasses must override this method if they make reference to workflow variables, whether directly by name or indirectly via expressions. This is to prevent the inadvertent deletion of referenced variables. Note that in plugin-customizable nodes where actions are supported by default (start, event, done, action), the framework takes care of checking these action list(s) automatically.

Parameters:
var - The name of the variable.
Returns:
true if the panel references the variable.
See Also:
variableRenamed(java.lang.String, java.lang.String)

validateAndSave

public abstract boolean validateAndSave()
Instructs the panel to validate its UI control values and save them into the plugin-provided data. Implementations call getData() to access the plugin data, cast the result to the corresponding plugin-defined class, then call the appropriate setter methods to save the display values. Plugins that use the default event watch registration and correlation scheme should check in their implementation of this method that a suitable event key is defined, by calling PluginPanelContext.checkEventKey(java.lang.String, java.lang.String, boolean). If the latter call returns PluginPanelContext.EVENT_KEY_NOT_EXISTS, validateAndSave should return false.

See Also:
load()

variableRenamed

public void variableRenamed(java.lang.String oldName,
                            java.lang.String newName)
Cascade updates to the specified workflow variable. Subclasses must override this method if they make reference to workflow variables, whether directly by name or indirectly via expressions. Note that in plugin-customizable nodes where actions are supported by default (start, event, done, action), the framework takes care of propagating the change throughout these action list(s) automatically.

Parameters:
oldName - The variable's old name.
newName - The variable's new name.
See Also:
referencesVariable(java.lang.String)

WebLogic Integration

WebLogic Integration (WLI)