Version: 1.1.1

ca.ucalgary.seahawk.gui
Class MobyContentClipboard

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 ca.ucalgary.seahawk.gui.MobyContentPane
                      extended by ca.ucalgary.seahawk.gui.MobyContentClipboard
All Implemented Interfaces:
DataImportChoiceListener, ClipboardOwner, ActionListener, KeyListener, MouseListener, MouseMotionListener, ImageObserver, MenuContainer, Printable, Serializable, EventListener, Accessible, CaretListener, ChangeListener, HyperlinkListener, MobyRequestEventHandler

public class MobyContentClipboard
extends MobyContentPane
implements DataImportChoiceListener

The clipboard is a special tab that holds a query with a MOBY Collection that the user can add and subtract MobyDataInstances from.

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 String CLEAR_CLIPBOARD_OPTION
           
static String CLIPBOARD_COLLECTION_NAME
           
static String CLIPBOARD_FILE_NAME
           
static String CLIPBOARD_QUERY_NAME
           
static Color CLIPBOARD_TAB_COLOR
           
static String CLIPBOARD_TAB_ICON_RESOURCE
           
static String CLIPBOARD_TAB_NAME
           
 
Fields inherited from class ca.ucalgary.seahawk.gui.MobyContentPane
FAILED_TAB_ICON_RESOURCE, LOADED_TAB_ICON_RESOURCE, MOBY_SERVICE_POPUP_NAME, SERVICE_CREATION_MSG, WAITING_TAB_ICON_RESOURCE, WRAPPING_RESULTFILE_PREFIX, XSL_DOC_SOURCE_PARAM
 
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 java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
MobyContentClipboard(MobyContentGUI cGUI, MobyServicesGUI sGUI, JTabbedPane parentComponent, DataFlowRecorder recorder, JLabel statusBar)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void addCollectionData(MobyContentInstance mci)
          Objects in the content instance will be flattened into a list and appended to the current contents of the collection.
 void addCollectionData(MobyDataInstance mdi)
          The main way to add data to the clipboard, data gets appended to the query with the name given in CLIPBOARD_COLLECTION_NAME
 void addCollectionData(MobyDataInstance mdi, boolean updateDisplay)
           
 void addCollectionData(URL u)
          Attempts to add data from the given URL as MOBY objects (converting if necessary).
 void addData(String title, MobyDataInstance mdi)
          Adds a query to the clipboard with the since MobyDataInstance attached to it.
 boolean canGoBack()
          history is disabled for the clipboard
 boolean canGoForward()
          history is disabled for the clipboard
 void clearData()
           
 MobyDataObjectSet getCollection()
          Get the Java representation of the data in the main clipboard collection.
 MobyContentInstance getContents()
          Get the Java representation of the data on the clipboard (as a MOBY data envelope), including any possible non-standard contents.
 URL getCurrentURL()
          Overrides the default implementation in parent class because the clipboard does not have a standard history.
 String getXMLSource()
           
 boolean hasXMLSource()
           
 void importCanceled(DataImportChoiceDialog dialog)
           
 void importConfirmed(DataImportChoiceDialog dialog, MobyDataObject[] selectedData)
           
 void init()
          Sets up temporary files, icons, etc.
 boolean removeCollectionData(MobyDataInstance itemToDelete)
           
 void stateChanged(ChangeEvent ce)
           
 void updateDisplay()
           
 
Methods inherited from class ca.ucalgary.seahawk.gui.MobyContentPane
canFilter, caretUpdate, exportDone, failed, getContentGUI, getDataFlowRecorder, getDisplay, getDraggedData, getExportOption, getFilter, getHistoryIndex, getHistorySize, getHTMLSource, getTabbedPaneParent, getWrappingEnabled, goBackward, goForward, gotoURL, hasFailure, hyperlinkUpdate, isFilterForwardConsistent, isMobyURL, isWrappingService, keyPressed, keyReleased, keyTyped, lostOwnership, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paste, print, processEvent, setFilterVisible, setPreferredSize, setStatus, setWaitScreen, setWrappingEnabled, start, stop, succeeded
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, 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, 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, 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, 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

CLEAR_CLIPBOARD_OPTION

