cytoscape.visual.ui
Class VizMapAttrTab

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 cytoscape.visual.ui.VizMapTab
                      extended by cytoscape.visual.ui.VizMapAttrTab
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class VizMapAttrTab
extends VizMapTab

VizMapAttrTab implements a tab for each mappable attribute of the graph except the size tab, which is a special case. These tabs are displayed in the Set Visual Properties dialog.

See Also:
Serialized Form

Nested Class Summary
protected  class VizMapAttrTab.CalculatorUIListener
          CalculatorUIListener listens to the current calculator for the visual attribute displayed by this tab.
protected  class VizMapAttrTab.TabContainerListener
          TabContainerListener refreshes the tab's UI when the tab becomes visible.
 
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
protected  VizMapAttrTab.CalculatorUIListener calcListener
          Listener for calculator UI changes
 
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
VizMapAttrTab(VizMapUI mainUI, JTabbedPane tabContainer, int tabIndex, VisualMappingManager VMM, byte type)
          create a new tab representing the underlying type.
 
Method Summary
protected  void drawCalc()
          Draws the panel containing the calculator selection combo box and the calculator manipulation buttons.
protected  void drawDefault(Object defaultObj)
          Builds the panel for displaying and changing the default value for this visual attribute.
protected  ImageIcon getImageIcon()
          Returns an ImageIcon suitable for this visual attribute, or null if we don't have an icon for this particular visual attribute.
protected static String getTypeName(byte type)
           
protected  void rebuildCalcComboBox()
          Creates the combo box for selecting a calculator and adds it to the appropriate panel after first removing any previous combo box.
 void refreshUI()
          Refreshes the panel that displays the UI for the currently selected calculator.
protected  void setCurrentCalculator(Calculator newCalculator)
          Changes the 'currentCalculator' field of this class to the new calculator specified by the argument.
 void visualStyleChanged()
          Alert the VizMapAttrTab that the relevant visual style has changed.
 
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
 

Field Detail

calcListener

protected VizMapAttrTab.CalculatorUIListener calcListener
Listener for calculator UI changes

Constructor Detail

VizMapAttrTab

public VizMapAttrTab(VizMapUI mainUI,
                     JTabbedPane tabContainer,
                     int tabIndex,
                     VisualMappingManager VMM,
                     byte type)
create a new tab representing the underlying type. Retrieve current calculator and default settings from the VMM.

Parameters:
VMM - VisualMappingManager for the window
tabContainer - The containing JTabbedPane
tabIndex - index of this tab in tabContainer
n - Underlying network
type - One of types defined in VisualMappingManager
c -
Method Detail

visualStyleChanged

public void visualStyleChanged()
Alert the VizMapAttrTab that the relevant visual style has changed.

Specified by:
visualStyleChanged in class VizMapTab

refreshUI

public void refreshUI()
Refreshes the panel that displays the UI for the currently selected calculator. This method replaces the current panel with the panel provided by the current calculator, or nothing if there is no currently selected calculator.

Specified by:
refreshUI in class VizMapTab

setCurrentCalculator

protected void setCurrentCalculator(Calculator newCalculator)
Changes the 'currentCalculator' field of this class to the new calculator specified by the argument. A null argument is allowed. This method also detaches the CalculatorUIListener from the old calculator, and attaches it to the new one iff the argument is not null. This method should be called whenever the visual style is changed, or when the calculator for this object's visual attribute is switched to a different calculator. If the change is made by a member of this class, they should call this method instead of directly changing the currentCalculator field (to make sure that the listener is properly updated). If the change was instead made directly to the underlying visual style, then a listener should respond by calling this method with the new calculator.


drawDefault

protected void drawDefault(Object defaultObj)
Builds the panel for displaying and changing the default value for this visual attribute.


getImageIcon

protected ImageIcon getImageIcon()
Returns an ImageIcon suitable for this visual attribute, or null if we don't have an icon for this particular visual attribute.


rebuildCalcComboBox

protected void rebuildCalcComboBox()
Creates the combo box for selecting a calculator and adds it to the appropriate panel after first removing any previous combo box.


drawCalc

protected void drawCalc()
Draws the panel containing the calculator selection combo box and the calculator manipulation buttons. The panel containing the UI for the current calculator is added later by refreshUI. Called only once; afterwards the UI is refreshed through either rebuildCalcComboBox, which refreshes the calculator selection combo box, or refreshUI which refreshes the current calculator view.


getTypeName

protected static String getTypeName(byte type)