| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--org.emboss.jemboss.editor.GraphicSequenceCollection
This class can be used to get a grapical representation of a collection of sequences.
| Field Summary | |
| private  java.util.Hashtable | colorSchemeColour scheme to use | 
| private  boolean | drawBlackBoxdraw black square around residues | 
| private  boolean | drawColorBoxcolour residues | 
| private  boolean | drawNumberdraw sequence position number | 
| private  boolean | drawSequencedraw the sequence | 
| private  java.util.Vector | graphicNameVector containing graphical names of sequences | 
| private  java.util.Vector | graphicSequenceVector containing graphical sequences | 
| private  int | hgt | 
| private  int | hgtName | 
| private  javax.swing.JScrollPane | jspSequencesequence scrollpane | 
| private  int | len | 
| private  int | lenName | 
| private  int | MAXSEQLENGTH | 
| private  SequenceJPanel | numberDraw | 
| private  int | numResiduePerLinenumber of residues on each line for print | 
| private  PlotConsensus | pcConsensus plot | 
| private  javax.swing.Box | plotconsSeqBox | 
| private  int | plotConStrut | 
| private  boolean | prettPlot | 
| private  java.util.Vector | removedSeqsVector of sequences removed from panel | 
| private  javax.swing.Box | seqBox | 
| private  javax.swing.Box | seqNameBox | 
| private  javax.swing.JPanel | seqNamePanel | 
| private  java.util.Vector | seqsVector containing Sequence objects | 
| Fields inherited from class javax.swing.JPanel | 
|  | 
| 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.Container | 
|  | 
| 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 | |
| GraphicSequenceCollection(java.util.Vector seqs,
                          java.util.Hashtable colorScheme,
                          javax.swing.JScrollPane jspSequence,
                          boolean drawSequence,
                          boolean drawBlackBox,
                          boolean drawColorBox,
                          boolean drawNumber,
                          javax.swing.JTextField statusField) | |
| GraphicSequenceCollection(java.util.Vector seqs,
                          javax.swing.JScrollPane jspSequence,
                          boolean drawSequence,
                          boolean drawBlackBox,
                          boolean drawColorBox,
                          boolean drawNumber,
                          javax.swing.JTextField statusField) | |
| Method Summary | |
| protected  void | addSequence(Sequence seq,
            boolean addToSequences,
            int ypad,
            int fontSize)Add a sequence to the sequence collection display and to the collection of sequences (seqs) with a specified y-padding. | 
| protected  void | addSequence(Sequence seq,
            boolean addToSequences,
            int ypad,
            int fontSize,
            int index)Add a sequence at a particular index to the sequence collection display and to the collection of sequences (seqs) with a specified y-padding. | 
| protected  void | deleteConsensusPlot() | 
| protected  void | deleteSequence(java.lang.String name)Delete a sequence from the sequence collection display and resize the sequence panel display | 
|  void | drawSequences(java.awt.Graphics2D g2d,
              java.awt.print.PageFormat format,
              int pageIndex) | 
|  void | drawSequences(java.awt.Graphics2D g2d,
              java.awt.print.PageFormat format,
              int pageIndex,
              int numResPerLine) | 
| private  int | findMiddle(int newResPos,
           int viewWidth,
           java.lang.String pat)Locate the center of a vieport view that contains the defined position to display | 
|  int | findPattern(java.lang.String pat,
            int oldResPosition,
            boolean wrapAround)Search sequences for a pattern and highlight matches. | 
| protected  java.awt.Color | getColor(java.lang.String s,
         int pos,
         java.lang.String seqName) | 
|  int | getFontSize() | 
|  java.util.Vector | getGraphicSequence() | 
|  int | getMaxSeqLength() | 
|  int | getNameHeight() | 
|  java.awt.Dimension | getNameViewSize()Get the sequence name view size | 
|  int | getNameWidth() | 
|  int | getNumberPages(java.awt.print.PageFormat format) | 
|  int | getNumberPages(java.awt.print.PageFormat format,
               int numResPerLine) | 