public static final String CLEAR_CLIPBOARD_OPTION
See Also:
Constant Field Values

CLIPBOARD_FILE_NAME

public static final String CLIPBOARD_FILE_NAME
See Also:
Constant Field Values

CLIPBOARD_COLLECTION_NAME

public static final String CLIPBOARD_COLLECTION_NAME
See Also:
Constant Field Values

CLIPBOARD_QUERY_NAME

public static final String CLIPBOARD_QUERY_NAME
See Also:
Constant Field Values

CLIPBOARD_TAB_NAME

public static final String CLIPBOARD_TAB_NAME
See Also:
Constant Field Values

CLIPBOARD_TAB_COLOR

public static final Color CLIPBOARD_TAB_COLOR

CLIPBOARD_TAB_ICON_RESOURCE

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

MobyContentClipboard

public MobyContentClipboard(MobyContentGUI cGUI,
                            MobyServicesGUI sGUI,
                            JTabbedPane parentComponent,
                            DataFlowRecorder recorder,
                            JLabel statusBar)
Method Detail

stateChanged

public void stateChanged(ChangeEvent ce)
Specified by:
stateChanged in interface ChangeListener
Overrides:
stateChanged in class MobyContentPane

init

public void init()
Sets up temporary files, icons, etc.


canGoBack

public boolean canGoBack()
history is disabled for the clipboard

Overrides:
canGoBack in class MobyContentPane

canGoForward

public boolean canGoForward()
history is disabled for the clipboard

Overrides:
canGoForward in class MobyContentPane

removeCollectionData

public boolean removeCollectionData(MobyDataInstance itemToDelete)
Returns:
true if the object was in the collection and was removed

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener
Overrides:
actionPerformed in class MobyContentPane

addData

public void addData(String title,
                    MobyDataInstance mdi)
Adds a query to the clipboard with the since MobyDataInstance attached to it.

Parameters:
title - the name to show for the object on the clipboard, will replace any existing query with same title
mdi - the data object to add to the clipboard

addCollectionData

public void addCollectionData(MobyDataInstance mdi)
The main way to add data to the clipboard, data gets appended to the query with the name given in CLIPBOARD_COLLECTION_NAME

Parameters:
mdi - the data to be added to the main clipboard collection

addCollectionData

public void addCollectionData(MobyDataInstance mdi,
                              boolean updateDisplay)

addCollectionData

public void addCollectionData(MobyContentInstance mci)
Objects in the content instance will be flattened into a list and appended to the current contents of the collection.


addCollectionData

public void addCollectionData(URL u)
Attempts to add data from the given URL as MOBY objects (converting if necessary). The conversion is "smart", and so if you have 2 DNASequences on the clipboard already, it will try to extract DNASequences from the URL data first, then other types.


importConfirmed

public void importConfirmed(DataImportChoiceDialog dialog,
                            MobyDataObject[] selectedData)
Specified by:
importConfirmed in interface DataImportChoiceListener

importCanceled

public void importCanceled(DataImportChoiceDialog dialog)
Specified by:
importCanceled in interface DataImportChoiceListener

hasXMLSource

public boolean hasXMLSource()
Overrides:
hasXMLSource in class MobyContentPane

getXMLSource

public String getXMLSource()
                    throws IOException
Overrides:
getXMLSource in class MobyContentPane
Throws:
IOException

getCurrentURL

public URL getCurrentURL()
Overrides the default implementation in parent class because the clipboard does not have a standard history.

Overrides:
getCurrentURL in class MobyContentPane

updateDisplay

public void updateDisplay()

getContents

public MobyContentInstance getContents()
Get the Java representation of the data on the clipboard (as a MOBY data envelope), including any possible non-standard contents. The standard way to access the clipboard is getCollection(). Note that changing the returned object changes the clipboard, but this is strongly discouraged because the display will not reflect the changes until updateDisplay() is called.


getCollection

public MobyDataObjectSet getCollection()
Get the Java representation of the data in the main clipboard collection. Note that changing the returned object changes the clipboard, but this is strongly discouraged because the display will not reflect the changes until updateDisplay() is called.


clearData

public void clearData()

Version: 1.1.1

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