|
BioLegato 0.7.0 GDE Canvas plugin | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biolegato.gdesupport.canvas.colourmap.ColourMap
public abstract class ColourMap
The superclass of all colour maps. Colour maps are used to provide different colour schemas to canvases. To implement a new schema, create a subclass that implements all of the methods you wish to override of the default schema.
| Field Summary | |
|---|---|
protected java.awt.Color |
background
The current default background colour of normal unselected text |
protected java.awt.Color |
backgroundSelect
The current default background colour of normal selected text |
protected java.awt.Color |
foreground
The current default foreground colour of normal unselected text |
protected java.awt.Color |
foregroundSelect
The current default foreground colour of normal selected text |
| Constructor Summary | |
|---|---|
ColourMap()
The abstract constructor for colour maps. |
|
| Method Summary | |
|---|---|
protected void |
drawString(BLTextArea ta,
java.awt.Graphics gfx,
int xstart,
int ystart,
java.lang.String string,
java.awt.Color foreground,
java.awt.Color background)
This is a function to help ensure proper spacing. |
java.awt.Color |
getBackground()
Returns the current default background colour for painting portions of the canvas without text. |
java.awt.Color |
getForeground()
Returns the current default foreground colour for painting portions of the canvas without text. |
java.lang.String |
getName()
Returns the name of the colour map. |
abstract void |
regularDrawString(BLTextArea ta,
java.awt.Graphics gfx,
int xstart,
int ystart,
org.biolegato.core.data.sequence.Sequence seq,
int pstart,
int pend)
Draws an unselected sequence while mapping the appropriate colours to each character rendered. |
java.lang.String |
safesubstring(org.biolegato.core.data.sequence.Sequence seq,
int pstart,
int pend)
|
void |
selectDrawString(BLTextArea ta,
java.awt.Graphics gfx,
int xstart,
int ystart,
org.biolegato.core.data.sequence.Sequence seq,
int pstart,
int pend)
Draws a selected sequence while mapping the appropriate colours to each character rendered. |
void |
setBackground(java.awt.Color c)
Changes the current default background colour for painting portions of the canvas without text. |
void |
setForeground(java.awt.Color c)
Changes the current default foreground colour for painting portions of the canvas without text. |
void |
setName(java.lang.String string)
Changes the name of the colour map. |
java.lang.String |
toString()
Returns the name of the colour map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.awt.Color foreground
protected java.awt.Color background
protected java.awt.Color foregroundSelect
protected java.awt.Color backgroundSelect
| Constructor Detail |
|---|
public ColourMap()
| Method Detail |
|---|
public abstract void regularDrawString(BLTextArea ta,
java.awt.Graphics gfx,
int xstart,
int ystart,
org.biolegato.core.data.sequence.Sequence seq,
int pstart,
int pend)
ta - the textarea to use for obtaining metrics from.gfx - the graphics object to draw the string to.xstart - the x co-ordinate to start drawing from.ystart - the y co-ordinate to start drawing from.seq - the sequence to draw.
public void selectDrawString(BLTextArea ta,
java.awt.Graphics gfx,
int xstart,
int ystart,
org.biolegato.core.data.sequence.Sequence seq,
int pstart,
int pend)
ta - the textarea to use for obtaining metrics from.gfx - the graphics object to draw the string to.xstart - the x co-ordinate to start drawing from.ystart - the y co-ordinate to start drawing from.seq - the sequence to draw.
protected void drawString(BLTextArea ta,
java.awt.Graphics gfx,
int xstart,
int ystart,
java.lang.String string,
java.awt.Color foreground,
java.awt.Color background)
ta - the textarea to use for obtaining metrics from.gfx - the graphics object to draw the string to.xstart - the x co-ordinate to start drawing from.ystart - the y co-ordinate to start drawing from.string - the string to draw.foreground - the foreground colour of the string.background - the background colour of the string.
public java.lang.String safesubstring(org.biolegato.core.data.sequence.Sequence seq,
int pstart,
int pend)
public java.awt.Color getForeground()
public void setForeground(java.awt.Color c)
c - the new background colour.public java.awt.Color getBackground()
public void setBackground(java.awt.Color c)
c - the new background colour.public java.lang.String getName()
public void setName(java.lang.String string)
string - the new name for the colour map.public java.lang.String toString()
toString in class java.lang.Object
|
BioLegato 0.7.0 GDE Canvas plugin | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||