Class JaxoGlLine

All Implemented Interfaces:
Shape, PropertyChangeListener, Serializable, Cloneable, EventListener, JaxoWiggleObject

public class JaxoGlLine extends JaxoLineObject implements JaxoWiggleObject
A gluon line.
Since:
2.0
See Also:
  • Constructor Details

    • JaxoGlLine

      public JaxoGlLine()
  • Method Details

    • copyFrom

      public void copyFrom(JaxoGlLine temp)
      Sets all parameters from the given object to the current one.
      Parameters:
      temp - The object to copy from.
    • setState

      public void setState(JaxoObject o)
      Restore state to the values of 'o'. The object 'o' must be an object of the same "type" obtained by JaxoObject.copy().
      Overrides:
      setState in class JaxoLineObject
      Parameters:
      o - the object to copy from.
    • isCopy

      public boolean isCopy(JaxoObject comp)
      Determines if this JaxoObject is a copy of the specified one.
      Overrides:
      isCopy in class JaxoLineObject
      Parameters:
      comp - The JaxoObject to compare against.
      Returns:
      True if the JaxoObjects are identical.
    • latexCommand

      public final String latexCommand(float scale, Dimension canvasDim)
      The LaTeX command that is necessary to draw the given JaxoObject using the axodraw.sty package.
      Overrides:
      latexCommand in class JaxoLineObject
      Parameters:
      scale - A scale factor to translate Java coordinates to LaTeX coordinates.
      canvasDim - The current dimension of the canvas.
      Returns:
      The corresponding axodraw LaTeX command.
    • getFrequency

      public float getFrequency()
      Gets the current frequency (number of wiggles per unit length) of this WiggleObject.
      Specified by:
      getFrequency in interface JaxoWiggleObject
      Returns:
      The frequency.
    • setWigglesFromFrequency

      public void setWigglesFromFrequency(float frequency)
      Sets the frequency to the given value and derives the number of wiggles from it.
      Specified by:
      setWigglesFromFrequency in interface JaxoWiggleObject
      Parameters:
      frequency - The frequency to set.
    • setWigglesFromFrequency

      public void setWigglesFromFrequency()
      Sets the number of wiggles from the current frequency.
      Specified by:
      setWigglesFromFrequency in interface JaxoWiggleObject
    • setFrequencyFromWiggles

      public void setFrequencyFromWiggles(int wiggles)
      Sets the number of wiggles to the given value and derives the frequency from it.
      Specified by:
      setFrequencyFromWiggles in interface JaxoWiggleObject
      Parameters:
      wiggles - The number of wiggles to set.
    • setPreferences

      public void setPreferences()
      Applies default values to this JaxoObject. All fields except location points are initialized with values taken from the preferences.
      Overrides:
      setPreferences in class JaxoParticleObject
    • prepareEditPanel

      public void prepareEditPanel(JaxoObjectEditPanel editPanel)
      Initializes the given editPanel to edit properties of this JaxoObject.
      Specified by:
      prepareEditPanel in class JaxoObject
      Parameters:
      editPanel - the panel to prepare.
    • getObjectPath

      protected GeneralPath getObjectPath()
      Get the GeneralPath that paints this line.
      Specified by:
      getObjectPath in class JaxoLineObject
      Returns:
      GeneralPath.
    • getAxo4JOptions

      protected String getAxo4JOptions(float scale)
      Return the option part of the LaTeX command for this line.
      Specified by:
      getAxo4JOptions in class JaxoLineObject
      Parameters:
      scale - the axodraw4j scale factor.
      Returns:
      the option String.