Main Page | Namespace List | Class Hierarchy | Class List | Class Members | Related Pages

gov::lbl::genome::gui::Picture Class Reference

Inheritance diagram for gov::lbl::genome::gui::Picture:

Inheritance graph
[legend]
Collaboration diagram for gov::lbl::genome::gui::Picture:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Picture (VistaApp vapp, String name)
BufferedImage getImage ()
BufferedImage getImage (JComponent comp, int i)
BufferedImage getImage (JComponent comp)
BufferedImage getImage (PageFormat pf)
BufferedImage getImage (int width, int height)
void drawPicture (Graphics gr, JComponent comp, int i)
void drawPicture (Graphics gr, JComponent comp)
void drawPicture (Graphics gr, PageFormat pf)
void drawPicture (Graphics gr, PageFormat pf, int line)
void drawPicture (Graphics gr, int width, int height)
void drawPicture (Graphics gr)
void debug (String s)
void setDebug (boolean d)
int getWidth ()
int getHeight ()
int getMaxWidth ()
int getMaxHeight ()
int getImageableWidth ()
int getImageableHeight ()
int getMarginLeft ()
int getMarginRight ()
int getMarginTop ()
int getMarginBottom ()
void setSize ()
void setSize (JComponent comp)
void setSize (PageFormat pf)
void setSize (int width, int height)
void setMargins (PageFormat pf)
void setMargins (int left, int top, int right, int bottom)
void setImageableArea (PageFormat pf)
void setImageableArea (int left, int top, int width, int height)
String toString ()
void translate (int x, int y)
void translate (int x, int y, int x1, int y1)
void setMarginRight (int x)
int getStringWidth (String s, Font f)
String shortenString (String s, Font f, int width)
int X (int x)
int Y (int y)
String getFormattedNumberString (double x, int maxFracDigits)
String getFormattedNumberString (int x, int maxFracDigits)
String getFormattedXDisplayString (int currXPos)
long getXDisplay (int currXPos)
void setMinX (long minx)
void setMaxX (long maxx)
void setMinMaxX (long minx, long maxx)
void setMinX (int i)
void setMaxX (int i)
void setMinMaxX (int i)
void setComponent (JComponent comp)
void setPage (PageFormat pf)
long getDX ()
double getRelX (long x)
double getRelX (double x)
void setZ (int Z)

Protected Member Functions

int convertX (double x)
int convertX (long x)

Protected Attributes

VistaApp va = null
int width = 10
int height = 10
int imageableWidth
int imageableHeight
int marginLeft = 0
int marginRight = 0
int marginTop = 0
int marginBottom = 0
int maxWidth
int maxHeight
double pixelWidth = 0
Graphics g = null
Graphics2D g2d = null
DecimalFormat df = new DecimalFormat()
String name = "picture"
boolean debug = false
boolean G2D = false
JComponent component
BufferedImage image = null
long minX = UIConstants.DEFAULT_MIN_X
long maxX = UIConstants.DEFAULT_MAX_X
boolean tooSmall = false
int z = 0

Detailed Description

Title: Picture

Description: Some panel require intermediate class for drawing. This class provides basic methods for drawing pictures

Copyright: Copyright (c) 2002 Ernest Orlando Lawrence Berkeley National Laboratory

Company: LBNL

Author:
Michael Teplitskiy
Version:
1.0


Constructor & Destructor Documentation

gov::lbl::genome::gui::Picture::Picture VistaApp  vapp,
String  name
[inline]
 

Picture

Parameters:
vapp VistaApp
name String


Member Function Documentation

int gov::lbl::genome::gui::Picture::convertX long  x  )  [inline, protected]
 

convert cromosome coordinate to the picture coordinate

Parameters:
x long
Returns:
int

Reimplemented in gov::lbl::genome::gui::panel::ChromPanelPicture.

int gov::lbl::genome::gui::Picture::convertX double  x  )  [inline, protected]
 

convert cromosome coordinate to the picture coordinate

Parameters:
x double
Returns:
int

Reimplemented in gov::lbl::genome::gui::panel::ChromPanelPicture.

void gov::lbl::genome::gui::Picture::debug String  s  )  [inline]
 

pring debuging output

Parameters:
s String

void gov::lbl::genome::gui::Picture::drawPicture Graphics  gr  )  [inline]
 

draw Picture

Parameters:
gr Graphics

Reimplemented in gov::lbl::genome::gui::panel::AnnotationPanelPicture, gov::lbl::genome::gui::panel::AxisPanelPicture, gov::lbl::genome::gui::panel::ChromPanelPicture, gov::lbl::genome::gui::panel::ContigPanelPicture, and gov::lbl::genome::gui::panel::RepeatPanelPicture.

