public class TableCanvas
extends org.biolegato.main.DataCanvas
Modifier and Type | Class and Description |
---|---|
static class |
TableCanvas.SelectionMode
The selection modes available for the table canvas.
|
javax.swing.JApplet.AccessibleJApplet
java.applet.Applet.AccessibleApplet
Modifier and Type | Field and Description |
---|---|
javax.swing.AbstractAction |
selectAllA
The menu item "Select All"
|
ABOUT_MENUITEM, EMPTY_STRING, EXIT_MENUITEM, NAME, properties, serialVersionUID
accessibleContext, rootPane, rootPaneCheckingEnabled
Modifier | Constructor and Description |
---|---|
|
TableCanvas()
Creates a new instance of a TableCanvas.
|
|
TableCanvas(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> props)
Creates a new instance of TableCanvas.
|
|
TableCanvas(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> props,
java.sql.ResultSet rs)
Creates a new instance of TableCanvas, reading results from an SQL query
into the table, by default.
|
|
TableCanvas(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> propertiesadd,
java.lang.String[][] dataImport)
Creates a new instance of TableCanvas.
|
protected |
TableCanvas(java.sql.ResultSet rs)
Creates a new instance of TableCanvas, reading results from an SQL query
into the table, by default.
|
Modifier and Type | Method and Description |
---|---|
void |
addColumns(java.lang.String[] columns)
Adds a list of column headers to the current table model.
|
static java.lang.String |
columnLetter(int columnCount)
Converts a number into a column letter(s).
|
java.awt.Component |
display()
Displays the table canvas within a BioLegato window.
|
java.lang.String[][] |
getData()
Returns the current/selected data in the canvas as a 2D string array.
|
java.lang.String[][] |
getData(boolean forceall)
Returns the current/selected data in the canvas as a 2D string array.
|
java.lang.String |
getPluginName()
Deprecated.
vestigial code from a previous BioLegato framework structure.
|
static void |
main(java.lang.String[] args)
Starts a new instance of BioLegato, using the table canvas.
|
void |
readFile(java.lang.String format,
java.io.Reader in,
boolean overwrite,
boolean forceall)
Reads a data into the canvas.
|
void |
setSelectionMode(TableCanvas.SelectionMode m)
Changes the SelectioMode of the TableCanvas
|
void |
writeFile(java.lang.String format,
java.lang.Appendable out,
boolean forceall)
Writes data out from the canvas to an Appendable object.
|
addMenuHeading, addMenuHeading, createJFrame, error, getJFrame, getProperty, init, message, testNumber, warning
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public final javax.swing.AbstractAction selectAllA
public TableCanvas()
public TableCanvas(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> props)
props
- the BioLegato properties to initialize the canvas with.
This parameter is ignored if null.protected TableCanvas(java.sql.ResultSet rs)
rs
- the results of an SQL query; these are to be used as the
initial contents of the table canvas.public TableCanvas(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> props, java.sql.ResultSet rs)
props
- the BioLegato properties to initialize the canvas with.
This parameter is ignored if null.rs
- the results of an SQL query; these are to be used as the
initial contents of the table canvas.public TableCanvas(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> propertiesadd, java.lang.String[][] dataImport)
props
- the BioLegato properties to initialize the canvas with.
This parameter is ignored if null.dataImport
- a 2D string array to initialize the canvas with.public static void main(java.lang.String[] args)
args
- the command line arguments for BioLegato.public java.lang.String[][] getData()
public java.lang.String[][] getData(boolean forceall)
forceall
- use the entire canvas instead of just only exporting
whichever sequences are selected.public static java.lang.String columnLetter(int columnCount)
Converts a number into a column letter(s). This is used if the first line of a file being imported does not contain column headers -- i.e. namedHeaders is set to false. The column letter(s) are a base-26 representation of the number 'columnCount' using alphabet letters.
The only exception is that the value zero cannot be represented, thus the letter "A" represents the value zero in the right-most digit, but the letter "A" represents the value one for every other digit. This is okay, because we are only displaying column letters, and not creating a true base-10 to base-26 converter.
For example, the value 27 is equal to "AA" (26 + 1)
Likewise, the value 3 is equal to "C", and the value 56 is "BC"
columnCount
- the number of the column to convert into a letterpublic void addColumns(java.lang.String[] columns)
columns
- the array of column names to use for adding columns.public java.lang.String getPluginName()
getPluginName
in class org.biolegato.main.DataCanvas
public void readFile(java.lang.String format, java.io.Reader in, boolean overwrite, boolean forceall) throws java.io.IOException
format
- the file format to use for parsing the file. If the
string "" is passed, the PCDIO object should auto-
detect the format of the data.in
- the "file" (or stream) to read in from.overwrite
- whether to overwrite the currently selected
data in the current canvas with the data
being imported by this function/method.forceall
- force selection of the entire canvas.java.io.IOException
- if an error occurs while readingCSVFile
,
TSVFile
public void writeFile(java.lang.String format, java.lang.Appendable out, boolean forceall) throws java.io.IOException
format
- the file format to use for writing the file.out
- the "file" (or stream) to write out to.forceall
- write the entire contents of the canvas
instead of just the currently selected
sequences in the canvas.java.io.IOException
- if an error occurs while writingCSVFile
,
TSVFile
public void setSelectionMode(TableCanvas.SelectionMode m)
public java.awt.Component display()
display
in class org.biolegato.main.DataCanvas
Copyright © 2008-2022 University of Manitoba.