|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.strbio.mol.lib.pred2ary.ProfileDisplayArea
public class ProfileDisplayArea
This represents an area in object that will want to display some proteins in an area. This has to be something that will want to paint into a Graphics object; when it does, it calls ProteinDisplayArea to do the work. This is not an subclass of JComponent or Canvas, in order to be able to print on anything.
Version 1.0, 6/8/98 - original version
Nested Class Summary | |
---|---|
class |
ProfileDisplayArea.ClickedArea
This class keeps track of rectangular areas of interest, and tells which one has been clicked on. |
Field Summary | |
---|---|
protected ColorScale |
blueScale
|
protected int |
boxHeight
|
protected int |
boxOffset
|
ProfileDisplayArea.ClickedArea |
clickedArea
Keep track of interesting rectangles (where sequences are drawn) |
int |
clickedProtein
|
int |
clickedSequence
|
protected java.awt.Font |
f
Font used for text labels. |
protected java.awt.Font |
fBold
|
int |
fontHeight
|
int |
fontWidth
|
boolean |
graphPrediction
|
protected ColorScale |
greenScale
|
static int |
MAX_NAME_PRINTED
maximum length of a name to print (beyond gets truncated) |
int |
maxLength
largest protein length in set |
int |
maxNameLength
largest name length in set |
int |
maxSeqNameLength
largest name of a sequence |
protected int |
maxX
Preferred width of component. |
protected int |
maxY
Preferred height of component. |
ProfileSet |
p
Profiles to display. |
protected int |
padX
Padding constant for X dimension. |
protected int |
padY
Padding constant for Y dimension. |
java.awt.Component |
parent
This is the component this is displayed in. |
protected ColorScale |
redScale
Color scales to draw things in. |
boolean |
sequenceClicked
|
boolean |
showCorrect
|
boolean |
showPrediction
|
boolean |
showProfile
What exactly to show? |
boolean |
wrapLines
|
int |
wrapPos
|
Constructor Summary | |
---|---|
ProfileDisplayArea(ProfileSet ps,
java.awt.Component par,
int fontSize)
Initialize with given parent container. |
Method Summary | |
---|---|
void |
calcMaxNameLength()
Figure out the maximum name length in the set. |
int |
calcWrapPos(int pageWidth)
returns the number of chars in the sequence that will fit on a page with a given width. |
java.awt.Dimension |
getPreferredSize()
This gets the preferred size of the component; the parent container should probably just return this. |
void |
paint(java.awt.Graphics g,
java.awt.Rectangle viewRect)
Paint the area within a viewport; the parent component should provide the dimensions. |
int |
paintArea(java.awt.Graphics g,
int yLo,
int yHi)
Paint graphics from y=yLo to y=yHi. |
void |
reRender()
|
void |
setFont(java.lang.String fName,
int fSize)
Set font to draw labels. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.awt.Component parent
public ProfileSet p
public int maxNameLength
public int maxSeqNameLength
public int maxLength
public static final int MAX_NAME_PRINTED
protected int maxX
protected int maxY
protected java.awt.Font f
protected java.awt.Font fBold
public int fontWidth
public int fontHeight
protected int boxHeight
protected int boxOffset
protected final int padX
protected final int padY
public final ProfileDisplayArea.ClickedArea clickedArea
protected final ColorScale redScale
protected final ColorScale greenScale
protected final ColorScale blueScale
public boolean showProfile
public boolean wrapLines
public int wrapPos
public boolean graphPrediction
public boolean showCorrect
public boolean showPrediction
public boolean sequenceClicked
public int clickedProtein
public int clickedSequence
Constructor Detail |
---|
public ProfileDisplayArea(ProfileSet ps, java.awt.Component par, int fontSize)
Method Detail |
---|
public java.awt.Dimension getPreferredSize()
public void setFont(java.lang.String fName, int fSize)
public int calcWrapPos(int pageWidth)
public void calcMaxNameLength()
public int paintArea(java.awt.Graphics g, int yLo, int yHi)
public void paint(java.awt.Graphics g, java.awt.Rectangle viewRect)
public void reRender()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |