Package net.sf.jaxodraw.object.arrow
Class JaxoDefaultArrow
- java.lang.Object
-
- net.sf.jaxodraw.object.arrow.AbstractBaseArrow
-
- net.sf.jaxodraw.object.arrow.JaxoDefaultArrow
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,JaxoArrow
public class JaxoDefaultArrow extends AbstractBaseArrow
The default arrow for JaxoDraw.- Since:
- 2.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.sf.jaxodraw.object.arrow.JaxoArrow
JaxoArrow.Coordinates
-
-
Constructor Summary
Constructors Constructor Description JaxoDefaultArrow()Constructor: initialize the fields.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.RectanglegetBounds(JaxoArrow.Coordinates coords)Returns a bounding rectangle for this arrow at the given coordinates.JaxoEditPanelgetEditPanel()Return a panel that allows to edit the parameters of the arrow.booleanisCopy(JaxoArrow testArrow)Checks if this Arrow is a copy of the given test Arrow.java.lang.StringlatexCommand(float arPos, float scale)Returns the arrow part of the latex command for axodraw4j.voidpaint(java.awt.Graphics2D g2, JaxoArrow.Coordinates coords)Paints the arrow to the given graphics context.voidpropertyChange(java.beans.PropertyChangeEvent evt)-
Methods inherited from class net.sf.jaxodraw.object.arrow.AbstractBaseArrow
copy, getArrowInset, getArrowLength, getArrowWidth, getColor, getFillColor, getStroke, isFilled, setArrowInset, setArrowLength, setArrowWidth, setColor, setFillColor, setFilled, setStroke
-
-
-
-
Method Detail
-
paint
public void paint(java.awt.Graphics2D g2, JaxoArrow.Coordinates coords)Paints the arrow to the given graphics context.- Parameters:
g2- The graphics context to paint to.coords- The coordinates of the arrow to paint.
-
isCopy
public boolean isCopy(JaxoArrow testArrow)
Checks if this Arrow is a copy of the given test Arrow.- Specified by:
isCopyin interfaceJaxoArrow- Overrides:
isCopyin classAbstractBaseArrow- Parameters:
testArrow- the Arrow to test against.- Returns:
- True if the two arrows are equal.
-
latexCommand
public java.lang.String latexCommand(float arPos, float scale)Returns the arrow part of the latex command for axodraw4j.- Parameters:
arPos- the arrow position.scale- the current scale.- Returns:
- the arrow latex command.
-
getBounds
public java.awt.Rectangle getBounds(JaxoArrow.Coordinates coords)
Returns a bounding rectangle for this arrow at the given coordinates.- Parameters:
coords- The coordinates of the arrow.- Returns:
- a rectangle that completely contains the arrow.
-
getEditPanel
public JaxoEditPanel getEditPanel()
Return a panel that allows to edit the parameters of the arrow.- Returns:
- an arrow edit panel or null if the arrow cannot be edited.
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
-
-