de.uni_paderborn.fujaba.gui
Class KindComboBox

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JComboBox
                  extended byde.uni_paderborn.fujaba.gui.KindComboBox
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.ItemSelectable, javax.swing.event.ListDataListener, java.awt.MenuContainer, java.io.Serializable

public class KindComboBox
extends javax.swing.JComboBox

this combobox is used to select a assoc, aggregation or a composition.

FIX ME: prehaps we could use very nice little icons instead of boring ASCII-stuff.

Version:
$Revision: 1.17 $
Author:
$Author: zuendorf $
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComboBox
javax.swing.JComboBox.AccessibleJComboBox, javax.swing.JComboBox.KeySelectionManager
 
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
static java.lang.String LEFT_AGG
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String LEFT_COMP
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String LEFT_REF
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String NORMAL
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String RIGHT_AGG
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String RIGHT_COMP
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String RIGHT_REF
          No comment provided by developer, please add a comment to improve documentation.
 
Fields inherited from class javax.swing.JComboBox
actionCommand, dataModel, editor, isEditable, keySelectionManager, lightWeightPopupEnabled, maximumRowCount, renderer, selectedItemReminder
 
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
KindComboBox()
          Constructor for class KindComboBox
 
Method Summary
 void adjustDirection(int direction)
          this function adjust the direction of the current selection. a aggregation or a composition.
 int getDirection()
           
 java.lang.String getSelected()
          Get the selected attribute of the KindComboBox object
 void parse(UMLRole leftRole, UMLRole rightRole)
          parse the data of the ComboBox to the leftRole and rightRole-object
 void swapDirection()
          this function swaps the direction of the selected item, if it is a aggregation or a composition.
 void unparse(UMLAssoc assoc, UMLRole leftRole, UMLRole rightRole)
          unparse the data of the leftRole and rightRole-object to the ComboBox data.
 
Methods inherited from class javax.swing.JComboBox
actionPerformed, addActionListener, addItem, addItemListener, addPopupMenuListener, configureEditor, configurePropertiesFromAction, contentsChanged, createActionPropertyChangeListener, createDefaultKeySelectionManager, fireActionEvent, fireItemStateChanged, firePopupMenuCanceled, firePopupMenuWillBecomeInvisible, firePopupMenuWillBecomeVisible, getAccessibleContext, getAction, getActionCommand, getActionListeners, getEditor, getItemAt, getItemCount, getItemListeners, getKeySelectionManager, getMaximumRowCount, getModel, getPopupMenuListeners, getPrototypeDisplayValue, getRenderer, getSelectedIndex, getSelectedItem, getSelectedObjects, getUI, getUIClassID, hidePopup, insertItemAt, installAncestorListener, intervalAdded, intervalRemoved, isEditable, isLightWeightPopupEnabled, isPopupVisible, paramString, processKeyEvent, removeActionListener, removeAllItems, removeItem, removeItemAt, removeItemListener, removePopupMenuListener, selectedItemChanged, selectWithKeyChar, setAction, setActionCommand, setEditable, setEditor, setEnabled, setKeySelectionManager, setLightWeightPopupEnabled, setMaximumRowCount, setModel, setPopupVisible, setPrototypeDisplayValue, setRenderer, setSelectedIndex, setSelectedItem, setUI, showPopup, 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, 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, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, 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
 

Field Detail

NORMAL

public static final java.lang.String NORMAL
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

RIGHT_AGG

public static final java.lang.String RIGHT_AGG
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

LEFT_AGG

public static final java.lang.String LEFT_AGG
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

RIGHT_COMP

public static final java.lang.String RIGHT_COMP
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

LEFT_COMP

public static final java.lang.String LEFT_COMP
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

LEFT_REF

public static final java.lang.String LEFT_REF
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

RIGHT_REF

public static final java.lang.String RIGHT_REF
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values
Constructor Detail

KindComboBox

public KindComboBox()
Constructor for class KindComboBox

Method Detail

swapDirection

public void swapDirection()
this function swaps the direction of the selected item, if it is a aggregation or a composition.


adjustDirection

public void adjustDirection(int direction)
this function adjust the direction of the current selection. a aggregation or a composition.

Parameters:
direction - the direction to which the selction should be adjusted (valid arguments are: UMLAssoc.LEFTRIGHT or UMLAssoc.RIGHTLEFT)

getDirection

public int getDirection()
Returns:
the direction of the current selction. If it is a aggregation or a composition the return value is UMLAssoc.LEFTRIGHT or UMLAssoc.RIGHTLEFT. Else it is -1

getSelected

public java.lang.String getSelected()
Get the selected attribute of the KindComboBox object

Returns:
The selected value

unparse

public void unparse(UMLAssoc assoc,
                    UMLRole leftRole,
                    UMLRole rightRole)
unparse the data of the leftRole and rightRole-object to the ComboBox data.

Parameters:
leftRole - the left role of the current dialog (could be null)
rightRole - the right role of the current dialog (could be null)
assoc - No description provided

parse

public void parse(UMLRole leftRole,
                  UMLRole rightRole)
parse the data of the ComboBox to the leftRole and rightRole-object

Parameters:
leftRole - the left role of the current dialog (could NOT be null)
rightRole - the right role of the current dialog (could NOT be null)