BioLegato 0.7.5 GDE plugin

org.biolegato.gdesupport.canvas
Class GDEList

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JList
                  extended by org.biolegato.gdesupport.canvas.GDEList
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.Scrollable, GDECanvasObject

public class GDEList
extends javax.swing.JList
implements java.awt.event.MouseListener, GDECanvasObject

The JList of sequences in the GDE canvas.

Author:
Graham Alvare, Brian Fristensky
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JList
javax.swing.JList.AccessibleJList
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  Dataset datamodel
          Used for the relationship between the data model and the list
 javax.swing.AbstractAction getInfoAction
          The menu item "Get info..."
 javax.swing.AbstractAction groupAction
          Action for grouping sequences in the canvas
protected  javax.swing.JPopupMenu popup
          The right click menu for the GDE sequence list.
 javax.swing.AbstractAction selectAllAction
          The menu item "Select All"
 javax.swing.AbstractAction selectByNameAction
          The abstract action "Select sequence by name"
 javax.swing.AbstractAction selectGroupAction
          The menu item "Select group"
 javax.swing.AbstractAction ungroupAction
          Action for ungrouping sequences in the canvas
 
Fields inherited from class javax.swing.JList
HORIZONTAL_WRAP, VERTICAL, VERTICAL_WRAP
 
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
GDEList(GDECanvas canvas, Dataset datamodel)
          Constructs a new GDEList
 
Method Summary
 void changeCase()
          Changes the case of the currently selected sequence (if the sequence is of inconsistent case, the case of the entire sequence is changed to the opposite case of the first character in the sequence.
 void copyClipboard()
          Returns the currently selected data in the list.
 void deleteSelection()
          Displays a window to edit the currently selected sequence's properties
 void mouseClicked(java.awt.event.MouseEvent event)
          Checks for double clicks.
 void mouseEntered(java.awt.event.MouseEvent event)
          Currently does nothing
 void mouseExited(java.awt.event.MouseEvent event)
          Currently does nothing
 void mousePressed(java.awt.event.MouseEvent event)
          Checks for right clicks.
 void mouseReleased(java.awt.event.MouseEvent event)
          Checks for right clicks.
 void paste()
          Pastes content into the current Editable object.
 void setFont(java.awt.Font font)
          Updates the font for the canvas (ensures repaint)
 void writeOut(DataFormat format, java.lang.Appendable dest)
           
 
Methods inherited from class javax.swing.JList
addListSelectionListener, addSelectionInterval, clearSelection, createSelectionModel, ensureIndexIsVisible, fireSelectionValueChanged, getAccessibleContext, getAnchorSelectionIndex, getCellBounds, getCellRenderer, getDragEnabled, getFirstVisibleIndex, getFixedCellHeight, getFixedCellWidth, getLastVisibleIndex, getLayoutOrientation, getLeadSelectionIndex, getListSelectionListeners, getMaxSelectionIndex, getMinSelectionIndex, getModel, getNextMatch, getPreferredScrollableViewportSize, getPrototypeCellValue, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedIndex, getSelectedIndices, getSelectedValue, getSelectedValues, getSelectionBackground, getSelectionForeground, getSelectionMode, getSelectionModel, getToolTipText, getUI, getUIClassID, getValueIsAdjusting, getVisibleRowCount, indexToLocation, isSelectedIndex, isSelectionEmpty, locationToIndex, paramString, removeListSelectionListener, removeSelectionInterval, setCellRenderer, setDragEnabled, setFixedCellHeight, setFixedCellWidth, setLayoutOrientation, setListData, setListData, setModel, setPrototypeCellValue, setSelectedIndex, setSelectedIndices, setSelectedValue, setSelectionBackground, setSelectionForeground, setSelectionInterval, setSelectionMode, setSelectionModel, setUI, setValueIsAdjusting, setVisibleRowCount, 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, 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, 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

popup

protected javax.swing.JPopupMenu popup
The right click menu for the GDE sequence list.


datamodel

protected Dataset datamodel
Used for the relationship between the data model and the list


selectGroupAction

public final javax.swing.AbstractAction selectGroupAction
The menu item "Select group"


getInfoAction

public final javax.swing.AbstractAction getInfoAction
The menu item "Get info..."


selectAllAction

public final javax.swing.AbstractAction selectAllAction
The menu item "Select All"


selectByNameAction

public final javax.swing.AbstractAction selectByNameAction
The abstract action "Select sequence by name"


groupAction

public final javax.swing.AbstractAction groupAction
Action for grouping sequences in the canvas


ungroupAction

public final javax.swing.AbstractAction ungroupAction
Action for ungrouping sequences in the canvas

Constructor Detail

GDEList

public GDEList(GDECanvas canvas,
               Dataset datamodel)
Constructs a new GDEList

Method Detail

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent event)
Checks for double clicks. On a double click, this method opens up a sequence properties window.

Specified by:
mouseClicked in interface java.awt.event.MouseListener
Parameters:
event - the mouse event to check for the double click.

mousePressed

public void mousePressed(java.awt.event.MouseEvent event)
Checks for right clicks. On a right click, this method opens up a popup menu

Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
event - the mouse event to check for the right click.

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent event)
Checks for right clicks. On a right click, this method opens up a popup menu

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Parameters:
event - the mouse event to check for the right click.

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent event)
Currently does nothing

Specified by:
mouseEntered in interface java.awt.event.MouseListener
Parameters:
event - ignored.

mouseExited

public void mouseExited(java.awt.event.MouseEvent event)
Currently does nothing

Specified by:
mouseExited in interface java.awt.event.MouseListener
Parameters:
event - ignored.

paste

public void paste()
Pastes content into the current Editable object.

Specified by:
paste in interface GDECanvasObject

changeCase

public void changeCase()
Changes the case of the currently selected sequence (if the sequence is of inconsistent case, the case of the entire sequence is changed to the opposite case of the first character in the sequence.

Specified by:
changeCase in interface GDECanvasObject

setFont

public void setFont(java.awt.Font font)
Updates the font for the canvas (ensures repaint)

Overrides:
setFont in class javax.swing.JComponent
Parameters:
font - the new font to handle.

deleteSelection

public void deleteSelection()
Displays a window to edit the currently selected sequence's properties

Specified by:
deleteSelection in interface GDECanvasObject

copyClipboard

public void copyClipboard()
Returns the currently selected data in the list.

Specified by:
copyClipboard in interface GDECanvasObject

writeOut

public void writeOut(DataFormat format,
                     java.lang.Appendable dest)
              throws java.io.IOException
Specified by:
writeOut in interface GDECanvasObject
Throws:
java.io.IOException

BioLegato 0.7.5 GDE plugin

Copyright © 2008-2011 University of Manitoba.