|  int | getPanelHeight() | 
|  java.awt.Dimension | getPanelSize() | 
|  int | getPanelWidth() | 
|  java.awt.Dimension | getPreferredScrollableViewportSize() | 
|  int | getResiduesPerLine(java.awt.print.PageFormat format) | 
|  int | getResiduesPerPage(java.awt.print.PageFormat format,
                   int numResPerLine) | 
|  int | getScrollableBlockIncrement(java.awt.Rectangle r,
                            int orientation,
                            int direction) | 
|  boolean | getScrollableTracksViewportHeight() | 
|  boolean | getScrollableTracksViewportWidth() | 
|  int | getScrollableUnitIncrement(java.awt.Rectangle r,
                           int orientation,
                           int direction) | 
| protected  java.util.Vector | getSequenceCollection() | 
| protected  java.awt.Point | getViewPosition() | 
| protected  java.awt.Rectangle | getViewRect() | 
|  java.awt.Dimension | getViewSize()Get the sequence view size | 
| protected  void | idSort() | 
| static void | main(java.lang.String[] args) | 
| protected  void | moveSequence(java.lang.String name,
             int i) | 
|  int | print(java.awt.Graphics g,
      java.awt.print.PageFormat format,
      int pageIndex) | 
| private  Sequence | removeSequence(java.lang.String name) | 
| private  int | searchSequences(int startSearch,
                java.lang.String pat)Search the sequences for the position in that matches the given pattern to search for. | 
|  void | setColorScheme(java.util.Hashtable colourTable) | 
|  void | setDrawBoxes(boolean drawBlackBox) | 
|  void | setDrawColor(boolean drawColorBox) | 
|  void | setFontSizeForCollection(int fs) | 
|  void | setJScrollPaneViewportView() | 
| private  void | setMaxSeqLength() | 
| protected  void | setMaxSequenceLength(int max) | 
|  void | setNamePanelWidth(int x) | 
| protected  void | setNumberOfResiduesPerLine(int numResiduePerLine) | 
| private  void | setNumberSize() | 
|  void | setPrettyPlot(boolean bpretty) | 
| protected  void | setSequenceSelection(boolean b) | 
| protected  void | showConsensusPlot(java.io.File matrix,
                  int wsize) | 
| protected  void | showConsensusPlot(Matrix mat,
                  int wsize) | 
| Methods inherited from class javax.swing.JPanel | 
| getAccessibleContext, getUI, getUIClassID, paramString, setUI, 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, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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 | 
private java.util.Vector removedSeqs
private java.util.Vector seqs
private java.util.Vector graphicSequence
private java.util.Vector graphicName
private java.util.Hashtable colorScheme
private PlotConsensus pc
private int lenName
private int hgtName
private int hgt
private int len
private int MAXSEQLENGTH
private int numResiduePerLine
private SequenceJPanel numberDraw
private javax.swing.JScrollPane jspSequence
private javax.swing.JPanel seqNamePanel
private javax.swing.Box seqBox
private javax.swing.Box seqNameBox
private javax.swing.Box plotconsSeqBox
private boolean drawSequence
private boolean drawBlackBox
private boolean drawColorBox
private boolean drawNumber
private boolean prettPlot
private int plotConStrut
| Constructor Detail | 
public GraphicSequenceCollection(java.util.Vector seqs,
                                 java.util.Hashtable colorScheme,
                                 javax.swing.JScrollPane jspSequence,
                                 boolean drawSequence,
                                 boolean drawBlackBox,
                                 boolean drawColorBox,
                                 boolean drawNumber,
                                 javax.swing.JTextField statusField)
