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 voidbaseEditPanel(JaxoLineOptionsPanel lineop)Adds components to the edit panel that are common to all line objects.voiddrawHandles(org.freehep.graphics2d.VectorGraphics g2)Draws the handles of this line object.intgetAmp()Returns the amp property of this line object.booleangetArrow()Returns the arrow property of this line object.booleangetBack()Returns the back property of this line object.floatgetDash()Returns the dash property of this line object.floatgetDLSeparation()Returns the double line property.booleangetDoubleLine()Returns the double line property.booleangetEnd()Returns the end property of this line object.booleangetFlip()Returns the flip property of this line object.floatgetFreq()Returns the freq property of this line object.intgetGrabbedHandle(int clickX, int clickY, int editmode)Determines which handle the user has selected to move/resize/edit this line.booleangetInflip()Returns the inflip property of this line object.floatgetStroke()Returns the stroke property of this line object.booleangetSymm()Returns the symm property of this line object.booleanisArrow()Determines whether the arrow property of this line object is set or not.booleanisBack()Determines whether the back property of this line 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 line object is set or not.booleanisInflip()Determines whether the inflip property of this line object is set or not.booleanisSymm()Determines whether the symm property of this line object is set or not.java.lang.StringlatexWidth()The LaTeX command that sets the width for this Line, using the axodraw.sty package.voidrescaleObject(int orx, int ory, float scale)Rescales this JaxoLine by the scale factor scale, keeping the point (orx, ory) fixed.voidsetAmp(int newAmp)Sets the amp property of this line object.voidsetArrow(boolean arr)Sets the arrow property of this line object.voidsetBack(boolean newBack)Sets the back property of this line object.voidsetDash(float newDash)Sets the dash property of this line object.voidsetDLSeparation(float dlsep)Sets the double line 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 line object.voidsetFreq(float newFreq)Sets the freq property of this line object.voidsetInflip(boolean newInflip)Sets the inflip property of this line object.voidsetStroke(float newStroke)Sets the stroke property of this line object.voidsetSymm(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:
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.
-
drawHandles
public final void drawHandles(org.freehep.graphics2d.VectorGraphics g2)
Draws the handles of this line object.- Specified by:
drawHandlesin 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:
rescaleObjectin 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:
latexWidthin classJaObject- Returns:
- The corresponding LaTeX command.
-
-
DMelt 3.0 © DataMelt by jWork.ORG