com.ibm.di.admin.ui
Class ConnectorTreeUI

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.ConnectorTreeUI
All Implemented Interfaces:
BaseUIInterface, DragGestureListener, DragSourceListener, DropTargetListener, ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, TreeSelectionListener

public class ConnectorTreeUI
extends BaseUI
implements ActionListener, TreeSelectionListener, DropTargetListener

This is the Connector Tree user interface class. This class is responsible for tree events.

See Also:
Serialized Form

Nested Class Summary
 class ConnectorTreeUI.AddConnector
          This class represents an object which is added to an AssemblyLine.
 class ConnectorTreeUI.CheckBoxListener
           
 class ConnectorTreeUI.ConnectorTree
          Sub class JTree to avoid editing of certain objects.
 class ConnectorTreeUI.ConnectorTreeContextMenu
          This class describes context menu for a Component.
 class ConnectorTreeUI.ConnectorTreeModel
          List Model.
 class ConnectorTreeUI.TreeSelMod
          Override the setSelectionPath to prevent resetting selected items if user clicks on an already selected item.
 
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
 
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
ConnectorTreeUI()
          Constructor for the ConnectorTreeUI object
ConnectorTreeUI(AssemblyLineConfig config)
          Constructor for the ConnectorTreeUI object
 
Method Summary
 void actionPerformed(ActionEvent event)
          This method is called when an action is performed.
 void addConnector(Object name)
          Adds a connector to the container
 void addEnabledCB(JPopupMenu menu, Object sel)
           
 void clearSelection()
          This method clears the selection.
 int count()
          Returns the number of components in our container
 void createUI()
          Creates user interface for config object
 boolean differentRoots(BaseConfiguration one, BaseConfiguration two)
          Check if two BaseConfigurations are in different Containers.
 void doubleClick(int row, TreePath path)
          Called when an item has been double clicked - fires a Rename action event
 void dragDropEnd(DragSourceDropEvent e)
          Called after drag/drop ended - reset selection path
 void dragGestureRecognized(DragGestureEvent e)
          Called when an item has been dragged.
 void dragOver(DropTargetDragEvent e)
          This method is call when a drag operation is performed.
 void drop(DropTargetDropEvent e)
          Items dropped - either add configs from the library (list) or rearrange internally (string)
 void enableToolbarItem(String actionName, boolean enabled)
          This method enables the specified tool bar item.
 void enableToolbarItems(String[] actionNames, boolean enabled)
          This method specifies if a tool bar items are enabled/disabled.
 int getSelectedIndex()
          Gets the selectedIndex attribute of the ConnectorTreeUI object
 int[] getSelectedIndices()
          Gets the selectedIndices attribute of the ConnectorTreeUI object
 Object getSelectedItem()
          Gets the selectedItem attribute of the ConnectorTreeUI object
 Vector getSelectedItems()
          Gets all selected items
 void moveComponent(String name, Point p)
          This method is call when a Component is moved.
 void moveOneComponent(String name, Point p, boolean giveMessage)
          This method is call when a Component is moved.
 void openSelection(int row, TreePath path)
          Opens the current selection
 void renameSelectedItem()
          Called to start editing the currently selected item
 ContainerConfig rootContainer(BaseConfiguration bc)
          Returns the top level container for a config
 ContainerConfig selectedContainer()
          This method returns the currently selected container.
 void setSelectedIndex(int index)
          Sets the selectedIndex attribute of the ConnectorTreeUI object
 void singleClick(int row, TreePath path)
          Called when an item has been clicked
 void valueChanged(TreeSelectionEvent event)
          This method is called when the value of the selected item is changed.
 
Methods inherited from class com.ibm.di.admin.ui.BaseUI
addActionListener, dragEnter, dragEnter, dragExit, dragExit, dragOver, dropActionChanged, dropActionChanged, findContainer, fireActionPerformed, getConfig, getContainer, getProperty, isDebugMode, removeActionListener, 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, getPreferredSize, 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
 
Methods inherited from interface java.awt.dnd.DropTargetListener
dragEnter, dragExit, dropActionChanged
 

Constructor Detail

ConnectorTreeUI

public ConnectorTreeUI()
Constructor for the ConnectorTreeUI object


ConnectorTreeUI

public ConnectorTreeUI(AssemblyLineConfig config)
Constructor for the ConnectorTreeUI object

Parameters:
config - this parameter represents AssemblyLine configuration.
Method Detail

createUI

public void createUI()
Description copied from interface: BaseUIInterface
Creates user interface for config object

Specified by:
createUI in interface BaseUIInterface

singleClick

public void singleClick(int row,
                        TreePath path)
Called when an item has been clicked

Parameters:
row - the row on which the item is placed.
path - the path to the clicked item.