void gov::lbl::genome::gui::Picture::drawPicture Graphics  gr,
int  width,
int  height
[inline]
 

draw Picture

Parameters:
gr Graphics
width int
height int

void gov::lbl::genome::gui::Picture::drawPicture Graphics  gr,
PageFormat  pf,
int  line
[inline]
 

draw Picture

Parameters:
gr Graphics
pf PageFormat
line int

Reimplemented in gov::lbl::genome::gui::panel::ContigPanelPicture.

void gov::lbl::genome::gui::Picture::drawPicture Graphics  gr,
PageFormat  pf
[inline]
 

draw Picture

Parameters:
gr Graphics
pf PageFormat

void gov::lbl::genome::gui::Picture::drawPicture Graphics  gr,
JComponent  comp
[inline]
 

draw Picture

Parameters:
gr Graphics
comp JComponent

Reimplemented in gov::lbl::genome::gui::panel::AnnotationPanelPicture, and gov::lbl::genome::gui::panel::ContigPanelPicture.

void gov::lbl::genome::gui::Picture::drawPicture Graphics  gr,
JComponent  comp,
int  i
[inline]
 

draw Picture

Parameters:
gr Graphics
comp JComponent
i int

long gov::lbl::genome::gui::Picture::getDX  )  [inline]
 

return maxX-minX

Returns:
long

String gov::lbl::genome::gui::Picture::getFormattedNumberString int  x,
int  maxFracDigits
[inline]
 

return Formatted Number String

Parameters:
x int
maxFracDigits int
Returns:
String

String gov::lbl::genome::gui::Picture::getFormattedNumberString double  x,
int  maxFracDigits
[inline]
 

return Formatted Number String

Parameters:
x double
maxFracDigits int
Returns:
String

String gov::lbl::genome::gui::Picture::getFormattedXDisplayString int  currXPos  )  [inline]
 

return Formatted String converted to the chromosome coordinates

Parameters:
currXPos int
Returns:
String

Reimplemented in gov::lbl::genome::gui::panel::ChromPanelPicture.

int gov::lbl::genome::gui::Picture::getHeight  )  [inline]
 

return picture Height

Returns:
int

BufferedImage gov::lbl::genome::gui::Picture::getImage int  width,
int  height
[inline]
 

return new Image with the size specified by parameters

Returns:
BufferedImage

BufferedImage gov::lbl::genome::gui::Picture::getImage PageFormat  pf  )  [inline]
 

return new Image with the size equals to the page size

Returns:
BufferedImage

BufferedImage gov::lbl::genome::gui::Picture::getImage JComponent  comp  )  [inline]
 

return new Image with the size equals to the componet size

Returns:
BufferedImage

BufferedImage gov::lbl::genome::gui::Picture::getImage JComponent  comp,
int  i
[inline]
 

return new Image with the size equals to the componet size

Returns:
BufferedImage

BufferedImage gov::lbl::genome::gui::Picture::getImage  )  [inline]
 

return new Image with default size

Returns:
BufferedImage

int gov::lbl::genome::gui::Picture::getImageableHeight  )  [inline]
 

return height of the Imageable rectangle

Returns:
int

int gov::lbl::genome::gui::Picture::getImageableWidth  )  [inline]
 

return width of the Imageable rectangle

Returns:
int

int gov::lbl::genome::gui::Picture::getMarginBottom  )  [inline]
 

return bottom Margin

Returns:
int

int gov::lbl::genome::gui::Picture::getMarginLeft  )  [inline]
 

return left Margin

Returns:
int

int gov::lbl::genome::gui::Picture::getMarginRight  )  [inline]
 

return right Margin

Returns:
int

int gov::lbl::genome::gui::Picture::getMarginTop  )  [inline]
 

return top Margin

Returns:
int

int gov::lbl::genome::gui::Picture::getMaxHeight  )  [inline]
 

return Max drawable Height

Returns:
int

int gov::lbl::genome::gui::Picture::getMaxWidth  )  [inline]
 

return tMax drawable Width

Returns:
int

double gov::lbl::genome::gui::Picture::getRelX double  x  )  [inline]
 

eturn relative position from the begining

Parameters:
x double
Returns:
double

double gov::lbl::genome::gui::Picture::getRelX long  x  )  [inline]
 

return relative position from the begining

Parameters:
x long
Returns:
double

int gov::lbl::genome::gui::Picture::getStringWidth String  s,
Font  f
[inline]
 

return Width (in pixels) of the string

Parameters:
s String
f Font
Returns:
int

int gov::lbl::genome::gui::Picture::getWidth  )  [inline]
 

