japlot.jaxodraw
Class JaxoMainPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Frame
-
- javax.swing.JFrame
-
- japlot.jaxodraw.JaxoMainPanel
-
- All Implemented Interfaces:
- java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
public class JaxoMainPanel extends javax.swing.JFrameThe main panel: holds the menu bar, the button panel, the flag panel and the canvas. Responsible for the interaction between those components.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static intBACKGROUNDPut an object in the background.static intBLOBBlob (filled ellipse).static intBOXBox (filled rectangle).static intCLEARClear the current graph.static intCLOSEClose the current buffer.static intCOLORColor an object.static intCOPYCopy an object.static intDELETEDelete an object.static intDESCRIBEEnter a description of the graph.static intDUMMIEA dummy variable.static intDUMMIE1Another dummy.static intEDITEdit an object.static intEXPORTExport the graph.static intFARCFermion arc.static intFLINEFermion line.static intFLOOPFermion loop.static intFOREGROUNDPut an object in the foreground.static intGARCGhost arc.static intGLARCGluon arc.static intGLINEGhost line.static intGLLINEGluon line.static intGLLOOPGluon loop.static intGLOOPGhost loop.static intGROUPGroup objects.static intIMPORTImport a Latex file.static intLATEXLatex text.static intMOVEMove an object.static intNEWGStart a new graph.static intNEWTStart a new graph tab.static intOPENOpen a japlot.jaxodraw file.static intOPENDATAOpen a ROOT/AIDA file.static intPACKAGEAdd a custom Latex package to the Latex output of japlot.jaxodraw.static intPARCPhoton arc.static intPASTEPaste the most recently selected objects from the clipboard.static intPLINEPhoton line.static intPLOOPPhoton loop.static intPREVIEWPreview the graph.static intPRINTPrint the graph.static intQUITExit this japlot.jaxodraw session.static intREFRESHRefresh the screen.static intRESIZEResize an object.static intSARCScalar arc.static intSAVESave a japlot.jaxodraw graph.static intSAVE_ASSave a japlot.jaxodraw graph in a given file.static intSLINEScalar line.static intSLOOPScalar loop.static intSTANDBYDefault drawing mode: do nothing.static intTEXTNormal text.static intUNDOUndo the last operation.static intUNGROUPUngroup objects.static intVERTEXVertex (black circle).static intVERTEXT1A vertex type 1 object (a dot).static intVERTEXT2A vertex type 2 object (a cross with a circle).static intVERTEXT3A vertex type 3 object (a filled square).static intVERTEXT4A vertex type 4 object (a cross).static intVERTEXT5A vertex type 5 object (a triangle).static intVERTEXT6A vertex type 6 object (a diamond).static intZIGZAGZigZag line.static intZOOMDynamic zoom.-
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor and Description JaxoMainPanel(HPlotJa japlot)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidactionEvent(int i)Called when an action item has been chosen from the menu bar, the button panel or via key shortcuts.voidantialiasOn(boolean on)Switches antialiasing on or off.voidapplyPrefs()Applies the preferences.voidarrow(boolean on)Determines whether to draw arrows on lines, arcs and loops.voidclearData(int padX, int padY)Clear the datavoideditEvent(int i)Called when an edit item has been chosen from the menu bar, the button panel or via key shortcuts.voidexport(java.lang.String file)Fast export of the canvas to an image file (depends on the extension, i.e.voidexportImage()Exports the image to some graphic format using a dialogvoidfileEvent(int i)Called when a file item has been chosen from the menu , the tool bar or via key shortcuts.voidfillBrowser(java.util.Map<java.lang.String,java.lang.Object> map)Fill browser.JaxoCanvasgetCanvas()Returns an instance of the canvas.JaxoTabbedCanvasPanelgetCanvasPanel()Returns the particle button panel.JaxoGraphgetClipboard()Returns the current clipboard.JaxoEditButtonsgetEbtPanel()Returns the edit button panel.JaxoGridButtonsgetGbtPanel()Returns the grid button panel.JaxoGraphgetGraph()Get graph of this canvasHPlotJagetJaPlot()Get HPlotJaJaxoMiscButtonsgetMbtPanel()Returns the miscellaneous button panel.intgetMode()Return the current drawing/editing mode.JaxoOptionsMenugetOptMenu()Returns the options menu.JaxoParticleButtonsgetPbtPanel()Returns the particle button panel.intgetSizeX()Repaints the canvas.intgetSizeY()Repaints the canvas.booleangetSnap()Returns the current snap mode.intgetVertexType()Returns the current vertex type.JaxoZoomgetZoom()Returns the zoom.voidgridOn(boolean on)Switches the grid on or off.voidhelpEvent()voidinit(java.lang.String inputFileName, JaxoGraph fGraph)The initialisation method of the panel: sets up the menus, the button panels, the flag panel and the canvas.booleanisEditMode()Determines whether the current mode is an edit mode.booleanisMiscMode()Determines whether the current mode is a misc mode.booleanisParticleMode()Determines whether the current mode is a particle mode.booleanisWatchMode()Indicates whether watch mode is active or not.voidmiscEvent(int i)Called when a misc item has been chosen from the button panel.voidparticleEvent(int i)Processes the corresponding events whenever a particle button has been pressed.voidrepaintCanvas()Repaints the canvas.voidreset()Resets the canvas.voidresetButtons()Sets all the buttons as not pressed and hides the handles.voidsetAxes(int n1, int n2)voidsetClipboard(JaxoGraph newClipboard)Sets the clipboard.voidsetFlagPanelCoordinates(java.lang.String coordinates)Sets the coordinates in the flag panel.voidsetFlagPanelFileName(java.lang.String filename)Sets the current file being edited in the flag panel.voidsetFlagPanelMode(java.lang.String mode)Sets the current drawing/edit mode in the flag panel.voidsetGraph(JaxoGraph graph)voidsetLanguage(java.lang.String languageString)Sets the text and tool tips for all components of the panel (the menus, toolbar, button panels and status bar) in different languages.voidsetMode(int newMode)Sets the current drawing/edit mode.voidsetSizeCanvas(int xsize, int ysize)set sizevoidsetSnap(boolean newSnap)Sets the snap mode.voidsetVertexType(int type)Sets the current type of vertex.voidsetWatchMode(boolean choice)Sets the current watch mode.voidsetZoom(JaxoZoom z)Sets the zoom.voidshowBrowserbar(boolean show)Switches the browser on or off.voidshowEditorbar(boolean show)Switches the editor on or off.voidshowStatusbar(boolean show)Switches the status bar on or off.voidshowToolbar(boolean show)Switches the toolbar on or off.voidshutdown()Clear from all objects and dispose the frame.voidupdate()UpdatevoidupdateUI()voidupdateZoom()Initializes the zoom: sets the background image, graphics context, image dimensions and canvas dimensions.-
Methods inherited from class javax.swing.JFrame
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setTransferHandler, update
-
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
STANDBY
public static final int STANDBY
Default drawing mode: do nothing.- See Also:
- Constant Field Values
-
FLINE
public static final int FLINE
Fermion line.- See Also:
- Constant Field Values
-
FLOOP
public static final int FLOOP
Fermion loop.- See Also:
- Constant Field Values
-
FARC
public static final int FARC
Fermion arc.- See Also:
- Constant Field Values
-
SLINE
public static final int SLINE
Scalar line.- See Also:
- Constant Field Values
-
GLINE
public static final int GLINE
Ghost line.- See Also:
- Constant Field Values
-
SLOOP
public static final int SLOOP
Scalar loop.- See Also:
- Constant Field Values
-
GLOOP
public static final int GLOOP
Ghost loop.- See Also:
- Constant Field Values
-
SARC
public static final int SARC
Scalar arc.- See Also:
- Constant Field Values
-
GARC
public static final int GARC
Ghost arc.- See Also:
- Constant Field Values
-
PLINE
public static final int PLINE
Photon line.- See Also:
- Constant Field Values
-
PLOOP
public static final int PLOOP
Photon loop.- See Also:
- Constant Field Values
-
PARC
public static final int PARC
Photon arc.- See Also:
- Constant Field Values
-
GLLINE
public static final int GLLINE
Gluon line.- See Also:
- Constant Field Values
-
GLLOOP
public static final int GLLOOP
Gluon loop.- See Also:
- Constant Field Values
-
GLARC
public static final int GLARC
Gluon arc.- See Also:
- Constant Field Values
-
BOX
public static final int BOX
Box (filled rectangle).- See Also:
- Constant Field Values
-
BLOB
public static final int BLOB
Blob (filled ellipse).- See Also:
- Constant Field Values
-
VERTEX
public static final int VERTEX
Vertex (black circle).- See Also:
- Constant Field Values
-
ZIGZAG
public static final int ZIGZAG
ZigZag line.- See Also:
- Constant Field Values
-
TEXT
public static final int TEXT
Normal text.- See Also:
- Constant Field Values
-
LATEX
public static final int LATEX
Latex text.- See Also:
- Constant Field Values
-
VERTEXT1
public static final int VERTEXT1
A vertex type 1 object (a dot).- See Also:
- Constant Field Values
-
VERTEXT2
public static final int VERTEXT2
A vertex type 2 object (a cross with a circle).- See Also:
- Constant Field Values
-
VERTEXT3
public static final int VERTEXT3
A vertex type 3 object (a filled square).- See Also:
- Constant Field Values
-
VERTEXT4
public static final int VERTEXT4
A vertex type 4 object (a cross).- See Also:
- Constant Field Values
-
VERTEXT5
public static final int VERTEXT5
A vertex type 5 object (a triangle).- See Also:
- Constant Field Values
-
VERTEXT6
public static final int VERTEXT6
A vertex type 6 object (a diamond).- See Also:
- Constant Field Values
-
UNDO
public static final int UNDO
Undo the last operation.- See Also:
- Constant Field Values
-
CLEAR
public static final int CLEAR
Clear the current graph.- See Also:
- Constant Field Values
-
QUIT
public static final int QUIT
Exit this japlot.jaxodraw session.- See Also:
- Constant Field Values
-
REFRESH
public static final int REFRESH
Refresh the screen.- See Also:
- Constant Field Values
-
PASTE
public static final int PASTE
Paste the most recently selected objects from the clipboard.- See Also:
- Constant Field Values
-
ZOOM
public static final int ZOOM
Dynamic zoom.- See Also:
- Constant Field Values
-
MOVE
public static final int MOVE
Move an object.- See Also:
- Constant Field Values
-
RESIZE
public static final int RESIZE
Resize an object.- See Also:
- Constant Field Values
-
COPY
public static final int COPY
Copy an object.- See Also:
- Constant Field Values
-
COLOR
public static final int COLOR
Color an object.- See Also:
- Constant Field Values
-
EDIT
public static final int EDIT
Edit an object.- See Also:
- Constant Field Values
-
DELETE
public static final int DELETE
Delete an object.- See Also:
- Constant Field Values
-
BACKGROUND
public static final int BACKGROUND
Put an object in the background.- See Also:
- Constant Field Values
-
FOREGROUND
public static final int FOREGROUND
Put an object in the foreground.- See Also:
- Constant Field Values
-
GROUP
public static final int GROUP
Group objects.- See Also:
- Constant Field Values
-
UNGROUP
public static final int UNGROUP
Ungroup objects.- See Also:
- Constant Field Values
-
NEWG
public static final int NEWG
Start a new graph.- See Also:
- Constant Field Values
-
OPEN
public static final int OPEN
Open a japlot.jaxodraw file.- See Also:
- Constant Field Values
-
SAVE
public static final int SAVE
Save a japlot.jaxodraw graph.- See Also:
- Constant Field Values
-
SAVE_AS
public static final int SAVE_AS
Save a japlot.jaxodraw graph in a given file.- See Also:
- Constant Field Values
-
DESCRIBE
public static final int DESCRIBE
Enter a description of the graph.- See Also:
- Constant Field Values
-
EXPORT
public static final int EXPORT
Export the graph.- See Also:
- Constant Field Values
-
PRINT
public static final int PRINT
Print the graph.- See Also:
- Constant Field Values
-
PREVIEW
public static final int PREVIEW
Preview the graph.- See Also:
- Constant Field Values
-
CLOSE
public static final int CLOSE
Close the current buffer.- See Also:
- Constant Field Values
-
NEWT
public static final int NEWT
Start a new graph tab.- See Also:
- Constant Field Values
-
PACKAGE
public static final int PACKAGE
Add a custom Latex package to the Latex output of japlot.jaxodraw.- See Also:
- Constant Field Values
-
IMPORT
public static final int IMPORT
Import a Latex file.- See Also:
- Constant Field Values
-
OPENDATA
public static final int OPENDATA
Open a ROOT/AIDA file.- See Also:
- Constant Field Values
-
DUMMIE
public static final int DUMMIE
A dummy variable.- See Also:
- Constant Field Values
-
DUMMIE1
public static final int DUMMIE1
Another dummy.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JaxoMainPanel
public JaxoMainPanel(HPlotJa japlot)
-
-
Method Detail
-
getJaPlot
public HPlotJa getJaPlot()
Get HPlotJa
-
init
public final void init(java.lang.String inputFileName, JaxoGraph fGraph)The initialisation method of the panel: sets up the menus, the button panels, the flag panel and the canvas. If an input file was given on the command line, opens it and creates the JaxoGraph.- Parameters:
inputFileName- The name of the file to be opened.
-
setGraph
public void setGraph(JaxoGraph graph)
-
getMode
public final int getMode()
Return the current drawing/editing mode.- Returns:
- The current drawing/editing mode.
-
setMode
public final void setMode(int newMode)
Sets the current drawing/edit mode.- Parameters:
newMode- The drawing/edit mode to be set.
-
getCanvas
public final JaxoCanvas getCanvas()
Returns an instance of the canvas.- Returns:
- The canvas.
-
isEditMode
public final boolean isEditMode()
Determines whether the current mode is an edit mode.- Returns:
- True if the current mode is an edit mode.
-
isParticleMode
public final boolean isParticleMode()
Determines whether the current mode is a particle mode.- Returns:
- True if the current mode is a particle mode.
-
isMiscMode
public final boolean isMiscMode()
Determines whether the current mode is a misc mode.- Returns:
- True if the current mode is a misc mode.
-
reset
public final void reset()
Resets the canvas.
-
setFlagPanelCoordinates
public final void setFlagPanelCoordinates(java.lang.String coordinates)
Sets the coordinates in the flag panel.- Parameters:
coordinates- The coordinates to be set.
-
setFlagPanelMode
public final void setFlagPanelMode(java.lang.String mode)
Sets the current drawing/edit mode in the flag panel.- Parameters:
mode- The mode to be set.
-
setFlagPanelFileName
public final void setFlagPanelFileName(java.lang.String filename)
Sets the current file being edited in the flag panel.- Parameters:
filename- The filename to be set.
-
setLanguage
public final void setLanguage(java.lang.String languageString)
Sets the text and tool tips for all components of the panel (the menus, toolbar, button panels and status bar) in different languages.- Parameters:
languageString- A string specifying the language to be set.
-
particleEvent
public final void particleEvent(int i)
Processes the corresponding events whenever a particle button has been pressed.- Parameters:
i- An integer specifying the particle button that was pressed.
-
miscEvent
public final void miscEvent(int i)
Called when a misc item has been chosen from the button panel. Presses the corresponding button in the button panel, sets the mode in the flag panel, sets the current mode and shows all handles. Finally, makes sure that no object is selected.- Parameters:
i- Integer specifying the misc mode.
-
updateUI
public void updateUI()
-
setAxes
public void setAxes(int n1, int n2)
-
editEvent
public final void editEvent(int i)
Called when an edit item has been chosen from the menu bar, the button panel or via key shortcuts. Presses the corresponding button in the button panel, sets the mode in the flag panel, sets the current mode and shows all handles. Finally, makes sure that no object is selected.- Parameters:
i- Integer specifying the edit mode.
-
fileEvent
public final void fileEvent(int i)
Called when a file item has been chosen from the menu , the tool bar or via key shortcuts. Calls the corresponding methods in the JaxoFileMenu.- Parameters:
i- Integer specifying the file event.
-
helpEvent
public void helpEvent()
-
actionEvent
public final void actionEvent(int i)
Called when an action item has been chosen from the menu bar, the button panel or via key shortcuts. An action item calls for immediate action, without further input, currently there is Undo, Clear and Quit.- Parameters:
i- Integer specifying the action mode. Currently one of JaxoMainPanel.UNDO, JaxoMainPanel.CLEAR or JaxoMainPanel.QUIT.
-
clearData
public void clearData(int padX, int padY)Clear the data
-
update
public void update()
Update
-
resetButtons
public final void resetButtons()
Sets all the buttons as not pressed and hides the handles.
-
repaintCanvas
public final void repaintCanvas()
Repaints the canvas.
-
getSizeX
public int getSizeX()
Repaints the canvas.
-
getSizeY
public int getSizeY()
Repaints the canvas.
-
getGraph
public JaxoGraph getGraph()
Get graph of this canvas
-
shutdown
public void shutdown()
Clear from all objects and dispose the frame.
-
setSizeCanvas
public void setSizeCanvas(int xsize, int ysize)set size
-
applyPrefs
public final void applyPrefs()
Applies the preferences.
-
showToolbar
public final void showToolbar(boolean show)
Switches the toolbar on or off.- Parameters:
show- A boolean variable that indicates whether the toolbar is visible or not.
-
showEditorbar
public final void showEditorbar(boolean show)
Switches the editor on or off.- Parameters:
show- A boolean variable that indicates whether the editor is visible or not.
-
showBrowserbar
public final void showBrowserbar(boolean show)
Switches the browser on or off.- Parameters:
show- A boolean variable that indicates whether the browser visible or not.
-
showStatusbar
public final void showStatusbar(boolean show)
Switches the status bar on or off.- Parameters:
show- A boolean variable that indicates whether the status bar is visible or not.
-
antialiasOn
public final void antialiasOn(boolean on)
Switches antialiasing on or off.- Parameters:
on- A boolean variable that indicates whether antialising is on or not.
-
gridOn
public final void gridOn(boolean on)
Switches the grid on or off.- Parameters:
on- A boolean variable that indicates whether the grid is on or not.
-
arrow
public final void arrow(boolean on)
Determines whether to draw arrows on lines, arcs and loops.- Parameters:
on- A boolean variable that indicates whether to draw arrows on lines, arcs and loops.
-
setVertexType
public final void setVertexType(int type)
Sets the current type of vertex.- Parameters:
type- An integer specifying the vertex type.
-
getVertexType
public final int getVertexType()
Returns the current vertex type.- Returns:
- The current vertex type.
-
setClipboard
public final void setClipboard(JaxoGraph newClipboard)
Sets the clipboard.- Parameters:
newClipboard- A JaxoGraph containing the new clipboard.
-
getClipboard
public final JaxoGraph getClipboard()
Returns the current clipboard.- Returns:
- The current clipboard.
-
setSnap
public final void setSnap(boolean newSnap)
Sets the snap mode.- Parameters:
newSnap- The new snap mode.
-
getSnap
public final boolean getSnap()
Returns the current snap mode.- Returns:
- The current snap mode.
-
isWatchMode
public final boolean isWatchMode()
Indicates whether watch mode is active or not.- Returns:
- True when watch mode is active, false otherwise.
-
setWatchMode
public final void setWatchMode(boolean choice)
Sets the current watch mode.- Parameters:
choice- True, if watch mode is to be switched on, false otherwise.
-
getPbtPanel
public final JaxoParticleButtons getPbtPanel()
Returns the particle button panel.- Returns:
- The current particle button panel.
-
getEbtPanel
public final JaxoEditButtons getEbtPanel()
Returns the edit button panel.- Returns:
- The current edit button panel.
-
getMbtPanel
public final JaxoMiscButtons getMbtPanel()
Returns the miscellaneous button panel.- Returns:
- The current miscalleneous button panel.
-
getGbtPanel
public final JaxoGridButtons getGbtPanel()
Returns the grid button panel.- Returns:
- The current grid button panel.
-
getCanvasPanel
public final JaxoTabbedCanvasPanel getCanvasPanel()
Returns the particle button panel.- Returns:
- The current particle button panel.
-
getOptMenu
public final JaxoOptionsMenu getOptMenu()
Returns the options menu.- Returns:
- The current options menu.
-
setZoom
public final void setZoom(JaxoZoom z)
Sets the zoom.- Parameters:
z- The zoom.
-
getZoom
public final JaxoZoom getZoom()
Returns the zoom.- Returns:
- The zoom.
-
updateZoom
public final void updateZoom()
Initializes the zoom: sets the background image, graphics context, image dimensions and canvas dimensions.
-
fillBrowser
public final void fillBrowser(java.util.Map<java.lang.String,java.lang.Object> map)
Fill browser.- Parameters:
map-
-
exportImage
public void exportImage()
Exports the image to some graphic format using a dialog
-
export
public void export(java.lang.String file)
Fast export of the canvas to an image file (depends on the extension, i.e. PNG, PDF, EPS, PS). No questions will be asked, an existing file will be rewritten- Parameters:
file- Output file with the proper extension. If no extension, PNG file is assumed.
-
-
DMelt 3.0 © DataMelt by jWork.ORG