jhplot.jadraw
Class JaArcObject
- java.lang.Object
-
- jhplot.jadraw.JaObject
-
- jhplot.jadraw.JaArcObject
-
-
Constructor Summary
Constructors Constructor and Description JaArcObject()Constructor: sets the width, height, relative width and height, to a default value of JaObject.INIT_SIZE.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddrawHandles(org.freehep.graphics2d.VectorGraphics g2)Draws the handles of this JaxoArc.voiddrawVisualAid(org.freehep.graphics2d.VectorGraphics g2)Draws a visual aid during the dragging of an arc object.booleaneditPanel()Brings up the edit panel that allows to change the parameters of this object.intgetAmp()Returns the amp property of this arc object.double[]getArcParameters()booleangetArrow()Returns the arrow property of this arc object.floatgetDash()Returns the dash property of this arc object.floatgetDLSeparation()Returns the double line separation of this object.booleangetDoubleLine()Returns the double line property.booleangetEnd()Returns the end property of this line object.booleangetFlip()Returns the flip property of this arc object.floatgetFreq()Returns the freq property of this arc object.intgetGrabbedHandle(int clickX, int clickY, int editmode)Determines which handle the user has selected to move/resize/edit this arc.intgetStangle()Returns the stangle property of this arc object.floatgetStroke()Returns the stroke property of this arc object.intgetX1()Returns the x coordinate of the first click point of this arc.intgetX2()Returns the x coordinate of the second click point of this arc.intgetY1()Returns the y coordinate of the first click point of this arc.intgetY2()Returns the y coordinate of the second click point of this arc.booleanisArrow()Determines whether the arrow property of this arc object is set or not.booleanisEnd()Determines whether the end property of this line object is set or not.booleanisFlip()Determines whether the flip property of this arc object is set or not.booleanisResizing()Returns the resizing property of this arc.java.lang.StringlatexWidth()The LaTeX command that sets the width for this Arc, using the axodraw.sty package.voidmoveBy(int deltaX, int deltaY)Shifts the elements of the vector containing the three click points of this arc.voidrescaleObject(int orx, int ory, float scale)Rescales this JaArcObject by the scale factor scale.voidsetAmp(int newAmp)Sets the amp property of this arc object.voidsetArcPts(int sx1, int sy1, int sx2, int sy2, int sx3, int sy3)Sets the points of this arc.voidsetArrow(boolean arr)Sets the arrow property of this arc object.voidsetDash(float newDash)Sets the dash property of this arc object.voidsetDLSeparation(float dlsep)Sets the double line separation property.voidsetDoubleLine(boolean dline)Sets the double line property.voidsetEnd(boolean mid)Sets the end property of this line object.voidsetFlip(boolean newFlip)Sets the flip property of this arc object.voidsetFreq(float newFreq)Sets the freq property of this arc object.voidsetIsResizing(boolean ir)Sets the resizing property of this arc.voidsetStangle(int newStangle)Sets the stangle property of this arc object.voidsetStroke(float newStroke)Sets the stroke property of this arc object.voidsetX1(int newx1)Sets the x coordinate of the first click point of this arc.voidsetX2(int newx2)Sets the x coordinate of the second click point of this arc.voidsetY1(int newy1)Sets the y coordinate of the first click point of this arc.voidsetY2(int newy2)Sets the y coordinate of the second click point of this arc.-
Methods inherited from class jhplot.jadraw.JaObject
copy, getBoundingBox, getColor, getGeneralPath, getHeight, getRelh, getRelHndc, getRelHuser, getRelSize, getRelw, getRelWndc, getRelWuser, getSize, getWidth, getX, getXndc, getXuser, getY, getYndc, getYuser, isCopy, isMarked, isUser, jaxoDraw, latexCommand, scalePoint, setAsMarked, setBoundingBox, setColor, setLocation, setLocation, setRelh, setRelw, setRelWAndH, setRelWH, setSize, setX, setY, updateCoor, updateNDC
-
-
-
-
Constructor Detail
-
JaArcObject
public JaArcObject()
Constructor: sets the width, height, relative width and height, to a default value of JaObject.INIT_SIZE.
-
-
Method Detail
-
setIsResizing
public final void setIsResizing(boolean ir)
Sets the resizing property of this arc.- Parameters:
ir- True if this arc id being resized.
-
isResizing
public final boolean isResizing()
Returns the resizing property of this arc.- Returns:
- True if this arc id being resized.
-
setX1
public final void setX1(int newx1)
Sets the x coordinate of the first click point of this arc.- Parameters:
newx1- The x coordinate of the first click point of this arc.
-
getX1
public final int getX1()
Returns the x coordinate of the first click point of this arc.- Returns:
- The x coordinate of the first click point of this arc.
-
setX2
public final void setX2(int newx2)
Sets the x coordinate of the second click point of this arc.- Parameters:
newx2- The x coordinate of the second click point of this arc.
-
getX2
public final int getX2()
Returns the x coordinate of the second click point of this arc.- Returns:
- The x coordinate of the second click point of this arc.
-
setY1
public final void setY1(int newy1)
Sets the y coordinate of the first click point of this arc.- Parameters:
newy1- The y coordinate of the first click point of this arc.
-
getY1
public final int getY1()
Returns the y coordinate of the first click point of this arc.- Returns:
- The y coordinate of the first click point of this arc.
-
setY2
public final void setY2(int newy2)
Sets the y coordinate of the second click point of this arc.- Parameters:
newy2- The y coordinate of the second click point of this arc.
-
getY2
public final int getY2()
Returns the y coordinate of the second click point of this arc.- Returns:
- The y coordinate of the second click point of this arc.
-
setArcPts
public final void setArcPts(int sx1, int sy1, int sx2, int sy2, int sx3, int sy3)Sets the points of this arc.- Parameters:
sx1- The x coordinate of the first click point of this arc.sy1- The y coordinate of the first click point of this arc.sx2- The x coordinate of the second click point of this arc.sy2- The y coordinate of the second click point of this arc.sx3- The x coordinate of the third click point of this arc.sy3- The y coordinate of the third click point of this arc.
-
getStroke
public final float getStroke()
Returns the stroke property of this arc object.- Returns:
- The stroke property of this arc object.
-
setStroke
public final void setStroke(float newStroke)
Sets the stroke property of this arc object.- Parameters:
newStroke- The stroke property of this arc object.
-
getDash
public final float getDash()
Returns the dash property of this arc object.- Returns:
- The dash property of this arc object.
-
setDash
public final void setDash(float newDash)
Sets the dash property of this arc object.- Parameters:
newDash- The dash property of this arc object.
-
getFreq
public final float getFreq()
Returns the freq property of this arc object.- Returns:
- The freq property of this arc object.
-
setFreq
public final void setFreq(float newFreq)
Sets the freq property of this arc object.- Parameters:
newFreq- The freq property of this arc object.
-
getAmp
public final int getAmp()
Returns the amp property of this arc object.- Returns:
- The amp property of this arc object.
-
setAmp
public final void setAmp(int newAmp)
Sets the amp property of this arc object.- Parameters:
newAmp- The amp property of this arc object.
-
getStangle
public final int getStangle()
Returns the stangle property of this arc object.- Returns:
- The stangle property of this arc object.
-
setStangle
public final void setStangle(int newStangle)
Sets the stangle property of this arc object.- Parameters:
newStangle- The stangle property of this arc object.
-
isArrow
public final boolean isArrow()
Determines whether the arrow property of this arc object is set or not.- Returns:
- The arrow property of this arc object.
-
getArrow
public final boolean getArrow()
Returns the arrow property of this arc object.- Returns:
- The arrow property of this arc object.
-
setArrow
public final void setArrow(boolean arr)
Sets the arrow property of this arc object.- Parameters:
arr- The arrow property of this arc object.
-
isEnd
public final boolean isEnd()
Determines whether the end property of this line object is set or not.- Returns:
- The end property of this line object.
-
getEnd
public final boolean getEnd()
Returns the end property of this line object.- Returns:
- The end property of this line object.
-
setEnd
public final void setEnd(boolean mid)
Sets the end property of this line object.- Parameters:
mid- The end property of this line object.
-
isFlip
public final boolean isFlip()
Determines whether the flip property of this arc object is set or not.- Returns:
- The flip property of this arc object.
-
getFlip
public final boolean getFlip()
Returns the flip property of this arc object.- Returns:
- The flip property of this arc object.
-
setFlip
public final void setFlip(boolean newFlip)
Sets the flip property of this arc object.- Parameters:
newFlip- The flip property of this arc object.
-
setDoubleLine
public final void setDoubleLine(boolean dline)
Sets the double line property.- Parameters:
dline- The double line boolean variable.
-
getDoubleLine
public final boolean getDoubleLine()
Returns the double line property.- Returns:
- The double line boolean variable of this object.
-
setDLSeparation
public final void setDLSeparation(float dlsep)
Sets the double line separation property.- Parameters:
dlsep- The double line separation to be set.
-
getDLSeparation
public final float getDLSeparation()
Returns the double line separation of this object.- Returns:
- The double line separation.
-
drawVisualAid
public final void drawVisualAid(org.freehep.graphics2d.VectorGraphics g2)
Draws a visual aid during the dragging of an arc object.- Overrides:
drawVisualAidin classJaObject- Parameters:
g2- The graphics context to draw to.
-
drawHandles
public final void drawHandles(org.freehep.graphics2d.VectorGraphics g2)
Draws the handles of this JaxoArc.- Specified by:
drawHandlesin classJaObject- Parameters:
g2- The corresponding graphics context.
-
getArcParameters
public final double[] getArcParameters()
-
getGrabbedHandle
public final int getGrabbedHandle(int clickX, int clickY, int editmode)Determines which handle the user has selected to move/resize/edit this arc.- Specified by:
getGrabbedHandlein classJaObject- Parameters:
clickX- The x coordinate where the mouse click has ocurred.clickY- The y coordinate where the mouse click has ocurred.editmode- The current edit mode.- Returns:
- One of the static variables SELECT_* defined in JaObject that specifies the handle which the user has clicked.
-
moveBy
public final void moveBy(int deltaX, int deltaY)Shifts the elements of the vector containing the three click points of this arc.
-
rescaleObject
public final void rescaleObject(int orx, int ory, float scale)Rescales this JaArcObject by the scale factor scale. keeping the point (orx, ory) fixed.- Specified by:
rescaleObjectin classJaObject- Parameters:
orx- The x-coordinate of the fixed point.ory- The y-coordinate of the fixed point.scale- The scale parameter.
-
editPanel
public final boolean editPanel()
Brings up the edit panel that allows to change the parameters of this object.
-
latexWidth
public final java.lang.String latexWidth()
The LaTeX command that sets the width for this Arc, using the axodraw.sty package.- Specified by:
latexWidthin classJaObject- Returns:
- The corresponding LaTeX command.
-
-
DMelt 3.0 © DataMelt by jWork.ORG