charite.christo.strap
Class StrapView
java.lang.Object
charite.christo.strap.StrapView
- All Implemented Interfaces:
- ChRunnable, Disposable, PaintHook, PreferredSize, ProcessEv, StrapListener, TooltipProvider, java.awt.event.ActionListener, java.util.EventListener
public final class StrapView
- extends java.lang.Object
- implements ChRunnable, StrapListener, Disposable, PreferredSize, java.awt.event.ActionListener, PaintHook, TooltipProvider, ProcessEv
HELP
The central view of the STRAP application is the alignment panel. It
shows the names and sequences of loaded proteins. The user can
add and remove white space to
align the sequences, so-called alignment gaps.
Usually, only one sequence alignment panel is shown but additional
alignment views can be opened ITEM:StrapAlign#ACTION_newPan.
In any case only one alignment is present in one STRAP instance.
Nevertheless, STRAP can be run several times in parallel and data
exchange between STRAP sessions is conducted by Drag-n-Drop.
Shading:
Three residue shadings are available in the tool-bar: "charge", "hydropathy" and
"chemical".
Alternatively, secondary structure can be highlighted: Helices are
painted red and sheets yellow.
Further GUI controls are in the context-menu.
Editing: Manipulation of the multiple sequence alignment is
performed with the keyboard.
STRAP has many sophisticated keyboard commands.
Please see ITEM:StrapKeyStroke.
Cursor: The cursor position is highlighted in all views with the following symbol:
ICON:IC_CURSOR16.
Usually only the alignment row containing the cursor is changed when
for example a gap is introduced by pressing the space bar.
It is often necessary to add white space to
a number of sequences and not only to one sequence.
The number of adjacent rows edited simultaneously can be set by
hitting "#" and subsequently typing a number.
Stacking proteins: Usually, each row contains exactly
one protein. The proteins can be dragged up or down in the row
header to change their order. A number of proteins can be
stacked into one single row to be manipulated simultaneously
while only the sequence of one protein is shown:
DIALOG:DialogManyInOneRow.
Residue selections are highlighted in the multiple sequence
alignment. When the mouse is over a highlighted residue a WIKI:Tooltip
with additional information appears. Right-click opens the
context meny and CTRL+left-click selects the selection. It can also be selected by dragging a rectangular region.
Scrolling:
The horizontal
scroll-bar outlines the entire alignment and shows selections and
plots. It can be enlarged with the mouse.
If there are many proteins the vertical scroll-bar is visible.
But also the horizontal
scroll-bar can scroll vertically.
Try mouse wheel turning with and without SHIFT and CTRL.
Fields inherited from interface charite.christo.ChRunnable |
APPEND, COLUMN_TITLE, DOWNLOAD_FINISHED, GET_PANEL, ICON, INTERPRET_LINE, IS_DRAG4XY, ITEM_TEXT, MODIFY_RENDERER_COMPONENT, PROGRESS, REPAINT_CURSOR, SAY_DOWNLOADING, SET_ICON_IMAGE, SET_TREE_VALUE, SHOW_IN_FRAME, TAB_TEXT, TIP_TEXT |
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent ev)
|
void |
addProtein(int afterRow,
Protein p)
|
static ChButton |
button(int t)
|
static ChCombo |
choiceShading()
|
int |
col2x(int col)
|
int |
countColumns()
|
int |
countRows()
|
void |
dispose()
|
int |
findRow(Protein p)
|
javax.swing.JComponent |
getAlignmentPane()
|
static javax.swing.JComponent |
getAlignmentPane(StrapView v)
|
int |
getCursorAminoAcid()
|
int |
getCursorColumn()
|
Protein |
getCursorProtein()
|
int |
getCursorRow()
|
HScrollBar |
getHorizontalSB()
|
javax.swing.JComponent |
getPanel()
|
java.awt.Dimension |
getPreferredSize(javax.swing.JComponent c)
|
Protein |
getProtein(int row)
|
Protein[] |
getProteins()
|
Protein[] |
getProteinsInRow(int row)
|
java.awt.Rectangle |
getRectRubberBand()
|
javax.swing.JComponent |
getRowHeader()
|
int |
getSpaceBetweenRows()
|
Protein[] |
getVisibleProteins()
|
java.awt.Rectangle |
getVisibleRowsAndCols()
|
java.awt.Rectangle |
getVisibleXYWH()
|
void |
handleEvent(StrapEvent ev)
|
int |
modificationCount()
|
void |
mouseEnterDrogTarget(java.lang.Object target)
|
boolean |
paintHook(javax.swing.JComponent c,
java.awt.Graphics g,
boolean after)
|
void |
paintRegion(java.awt.Graphics gAwt,
int colLeft,
int colRight,
int rowTop,
int rowBot,
int options)
|
void |
processEv(java.awt.AWTEvent ev)
|
java.lang.String |
provideTip(java.lang.Object objOrEv)
|
void |
removeProteins(Protein... pp)
|
int |
row2y(int row)
|
java.lang.Object |
run(java.lang.String id,
java.lang.Object arg)
|
void |
saveRestore(boolean save,
java.lang.Object key)
|
static void |
setButAlign(int nProt)
|
boolean |
setCursor(int opt,
Protein p,
int idxOrCol)
|
void |
setRectRubberBand(int col,
int row,
int numCol,
int numRow)
|
static void |
setReduceHeight()
|
void |
setReduceHeight(int h)
|
static void |
setResSelection(boolean toClipbrd,
Protein protein,
int col1,
int col2,
boolean[] selRes,
StrapView view0)
|
static void |
setRowHeaderType(java.lang.String t)
|
void |
setSpaceBetweenRows(int space)
|
void |
showMinRows(int n)
|
static ChSlider |
sliderSimilarity()
|
java.lang.Thread |
thread_setCursor(int opt,
Protein p,
int idxOrCol)
|
static java.lang.Thread |
thread_setRowHeaderType(java.lang.String t)
|
int |
x2col(int x)
|
int |
y2row(int y)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY_AP
public static final java.lang.String KEY_AP
- See Also:
- Constant Field Values
KEY_RH
public static final java.lang.String KEY_RH
- See Also:
- Constant Field Values
BUT_INFER3D_ALL
public static final int BUT_INFER3D_ALL
- See Also:
- Constant Field Values
BUT_LIST_HET
public static final int BUT_LIST_HET
- See Also:
- Constant Field Values
BUT_NUCL
public static final int BUT_NUCL
- See Also:
- Constant Field Values
BUT_SEQVISTA
public static final int BUT_SEQVISTA
- See Also:
- Constant Field Values
BUT_3D
public static final int BUT_3D
- See Also:
- Constant Field Values
BUT_EXPORT
public static final int BUT_EXPORT
- See Also:
- Constant Field Values
BUT_ALIGN
public static final int BUT_ALIGN
- See Also:
- Constant Field Values
BUT_ALIGN_CTRL
public static final int BUT_ALIGN_CTRL
- See Also:
- Constant Field Values
BUT_ALIGN_UNDO
public static final int BUT_ALIGN_UNDO
- See Also:
- Constant Field Values
BUT_LAF
public static final int BUT_LAF
- See Also:
- Constant Field Values
BUT_FEATURE
public static final int BUT_FEATURE
- See Also:
- Constant Field Values
BUT_WARN_MARCHING_ANTS
public static final int BUT_WARN_MARCHING_ANTS
- See Also:
- Constant Field Values
TOG_MAXIMIZE
public static final int TOG_MAXIMIZE
- See Also:
- Constant Field Values
TOG_BRIGHTER
public static final int TOG_BRIGHTER
- See Also:
- Constant Field Values
TOG_SHADE_ONLY_SELECTED
public static final int TOG_SHADE_ONLY_SELECTED
- See Also:
- Constant Field Values
TOG_PLOT_ENTIRE_PANEL
public static final int TOG_PLOT_ENTIRE_PANEL
- See Also:
- Constant Field Values
TOG_PROTECT_COL
public static final int TOG_PROTECT_COL
- See Also:
- Constant Field Values
MCSV_RESSEL_RECT
public static final int MCSV_RESSEL_RECT
- See Also:
- Constant Field Values
MCSV_CHARACTERS
public static final int MCSV_CHARACTERS
- See Also:
- Constant Field Values
MCSV_FREQ
public static final int MCSV_FREQ
- See Also:
- Constant Field Values
CURSOR_COLUMN
public static final int CURSOR_COLUMN
- See Also:
- Constant Field Values
StrapView
public StrapView(boolean real)
dispose
public void dispose()
- Specified by:
dispose
in interface Disposable
countRows
public int countRows()
getProtein
public Protein getProtein(int row)
modificationCount
public int modificationCount()
findRow
public int findRow(Protein p)
addProtein
public void addProtein(int afterRow,
Protein p)
getProteinsInRow
public Protein[] getProteinsInRow(int row)
removeProteins
public void removeProteins(Protein... pp)
getProteins
public Protein[] getProteins()
getVisibleProteins
public Protein[] getVisibleProteins()
sliderSimilarity
public static ChSlider sliderSimilarity()
choiceShading
public static ChCombo choiceShading()
button
public static ChButton button(int t)
run
public java.lang.Object run(java.lang.String id,
java.lang.Object arg)
- Specified by:
run
in interface ChRunnable
countColumns
public int countColumns()
getVisibleRowsAndCols
public java.awt.Rectangle getVisibleRowsAndCols()
row2y
public int row2y(int row)
col2x
public int col2x(int col)
x2col
public int x2col(int x)
y2row
public int y2row(int y)
getPreferredSize
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
- Specified by:
getPreferredSize
in interface PreferredSize
getPanel
public javax.swing.JComponent getPanel()
getSpaceBetweenRows
public int getSpaceBetweenRows()
setSpaceBetweenRows
public void setSpaceBetweenRows(int space)
getVisibleXYWH
public java.awt.Rectangle getVisibleXYWH()
setReduceHeight
public static void setReduceHeight()
showMinRows
public void showMinRows(int n)
setReduceHeight
public void setReduceHeight(int h)
provideTip
public java.lang.String provideTip(java.lang.Object objOrEv)
- Specified by:
provideTip
in interface TooltipProvider
paintHook
public boolean paintHook(javax.swing.JComponent c,
java.awt.Graphics g,
boolean after)
- Specified by:
paintHook
in interface PaintHook
after
- This method is called once before and once after super.paintComponent.
- Returns:
- means do not call super.paintComponent
getAlignmentPane
public static javax.swing.JComponent getAlignmentPane(StrapView v)
getAlignmentPane
public javax.swing.JComponent getAlignmentPane()
getHorizontalSB
public HScrollBar getHorizontalSB()
paintRegion
public void paintRegion(java.awt.Graphics gAwt,
int colLeft,
int colRight,
int rowTop,
int rowBot,
int options)
handleEvent
public void handleEvent(StrapEvent ev)
- Specified by:
handleEvent
in interface StrapListener
processEv
public void processEv(java.awt.AWTEvent ev)
- Specified by:
processEv
in interface ProcessEv
- See Also:
EvAdapter
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent ev)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
getRowHeader
public javax.swing.JComponent getRowHeader()
thread_setRowHeaderType
public static java.lang.Thread thread_setRowHeaderType(java.lang.String t)
setRowHeaderType
public static void setRowHeaderType(java.lang.String t)
mouseEnterDrogTarget
public void mouseEnterDrogTarget(java.lang.Object target)
setButAlign
public static void setButAlign(int nProt)
setResSelection
public static void setResSelection(boolean toClipbrd,
Protein protein,
int col1,
int col2,
boolean[] selRes,
StrapView view0)
getCursorAminoAcid
public int getCursorAminoAcid()
getCursorColumn
public int getCursorColumn()
getCursorRow
public int getCursorRow()
getCursorProtein
public Protein getCursorProtein()
thread_setCursor
public java.lang.Thread thread_setCursor(int opt,
Protein p,
int idxOrCol)
setCursor
public boolean setCursor(int opt,
Protein p,
int idxOrCol)
saveRestore
public void saveRestore(boolean save,
java.lang.Object key)
setRectRubberBand
public void setRectRubberBand(int col,
int row,
int numCol,
int numRow)
getRectRubberBand
public java.awt.Rectangle getRectRubberBand()
'The most important classes are StrapAlign, Protein and StrapEvent.'