openSelection

public void openSelection(int row,
                          TreePath path)
Opens the current selection

Parameters:
row - the row on which the selection is placed.
path - the path to the current selection.

doubleClick

public void doubleClick(int row,
                        TreePath path)
Called when an item has been double clicked - fires a Rename action event

Parameters:
row - the row on which the item is placed.
path - the path to the clicked item.

renameSelectedItem

public void renameSelectedItem()
Called to start editing the currently selected item


addConnector

public void addConnector(Object name)
Adds a connector to the container

Parameters:
name - The feature to be added to the Connector attribute

count

public int count()
Returns the number of components in our container

Returns:
int value representing the number of components in our container.

dragGestureRecognized

public void dragGestureRecognized(DragGestureEvent e)
Called when an item has been dragged.

Specified by:
dragGestureRecognized in interface DragGestureListener
Overrides:
dragGestureRecognized in class BaseUI
Parameters:
e - the DragGestureEvent describing the gesture that has just occurred.

dragDropEnd

public void dragDropEnd(DragSourceDropEvent e)
Called after drag/drop ended - reset selection path

Specified by:
dragDropEnd in interface DragSourceListener
Overrides:
dragDropEnd in class BaseUI
Parameters:
e - this parameter provides information about the originator of the drag/drop event.

drop

public void drop(DropTargetDropEvent e)
Items dropped - either add configs from the library (list) or rearrange internally (string)

Specified by:
drop in interface DropTargetListener
Overrides:
drop in class BaseUI
Parameters:
e - This parameter reports for drop actions that reflect the current state of the drag-and-drop operation.

dragOver

public void dragOver(DropTargetDragEvent e)
This method is call when a drag operation is performed.

Specified by:
dragOver in interface DropTargetListener
Overrides:
dragOver in class BaseUI
Parameters:
e - This parameter reports for drag actions that reflect the current state of the drag operation.

differentRoots

public boolean differentRoots(BaseConfiguration one,
                              BaseConfiguration two)
Check if two BaseConfigurations are in different Containers. Returns true if the two configs belong to different root component trees (e.g. entry feed, data flow)


rootContainer

public ContainerConfig rootContainer(BaseConfiguration bc)
Returns the top level container for a config


selectedContainer

public ContainerConfig selectedContainer()
This method returns the currently selected container.

Returns:
ContainerConfig object representing the currently selected container or null if it is not an instance of ContainerConfig or BaseConfiguration.

moveComponent

public void moveComponent(String name,
                          Point p)
This method is call when a Component is moved.

Parameters:
name - the name of the Component.
p - the position of the Component.

moveOneComponent

public void moveOneComponent(String name,
                             Point p,
                             boolean giveMessage)
This method is call when a Component is moved.

Parameters:
name - the name of the Component.
p - the position of the Component.
giveMessage - if this parameter is true an info message is displayed if it is not allowed to move the specified Component to the specified place.

actionPerformed

public void actionPerformed(ActionEvent event)
This method is called when an action is performed.

Specified by:
actionPerformed in interface ActionListener
Parameters:
event - this parameter describes the performed action.

valueChanged

public void valueChanged(TreeSelectionEvent event)
This method is called when the value of the selected item is changed.

Specified by:
valueChanged in interface TreeSelectionListener
Parameters:
event - the event that characterizes the change.

getSelectedItem

public Object getSelectedItem()
Gets the selectedItem attribute of the ConnectorTreeUI object

Returns:
The selectedItem value

getSelectedItems

public Vector getSelectedItems()
Gets all selected items

Returns:
The selected items

getSelectedIndex

public int getSelectedIndex()
Gets the selectedIndex attribute of the ConnectorTreeUI object

Returns:
The selectedIndex value

getSelectedIndices

public int[] getSelectedIndices()
Gets the selectedIndices attribute of the ConnectorTreeUI object

Returns:
The selectedIndices value

setSelectedIndex

public void setSelectedIndex(int index)
Sets the selectedIndex attribute of the ConnectorTreeUI object

Parameters:
index - The new selectedIndex value

clearSelection

public void clearSelection()
This method clears the selection.


enableToolbarItems

public void enableToolbarItems(String[] actionNames,
                               boolean enabled)
This method specifies if a tool bar items are enabled/disabled.

Parameters:
actionNames - this parameter specifies the names of the items.
enabled - this parameter specifies if the tool bar items are enabled/disabled.

enableToolbarItem

public void enableToolbarItem(String actionName,
                              boolean enabled)
This method enables the specified tool bar item.

Parameters:
actionName - this parameter specifies the name of the item.
enabled - this parameter specifies if the tool bar item is enabled/disabled.

addEnabledCB

public void addEnabledCB(JPopupMenu menu,
                         Object sel)