public class JPlot extends JPanel
BUGS/TODO:
JComponent.AccessibleJComponent
Component.BaselineResizeBehavior
Modifier and Type | Field and Description |
---|---|
JFrame |
about |
static String |
AppName |
static boolean |
debug |
static String[] |
fontNames |
JFrame |
frame |
static String |
FS |
static int |
HEIGHT |
PanelLabel |
labelPanel |
PanelLegend |
legendPanel |
boolean |
loaded |
JFrame |
plotFrame |
Vector<PanelPlot> |
plotPanels |
StyleChooser |
styleChooser |
static int |
WIDTH |
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, PROPERTIES, SOMEBITS
Constructor and Description |
---|
JPlot(JFrame parent)
Another constructor.
|
JPlot(JFrame parent,
Vector files)
Another constructor.
|
JPlot(JFrame parent,
Vector files,
File script,
boolean lonely)
Principal constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the plot-panel, kills eventual plot frames
|
void |
clearData() |
void |
clearData(int i) |
void |
dismissGraph()
kills the graph frame, stops showing anything.
|
Vector |
getAllPanels() |
PanelAxes |
getAxesPanel() |
Vector |
getDataArray() |
DataArray |
getDataArray(int ind) |
DataArray |
getDataArraySelected() |
GraphGeneral |
getGraph() |
GraphSettings |
getGraphSettings() |
GraphSettings |
getGS() |
ImageIcon |
getImageIcon(String name)
Returns an image which is found in a valid image URL.
|
PanelLabel |
getLabelPanel() |
PanelLegend |
getLegendPanel() |
StyleChooser |
getStyleChooser() |
boolean |
insertData(int index_data,
DataArray data) |
boolean |
insertDatafile(File file) |
boolean |
insertDataReader(BufferedReader in,
LinePars lp) |
void |
quit()
Quits the app, really quits.
|
void |
quitDialog()
Quits the application but asks confirmation if you didn't saved yet.
|
void |
readProject(String ffile)
Load the script from a file in memory after heaving cleared the
actual data.
|
void |
replaceData(int index_data,
DataArray data) |
void |
replaceLinePars(int index_data,
LinePars lp) |
PanelScaling |
ScalingPanel() |
void |
setAutoUpdate(boolean b)
Toggles timer which updates the graph every second.
|
void |
setGraphLocation(int x,
int y)
Sets the location at which we put the graph
|
void |
setGraphSettings(GraphSettings gs) |
void |
setGS(GraphSettings s) |
void |
show(String fn)
Refreshes the actual graph with new data.
|
boolean |
showGraph()
Display the graph in a separate frame.
|
boolean |
showGraph(boolean b)
Display the graph in a separate frame.
|
boolean |
showGraph(boolean b,
boolean toFront)
Displays the graph in a separate frame.
|
int |
sizeData() |
boolean |
switchGraphType(int graphType)
Switch from one graph type to another.
|
void |
update(String fn)
Refreshes the actual graph with new data.
|
void |
updateGraphIfShowing()
Update the graph if the graph is actually showing.
|
void |
updateGraphIfShowing(boolean b)
Update the graph if the graph is actually showing.
|
void |
updateLookAndFeel(String laf)
Sets the current L&F
|
boolean |
writeScript(File f)
Writes the script to a file.
|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final boolean debug
public static int WIDTH
public static int HEIGHT
public static final String AppName
public JFrame frame
public JFrame about
public JFrame plotFrame
public PanelLabel labelPanel
public PanelLegend legendPanel
public StyleChooser styleChooser
public static String[] fontNames
public boolean loaded
public static final String FS
public JPlot(JFrame parent, Vector files, File script, boolean lonely)
files
- vector of files containing the data arrays. This array
is the result of command-line filenames, and may be empty.public JPlot(JFrame parent)
public void updateGraphIfShowing(boolean b)
b
- true if the graph must be brought to the frontpublic void updateGraphIfShowing()
public GraphGeneral getGraph()
public GraphSettings getGraphSettings()
public void setGraphSettings(GraphSettings gs)
public StyleChooser getStyleChooser()
public PanelAxes getAxesPanel()
public PanelScaling ScalingPanel()
public PanelLabel getLabelPanel()
public PanelLegend getLegendPanel()
public ImageIcon getImageIcon(String name)
name
- name of the imagepublic boolean switchGraphType(int graphType)
graphType
- type of the graph (i.e. PIPER, 2D...)public boolean showGraph(boolean b, boolean toFront)
b
- flag, true if the graph must be shown.toFront
- true if the graph must be pushed to the foreground.public boolean showGraph(boolean b)
b
- flag, true if the graph must be shown.public boolean showGraph()
public void quitDialog()
public void quit()
public void dismissGraph()
public boolean insertDataReader(BufferedReader in, LinePars lp)
public boolean insertDatafile(File file)
public void replaceData(int index_data, DataArray data)
public void clearData()
public void clearData(int i)
public int sizeData()
public void replaceLinePars(int index_data, LinePars lp)
public GraphSettings getGS()
public void setGS(GraphSettings s)
public boolean insertData(int index_data, DataArray data)
public Vector getDataArray()
public DataArray getDataArray(int ind)
public DataArray getDataArraySelected()
public boolean writeScript(File f)
f
- file to which to save the scriptpublic void readProject(String ffile)
public void update(String fn)
fn
- name of the file with data for JPlot.public void setAutoUpdate(boolean b)
public void setGraphLocation(int x, int y)
x
- x-position in pixelsy
- y-position in pixelspublic void show(String fn)
fn
- name of the file with data for JPlot.public void clear()
public Vector getAllPanels()
public void updateLookAndFeel(String laf)
Jas4pp 1.5 © Java Analysis Studio for Particle Physics