Package org.biojava.bio.gui.glyph
Class ArrowGlyph
java.lang.Object
org.biojava.bio.gui.glyph.ArrowGlyph
- All Implemented Interfaces:
Glyph
A Glyph that paints an arrow shape within the bounds. The
setDirection
method allows the decision of the direction, to
which the arrow points.- Since:
- 1.5
- Author:
- Mark Southern, Andreas Dräger
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newArrowGlyph
, which is filled with the color blue by default.ArrowGlyph
(Rectangle2D.Float bounds) This constructs an arrow in the given bounds, which is colored blue.ArrowGlyph
(Rectangle2D.Float bounds, Paint fillPaint, Paint outerPaint) Constructor which sets both the size of this arrow and its color.ArrowGlyph
(Paint fillPaint, Paint outerPaint) Creates a newArrowGlyph
, which is filled with the given color. -
Method Summary
Modifier and TypeMethodDescriptionReturns the paint properties of this glyph.Returns the paint properties of the outer line of this glyph.void
render
(Graphics2D g) void
void
setDirection
(int direction) This method allows you to decide in which direction the arrow has to point.void
setFillPaint
(Paint fillPaint) Allows you to set the paint properties of this glyph.void
setOuterPaint
(Paint outerPaint) Allows setting the paint properties of the outer line of this glyph to the given value.
-
Constructor Details
-
ArrowGlyph
public ArrowGlyph()Creates a newArrowGlyph
, which is filled with the color blue by default. -
ArrowGlyph
Creates a newArrowGlyph
, which is filled with the given color.- Parameters:
fillPaint
- Paint properties to fill this arrow.outerPaint
- Paint properties of the outer border of this arrow.
-
ArrowGlyph
This constructs an arrow in the given bounds, which is colored blue.- Parameters:
bounds
-
-
ArrowGlyph
Constructor which sets both the size of this arrow and its color.- Parameters:
bounds
-fillPaint
-
-
-
Method Details
-
getBounds
-
setBounds
-
setDirection
This method allows you to decide in which direction the arrow has to point. The definition of directions is equal to the definition ofStrandedFeature
.- Parameters:
direction
- A +1 means to the right, -1 to the left an 0 (and any other value) produces a rectangular shape without arrows at its end.
-
render
-
getFillPaint
Returns the paint properties of this glyph.- Returns:
- the fillPaint
-
setFillPaint
Allows you to set the paint properties of this glyph.- Parameters:
fillPaint
-
-
getOuterPaint
Returns the paint properties of the outer line of this glyph.- Returns:
- the outerPaint
-
setOuterPaint
Allows setting the paint properties of the outer line of this glyph to the given value.- Parameters:
outerPaint
-
-