public class EmbeddedCanvas extends JPanel implements MouseMotionListener, MouseListener, ActionListener
JComponent.AccessibleJComponent
Component.BaselineResizeBehavior
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, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
EmbeddedCanvas() |
EmbeddedCanvas(EmbeddedPad pad) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
void |
cd(int pad)
changes current active drawing pad to index=pad
|
void |
clear()
Clears content of all pads.
|
void |
copyToClipboard() |
void |
divide(int columns,
int rows) |
void |
draw(DataGroup group) |
void |
draw(IDataSet ds)
draws dataset on current active pad with no options
|
void |
draw(IDataSet ds,
String options)
draws data set on current active pad with given options
|
void |
drawNext(IDataSet ds)
draws data set on current pad and advances active pad by one.
|
String |
getBenchmarkString()
returns benchmark string containing number of repaint operations
performed as well as the time it took to repaint.
|
List<EmbeddedPad> |
getCanvasPads() |
int |
getNColumns() |
int |
getNRows() |
Map<String,IDataSet> |
getObjectMap()
returns all objects plotted on current canvas
|
EmbeddedPad |
getPad(int index)
returns EmbeddedPad object with given index
|
int |
getPadByXY(int x,
int y) |
void |
initMouse() |
void |
initTimer(int interval) |
boolean |
isChild() |
static void |
main(String[] args) |
void |
mouseClicked(MouseEvent e) |
void |
mouseDragged(MouseEvent e) |
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mouseMoved(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
void |
paint(Graphics g)
painting all components on the Graphics2D object.
|
void |
save(String filename) |
void |
setAxisFontSize(int size) |
void |
setAxisLabelSize(int fontSize) |
void |
setAxisTitleSize(int fontSize) |
void |
setCanvasPads(List<EmbeddedPad> canvasPads) |
void |
setChild(boolean isChild) |
void |
setFont(String fontName) |
void |
setGridX(boolean isGrid) |
void |
setGridY(boolean isGrid) |
void |
setPadTitles(String title) |
void |
setPadTitlesX(String title) |
void |
setPadTitlesY(String title) |
void |
setStatBoxFontSize(int fontSize) |
void |
setTitleSize(int fontSize) |
void |
showFPS(boolean benchmark) |
void |
update()
forces repaint method for the entire canvas
|
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, 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 EmbeddedCanvas()
public EmbeddedCanvas(EmbeddedPad pad)
public List<EmbeddedPad> getCanvasPads()
public void setCanvasPads(List<EmbeddedPad> canvasPads)
public final void initMouse()
public final void divide(int columns, int rows)
public void cd(int pad)
pad
- index of the padpublic void clear()
public Map<String,IDataSet> getObjectMap()
public void drawNext(IDataSet ds)
ds
- data set to be drawnpublic void draw(IDataSet ds)
ds
- data set to be drawnpublic void draw(IDataSet ds, String options)
ds
- data set to be drawnoptions
- drawing optionspublic int getNColumns()
public int getNRows()
public void paint(Graphics g)
paint
in class JComponent
g
- public EmbeddedPad getPad(int index)
index
- index of the EmbeddedPadpublic void update()
public String getBenchmarkString()
public void setAxisFontSize(int size)
public void showFPS(boolean benchmark)
public void initTimer(int interval)
public int getPadByXY(int x, int y)
public void draw(DataGroup group)
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void copyToClipboard()
public void save(String filename)
public static void main(String[] args)
public boolean isChild()
public void setChild(boolean isChild)
public void setFont(String fontName)
public void setTitleSize(int fontSize)
public void setAxisLabelSize(int fontSize)
public void setAxisTitleSize(int fontSize)
public void setStatBoxFontSize(int fontSize)
public void setPadTitles(String title)
public void setPadTitlesX(String title)
public void setPadTitlesY(String title)
public void setGridX(boolean isGrid)
public void setGridY(boolean isGrid)
Jas4pp 1.5 © Java Analysis Studio for Particle Physics