jhplot.jadraw
Class JaLineObject
- java.lang.Object
-
- jhplot.jadraw.JaObject
-
- jhplot.jadraw.JaLineObject
-
- All Implemented Interfaces:
- java.io.Serializable
public abstract class JaLineObject extends JaObject
A general line object.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description JaLineObject()
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 void
baseEditPanel(JaxoLineOptionsPanel lineop)
Adds components to the edit panel that are common to all line objects.void
drawHandles(org.freehep.graphics2d.VectorGraphics g2)
Draws the handles of this line object.int
getAmp()
Returns the amp property of this line object.boolean
getArrow()
Returns the arrow property of this line object.boolean
getBack()
Returns the back property of this line object.float
getDash()
Returns the dash property of this line object.float
getDLSeparation()
Returns the double line property.boolean
getDoubleLine()
Returns the double line property.boolean
getEnd()
Returns the end property of this line object.boolean
getFlip()
Returns the flip property of this line object.float
getFreq()
Returns the freq property of this line object.int
getGrabbedHandle(int clickX, int clickY, int editmode)
Determines which handle the user has selected to move/resize/edit this line.boolean
getInflip()
Returns the inflip property of this line object.float
getStroke()
Returns the stroke property of this line object.boolean
getSymm()
Returns the symm property of this line object.boolean
isArrow()
Determines whether the arrow property of this line object is set or not.boolean
isBack()
Determines whether the back property of this line object is set or not.boolean
isEnd()
Determines whether the end property of this line object is set or not.boolean
isFlip()
Determines whether the flip property of this line object is set or not.boolean
isInflip()
Determines whether the inflip property of this line object is set or not.boolean
isSymm()
Determines whether the symm property of this line object is set or not.java.lang.String
latexWidth()
The LaTeX command that sets the width for this Line, using the axodraw.sty package.void
rescaleObject(int orx, int ory, float scale)
Rescales this JaxoLine by the scale factor scale, keeping the point (orx, ory) fixed.void
setAmp(int newAmp)
Sets the amp property of this line object.void
setArrow(boolean arr)
Sets the arrow property of this line object.void
setBack(boolean newBack)
Sets the back property of this line object.void
setDash(float newDash)
Sets the dash property of this line object.void
setDLSeparation(float dlsep)
Sets the double line property.void
setDoubleLine(boolean dline)
Sets the double line property.void
setEnd(boolean mid)
Sets the end property of this line object.void
setFlip(boolean newFlip)
Sets the flip property of this line object.void
setFreq(float newFreq)
Sets the freq property of this line object.void
setInflip(boolean newInflip)
Sets the inflip property of this line object.void
setStroke(float newStroke)
Sets the stroke property of this line object.void
setSymm(boolean newSymm)
Sets the symm property of this line object.-
Methods inherited from class jhplot.jadraw.JaObject
copy, drawVisualAid, editPanel, getBoundingBox, getColor, getGeneralPath, getHeight, getRelh, getRelHndc, getRelHuser, getRelSize, getRelw, getRelWndc, getRelWuser, getSize, getWidth, getX, getXndc, getXuser, getY, getYndc, getYuser, isCopy, isMarked, isUser, jaxoDraw, latexCommand, moveBy, scalePoint, setAsMarked, setBoundingBox, setColor, setLocation, setLocation, setRelh, setRelw, setRelWAndH, setRelWH, setSize, setX, setY, updateCoor, updateNDC
-
-
-
-
Constructor Detail
-
JaLineObject
public JaLineObject()
Constructor: sets the width, height, relative width and height, to a default value of JaObject.INIT_SIZE.
-
-
Method Detail
-
getStroke
public final float getStroke()
Returns the stroke property of this line object.- Returns:
- The stroke property of this line object.
-
setStroke
public final void setStroke(float newStroke)
Sets the stroke property of this line object.- Parameters:
newStroke
- The stroke property of this line object.
-
getDash
public final float getDash()
Returns the dash property of this line object.- Returns:
- The dash property of this line object.
-
setDash
public final void setDash(float newDash)
Sets the dash property of this line object.- Parameters:
newDash
- The dash property of this line object.
-
getFreq
public final float getFreq()
Returns the freq property of this line object.- Returns:
- The freq property of this line object.
-
setFreq
public final void setFreq(float newFreq)
Sets the freq property of this line object.- Parameters:
newFreq
- The freq property of this line object.
-
isArrow
public final boolean isArrow()
Determines whether the arrow property of this line object is set or not.- Returns:
- The arrow property of this line object.
-
getArrow
public final boolean getArrow()
Returns the arrow property of this line object.- Returns:
- The arrow property of this line object.
-
setArrow
public final void setArrow(boolean arr)
Sets the arrow property of this line object.- Parameters:
arr
- The arrow property of this line 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 line object is set or not.- Returns:
- The flip property of this line object.
-
getFlip
public final boolean getFlip()
Returns the flip property of this line object.- Returns:
- The flip property of this line object.
-
setFlip
public final void setFlip(boolean newFlip)
Sets the flip property of this line object.- Parameters:
newFlip
- The flip property of this line object.
-
isBack
public final boolean isBack()
Determines whether the back property of this line object is set or not.- Returns:
- The back property of this line object.
-
getBack
public final boolean getBack()
Returns the back property of this line object.- Returns:
- The back property of this line object.
-
setBack
public final void setBack(boolean newBack)
Sets the back property of this line object.- Parameters:
newBack
- The back property of this line object.
-
isInflip
public final boolean isInflip()
Determines whether the inflip property of this line object is set or not.- Returns:
- The inflip property of this line object.
-
getInflip
public final boolean getInflip()
Returns the inflip property of this line object.- Returns:
- The inflip property of this line object.
-
setInflip
public final void setInflip(boolean newInflip)
Sets the inflip property of this line object.- Parameters:
newInflip
- The inflip property of this line object.
-
isSymm
public final boolean isSymm()
Determines whether the symm property of this line object is set or not.- Returns:
- The symm property of this line object.
-
getSymm
public final boolean getSymm()
Returns the symm property of this line object.- Returns:
- The symm property of this line object.
-
setSymm
public final void setSymm(boolean newSymm)
Sets the symm property of this line object.- Parameters:
newSymm
- The symm property of this line object.
-
getAmp
public final int getAmp()
Returns the amp property of this line object.- Returns:
- The amp property of this line object.
-
setAmp
public final void setAmp(int newAmp)
Sets the amp property of this line object.- Parameters:
newAmp
- The amp property of this line 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 property.- Parameters:
dlsep
- The double line property.
-
getDLSeparation
public final float getDLSeparation()
Returns the double line property.- Returns:
- The double line boolean variable of this object.
-
getGrabbedHandle
public final int getGrabbedHandle(int clickX, int clickY, int editmode)
Determines which handle the user has selected to move/resize/edit this line.- Specified by:
getGrabbedHandle
in 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.
-
drawHandles
public final void drawHandles(org.freehep.graphics2d.VectorGraphics g2)
Draws the handles of this line object.- Specified by:
drawHandles
in classJaObject
- Parameters:
g2
- The current graphics context
-
rescaleObject
public final void rescaleObject(int orx, int ory, float scale)
Rescales this JaxoLine by the scale factor scale, keeping the point (orx, ory) fixed.- Specified by:
rescaleObject
in classJaObject
- Parameters:
orx
- The x-coordinate of the fixed point.ory
- The y-coordinate of the fixed point.scale
- The scale parameter.
-
baseEditPanel
public final void baseEditPanel(JaxoLineOptionsPanel lineop)
Adds components to the edit panel that are common to all line objects.- Parameters:
lineop
- The option panel of the line object.
-
latexWidth
public final java.lang.String latexWidth()
The LaTeX command that sets the width for this Line, using the axodraw.sty package.- Specified by:
latexWidth
in classJaObject
- Returns:
- The corresponding LaTeX command.
-
-
DMelt 3.0 © DataMelt by jWork.ORG