com.ibm.di.admin.ui
Class FormUI

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.ibm.di.admin.ui.BaseUI
                      extended by com.ibm.di.admin.ui.FormUI
All Implemented Interfaces:
BaseUIInterface, MetamergeConfigChangeListener, DragGestureListener, DragSourceListener, DropTargetListener, ActionListener, KeyListener, MouseListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class FormUI
extends BaseUI
implements ActionListener, KeyListener, MouseListener, MetamergeConfigChangeListener

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static String FORM_BUTTONS
           
static String FORM_DEFAULTTAB
           
static String FORM_EVENTS
           
static String FORM_HEIGHT
           
static String FORM_PARAMETER
           
static String FORM_RUNTIME_PSE_MC
           
static String FORM_RUNTIME_PSE_PREFIX
           
static String FORM_TABLIST
           
static String FORM_TABS
           
static String FORM_TITLE
           
static String FORM_USEHYPER
           
static String FORM_USER_CODE
           
static String FORM_VALUE_LISTS
           
static String FORM_WIDTH
           
 FormUI myform
           
 
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
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
FormUI(BaseConfiguration global, BaseConfiguration form, BaseConfiguration config)
           
FormUI(BaseConfiguration global, BaseConfiguration form, BaseConfiguration config, TreeMap runtimeParam)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void addActionListener(ActionListener l)
          Other components may want to know about events too ...
 ArrayList addDeleteEntry(Object[] contents)
           
 String addFiles(String oldPaths)
           
 void addRow(String paramName, JComponent l, JComponent cf)
           
 void addUserForm(String javaClass)
          User code
 Vector addValues(List val)
           
 void addValueScript(JComponent component, String scriptName)
           
 void alert(String msg)
           
 JComponent buildCheckList(TreeMap param)
           
 Color chooseColor(String name)
           
 Object chooseFromList(String prompt, Object list)
           
 void configurationChanged(MetamergeConfigChange mcc)
          Called when one of the configuration keys has changed.
 JComponent createForm()
          initgui (dataConfig, Add the form components for a section and returned a GUI component
 void createTabbedUI()
          Create a tabbed pane with FormUI components
 void createUI()
          Create the form user interface.
 boolean deleteFile(String path)
           
 void editValue(String name)
           
 void execCommand(JButton button)
           
 void fireListener(ActionEvent e)
           
 void formEvent(Object event)
          Form event dispatcher.
 Object getConfig(String key)
           
 Object getConfigObject()
           
 String getConfigValue(String paramName)
           
 JComponent getControl(String name)
           
 int getExpressionFlag(Object paramName)
          Returns -1 when param has no "expression" flag set.
 int getFormSelectedPane()
           
 int getFormSelectedPane2()
           
 String getInheritedValue(String paramName)
           
 TreeMap getLocalData(Object o, Vector data)
           
 Dimension getPreferredSize()
          Return our preferred size to parent container
 String getTitle()
           
 Object getUserData()
           
 void helpMe()
           
 String input(String prompt)
           
 boolean isType(String paramName, String type)
           
static boolean isValidPath(File path)
           
 void keyPressed(KeyEvent ke)
           
 void keyReleased(KeyEvent ke)
           
 void keyTyped(KeyEvent ke)
           
 Object loadConnector()
           
 Object loadFunction()
           
 void loadNamespace()
           
 void mouseClicked(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 Vector parseValueList(Object val, TreeMap valuelists)
           
 boolean prompt(String yesno)
           
 void removeActionListener(ActionListener l)
           
 void saveLocalData(TreeMap t)
           
 String selectFile()
           
 String selectFile(String oldpath, String filter)
           
 String selectGlobalScripts(String curval)
           
 boolean selectItem(JComboBox cb, String value)
           
 void setConfig(Object key, Object value)
           
 void setConfig(Object key, Object value, boolean protect)
           
 void setLabelColor(String paramName)
           
 void setParameterValue(Object paramName, Object paramValue)
           
 void setParameterValue(Object paramName, Object paramValue, boolean protect)
           
 void setPwdStoreEnabled(boolean enabled)
           
 void setReadonly()
           
 void setUserData(Object userData)
           
 void showFormHelp(String url)
           
 void showParamInfo(String param)
           
 void showParamSubstEditor(String param, boolean expression)
           
 String toControlValue(Object value)
           
 void togglePropertyField(String param)
           
 String toHex(int i)
           
 void updateControl(JComponent c)
           
 void updateControl(String name)
           
 void updateParameter(JComponent c)
           
 void updateParameterValue(String name, Object value)
           
 void updateParameterValue(String name, Object value, boolean protect)
           
 void useDefaultColors()
           
 boolean useHyper()
           
 
Methods inherited from class com.ibm.di.admin.ui.BaseUI
dragDropEnd, dragEnter, dragEnter, dragExit, dragExit, dragGestureRecognized, dragOver, dragOver, drop, dropActionChanged, dropActionChanged, findContainer, fireActionPerformed, getConfig, getContainer, getProperty, isDebugMode, setConfig, setContainer, setProperty
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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
 

Field Detail

FORM_WIDTH

public static final String FORM_WIDTH
See Also:
Constant Field Values

FORM_HEIGHT

public static final String FORM_HEIGHT
See Also:
Constant Field Values

FORM_PARAMETER

public static final String FORM_PARAMETER
See Also:
Constant Field Values

FORM_DEFAULTTAB

public static final String FORM_DEFAULTTAB
See Also:
Constant Field Values

FORM_TABLIST

public static final String FORM_TABLIST
See Also:
Constant Field Values

FORM_TITLE

public static final String FORM_TITLE
See Also:
Constant Field Values

FORM_TABS

public static final String FORM_TABS
See Also:
Constant Field Values

FORM_BUTTONS

public static final String FORM_BUTTONS
See Also:
Constant Field Values

FORM_USEHYPER

public static final String FORM_USEHYPER
See Also:
Constant Field Values

FORM_EVENTS

public static final String FORM_EVENTS
See Also:
Constant Field Values

FORM_VALUE_LISTS

public static final String FORM_VALUE_LISTS
See Also:
Constant Field Values

FORM_USER_CODE

public static final String FORM_USER_CODE
See Also:
Constant Field Values

FORM_RUNTIME_PSE_PREFIX

public static final String FORM_RUNTIME_PSE_PREFIX
See Also:
Constant Field Values

FORM_RUNTIME_PSE_MC

public static final String FORM_RUNTIME_PSE_MC
See Also:
Constant Field Values

myform

public FormUI myform
Constructor Detail

FormUI

public FormUI(BaseConfiguration global,
              BaseConfiguration form,
              BaseConfiguration config)
       throws Exception
Throws:
Exception

FormUI

public FormUI(BaseConfiguration global,
              BaseConfiguration form,
              BaseConfiguration config,
              TreeMap runtimeParam)
       throws Exception
Throws:
Exception
Method Detail

setPwdStoreEnabled

public void setPwdStoreEnabled(boolean enabled)

addUserForm

public void addUserForm(String javaClass)
                 throws Exception
User code

Throws:
Exception

formEvent

public void formEvent(Object event)
Form event dispatcher. This method calls form and item methods based on the change event.


configurationChanged

public void configurationChanged(MetamergeConfigChange mcc)
Called when one of the configuration keys has changed. This method will then call the Form's onchange script, and then the input items' onchange script.

Specified by:
configurationChanged in interface MetamergeConfigChangeListener

addActionListener

public void addActionListener(ActionListener l)
Other components may want to know about events too ...

Overrides:
addActionListener in class BaseUI

removeActionListener

public void removeActionListener(ActionListener l)
Overrides:
removeActionListener in class BaseUI

fireListener

public void fireListener(ActionEvent e)

getPreferredSize

public Dimension getPreferredSize()
Return our preferred size to parent container

Overrides:
getPreferredSize in class JComponent

createTabbedUI

public void createTabbedUI()
                    throws Exception
Create a tabbed pane with FormUI components

Throws:
Exception

createUI

public void createUI()
              throws Exception
Create the form user interface.

Specified by:
createUI in interface BaseUIInterface
Throws:
Exception - if an error occurs while creating user interface

getFormSelectedPane

public int getFormSelectedPane()

getFormSelectedPane2

public int getFormSelectedPane2()

useDefaultColors

public void useDefaultColors()

setUserData

public void setUserData(Object userData)

getUserData

public Object getUserData()

setReadonly

public void setReadonly()

parseValueList

public Vector parseValueList(Object val,
                             TreeMap valuelists)

createForm

public JComponent createForm()
                      throws Exception
initgui (dataConfig, Add the form components for a section and returned a GUI component

Throws:
Exception

getConfigValue

public String getConfigValue(String paramName)

setParameterValue

public void setParameterValue(Object paramName,
                              Object paramValue)

setParameterValue

public void setParameterValue(Object paramName,
                              Object paramValue,
                              boolean protect)

keyPressed

public void keyPressed(KeyEvent ke)
Specified by:
keyPressed in interface KeyListener

keyReleased

public void keyReleased(KeyEvent ke)
Specified by:
keyReleased in interface KeyListener

keyTyped

public void keyTyped(KeyEvent ke)
Specified by:
keyTyped in interface KeyListener

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

updateParameter

public void updateParameter(JComponent c)

updateParameterValue

public void updateParameterValue(String name,
                                 Object value)

updateParameterValue

public void updateParameterValue(String name,
                                 Object value,
                                 boolean protect)

addValues

public Vector addValues(List val)

addValueScript

public void addValueScript(JComponent component,
                           String scriptName)

setConfig

public void setConfig(Object key,
                      Object value)

setConfig

public void setConfig(Object key,
                      Object value,
                      boolean protect)

getConfig

public Object getConfig(String key)

getConfigObject

public Object getConfigObject()

buildCheckList

public JComponent buildCheckList(TreeMap param)

selectItem

public boolean selectItem(JComboBox cb,
                          String value)

isType

public boolean isType(String paramName,
                      String type)

getExpressionFlag

public int getExpressionFlag(Object paramName)
Returns -1 when param has no "expression" flag set. Otherwise, returns the value of the expression flag which is 0 for plain param or 1 for expression. Expression flag has meaning when the parameter substitution editor is invoked. When a parameter is tagged as an expression, the actual expression is set as a value rather than as a parameter property source string.

Parameters:
paramName -
Returns:
-1 = Unknown, 0 = Plain value, 1 = Expression string

showParamInfo

public void showParamInfo(String param)

togglePropertyField

public void togglePropertyField(String param)

getControl

public JComponent getControl(String name)

updateControl

public void updateControl(String name)

updateControl

public void updateControl(JComponent c)

execCommand

public void execCommand(JButton button)

addRow

public void addRow(String paramName,
                   JComponent l,
                   JComponent cf)

loadFunction

public Object loadFunction()
                    throws Exception
Throws:
Exception

loadConnector

public Object loadConnector()
                     throws Exception
Throws:
Exception

chooseFromList

public Object chooseFromList(String prompt,
                             Object list)

selectGlobalScripts

public String selectGlobalScripts(String curval)

prompt

public boolean prompt(String yesno)

alert

public void alert(String msg)

input

public String input(String prompt)

addDeleteEntry

public ArrayList addDeleteEntry(Object[] contents)

deleteFile

public boolean deleteFile(String path)

isValidPath

public static boolean isValidPath(File path)

selectFile

public String selectFile()

selectFile

public String selectFile(String oldpath,
                         String filter)

addFiles

public String addFiles(String oldPaths)

loadNamespace

public void loadNamespace()

setLabelColor

public void setLabelColor(String paramName)

editValue

public void editValue(String name)

chooseColor

public Color chooseColor(String name)

toHex

public String toHex(int i)

toControlValue

public String toControlValue(Object value)

showFormHelp

public void showFormHelp(String url)

getTitle

public String getTitle()

mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

helpMe

public void helpMe()

getLocalData

public TreeMap getLocalData(Object o,
                            Vector data)

saveLocalData

public void saveLocalData(TreeMap t)

getInheritedValue

public String getInheritedValue(String paramName)

showParamSubstEditor

public void showParamSubstEditor(String param,
                                 boolean expression)

useHyper

public boolean useHyper()