Class JaxoConstants

java.lang.Object
net.sf.jaxodraw.util.JaxoConstants

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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    About.
    static final int
    Antialias on/off.
    static final int
    Arrow on/off.
    static final int
    Put an object in the background.
    static final int
    Blob (filled ellipse).
    static final int
    Box (filled rectangle).
    static final int
    Clear the current graph.
    static final int
    Close the current buffer.
    static final int
    Color an object.
    static final int
    Cut the most recently selected objects stored in the clipboard.
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default fline.
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default none.
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Default .
    static final int
    Delete an object.
    static final int
    Enter a description of the graph.
    static final int
    A dummy variable.
    static final int
    Another dummy.
    static final int
    Copy an object.
    static final int
    Edit an object.
    static final int
    English language mode.
    static final int
    Export the graph.
    static final int
    Export the current selection of objects.
    static final int
    Fermion arc.
    static final int
    Fermionic Bezier.
    static final int
    Fermion line.
    static final int
    Fermion loop.
    static final int
    Put an object in the foreground.
    static final int
    French language mode.
    static final int
    Ghost arc.
    static final int
    Ghost Bezier.
    static final int
    German language mode.
    static final int
    Gluon arc.
    static final int
    Gluonic Bezier.
    static final int
    Ghost line.
    static final int
    Gluon line.
    static final int
    Gluon loop.
    static final int
    Ghost loop.
    static final int
    Grid.
    static final int
    Grid on/off.
    static final int
    Grid size.
    static final int
    Cross style.
    static final int
    Dot style.
    static final int
    Line style.
    static final int
    Honeycomb style.
    static final int
    Show gridbar.
    static final int
    Hexagonal grid.
    static final int
    Import a Latex file.
    static final int
    Italian language mode.
    static final int
    Latex text.
    static final int
    Preview the current selection of objects (compiles in LaTeX + dvips).
    static final int
    LooknFeel dialog.
    static final int
    System info.
    static final int
    Move an object.
    static final int
    Move complete graph on canvas.
    static final int
    Start a new graph.
    static final int
    Start a new graph tab.
    static final int
    A mode indicating an invalid JaxoDraw mode.
    static final int
    Open a JaxoDraw file.
    static final int
    Add a custom Latex package to the Latex output of JaxoDraw.
    static final int
    Photon arc.
    static final int
    Paste the most recently selected objects from the clipboard.
    static final int
    Photonic Bezier.
    static final int
    Photon line.
    static final int
    Photon loop.
    static final int
    Plugin manager dialog.
    static final int
    Preferences dialog.
    static final int
    Preview the graph.
    static final int
    Print the graph.
    static final int
    Quit.
    static final int
    Recent file mode.
    static final int
    Rectangular grid.
    static final int
    Redo the last operations.
    static final int
    Refresh the screen.
    static final int
    Rename a tab.
    static final int
    Resize an object.
    static final int
    Scalar arc.
    static final int
    Save a JaxoDraw graph.
    static final int
    Save a JaxoDraw graph in a given file.
    static final int
    Save the current selection of objects in a given file.
    static final int
    Put in the background the most recently selected objects.
    static final int
    Scalar Bezier.
    static final int
    Copy into the clipboard the most recently selected objects.
    static final int
    Select objects.
    static final int
    Put in the foreground the most recently selected objects.
    static final int
    Group the most recently selected objects.
    static final int
    Scalar line.
    static final int
    Scalar loop.
    static final int
    Snap on/off.
    static final int
    Spanish language mode.
    static final int
    Default drawing mode: do nothing.
    static final int
    Show statusbar.
    static final int
    Ungroup the most recently selected objects.
    static final int
    System info.
    static final int
    Normal text.
    static final int
    Show toolbar.
    static final int
    Undo the last operations.
    static final int
    Ungroup objects.
    static final int
    User guide.
    static final int
    A general vertex.
    static final int
    A vertex type 1 object (a dot).
    static final int
    A vertex type 2 object (a cross with a circle).
    static final int
    A vertex type 3 object (a filled square).
    static final int
    A vertex type 4 object (a cross).
    static final int
    A vertex type 5 object (a triangle).
    static final int
    A vertex type 6 object (a diamond).
    static final int
    Watch file mode.
    static final int
    ZigZag line.
    static final int
    Dynamic zoom.
    static final int
    A zoom factor mode.
    static final int
    A zoom factor mode x2.
    static final int
    A zoom factor mode x4.
    static final int
    A zoom factor mode x8.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String[]
    Returns the default action keys.
    static int
    defaultActionToMode(int defaultAction)
    Mode constants corresponding to a DEF_XYZ constant.
    static int[]
    Returns the default modes.
    static int
    getModeAsInt(String modeString)
    Converts the given string to an integer and checks if it corresponds to a JaxoDraw mode.
    static 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
  • Field Details

  • Method Details

    • defaultActionKeys

      public static 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 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(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.