Class JaxoConstants


  • public final class JaxoConstants
    extends java.lang.Object
    Defines constants used throughout JaxoDraw.
    Since:
    2.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ABOUT
      About.
      static int ANTIALIAS
      Antialias on/off.
      static int ARROW
      Arrow on/off.
      static int BACKGROUND
      Put an object in the background.
      static int BLOB
      Blob (filled ellipse).
      static int BOX
      Box (filled rectangle).
      static int CLEAR
      Clear the current graph.
      static int CLOSE
      Close the current buffer.
      static int COLOR
      Color an object.
      static int CUT
      Cut the most recently selected objects stored in the clipboard.
      static int DEF_BLOB
      Default .
      static int DEF_BOX
      Default .
      static int DEF_COLOR
      Default .
      static int DEF_DUPLICATE
      Default .
      static int DEF_EDIT
      Default .
      static int DEF_FARC
      Default .
      static int DEF_FLINE
      Default fline.
      static int DEF_FLOOP
      Default .
      static int DEF_GARC
      Default .
      static int DEF_GLARC
      Default .
      static int DEF_GLINE
      Default .
      static int DEF_GLLINE
      Default .
      static int DEF_GLLOOP
      Default .
      static int DEF_GLOOP
      Default .
      static int DEF_LATEX
      Default .
      static int DEF_MOVE
      Default .
      static int DEF_NONE
      Default none.
      static int DEF_PARC
      Default .
      static int DEF_PLINE
      Default .
      static int DEF_PLOOP
      Default .
      static int DEF_RESIZE
      Default .
      static int DEF_SARC
      Default .
      static int DEF_SELECT
      Default .
      static int DEF_SLINE
      Default .
      static int DEF_SLOOP
      Default .
      static int DEF_TEXT
      Default .
      static int DEF_VERTEX
      Default .
      static int DEF_ZIGZAG
      Default .
      static int DELETE
      Delete an object.
      static int DESCRIBE
      Enter a description of the graph.
      static int DUMMIE
      A dummy variable.
      static int DUMMIE1
      Another dummy.
      static int DUPLICATE
      Copy an object.
      static int EDIT
      Edit an object.
      static int ENGLISH
      English language mode.
      static int EXPORT
      Export the graph.
      static int EXPORT_SELECTION
      Export the current selection of objects.
      static int FARC
      Fermion arc.
      static int FBEZ
      Fermionic Bezier.
      static int FLINE
      Fermion line.
      static int FLOOP
      Fermion loop.
      static int FOREGROUND
      Put an object in the foreground.
      static int FRENCH
      French language mode.
      static int GARC
      Ghost arc.
      static int GBEZ
      Ghost Bezier.
      static int GERMAN
      German language mode.
      static int GLARC
      Gluon arc.
      static int GLBEZ
      Gluonic Bezier.
      static int GLINE
      Ghost line.
      static int GLLINE
      Gluon line.
      static int GLLOOP
      Gluon loop.
      static int GLOOP
      Ghost loop.
      static int GRID
      Grid.
      static int GRID_ONOFF
      Grid on/off.
      static int GRID_SIZE
      Grid size.
      static int GRID_STYLE_CROSS
      Cross style.
      static int GRID_STYLE_DOT
      Dot style.
      static int GRID_STYLE_LINE
      Line style.
      static int GRID_STYLE_LINE_HONEYCOMB
      Honeycomb style.
      static int GRIDBAR
      Show gridbar.
      static int HEXAGONAL_GRID
      Hexagonal grid.
      static int IMPORT
      Import a Latex file.
      static int ITALIAN
      Italian language mode.
      static int LATEX
      Latex text.
      static int LATEX_PREVIEW_SELECTION
      Preview the current selection of objects (compiles in LaTeX + dvips).
      static int LOOKNFEEL
      LooknFeel dialog.
      static int MAC_README
      System info.
      static int MOVE
      Move an object.
      static int MOVE_GRAPH
      Move complete graph on canvas.
      static int NEWG
      Start a new graph.
      static int NEWT
      Start a new graph tab.
      static int NO_MODE
      A mode indicating an invalid JaxoDraw mode.
      static int OPEN
      Open a JaxoDraw file.
      static int PACKAGE
      Add a custom Latex package to the Latex output of JaxoDraw.
      static int PARC
      Photon arc.
      static int PASTE
      Paste the most recently selected objects from the clipboard.
      static int PBEZ
      Photonic Bezier.
      static int PLINE
      Photon line.
      static int PLOOP
      Photon loop.
      static int PLUGINS
      Plugin manager dialog.
      static int PREFERENCES
      Preferences dialog.
      static int PREVIEW
      Preview the graph.
      static int PRINT
      Print the graph.
      static int QUIT
      Quit.
      static int RECENT_FILE
      Recent file mode.
      static int RECTANGULAR_GRID
      Rectangular grid.
      static int REDO
      Redo the last operations.
      static int REFRESH
      Refresh the screen.
      static int RENAME_TAB
      Rename a tab.
      static int RESIZE
      Resize an object.
      static int SARC
      Scalar arc.
      static int SAVE
      Save a JaxoDraw graph.
      static int SAVE_AS
      Save a JaxoDraw graph in a given file.
      static int SAVE_SELECTION_AS
      Save the current selection of objects in a given file.
      static int SBACK
      Put in the background the most recently selected objects.
      static int SBEZ
      Scalar Bezier.
      static int SCOPY
      Copy into the clipboard the most recently selected objects.
      static int SELECT
      Select objects.
      static int SFORE
      Put in the foreground the most recently selected objects.
      static int SGROUP
      Group the most recently selected objects.
      static int SLINE
      Scalar line.
      static int SLOOP
      Scalar loop.
      static int SNAP_ONOFF
      Snap on/off.
      static int SPANISH
      Spanish language mode.
      static int STANDBY
      Default drawing mode: do nothing.
      static int STATUSBAR
      Show statusbar.
      static int SUNGROUP
      Ungroup the most recently selected objects.
      static int SYS_INFO
      System info.
      static int TEXT
      Normal text.
      static int TOOLBAR
      Show toolbar.
      static int UNDO
      Undo the last operations.
      static int UNGROUP
      Ungroup objects.
      static int USR_GUIDE
      User guide.
      static int VERTEX
      A general vertex.
      static int VERTEXT1
      A vertex type 1 object (a dot).
      static int VERTEXT2
      A vertex type 2 object (a cross with a circle).
      static int VERTEXT3
      A vertex type 3 object (a filled square).
      static int VERTEXT4
      A vertex type 4 object (a cross).
      static int VERTEXT5
      A vertex type 5 object (a triangle).
      static int VERTEXT6
      A vertex type 6 object (a diamond).
      static int WATCHFILE
      Watch file mode.
      static int ZIGZAG
      ZigZag line.
      static int ZOOM
      Dynamic zoom.
      static int ZOOM_FACTOR
      A zoom factor mode.
      static int ZOOM_FACTOR_X2
      A zoom factor mode x2.
      static int ZOOM_FACTOR_X4
      A zoom factor mode x4.
      static int ZOOM_FACTOR_X8
      A zoom factor mode x8.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String[] defaultActionKeys()
      Returns the default action keys.
      static int defaultActionToMode​(int defaultAction)
      Mode constants corresponding to a DEF_XYZ constant.
      static int[] defaultModes()
      Returns the default modes.
      static int getModeAsInt​(java.lang.String modeString)
      Converts the given string to an integer and checks if it corresponds to a JaxoDraw mode.
      static java.lang.String getModeAsString​(int mode)
      Returns a string representation of the given mode.
      static boolean isActionMode​(int mode)
      Determines whether the given mode is an action mode.
      static boolean isArcMode​(int mode)
      Determines whether the given mode is an arc mode.
      static boolean isBezierMode​(int mode)
      Determines whether the given mode is a Bezier mode.
      static boolean isDefaultMode​(int mode)
      Determines whether the given mode is a default mode.
      static boolean isEditMode​(int mode)
      Determines whether the given mode is an edit mode.
      static boolean isFileMode​(int mode)
      Determines whether the given mode is a file mode.
      static boolean isGridMode​(int mode)
      Determines whether the given mode is a grid mode.
      static boolean isHelpMode​(int mode)
      Determines whether the given mode is a help mode.
      static boolean isLanguageMode​(int mode)
      Determines whether the given mode is a language mode.
      static boolean isLineMode​(int mode)
      Determines whether the given mode is a line mode.
      static boolean isLoopMode​(int mode)
      Determines whether the given mode is a loop mode.
      static boolean isMiscMode​(int mode)
      Determines whether the given mode is a misc mode.
      static boolean isNewObjectMode​(int mode)
      Determines whether the given mode is a mode that will create a new JaxoObject.
      static boolean isOptionMode​(int mode)
      Determines whether the given mode is an option mode.
      static boolean isParticleMode​(int mode)
      Determines whether the given mode is a particle mode.
      static boolean isSelectMode​(int mode)
      Determines whether the given mode is a select mode (mode allowing an object to be selected).
      static boolean isTextMode​(int mode)
      Determines whether the given mode is a text mode (either LATEX or TEXT).
      static boolean isVertexMode​(int mode)
      Determines whether the given mode is a vertex mode.
      static boolean isZoomFactorMode​(int mode)
      Determines whether the given mode is a zoom factor mode.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • defaultActionKeys

        public static java.lang.String[] defaultActionKeys()
        Returns the default action keys.
        Returns:
        The default action keys.
      • defaultModes

        public static int[] defaultModes()
        Returns the default modes.
        Returns:
        The default modes.
      • isEditMode

        public static boolean isEditMode​(int mode)
        Determines whether the given mode is an edit mode.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is an edit mode.
      • isParticleMode

        public static boolean isParticleMode​(int mode)
        Determines whether the given mode is a particle mode.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is a particle mode.
      • isMiscMode

        public static boolean isMiscMode​(int mode)
        Determines whether the given mode is a misc mode.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is a misc mode.
      • isFileMode

        public static boolean isFileMode​(int mode)
        Determines whether the given mode is a file mode.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is a file mode.
      • isActionMode

        public static boolean isActionMode​(int mode)
        Determines whether the given mode is an action mode.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is an action mode.
      • isGridMode

        public static boolean isGridMode​(int mode)
        Determines whether the given mode is a grid mode.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is a grid mode.
      • isVertexMode

        public static boolean isVertexMode​(int mode)
        Determines whether the given mode is a vertex mode.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is a vertex mode.
      • isZoomFactorMode

        public static boolean isZoomFactorMode​(int mode)
        Determines whether the given mode is a zoom factor mode.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is a zoom factor mode.
      • isHelpMode

        public static boolean isHelpMode​(int mode)
        Determines whether the given mode is a help mode.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is a help mode.
      • isLanguageMode

        public static boolean isLanguageMode​(int mode)
        Determines whether the given mode is a language mode.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is a language mode.
      • isOptionMode

        public static boolean isOptionMode​(int mode)
        Determines whether the given mode is an option mode.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is an option mode.
      • isDefaultMode

        public static boolean isDefaultMode​(int mode)
        Determines whether the given mode is a default mode.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is a default mode.
      • isNewObjectMode

        public static boolean isNewObjectMode​(int mode)
        Determines whether the given mode is a mode that will create a new JaxoObject.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is a particle, misc or vertex mode.
      • isLineMode

        public static boolean isLineMode​(int mode)
        Determines whether the given mode is a line mode.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is a line mode.
      • isArcMode

        public static boolean isArcMode​(int mode)
        Determines whether the given mode is an arc mode.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is an arc mode.
      • isBezierMode

        public static boolean isBezierMode​(int mode)
        Determines whether the given mode is a Bezier mode.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is an arc mode.
      • isLoopMode

        public static boolean isLoopMode​(int mode)
        Determines whether the given mode is a loop mode.
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is a loop mode.
      • isTextMode

        public static boolean isTextMode​(int mode)
        Determines whether the given mode is a text mode (either LATEX or TEXT).
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is a text mode.
      • isSelectMode

        public static boolean isSelectMode​(int mode)
        Determines whether the given mode is a select mode (mode allowing an object to be selected).
        Parameters:
        mode - The mode to check.
        Returns:
        True if the given mode is a select mode.
      • getModeAsString

        public static java.lang.String getModeAsString​(int mode)
        Returns a string representation of the given mode.
        Parameters:
        mode - The mode to convert.
        Returns:
        The mode as a string, or "NO_MODE" if it is not a valid mode.
      • getModeAsInt

        public static int getModeAsInt​(java.lang.String modeString)
        Converts the given string to an integer and checks if it corresponds to a JaxoDraw mode.
        Parameters:
        modeString - A string holding an integer.
        Returns:
        The JaxoDraw mode as defined by this class if modeString corresponds to one of them, or JaxoConstants.NO_MODE otherwise.
      • defaultActionToMode

        public static int defaultActionToMode​(int defaultAction)
        Mode constants corresponding to a DEF_XYZ constant.
        Parameters:
        defaultAction - One of the default modes defined by this class.
        Returns:
        One of the modes corresponding to defaultAction, or STANDBY if defaultAction is not a valid mode.