Documentation of 'japlot.jaxodraw.JaxoGroup' Java class
JaxoGroup
japlot.jaxodraw

Class JaxoGroup

  • All Implemented Interfaces:
    java.io.Serializable


    public class JaxoGroup
    extends JaObject
    Groups together a number of JaxoObjects.
    See Also:
    Serialized Form
    • Constructor Detail

      • JaxoGroup

        public JaxoGroup()
        Constructor: creates a new empty vector and sets the dimensions to a default value.
    • Method Detail

      • copy

        public final JaObject copy()
        Returns an exact copy of this JaxoGroup.
        Specified by:
        copy in class JaObject
        Returns:
        A copy of this JaxoGroup.
      • isCopy

        public final boolean isCopy(JaObject comp)
        Returns true if all serializable variables of this JaObject and those of the specified one are equal.
        Specified by:
        isCopy in class JaObject
        Parameters:
        comp - A JaObject to compare with.
        Returns:
        True if the objects are equal, false otherwise.
      • getGrabbedHandle

        public final int getGrabbedHandle(int clickX,
                                          int clickY,
                                          int editmode)
        Determines where on this JaObject a mouse click has ocurred.
        Specified by:
        getGrabbedHandle in class JaObject
        Parameters:
        clickX - The x position of the point where the mouse click ocurred.
        clickY - The y position of the point where the mouse click ocurred.
        editmode - The current edit mode as defined in JaxoMainPanel.
        Returns:
        An integer specifying whether the click ocurred on one of the handles and if yes, on which.
      • drawHandles

        public final void drawHandles(org.freehep.graphics2d.VectorGraphics g2)
        Draws the handles of this group.
        Specified by:
        drawHandles in class JaObject
        Parameters:
        g2 - The graphics context to draw to
      • jaxoDraw

        public final void jaxoDraw(org.freehep.graphics2d.VectorGraphics g2,
                                   boolean drawToScreen)
        Draws all the objects in this group.
        Specified by:
        jaxoDraw in class JaObject
        Parameters:
        g2 - The graphics context to draw to
        drawToScreen - Determines whether the drawing is done on the screen or to a printer
      • moveBy

        public final void moveBy(int deltaX,
                                 int deltaY)
        Displaces the group.
        Overrides:
        moveBy in class JaObject
        Parameters:
        deltaX - The displacement in x direction
        deltaY - The displacement in y direction
      • latexCommand

        public final java.lang.String latexCommand(float scale,
                                                   java.awt.Dimension canvasDim)
        The latex command of this group (obsolete because every JaObject has its own latex command).
        Specified by:
        latexCommand in class JaObject
        Parameters:
        scale - A scale factor to translate Java coordinates to LaTeX coordinates.
        canvasDim - The current dimension of the canvas.
        Returns:
        The string "%"
      • latexWidth

        public final java.lang.String latexWidth()
        The latex command setting the width of this group (obsolete because every JaObject has its own latexWidth).
        Specified by:
        latexWidth in class JaObject
        Returns:
        The string "%"
      • getBoundingBox

        public final double[] getBoundingBox()
        Gets the bounding box of this group.
        Overrides:
        getBoundingBox in class JaObject
        Returns:
        The bounding box of the group, i.e. the one envelopping all the objects in this group.
      • clearGroup

        public final void clearGroup()
        Removes all JaxoObjects from the Group.
      • getObList

        public final java.util.Vector getObList()
        Returns the JaxoObjects in this group.
        Returns:
        A vector containing all the JaxoObjects of this group
      • setObList

        public final void setObList(java.util.Vector obList)
        Sets the JaxoObjects of this group.
        Parameters:
        obList - A vector containing all the JaxoObjects to be set for this group
      • groupObListSize

        public final int groupObListSize()
        Returns the number of JaxoObjects in this group.
        Returns:
        The size of the vector of JaxoObjects in this group
      • rescaleObject

        public final void rescaleObject(int orx,
                                        int ory,
                                        float scale)
        Rescales this JaxoGroup by the scale factor scale, keeping the point (orx, ory) fixed.
        Specified by:
        rescaleObject in class JaObject
        Parameters:
        orx - The x-coordinate of the fixed point
        ory - The y-coordinate of the fixed point
        scale - The scale parameter
      • getStroke

        public final float getStroke()
        Returns the stroke property of this group object.
        Returns:
        The stroke property of this group object.
      • setStroke

        public final void setStroke(float newStroke)
        Sets the stroke property of this group object.
        Parameters:
        newStroke - The stroke property of this group object.
      • getAmp

        public final int getAmp()
        Returns the groupAmp property of this group object.
        Returns:
        The groupAmp property of this group object.
      • setAmp

        public final void setAmp(int amp)
        Sets the groupAmp property of this group object.
        Parameters:
        amp - The groupAmp property of this group object.
      • getTeXSize

        public final int getTeXSize()
        Returns the groupTeXSize property of this group object.
        Returns:
        The groupTeXSize property of this group object.
      • setTeXSize

        public final void setTeXSize(int teXSize)
        Sets the groupTeXSize property of this group object.
        Parameters:
        teXSize - The groupTeXSize property of this group object.
      • getTextFont

        public final java.awt.Font getTextFont()
        Returns the groupTextFont property of this text object.
        Returns:
        The groupTextFont property of this text object.
      • setTextFont

        public final void setTextFont(java.awt.Font textFont)
        Sets the groupTeXSize property of this group object.
        Parameters:
        textFont - The groupTeXSize property of this group object.
      • setGroupColor

        public final void setGroupColor(java.awt.Color newColor)
        Sets the color for all objects in this group.
        Parameters:
        newColor - The color to be set.
      • setGroupStroke

        public final void setGroupStroke(float newStroke)
        Sets the stroke property (line width) for all the objects in this group.
        Parameters:
        newStroke - The stroke to be set
      • areAmpObject

        public final boolean areAmpObject()
        Determines whether there are photon or gluon objects present in this group.
        Returns:
        A boolean parameter
      • setGroupAmp

        public final void setGroupAmp(int newAmp)
        Sets the amplitude for all the objects in this group.
        Parameters:
        newAmp - The amplitude to be set.
      • areTeXLabels

        public final boolean areTeXLabels()
        Determines whether there are LaTeX labels present in this group.
        Returns:
        A boolean parameter.
      • arePSLabels

        public final boolean arePSLabels()
        Determines whether there are PS labels present in this group.
        Returns:
        A boolean parameter.
      • setGroupTeXSize

        public final void setGroupTeXSize(int newSize)
        Sets the font size for all the LaTeX labels in this group.
        Parameters:
        newSize - The size to be set.
      • setGroupTextFont

        public final void setGroupTextFont(java.awt.Font newFont)
        Sets the font for all the PS labels in this group.
        Parameters:
        newFont - The size to be set.
      • editPanel

        public final boolean editPanel()
        Brings up the edit panel that allows to change the parameters of this object.
        Specified by:
        editPanel in class JaObject
        Returns:
        True if the editing actually changed the object, false if the object has not been changed.
      • setAvailableFonts

        public final void setAvailableFonts(java.lang.String[] fonts)
        Sets the vector of available fonts.
        Parameters:
        fonts - The vector of available fonts.

DMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.