|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jaxodraw.object.JaxoObject
net.sf.jaxodraw.object.JaxoExtendedObject
net.sf.jaxodraw.object.group.JaxoGroup
public class JaxoGroup
Groups together a number of JaxoObjects.
| Field Summary |
|---|
| Fields inherited from class net.sf.jaxodraw.object.JaxoExtendedObject |
|---|
SELECT_DX, SELECT_DY, SELECT_P2 |
| Fields inherited from class net.sf.jaxodraw.object.JaxoObject |
|---|
D_FORMAT, GRAY_SCALE_FORMAT, SELECT_NONE, SELECT_P1 |
| Constructor Summary | |
|---|---|
JaxoGroup()
Constructor: creates a new empty vector and sets the dimensions to a default value. |
|
| Method Summary | |
|---|---|
boolean |
canBeSelected(int handle,
int mode)
Determines if the object can be selected (moved, edited, etc) from the given point in a given edit mode. |
void |
clearGroup()
Removes all JaxoObjects from the Group. |
boolean |
containsInstanceOf(Class<?> clazz)
Determines whether there are instances of the given Class in this group. |
JaxoObject |
copy()
Returns an exact copy of this JaxoGroup. |
void |
copyFrom(JaxoGroup temp)
Sets all parameters from the given object to the current one. |
int |
getAmp()
Returns the groupAmp property of this group object. |
Rectangle |
getBounds()
Returns the bounding box of this object. |
Font |
getFont()
Returns the groupTextFont property of this text object. |
int |
getGrabbedHandle(int clickX,
int clickY,
JaxoHandle h)
Determines which handle the user has selected to move/resize/edit an object. |
int |
getLatexTextSize()
Returns the groupTeXSize property of this group object. |
JaxoList<JaxoObject> |
getObjectList()
Returns the JaxoObjects in this group. |
boolean |
isCopy(JaxoObject comp)
Determines if this JaxoObject is a copy of the specified one. |
String |
latexCommand(float scale,
Dimension canvasDim)
The latex command of this group (obsolete because every JaxoObject has its own latex command). |
String |
latexWidth()
The latex command setting the width of this group (obsolete because every JaxoObject has its own latexWidth). |
void |
moveBy(int deltaX,
int deltaY)
Displaces the group. |
void |
paint(JaxoGraphics2D g2)
The method that paints the JaxoObject. |
void |
paintHandles(JaxoGraphics2D g2,
JaxoHandle h,
int editMode)
Paints the handles of this JaxoObject that allow to move/resize/edit it. |
void |
paintVisualAid(JaxoGraphics2D g2)
Paints a visual aid for the user during dragging (moving or resizing) of this JaxoObject. |
void |
prepareEditPanel(JaxoObjectEditPanel editPanel)
Initializes the given editPanel to edit properties of this JaxoObject. |
void |
rescaleObject(int orx,
int ory,
float scale)
Rescale this JaxoObject by the scale factor scale, keeping the point (orx, ory) fixed. |
void |
setAmp(int amp)
Sets the groupAmp property of this group object. |
void |
setColor(Color newColor)
Sets the color for all objects in this group.If newColor != null, applies the value to all objects in the group. |
void |
setFont(Font textFont)
Sets the groupTextFont property of this group. |
void |
setFontName(String name)
Sets the font name of this group. |
void |
setFontSize(int size)
Sets the font size of this group. |
void |
setFontStyle(int style)
Sets the font style of this group. |
void |
setLatexTextSize(int teXSize)
Sets the groupTeXSize property of this group object. |
void |
setNewScale(float scale)
Rescales the group with the given scale factor, leaving the first point fixed. |
void |
setObjectList(JaxoList<JaxoObject> obList)
Sets the JaxoObjects of this group. |
void |
setState(JaxoObject o)
Restore state to the values of 'o'. |
void |
setStrokeWidth(float newStroke)
Sets the strokeWidth property of this group object. |
int |
size()
Returns the number of JaxoObjects in this group. |
float |
smallestDistanceTo(int px,
int py)
Determines the smallest distance of any of the handles of this JaxoObject from the given point. |
| Methods inherited from class net.sf.jaxodraw.object.JaxoExtendedObject |
|---|
copyFrom, getHeight, getPointCount, getRadius, getRelh, getRelSize, getRelw, getSize, getStroke, getStrokeWidth, getWidth, getX, getX2, getY, getY2, resetStroke, setLocation, setPreferences, setRadius, setRelativeHeight, setRelativeWidth, setRelWAndH, setStroke, setX, setX2, setY, setY2, strokeIs |
| Methods inherited from class net.sf.jaxodraw.object.JaxoObject |
|---|
addPropertyChangeListener, contains, contains, contains, contains, copyFrom, firePropertyChange, getBounds2D, getBoundsWithHandles, getColor, getGeneralPath, getLaTexLocation, getName, getPathIterator, getPathIterator, getPoints, getX, getY, intersects, intersects, isAround, isMarked, propertyChange, removePropertyChangeListener, setAsMarked, setLocation, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setPointCount, setPoints, setTransient, setX, setXPosition, setY, setYPosition |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JaxoGroup()
| Method Detail |
|---|
public final JaxoObject copy()
copy in class JaxoObjectpublic final boolean isCopy(JaxoObject comp)
isCopy in class JaxoExtendedObjectcomp - The JaxoObject to compare against.
public void copyFrom(JaxoGroup temp)
temp - The object to copy from.public void setState(JaxoObject o)
JaxoObject.copy().
setState in class JaxoExtendedObjecto - the object to copy from.
public final int getGrabbedHandle(int clickX,
int clickY,
JaxoHandle h)
getGrabbedHandle in class JaxoExtendedObjectclickX - The x coordinate where the mouse click has ocurred.clickY - The y coordinate where the mouse click has ocurred.h - A handle object.
public boolean canBeSelected(int handle,
int mode)
canBeSelected in class JaxoExtendedObjecthandle - One of the static variables SELECT_* defined for
this JaxoObject.mode - The current edit mode.
public final void paintHandles(JaxoGraphics2D g2,
JaxoHandle h,
int editMode)
paintHandles in class JaxoExtendedObjectg2 - The corresponding graphics context.h - A handle object to be used for painting.editMode - The edit mode that the handles are being painted in.
public final float smallestDistanceTo(int px,
int py)
smallestDistanceTo in class JaxoExtendedObjectpx - The x coordinate of the test point.py - The y coordinate of the test point.
public final void paintVisualAid(JaxoGraphics2D g2)
paintVisualAid in class JaxoObjectg2 - The graphics context to paint the visual aid.public final void paint(JaxoGraphics2D g2)
paint in class JaxoObjectg2 - The graphics context where the object has to be painted.
public final void moveBy(int deltaX,
int deltaY)
moveBy in class JaxoExtendedObjectdeltaX - The displacement in x directiondeltaY - The displacement in y direction
public final String latexCommand(float scale,
Dimension canvasDim)
latexCommand in class JaxoObjectscale - A scale factor to translate Java coordinates to
LaTeX coordinates.canvasDim - The current dimension of the canvas.
public final String latexWidth()
latexWidth in class JaxoExtendedObjectpublic Rectangle getBounds()
public final void clearGroup()
public final JaxoList<JaxoObject> getObjectList()
public final void setObjectList(JaxoList<JaxoObject> obList)
obList - A list containing all the JaxoObjects to be set
for this grouppublic final int size()
public final void rescaleObject(int orx,
int ory,
float scale)
rescaleObject in class JaxoObjectorx - The x-coordinate of the fixed point.ory - The y-coordinate of the fixed point.scale - The scale parameter.public final void setNewScale(float scale)
scale - the scale factor.public final void setStrokeWidth(float newStroke)
setStrokeWidth in class JaxoExtendedObjectnewStroke - The strokeWidth property of this group object.public final int getAmp()
public final void setAmp(int amp)
amp - The groupAmp property of this group object.public final int getLatexTextSize()
public final void setLatexTextSize(int teXSize)
teXSize - The groupTeXSize property of this group object.public final Font getFont()
public final void setFont(Font textFont)
textFont - The groupTextFont property of this group object.public final void setFontName(String name)
name - the font name to set.public final void setFontStyle(int style)
style - the font style to set.public final void setFontSize(int size)
size - the font size to set.public final void setColor(Color newColor)
setColor in class JaxoObjectnewColor - The color to be set.public final boolean containsInstanceOf(Class<?> clazz)
clazz - a Class to look for.
public void prepareEditPanel(JaxoObjectEditPanel editPanel)
prepareEditPanel in class JaxoObjecteditPanel - the panel to prepare.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||