japlot.jaxodraw
Class JaxoGroup
- java.lang.Object
-
- jhplot.jadraw.JaObject
-
- japlot.jaxodraw.JaxoGroup
-
- All Implemented Interfaces:
- java.io.Serializable
public class JaxoGroup extends JaObject
Groups together a number of JaxoObjects.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description JaxoGroup()Constructor: creates a new empty vector and sets the dimensions to a default value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanareAmpObject()Determines whether there are photon or gluon objects present in this group.booleanarePSLabels()Determines whether there are PS labels present in this group.booleanareTeXLabels()Determines whether there are LaTeX labels present in this group.voidclearGroup()Removes all JaxoObjects from the Group.JaObjectcopy()Returns an exact copy of this JaxoGroup.voiddrawHandles(org.freehep.graphics2d.VectorGraphics g2)Draws the handles of this group.booleaneditPanel()Brings up the edit panel that allows to change the parameters of this object.intgetAmp()Returns the groupAmp property of this group object.double[]getBoundingBox()Gets the bounding box of this group.intgetGrabbedHandle(int clickX, int clickY, int editmode)Determines where on this JaObject a mouse click has ocurred.java.util.VectorgetObList()Returns the JaxoObjects in this group.floatgetStroke()Returns the stroke property of this group object.intgetTeXSize()Returns the groupTeXSize property of this group object.java.awt.FontgetTextFont()Returns the groupTextFont property of this text object.intgroupObListSize()Returns the number of JaxoObjects in this group.booleanisCopy(JaObject comp)Returns true if all serializable variables of this JaObject and those of the specified one are equal.voidjaxoDraw(org.freehep.graphics2d.VectorGraphics g2, boolean drawToScreen)Draws all the objects in this group.java.lang.StringlatexCommand(float scale, java.awt.Dimension canvasDim)The latex command of this group (obsolete because every JaObject has its own latex command).java.lang.StringlatexWidth()The latex command setting the width of this group (obsolete because every JaObject has its own latexWidth).voidmoveBy(int deltaX, int deltaY)Displaces the group.voidrescaleObject(int orx, int ory, float scale)Rescales this JaxoGroup by the scale factor scale, keeping the point (orx, ory) fixed.voidsetAmp(int amp)Sets the groupAmp property of this group object.voidsetAvailableFonts(java.lang.String[] fonts)Sets the vector of available fonts.voidsetGroupAmp(int newAmp)Sets the amplitude for all the objects in this group.voidsetGroupColor(java.awt.Color newColor)Sets the color for all objects in this group.voidsetGroupStroke(float newStroke)Sets the stroke property (line width) for all the objects in this group.voidsetGroupTeXSize(int newSize)Sets the font size for all the LaTeX labels in this group.voidsetGroupTextFont(java.awt.Font newFont)Sets the font for all the PS labels in this group.voidsetObList(java.util.Vector obList)Sets the JaxoObjects of this group.voidsetStroke(float newStroke)Sets the stroke property of this group object.voidsetTeXSize(int teXSize)Sets the groupTeXSize property of this group object.voidsetTextFont(java.awt.Font textFont)Sets the groupTeXSize property of this group object.-
Methods inherited from class jhplot.jadraw.JaObject
drawVisualAid, getColor, getGeneralPath, getHeight, getRelh, getRelHndc, getRelHuser, getRelSize, getRelw, getRelWndc, getRelWuser, getSize, getWidth, getX, getXndc, getXuser, getY, getYndc, getYuser, isMarked, isUser, scalePoint, setAsMarked, setBoundingBox, setColor, setLocation, setLocation, setRelh, setRelw, setRelWAndH, setRelWH, setSize, setX, setY, updateCoor, updateNDC
-
-
-
-
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.
-
isCopy
public final boolean isCopy(JaObject comp)
Returns true if all serializable variables of this JaObject and those of the specified one are equal.
-
getGrabbedHandle
public final int getGrabbedHandle(int clickX, int clickY, int editmode)Determines where on this JaObject a mouse click has ocurred.- Specified by:
getGrabbedHandlein classJaObject- 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:
drawHandlesin classJaObject- 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.
-
moveBy
public final void moveBy(int deltaX, int deltaY)Displaces the group.
-
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:
latexCommandin classJaObject- 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:
latexWidthin classJaObject- Returns:
- The string "%"
-
getBoundingBox
public final double[] getBoundingBox()
Gets the bounding box of this group.- Overrides:
getBoundingBoxin classJaObject- 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:
rescaleObjectin classJaObject- Parameters:
orx- The x-coordinate of the fixed pointory- The y-coordinate of the fixed pointscale- 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.
-
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