jadex.swing.map
Class MapCartoon

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--jadex.swing.map.MapCartoon
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.beans.PropertyChangeListener, java.io.Serializable

public class MapCartoon
extends javax.swing.JPanel
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.beans.PropertyChangeListener

This customized JPanel is used to show the displayed region on the chromosome. It is also used as a zooming tool.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
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
MapCartoon()
          Creates new MapCartoon
MapCartoon(float lengthF)
          An overloaded constructor.
MapCartoon(long length)
          An overloaded constructor.
MapCartoon(MapRange scale)
          An overloaded constructor.
 
Method Summary
 MapRange getMap()
          Get the total MaRange for the chromosome.
 MapRange getRange()
          Getter for property range.
static void main(java.lang.String[] args)
           
 void mouseClicked(java.awt.event.MouseEvent p1)
          Do nothing here.
 void mouseDragged(java.awt.event.MouseEvent p1)
          Zooming by creating rectangels.
 void mouseEntered(java.awt.event.MouseEvent p1)
          Do nothing here.
 void mouseExited(java.awt.event.MouseEvent p1)
          Do nothing.
 void mouseMoved(java.awt.event.MouseEvent p1)
          Do nothing.
 void mousePressed(java.awt.event.MouseEvent p1)
          Start up the zooming.
 void mouseReleased(java.awt.event.MouseEvent p1)
          End the zooming.
 void paintComponent(java.awt.Graphics g)
          The most important method.
 void propertyChange(java.beans.PropertyChangeEvent p1)
          Listening to the Range property change.
 void setMainLoci(jade.db.AceObject[] loci)
          Deprecated. do not use this method. See LocusPanel.
 void setMap(MapRange r)
          An initilization method.
 void setMapControl(MapControl c)
          Set the MapControl as the central control to coordinate all zooming activites.
 void setMapRange(MapRange r)
          Set the displayed MapRange.
 void setTotalLengthF(float lengthF)
          Set the total length of the chromosome in float.
 void setTotalLengthL(long length)
          Set the total length of the chromosome this cartoon represents.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapCartoon

public MapCartoon()
Creates new MapCartoon

MapCartoon

public MapCartoon(long length)
An overloaded constructor. This constructor can be used for clone or sequence maps.
Parameters:
length - the total length of the chromosome.

MapCartoon

public MapCartoon(float lengthF)
An overloaded constructor. This constructor is for the Genetic_map.
Parameters:
lengthF - the total length of the chromosome in float unit.

MapCartoon

public MapCartoon(MapRange scale)
An overloaded constructor.
Parameters:
scale - the MapRange of the chromosome.
Method Detail

setMapControl

public void setMapControl(MapControl c)
Set the MapControl as the central control to coordinate all zooming activites.
Parameters:
c - the MapControl for coordination.

setMap

public void setMap(MapRange r)
An initilization method. Set the initial maprange.
Parameters:
r - the MapRange to be displayed. If this is the first time, the total MapRange is also set up.

getMap

public MapRange getMap()
Get the total MaRange for the chromosome.
Returns:
the total maprange.

setTotalLengthL

public void setTotalLengthL(long length)
Set the total length of the chromosome this cartoon represents.
Parameters:
length - the total length of the chromosome.

setTotalLengthF

public void setTotalLengthF(float lengthF)
Set the total length of the chromosome in float. This method is for the Genetic_maps.
Parameters:
lengthF - the total length of the chromosome in float.

setMainLoci

public void setMainLoci(jade.db.AceObject[] loci)
Deprecated. do not use this method. See LocusPanel.

Set the marks.
Parameters:
loci - the data for the markers.

paintComponent

public void paintComponent(java.awt.Graphics g)
The most important method.
Overrides:
paintComponent in class javax.swing.JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.paint(java.awt.Graphics)

setMapRange

public void setMapRange(MapRange r)
Set the displayed MapRange. Clients should call this method.
Parameters:
r - the MapRange to be displayed.

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent p1)
End the zooming.
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent p1)
Do nothing here.
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent p1)
Do nothing here.
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent p1)
Start up the zooming.
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent p1)
Do nothing.
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent p1)
Zooming by creating rectangels.
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent p1)
Do nothing.
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

getRange

public MapRange getRange()
Getter for property range.
Returns:
Value of property range.

main

public static void main(java.lang.String[] args)

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent p1)
Listening to the Range property change.
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.