return picture Width

Returns:
int

long gov::lbl::genome::gui::Picture::getXDisplay int  currXPos  )  [inline]
 

convert the parameter into chromosome coordinates

Parameters:
currXPos int
Returns:
long

Reimplemented in gov::lbl::genome::gui::panel::ChromPanelPicture.

void gov::lbl::genome::gui::Picture::setComponent JComponent  comp  )  [inline]
 

set Component

Parameters:
comp JComponent

void gov::lbl::genome::gui::Picture::setDebug boolean  d  )  [inline]
 

set Debuging mode

Parameters:
d boolean

void gov::lbl::genome::gui::Picture::setImageableArea int  left,
int  top,
int  width,
int  height
[inline]
 

set Imageable Area from the parameters

Parameters:
left int
top int
width int
height int

void gov::lbl::genome::gui::Picture::setImageableArea PageFormat  pf  )  [inline]
 

setI mageable Area from the pages Imageable area

Parameters:
pf PageFormat

void gov::lbl::genome::gui::Picture::setMarginRight int  x  )  [inline]
 

set right Margin

Parameters:
x int

void gov::lbl::genome::gui::Picture::setMargins int  left,
int  top,
int  right,
int  bottom
[inline]
 

set Margins from the parameters

Parameters:
left int
top int
right int
bottom int

void gov::lbl::genome::gui::Picture::setMargins PageFormat  pf  )  [inline]
 

set Margins from the page margins

Parameters:
pf PageFormat

void gov::lbl::genome::gui::Picture::setMaxX int  i  )  [inline]
 

set Max X

Parameters:
i int
See also:
gov.lbl.genome.gui.VistaApp::getMaxX(int)

void gov::lbl::genome::gui::Picture::setMaxX long  maxx  )  [inline]
 

set Max X

Parameters:
maxx long

void gov::lbl::genome::gui::Picture::setMinMaxX int  i  )  [inline]
 

set Min and Max X

Parameters:
i int
See also:
gov.lbl.genome.gui.VistaApp::getMinX(int)

gov.lbl.genome.gui.VistaApp::getMaxX(int)

void gov::lbl::genome::gui::Picture::setMinMaxX long  minx,
long  maxx
[inline]
 

set Min and Max X

Parameters:
minx long
maxx long

void gov::lbl::genome::gui::Picture::setMinX int  i  )  [inline]
 

set Min X

Parameters:
i int
See also:
gov.lbl.genome.gui.VistaApp::getMinX(int)

void gov::lbl::genome::gui::Picture::setMinX long  minx  )  [inline]
 

set Min X

Parameters:
minx long

void gov::lbl::genome::gui::Picture::setPage PageFormat  pf  )  [inline]
 

set Page

Parameters:
pf PageFormat

void gov::lbl::genome::gui::Picture::setSize int  width,
int  height
[inline]
 

set Size from the parameters

Parameters:
width int
height int

void gov::lbl::genome::gui::Picture::setSize PageFormat  pf  )  [inline]
 

set Size from the page

Parameters:
pf PageFormat

void gov::lbl::genome::gui::Picture::setSize JComponent  comp  )  [inline]
 

set size from the component

Parameters:
comp JComponent

void gov::lbl::genome::gui::Picture::setSize  )  [inline]
 

set size from the default component

void gov::lbl::genome::gui::Picture::setZ int  Z  )  [inline]
 

this parameter can be 0 or 1. Usualy it's 0, but because of the "off by one" bug in the PDF library, all "fill" operations require corrected coordinates.

Parameters:
Z int

String gov::lbl::genome::gui::Picture::shortenString String  s,
Font  f,
int  width
[inline]
 

remove last characters from the string until its width is less or equal the maximum parameter

Parameters:
s String
f Font
width int
Returns:
String

String gov::lbl::genome::gui::Picture::toString  )  [inline]
 

return summary string

Returns:
String

void gov::lbl::genome::gui::Picture::translate int  x,
int  y,
int  x1,
int  y1
[inline]
 

change size and position of the imageable area

Parameters:
x int
y int
x1 int
y1 int

void gov::lbl::genome::gui::Picture::translate int  x,
int  y
[inline]
 

translate imageable area

Parameters:
x int
y int

int gov::lbl::genome::gui::Picture::X int  x  )  [inline]
 

correct x coordinates

Parameters:
x int
Returns:
int

int gov::lbl::genome::gui::Picture::Y int  y  )  [inline]
 

correct y coordinates

Parameters:
y int
Returns:
int


The documentation for this class was generated from the following file:
Generated on Wed Jan 19 16:59:27 2005 by  doxygen 1.3.9.1