Package jspecview.js2d
Class JsPanel
java.lang.Object
jspecview.js2d.JsPanel
- All Implemented Interfaces:
JSVPanel
,JSVViewPanel
JSVPanel class represents a View combining one or more GraphSets, each with one or more JDXSpectra.
- Author:
- Debbie-Ann Facey, Khari A. Bryan, Craig A.D. Walters, Prof Robert J. Lancashire, Bob Hanson hansonr@stolaf.edu
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
void
doRepaint
(boolean andTaintAll) static JsPanel
getEmptyPanel
(JSViewer viewer) Constructs a new JSVPanelvoid
getFocusNow
(boolean asThread) int
getFontFaceID
(String name) int
static JsPanel
getPanelMany
(JSViewer viewer, Lst<Spectrum> spectra) Constructs aJSVPanel
with List of spectra and corresponding start and end indices of data points that should be displayedgetTitle()
int
getWidth()
boolean
hasFocus()
boolean
boolean
boolean
void
paintComponent
(Object context) Overrides paintComponent in class JPanel in order to draw the spectrumvoid
printPanel
(PrintLayout pl, OutputStream os, String title) Send a print job of the spectrum to the default printer on the systemvoid
processKeyEvent
(Object event) boolean
processMouseEvent
(int id, int x, int y, int modifiers, long time) called only by JavaScriptvoid
processTwoPointGesture
(float[][][] touches) void
repaint()
saveImage
(String type, GenericFileInterface file, OC out) void
setBackgroundColor
(GenericColor color) void
setColorOrFont
(ColorParameters ds, ScriptToken st) void
setEnabled
(boolean b) void
setFocusable
(boolean b) void
void
void
showMenu
(int x, int y) void
showMessage
(String msg, String title) toString()
-
Method Details
-
getApiPlatform
- Specified by:
getApiPlatform
in interfaceJSVPanel
-
getPanelData
- Specified by:
getPanelData
in interfaceJSVPanel
-
getEmptyPanel
Constructs a new JSVPanel- Parameters:
viewer
-- Returns:
- this
-
getPanelMany
Constructs aJSVPanel
with List of spectra and corresponding start and end indices of data points that should be displayed- Parameters:
viewer
-spectra
- the List ofGraph
instances- Returns:
- this
-
getTitle
- Specified by:
getTitle
in interfaceJSVViewPanel
-
dispose
public void dispose()- Specified by:
dispose
in interfaceJSVViewPanel
-
setTitle
- Specified by:
setTitle
in interfaceJSVViewPanel
-
setColorOrFont
-
setBackgroundColor
- Specified by:
setBackgroundColor
in interfaceJSVPanel
-
getInput
-
showMessage
- Specified by:
showMessage
in interfaceJSVPanel
-
getFocusNow
public void getFocusNow(boolean asThread) - Specified by:
getFocusNow
in interfaceJSVPanel
-
getFontFaceID
- Specified by:
getFontFaceID
in interfaceJSVPanel
-
doRepaint
public void doRepaint(boolean andTaintAll) -
paintComponent
Overrides paintComponent in class JPanel in order to draw the spectrum- Specified by:
paintComponent
in interfaceJSVPanel
- Parameters:
context
- the canvas's context
-
printPanel
Send a print job of the spectrum to the default printer on the system- Specified by:
printPanel
in interfaceJSVPanel
- Parameters:
pl
- the layout of the print jobos
-title
-
-
saveImage
-
hasFocus
public boolean hasFocus() -
repaint
public void repaint() -
setToolTipText
- Specified by:
setToolTipText
in interfaceJSVPanel
-
getHeight
public int getHeight()- Specified by:
getHeight
in interfaceJSVViewPanel
-
getWidth
public int getWidth()- Specified by:
getWidth
in interfaceJSVViewPanel
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceJSVViewPanel
-
isFocusable
public boolean isFocusable()- Specified by:
isFocusable
in interfaceJSVViewPanel
-
isVisible
public boolean isVisible()- Specified by:
isVisible
in interfaceJSVViewPanel
-
setEnabled
public void setEnabled(boolean b) - Specified by:
setEnabled
in interfaceJSVViewPanel
-
setFocusable
public void setFocusable(boolean b) - Specified by:
setFocusable
in interfaceJSVViewPanel
-
toString
-
processMouseEvent
public boolean processMouseEvent(int id, int x, int y, int modifiers, long time) called only by JavaScript- Specified by:
processMouseEvent
in interfaceJSVPanel
- Parameters:
id
-x
-y
-modifiers
-time
-- Returns:
- t/f
-
processTwoPointGesture
public void processTwoPointGesture(float[][][] touches) - Specified by:
processTwoPointGesture
in interfaceJSVPanel
-
processKeyEvent
- Specified by:
processKeyEvent
in interfaceJSVPanel
-
showMenu
public void showMenu(int x, int y)
-