|
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.data.GDEModel
public class GDEModel
The internal document format for BioLegato.
This document is structured as a linked list of sequences. Each character has an offset based on its position within the list and it's position within its containing sequence. Sequences start at 0 (first character in the first sequence in the list, and end with the last character in the last sequence within the list.
| Field Summary | |
|---|---|
static java.awt.datatransfer.DataFlavor |
seqDocFlavour
A data flavour representing the Dataset data type. |
| Constructor Summary | |
|---|---|
GDEModel()
Creates a new instance of Dataset |
|
| Method Summary | |
|---|---|
void |
addListener(GDEModelListener listener)
Adds a listener object to the data container. |
boolean |
addSequence(int y,
Cell seq)
Adds a sequence to the data container. |
void |
addSequences(Cell[] list)
|
boolean |
delete(int col,
int line,
int cols)
Removes text from the document. |
boolean |
delete(int col,
int line,
int cols,
int lines)
Removes text from the document. |
protected void |
finalize()
Finalizes the object - removes all references to itself |
Cell |
get(int number)
Retrieves a sequence object from the Dataset specified by its line line. |
java.util.List<java.lang.Integer> |
getgroup(java.lang.Integer groupNumber)
|
int |
getLineCount()
Returns the number of lines in the document. |
int |
getLineLength(int line)
Retrieves the length of a line in the document. |
int |
getLongestLine()
Returns the length of the longest line in the data container |
java.lang.Object |
getTransferData(java.awt.datatransfer.DataFlavor flavour)
Translates the Dataset to the given format |
java.awt.datatransfer.DataFlavor[] |
getTransferDataFlavors()
Dictates what formats the Dataset can be converted to. |
void |
group(int[] sequences)
|
boolean |
insert(int col,
int line,
java.lang.String string)
Inserts a string into the document on a given line. |
boolean |
isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavour)
Dictates whether a given format is supported for conversion |
void |
removeListener(GDEModelListener listener)
Adds a listener object to the data container. |
void |
removeSequences(int[] lineNumbers)
Removes an array of sequences from the data container. |
void |
sequenceChanged(Cell sequence,
java.lang.String key)
Called when a field in a sequence is modified. |
Cell[] |
toArray()
|
void |
ungroup(int[] sequences)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.awt.datatransfer.DataFlavor seqDocFlavour
| Constructor Detail |
|---|
public GDEModel()
| Method Detail |
|---|
public boolean addSequence(int y,
Cell seq)
lineNumber - is the line number to insert the sequence.seq - is the sequence to insert.
public void removeSequences(int[] lineNumbers)
lineNumbers - the line numbers to remove.
public boolean insert(int col,
int line,
java.lang.String string)
col - the offset in the object in the dataset to insert the text.x - the x-co-ordinate to insert the string.line - the line-co-ordinate to insert the string.string - the text to insert.
public boolean delete(int col,
int line,
int cols)
This method will delete line endings and sequences as well as individual characters from the document.
NOTE: ALL DELETIONS ARE PERFORMED AS FOLLOWS:
col - the X-offset/column number to start the deletion from.line - the Y-offset/line number to delete characters from.cols - the width of the deletion (measured in characters along the X-axis).
public boolean delete(int col,
int line,
int cols,
int lines)
This method will delete line endings and sequences as well as individual characters from the document.
NOTE: ALL DELETIONS ARE PERFORMED AS FOLLOWS:
col - the X-offset/column number to start the deletion from.line - the Y-offset/line number to delete characters from.w - the width of the deletion (measured in characters along the X-axis).lines - the height of the deletion (measured in sequences along the Y-axis).
public Cell get(int number)
number - the line line to retreive the sequence.
public int getLineCount()
public int getLineLength(int line)
line - the line line to find the length of.
public int getLongestLine()
public void addListener(GDEModelListener listener)
listener - the listener to add.public void removeListener(GDEModelListener listener)
listener - the listener to add.
public void sequenceChanged(Cell sequence,
java.lang.String key)
sequenceChanged in interface CellListenersequence - the sequence modified.key - the key of the modified field in the sequence.public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors in interface java.awt.datatransfer.Transferablepublic boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavour)
isDataFlavorSupported in interface java.awt.datatransfer.Transferableflavour - the flavour to test for compatability
public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavour)
throws java.awt.datatransfer.UnsupportedFlavorException,
java.io.IOException
getTransferData in interface java.awt.datatransfer.Transferableflavour - the data flavour to use for translation
java.awt.datatransfer.UnsupportedFlavorException - if the SeqDatasetnnot be translated into the requested data flavour
java.io.IOException - if there is a problem with I/O during the translationprotected void finalize()
finalize in class java.lang.Objectpublic void group(int[] sequences)
public void ungroup(int[] sequences)
public java.util.List<java.lang.Integer> getgroup(java.lang.Integer groupNumber)
public void addSequences(Cell[] list)
public Cell[] toArray()
|
BioLegato 0.7.3 GDE plugin | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||