|
BioLegato 0.7.3 GDE 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 |
foreground
The current default foreground colour of normal unselected text |
protected java.awt.Color |
SELECTBG
The background colour of selected text |
protected java.awt.Color |
SELECTFG
The foreground colour of selected text |
| Constructor Summary | |
|---|---|
ColourMap()
The abstract constructor for colour maps. |
|
| Method Summary | |
|---|---|
protected void |
drawChars(BLTextArea ta,
java.awt.Graphics gfx,
int xstart,
int ystart,
char[] array,
int index,
int end,
java.awt.Color foreground,
java.awt.Color background)
This is a function to help ensure proper spacing. |
java.lang.String |
getName()
Returns the name of the colour map. |
abstract void |
regularDrawString(BLTextArea ta,
java.awt.Graphics gfx,
int xstart,
int ystart,
Cell seq,
char[] array,
int pstart,
int pend)
Draws an unselected sequence while mapping the appropriate colours to each character rendered. |
java.lang.String |
safesubstring(Cell seq,
int pstart,
int pend)
Ensures all substrings do not excees the start or end of the sequence |
void |
selectDrawString(BLTextArea ta,
java.awt.Graphics gfx,
int xstart,
int ystart,
Cell seq,
char[] drawArray,
int pstart,
int pend)
Draws a selected sequence while mapping the appropriate colours to each character rendered. |
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 final java.awt.Color SELECTFG
protected final java.awt.Color SELECTBG
| Constructor Detail |
|---|
public ColourMap()
| Method Detail |
|---|
public abstract void regularDrawString(BLTextArea ta,
java.awt.Graphics gfx,
int xstart,
int ystart,
Cell seq,
char[] array,
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,
Cell seq,
char[] drawArray,
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 drawChars(BLTextArea ta,
java.awt.Graphics gfx,
int xstart,
int ystart,
char[] array,
int index,
int end,
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.array - the character to draw.index - the index to draw the characters in the array.length - the length of characters to draw in the array.foreground - the foreground colour of the string.background - the background colour of the string.
public java.lang.String safesubstring(Cell seq,
int pstart,
int pend)
pstart - the start position of the substringpend - the end position of the substringpublic 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.3 GDE plugin | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||