seqs - vector of sequencescolorScheme - sequence colour schemejspSequence - sequence scrollpanedrawSequence - true to draw the sequencedrawBlackBox - true to draw black square around residuesdrawColorBox - true to colour residuesdrawNumber - true to draw sequence position numberstatusField - status field in the editor
public GraphicSequenceCollection(java.util.Vector seqs,
                                 javax.swing.JScrollPane jspSequence,
                                 boolean drawSequence,
                                 boolean drawBlackBox,
                                 boolean drawColorBox,
                                 boolean drawNumber,
                                 javax.swing.JTextField statusField)
| Method Detail | 
protected java.util.Vector getSequenceCollection()
protected java.awt.Point getViewPosition()
protected java.awt.Rectangle getViewRect()
protected void showConsensusPlot(java.io.File matrix,
                                 int wsize)
protected void showConsensusPlot(Matrix mat,
                                 int wsize)
protected void deleteConsensusPlot()
protected void setMaxSequenceLength(int max)
private void setMaxSeqLength()
public int getMaxSeqLength()
protected void setSequenceSelection(boolean b)
private void setNumberSize()
protected java.awt.Color getColor(java.lang.String s,
                                  int pos,
                                  java.lang.String seqName)
private Sequence removeSequence(java.lang.String name)
protected void deleteSequence(java.lang.String name)
protected void moveSequence(java.lang.String name,
                            int i)
protected void idSort()
protected void addSequence(Sequence seq,
                           boolean addToSequences,
                           int ypad,
                           int fontSize,
                           int index)
protected void addSequence(Sequence seq,
                           boolean addToSequences,
                           int ypad,
                           int fontSize)
public java.awt.Dimension getViewSize()
public java.awt.Dimension getNameViewSize()
public java.awt.Dimension getPanelSize()
public int getNameHeight()
public int getNameWidth()
public void setNamePanelWidth(int x)
public int getPanelHeight()
public int getPanelWidth()
public java.util.Vector getGraphicSequence()
public void setDrawBoxes(boolean drawBlackBox)
public void setDrawColor(boolean drawColorBox)
public void setFontSizeForCollection(int fs)
public int getFontSize()
public int findPattern(java.lang.String pat,
                       int oldResPosition,
                       boolean wrapAround)
private int searchSequences(int startSearch,
                            java.lang.String pat)
private int findMiddle(int newResPos,
                       int viewWidth,
                       java.lang.String pat)
public void setColorScheme(java.util.Hashtable colourTable)
public void setPrettyPlot(boolean bpretty)
public void setJScrollPaneViewportView()
public int getNumberPages(java.awt.print.PageFormat format)
public int getNumberPages(java.awt.print.PageFormat format,
                          int numResPerLine)
public int getResiduesPerLine(java.awt.print.PageFormat format)
public int getResiduesPerPage(java.awt.print.PageFormat format,
                              int numResPerLine)
public int print(java.awt.Graphics g,
                 java.awt.print.PageFormat format,
                 int pageIndex)
          throws java.awt.print.PrinterException
print in interface java.awt.print.Printablejava.awt.print.PrinterExceptionprotected void setNumberOfResiduesPerLine(int numResiduePerLine)
public void drawSequences(java.awt.Graphics2D g2d,
                          java.awt.print.PageFormat format,
                          int pageIndex)
public void drawSequences(java.awt.Graphics2D g2d,
                          java.awt.print.PageFormat format,
                          int pageIndex,
                          int numResPerLine)
public java.awt.Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize in interface javax.swing.Scrollablepublic boolean getScrollableTracksViewportHeight()
getScrollableTracksViewportHeight in interface javax.swing.Scrollablepublic boolean getScrollableTracksViewportWidth()
getScrollableTracksViewportWidth in interface javax.swing.Scrollable
public int getScrollableBlockIncrement(java.awt.Rectangle r,
                                       int orientation,
                                       int direction)
getScrollableBlockIncrement in interface javax.swing.Scrollable
public int getScrollableUnitIncrement(java.awt.Rectangle r,
                                      int orientation,
                                      int direction)
getScrollableUnitIncrement in interface javax.swing.Scrollablepublic static void main(java.lang.String[] args)
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||