Version: 1.1.1

ca.ucalgary.seahawk.gui
Class MobyDataObjectWidget

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JLabel
                  extended by ca.ucalgary.seahawk.gui.MobyDataObjectWidget
All Implemented Interfaces:
MobyContentProducer, MobyObjectReceiver, ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

public class MobyDataObjectWidget
extends JLabel
implements MobyObjectReceiver, MobyContentProducer

A visual representation of a primary data object in Seahawk, intended for being a placeholder for data if it is not instantiated yet, allowing the user to drop data onto it via a MobyObjectTransferHandler (hence the implementation of MobyObjectReceiver).

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
 
Field Summary
static Color INSTANTIATED_FG_COLOUR
           
static String INSTANTIATED_ICON_RESOURCE
           
static int MAX_DATA_DESC
           
static int PARAM_TOOLTIP_WIDTH
           
static Color UNINSTANTIATED_FG_COLOUR
           
static String UNINSTANTIATED_ICON_RESOURCE
           
 
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
 
Constructor Summary
MobyDataObjectWidget(String articleName, MobyClient client, MobyDataInstance data, boolean editable)
          C-tor for instantiated data.
MobyDataObjectWidget(String articleName, MobyClient client, MobyDataType dataType, MobyNamespace[] nss, boolean isaCollection)
          C-tor for uninstantiated data.
MobyDataObjectWidget(String articleName, MobyClient client, MobyPrimaryData data)
           
 
Method Summary
 void addActionListener(ActionListener al)
          Any object registering themselves here will receive a callback when the value of the data changes.
 void consumeMobyObject(String incomingName, MobyDataInstance incomingData)
          Callback routine MobyObjectTransferHandler calls when suitable data has been dropped on this widget.
 MobyContentInstance exportMobyContent()
          Used to send data out to the clipboard.
 Map<String,MobyPrimaryData> getAcceptableData()
          List of data that we are willing to consume in consumeMobyObject() at the given moment.
 MobyPrimaryData getData()
           
 String getName()
           
 boolean removeActionListener(ActionListener al)
           
 
Methods inherited from class javax.swing.JLabel
getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, 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, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, 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, setLayout, 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, 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

PARAM_TOOLTIP_WIDTH

public static final int PARAM_TOOLTIP_WIDTH
See Also:
Constant Field Values

MAX_DATA_DESC

public static final int MAX_DATA_DESC
See Also:
Constant Field Values

INSTANTIATED_FG_COLOUR

public static final Color INSTANTIATED_FG_COLOUR

UNINSTANTIATED_FG_COLOUR

public static final Color UNINSTANTIATED_FG_COLOUR

INSTANTIATED_ICON_RESOURCE

public static final String INSTANTIATED_ICON_RESOURCE
See Also:
Constant Field Values

UNINSTANTIATED_ICON_RESOURCE

public static final String UNINSTANTIATED_ICON_RESOURCE
See Also:
Constant Field Values
Constructor Detail

MobyDataObjectWidget

public MobyDataObjectWidget(String articleName,
                            MobyClient client,
                            MobyDataInstance data,
                            boolean editable)
                     throws IllegalArgumentException
C-tor for instantiated data.

Throws:
IllegalArgumentException

MobyDataObjectWidget

public MobyDataObjectWidget(String articleName,
                            MobyClient client,
                            MobyPrimaryData data)
                     throws IllegalArgumentException
Throws:
IllegalArgumentException

MobyDataObjectWidget

public MobyDataObjectWidget(String articleName,
                            MobyClient client,
                            MobyDataType dataType,
                            MobyNamespace[] nss,
                            boolean isaCollection)
                     throws IllegalArgumentException
C-tor for uninstantiated data.

Throws:
IllegalArgumentException
Method Detail

addActionListener

public void addActionListener(ActionListener al)
Any object registering themselves here will receive a callback when the value of the data changes.


removeActionListener

public boolean removeActionListener(ActionListener al)

getName

public String getName()
Overrides:
getName in class Component

getData

public MobyPrimaryData getData()

consumeMobyObject

public void consumeMobyObject(String incomingName,
                              MobyDataInstance incomingData)
Callback routine MobyObjectTransferHandler calls when suitable data has been dropped on this widget. Could be called programmatically too to change the value of the data.

Specified by:
consumeMobyObject in interface MobyObjectReceiver

getAcceptableData

public Map<String,MobyPrimaryData> getAcceptableData()
List of data that we are willing to consume in consumeMobyObject() at the given moment. This could, for example a MobyDataObjectSet of MobyDataComposites of data type DNASequences, or a single MobyDataComposite of data type FASTA_AA.

Specified by:
getAcceptableData in interface MobyObjectReceiver

exportMobyContent

public MobyContentInstance exportMobyContent()
Used to send data out to the clipboard.

Specified by:
exportMobyContent in interface MobyContentProducer

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010