BioLegato 0.7.5 GDE plugin

org.biolegato.gdesupport.canvas
Class GDECanvas

java.lang.Object
  extended by org.biolegato.gdesupport.canvas.GDECanvas
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.ListSelectionListener, org.biolegato.main.DataCanvas

public final class GDECanvas
extends java.lang.Object
implements org.biolegato.main.DataCanvas, javax.swing.event.ListSelectionListener

The GDE-style sequence-based canvas class

Author:
Graham Alvare, Brian Fristensky

Field Summary
 javax.swing.AbstractAction changeCaseAction
          The action "Change Case"
 javax.swing.AbstractAction copyAction
          The action "Copy"
 javax.swing.AbstractAction cutAction
          The action "Cut"
static java.awt.Font DEFAULT_FONT
          The default font for the canvas
 javax.swing.AbstractAction joinAction
          Action for joining split canvases
 javax.swing.Box mainDisplay
          The main canvas display
 javax.swing.AbstractAction openAction
          The action "Open..."
 javax.swing.AbstractAction pasteAction
          The action "Paste"
 javax.swing.AbstractAction propertiesAction
          The action "Properties..."
 javax.swing.AbstractAction saveAsAction
          The action "Save As..."
 
Constructor Summary
GDECanvas()
          Creates a new instance of BLGDECanvas
 
Method Summary
 void cursorChange(int column, int row)
          Receives cursor updates for use in the status bar.
 java.awt.Component display()
          Displays the canvas
 java.lang.String getName()
          Returns the name to display in the canvas tab for
 void insertionMode(boolean mode)
          Receives insertion mode change updates for use in the status bar.
 void readFile(java.lang.String formatString, java.io.File file)
          Reads a file into the canvas
 void selectionMade(GDETextArea source)
          Manages mutual exclusion between the textarea and the list
 void updateFont(int size, boolean bold)
          Updates the font for the GDE canvas and its sub-objects
 void valueChanged(javax.swing.event.ListSelectionEvent e)
          Clears the data collector when an item is selected from the sequence list
 void writeFile(java.lang.String formatString, java.io.File file)
          Writes a file out from the canvas
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

openAction

public final javax.swing.AbstractAction openAction
The action "Open..."


saveAsAction

public final javax.swing.AbstractAction saveAsAction
The action "Save As..."


propertiesAction

public final javax.swing.AbstractAction propertiesAction
The action "Properties..."


joinAction

public final javax.swing.AbstractAction joinAction
Action for joining split canvases


cutAction

public final javax.swing.AbstractAction cutAction
The action "Cut"


copyAction

public final javax.swing.AbstractAction copyAction
The action "Copy"


pasteAction

public final javax.swing.AbstractAction pasteAction
The action "Paste"


changeCaseAction

public final javax.swing.AbstractAction changeCaseAction
The action "Change Case"


mainDisplay

public javax.swing.Box mainDisplay
The main canvas display


DEFAULT_FONT

public static final java.awt.Font DEFAULT_FONT
The default font for the canvas

Constructor Detail

GDECanvas

public GDECanvas()
Creates a new instance of BLGDECanvas

Method Detail

getName

public java.lang.String getName()
Returns the name to display in the canvas tab for

Specified by:
getName in interface org.biolegato.main.DataCanvas
Returns:
"GDE"

cursorChange

public void cursorChange(int column,
                         int row)
Receives cursor updates for use in the status bar.

Parameters:
column - the new column of the cursor.
row - the new row of the cursor.

insertionMode

public void insertionMode(boolean mode)
Receives insertion mode change updates for use in the status bar.

Parameters:
mode - the new insertion mode status.

valueChanged

public void valueChanged(javax.swing.event.ListSelectionEvent e)
Clears the data collector when an item is selected from the sequence list

Specified by:
valueChanged in interface javax.swing.event.ListSelectionListener
Parameters:
e - currently ignored

selectionMade

public void selectionMade(GDETextArea source)
Manages mutual exclusion between the textarea and the list

Parameters:
source - the source of the event

updateFont

public final void updateFont(int size,
                             boolean bold)
Updates the font for the GDE canvas and its sub-objects

Parameters:
size - the new font size
bold - whether to bold the font

writeFile

public void writeFile(java.lang.String formatString,
                      java.io.File file)
Writes a file out from the canvas

Specified by:
writeFile in interface org.biolegato.main.DataCanvas
Parameters:
formatString - the file format to use for writing the file.
file - the file to write out.

readFile

public void readFile(java.lang.String formatString,
                     java.io.File file)
Reads a file into the canvas

Specified by:
readFile in interface org.biolegato.main.DataCanvas
Parameters:
formatString - the file format to use for parsing the file.
file - the file to read in.

display

public java.awt.Component display()
Displays the canvas

Specified by:
display in interface org.biolegato.main.DataCanvas
Returns:
a component representing the canvas (visually)

BioLegato 0.7.5 GDE plugin

Copyright © 2008-2011 University of Manitoba.