Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.visual.ui
Class ValueDisplayer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.AbstractButton
                  extended by javax.swing.JButton
                      extended by cytoscape.visual.ui.ValueDisplayer
All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants

Deprecated. Will be removed 5/2008

@Deprecated
public class ValueDisplayer
extends JButton

Given an Object, figures out the class of the object and creates a JButton suitable for displaying the value of that object. When the button is pressed, it should pop up a user interface to change the value. The class interested in the selection of the ValueDisplayer should add an ItemListener to the button. The ItemListener is triggered when the user's selection changes.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Field Summary
static byte ARROW
          Deprecated. Display and get input for an arrowhead
static byte COLOR
          Deprecated. Display and get input for a color
static byte DOUBLE
          Deprecated. Display and get input for a double
static byte FONT
          Deprecated. Display and get input for a font
static DecimalFormat formatter
          Deprecated. Formatting for numeric types.
static byte INT
          Deprecated. Display and get input for an int
static byte LABEL_POSITION
          Deprecated. Display and get input for label position
static byte LINETYPE
          Deprecated. Display and get input for a linetype
static byte NODESHAPE
          Deprecated. Display and get input for node shape
static byte STRING
          Deprecated. Display and get input for a string
 
Fields inherited from class javax.swing.AbstractButton
BORDER_PAINTED_CHANGED_PROPERTY, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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 javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Method Summary
static ValueDisplayer getBlankDisplayFor(JDialog parent, String title, byte type)
          Deprecated. Get a blank or default display/input pair for a given type of input.
static ValueDisplayer getBlankDisplayFor(JDialog parent, String title, Object sampleObj)
          Deprecated. Get a blank or default display/input pair for the given sample object, which itself is ignored.
static ValueDisplayer getDisplayFor(JDialog parent, String title, Object o)
          Deprecated. Get a display/input pair initialized to a given type of input.
static ValueDisplayer getDisplayForColor(JDialog parent, String title, Color c)
          Deprecated. DOCUMENT ME!
static ValueDisplayer getDisplayForLabelPosition(JDialog parent, String title, LabelPosition c)
          Deprecated. DOCUMENT ME!
 ActionListener getInputListener()
          Deprecated. Returns the ActionListener that will pop up the input UI when triggered.
 Object getSelectedItem()
          Deprecated. Provided for convenience.
 byte getType()
          Deprecated. Returns the type of input this ValueDisplayer displays/gets input for
 Object getValue()
          Deprecated. Returns an object representing the user input.
 void setEnabled(boolean b)
          Deprecated. Set the ValueDisplayer active/inactive.
 void setObject(Object o)
          Deprecated. Externally sets the object displayed.
 
Methods inherited from class javax.swing.JButton
getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, removeNotify, setDefaultCapable, updateUI
 
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addItemListener, doClick, doClick, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

formatter

public static DecimalFormat formatter
Deprecated. 
Formatting for numeric types.


COLOR

public static final byte COLOR
Deprecated. 
Display and get input for a color

See Also:
Constant Field Values

LINETYPE

public static final byte LINETYPE
Deprecated. 
Display and get input for a linetype

See Also:
Constant Field Values

ARROW

public static final byte ARROW
Deprecated. 
Display and get input for an arrowhead

See Also:
Constant Field Values

STRING

public static final byte STRING
Deprecated. 
Display and get input for a string

See Also:
Constant Field Values

DOUBLE

public static final byte DOUBLE
Deprecated. 
Display and get input for a double

See Also:
Constant Field Values

NODESHAPE

public static final byte NODESHAPE
Deprecated. 
Display and get input for node shape

See Also:
Constant Field Values

INT

public static final byte INT
Deprecated. 
Display and get input for an int

See Also:
Constant Field Values

FONT

public static final byte FONT
Deprecated. 
Display and get input for a font

See Also:
Constant Field Values

LABEL_POSITION

public static final byte LABEL_POSITION
Deprecated. 
Display and get input for label position

See Also:
Constant Field Values
Method Detail

getSelectedItem

public Object getSelectedItem()
Deprecated. 
Provided for convenience.

Returns:
User-selected object displayed by this ValueDisplayer
See Also:
getValue()

getValue

public Object getValue()
Deprecated. 
Returns an object representing the user input. The return value is always an object type. It may be a String, Number, Arrow, LineType, or Byte depending on what type the ValueDisplayer was initialized with.

Returns:
User-selected object displayed by this ValueDisplayer

getInputListener

public ActionListener getInputListener()
Deprecated. 
Returns the ActionListener that will pop up the input UI when triggered. Attach this to a component to trigger input on a click.


getType

public byte getType()
Deprecated. 
Returns the type of input this ValueDisplayer displays/gets input for


setEnabled

public void setEnabled(boolean b)
Deprecated. 
Set the ValueDisplayer active/inactive.

Overrides:
setEnabled in class AbstractButton
Parameters:
b - true to enable, false to disable

getDisplayForLabelPosition

public static ValueDisplayer getDisplayForLabelPosition(JDialog parent,
                                                        String title,
                                                        LabelPosition c)
Deprecated. 
DOCUMENT ME!

Parameters:
parent - DOCUMENT ME!
title - DOCUMENT ME!
c - DOCUMENT ME!
Returns:
DOCUMENT ME!

getDisplayForColor

public static ValueDisplayer getDisplayForColor(JDialog parent,
                                                String title,
                                                Color c)
Deprecated. 
DOCUMENT ME!

Parameters:
parent - DOCUMENT ME!
title - DOCUMENT ME!
c - DOCUMENT ME!
Returns:
DOCUMENT ME!

setObject

public void setObject(Object o)
               throws ClassCastException
Deprecated. 
Externally sets the object displayed. Ensure that the class is the same. Does not fire an itemSelected event.

Throws:
ClassCastException - if caller attempts to set an object different from what was being represented.

getBlankDisplayFor

public static ValueDisplayer getBlankDisplayFor(JDialog parent,
                                                String title,
                                                byte type)
Deprecated. 
Get a blank or default display/input pair for a given type of input.

Parameters:
parent - The parent dialog for the returned ValueDisplayer
title - Title to display for input dialog
type - Type of input, one of COLOR, LINETYPE, NODESHAPE, ARROW, STRING, DOUBLE, INT, FONT
Returns:
ValueDisplayer initialized for given input
Throws:
ClassCastException - if you didn't pass in a known type

getBlankDisplayFor

public static ValueDisplayer getBlankDisplayFor(JDialog parent,
                                                String title,
                                                Object sampleObj)
Deprecated. 
Get a blank or default display/input pair for the given sample object, which itself is ignored.

Parameters:
parent - The parent dialog for the returned ValueDisplayer
title - Title to display for input dialog
o -
Returns:
ValueDisplayer initialized for given input
Throws:
ClassCastException - if you didn't pass in a known type

getDisplayFor

public static ValueDisplayer getDisplayFor(JDialog parent,
                                           String title,
                                           Object o)
                                    throws ClassCastException
Deprecated. 
Get a display/input pair initialized to a given type of input. If sending fonts, must send fonts as gotten from GraphicsEnvrionment

Parameters:
parent - The parent dialog for the returned ValueDisplayer
o - Object to represent. Should be a Color, LineType, node shape (byte), arrow, string, or number
Returns:
ValueDisplayer displaying the given object and accepting input for given object
Throws:
ClassCastException - if you didn't pass in a known type

www.cytoscape.org