public class ImageCanvas
extends org.biolegato.main.DataCanvas
javax.swing.JApplet.AccessibleJApplet
java.applet.Applet.AccessibleApplet
ABOUT_MENUITEM, EMPTY_STRING, EXIT_MENUITEM, NAME, properties, serialVersionUID
accessibleContext, rootPane, rootPaneCheckingEnabled
Constructor and Description |
---|
ImageCanvas()
Creates a new instance of ImageCanvas
|
ImageCanvas(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> importProps)
Creates a new instance of ImageCanvas
|
Modifier and Type | Method and Description |
---|---|
java.awt.Component |
display()
Displays the main pane of the image canvas
|
java.lang.String |
getPluginName()
Deprecated.
vestigial code from a previous BioLegato framework structure.
|
static void |
main(java.lang.String[] args)
Starts BioLegato image canvas
|
void |
readFile(java.lang.String format,
java.io.Reader currentFile,
boolean overwrite,
boolean forceall)
Reads a file into the canvas.
|
void |
setZoom(float newzoom)
Change the zoom level of the current image displayed in the image canvas.
|
void |
writeFile(java.lang.String format,
java.lang.Appendable outfile,
boolean forceall)
Writes a file out from the canvas
|
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 ImageCanvas()
public ImageCanvas(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> importProps)
importProps
- the properties object to import to the new canvas.public static void main(java.lang.String[] args)
args
- the command line arguments for BioLegatopublic java.lang.String getPluginName()
getPluginName
in class org.biolegato.main.DataCanvas
public void readFile(java.lang.String format, java.io.Reader currentFile, boolean overwrite, boolean forceall) throws java.io.IOException
Reads a file into the canvas. Currently, the ImageCanvas only support the BioLegato image format. This format is specified as follows. BioLegato image files contain only two lines:
The image line. This line specifies the image filename to display in the canvas. The line is comprised of the word image, followed by some whitespace, and the image file's filename in double-quotation marks (all double-quotation marks in the filename are doubled).
abcdefg.jpg
image "abcdefg.jpg"
q"abc.png
image "q""abc.png"
The data line. This line specifies the data for the canvas to pass to any programs it runs. This line is formatted similar to the image line except it is prefaced by 'data' instead of 'image', and the data (in the double-quotes) can be multi-lined.
The file:
image "abcdefg.jpg" data "xyz 123"" 456"
Would use the image file: abcdefg.jpg And pass the following output to any programs run by the BioLegato canvas:
xyz 123" 456
format
- the file format to use for parsing the file.currentFile
- the file to read in.overwrite
- whether to overwrite the currently selected sequences
with the data imported.java.io.IOException
public void writeFile(java.lang.String format, java.lang.Appendable outfile, boolean forceall) throws java.io.IOException
format
- the file format to use for writing the file.outfile
- the file to write out.forceall
- use the entire canvas instead of just its selected
sequences.java.io.IOException
public java.awt.Component display()
display
in class org.biolegato.main.DataCanvas
public void setZoom(float newzoom)
zoom
- the level to zoom the current image (as a percentage).
(For example, the value 100 corresponds to 100%, NOT 100x.)Copyright © 2008-2022 University of Manitoba.