Package ij.gui
Class Arrow
java.lang.Object
ij.gui.Roi
ij.gui.Line
ij.gui.Arrow
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Point>
public class Arrow extends Line
This is an Roi subclass for creating and displaying arrows.
- See Also:
- Serialized Form
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description static int
BAR
static String
DOUBLE_HEADED_KEY
static int
FILLED
static int
HEADLESS
static int
NOTCHED
static int
OPEN
static String
OUTLINE_KEY
static String
SIZE_KEY
static String
STYLE_KEY
static String[]
styles
static String
WIDTH_KEY
Fields inherited from class ij.gui.Line
startxd, startyd, x1, x1d, x1R, x2, x2d, x2R, y1, y1d, y1R, y2, y2d, y2R
Fields inherited from class ij.gui.Roi
ANGLE, asp_bk, aspect, cachedMask, center, clipboard, clipHeight, clipWidth, clipX, clipY, COMPOSITE, constrain, CONSTRUCTING, defaultFillColor, FERET_ARRAY_POINTOFFSET, FERET_ARRAYSIZE, fillColor, flattenScale, FREELINE, FREEROI, HANDLE_SIZE, handleColor, ic, ignoreClipRect, imp, instanceColor, LINE, lineWidth, mag, MOVING, MOVING_HANDLE, nonScalable, NORMAL, NOT_PASTING, oldHeight, oldWidth, oldX, oldY, onePixelWide, OVAL, overlay, pasteMode, POINT, POLYGON, POLYLINE, previousRoi, RECTANGLE, RESIZING, ROIColor, stroke, strokeColor, TRACED_ROI, type, updateFullWindow, wideLine, xMax, yMax
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected int
clipRectMargin()
boolean
contains(int x, int y)
Returns whether the center of pixel (x,y) is contained in the Roi.void
draw(Graphics g)
Draws this arrow on the image.void
drawPixels(ImageProcessor ip)
Draws the selection outline on the specified ImageProcessor.Rectangle
getBounds()
Return the bounding rectangle of this arrow.static boolean
getDefaultDoubleHeaded()
static double
getDefaultHeadSize()
static boolean
getDefaultOutline()
static int
getDefaultStyle()
static double
getDefaultWidth()
boolean
getDoubleHeaded()
double
getHeadSize()
ImageProcessor
getMask()
Always returns null for rectangular Roi'sboolean
getOutline()
int
getStyle()
protected void
handleMouseDown(int sx, int sy)
boolean
isDrawingTool()
Returns 'true' if this is an ROI primarily used from drawing (e.g., TextRoi or Arrow).static void
setDefaultDoubleHeaded(boolean b)
static void
setDefaultHeadSize(double size)
static void
setDefaultOutline(boolean b)
static void
setDefaultStyle(int style)
static void
setDefaultWidth(double width)
void
setDoubleHeaded(boolean b)
void
setHeadSize(double headSize)
void
setOutline(boolean b)
void
setStyle(int style)
void
setStyle(String style)
Methods inherited from class ij.gui.Line
drawLine, getAngle, getDrawOffset, getFloatPoints, getFloatPolygon, getLength, getPixels, getPoints, getPolygon, getRawLength, getRotationCenter, getWidth, grow, handleMouseUp, isHandle, iterator, mouseDownInHandle, mouseMoved, moveHandle, nudgeCorner, setDrawOffset, setLocation, setStrokeWidth, setWidth, showStatus, size, subPixelResolution
Methods inherited from class ij.gui.Roi
abortModification, abortPaste, addRoiListener, clone, containsPoint, convertToPolygon, copyAttributes, drawOverlay, drawPixels, enableSubPixelResolution, endPaste, equals, getAngle, getAntiAlias, getBoundingRect, getColor, getContainedFloatPoints, getContainedPoints, getContourCentroid, getConvexHull, getCornerDiameter, getCPosition, getCurrentPasteMode, getDebugInfo, getDefaultFillColor, getFeretsDiameter, getFeretValues, getFillColor, getFloatAngle, getFloatBounds, getFloatConvexHull, getFloatHeight, getFloatPolygon, getFloatWidth, getHashCode, getImage, getImageID, getInterpolatedPolygon, getInterpolatedPolygon, getInterpolatedPolygon, getInverse, getMagnification, getName, getPasteMode, getPosition, getProperties, getProperty, getPropertyCount, getPrototypeOverlay, getRoundRectArcSize, getScaledStroke, getState, getStatistics, getStroke, getStrokeColor, getStrokeWidth, getTPosition, getType, getTypeAsString, getXBase, getYBase, getZPosition, handleMouseDrag, hasHyperStackPosition, isActiveOverlayRoi, isArea, isCursor, isInteger, isLine, isVisible, lineCircleIntersection, mouseDragged, mouseReleased, notifyListeners, nudge, removeRoiListener, screenX, screenXD, screenY, screenYD, setAntiAlias, setColor, setCornerDiameter, setDefaultFillColor, setFillColor, setFlattenScale, setIgnoreClipRect, setImage, setInstanceColor, setIsCursor, setLineWidth, setLocation, setName, setNonScalable, setPasteMode, setPosition, setPosition, setPosition, setProperties, setProperty, setPrototypeOverlay, setRenderingHint, setRotationCenter, setRoundRectArcSize, setStroke, setStrokeColor, setStrokeWidth, startPaste, temporarilyHide, toFloat, toInt, toInt, toIntR, toString, update, updateClipRect, updateWideLine
-
Field Details
-
STYLE_KEY
- See Also:
- Constant Field Values
-
WIDTH_KEY
- See Also:
- Constant Field Values
-
SIZE_KEY
- See Also:
- Constant Field Values
-
DOUBLE_HEADED_KEY
- See Also:
- Constant Field Values
-
OUTLINE_KEY
- See Also:
- Constant Field Values
-
FILLED
public static final int FILLED- See Also:
- Constant Field Values
-
NOTCHED
public static final int NOTCHED- See Also:
- Constant Field Values
-
OPEN
public static final int OPEN- See Also:
- Constant Field Values
-
HEADLESS
public static final int HEADLESS- See Also:
- Constant Field Values
-
BAR
public static final int BAR- See Also:
- Constant Field Values
-
styles
-
-
Constructor Details
-
Method Details
-
draw
Draws this arrow on the image. -
getMask
Description copied from class:Roi
Always returns null for rectangular Roi's -
drawPixels
Description copied from class:Roi
Draws the selection outline on the specified ImageProcessor.- Overrides:
drawPixels
in classLine
- See Also:
ImageProcessor.setColor(java.awt.Color)
,ImageProcessor.setLineWidth(int)
-
contains
public boolean contains(int x, int y)Description copied from class:Roi
Returns whether the center of pixel (x,y) is contained in the Roi. The position of a pixel center determines whether a pixel is selected. Points exactly at the left (right) border are considered outside (inside); points exactly on horizontal borders are considered outside (inside) at the border with the lower (higher) y. This convention is opposite to that of the java.awt.Shape class. -
getBounds
Return the bounding rectangle of this arrow. -
handleMouseDown
protected void handleMouseDown(int sx, int sy)- Overrides:
handleMouseDown
in classLine
-
clipRectMargin
protected int clipRectMargin()- Overrides:
clipRectMargin
in classLine
-
isDrawingTool
public boolean isDrawingTool()Description copied from class:Roi
Returns 'true' if this is an ROI primarily used from drawing (e.g., TextRoi or Arrow).- Overrides:
isDrawingTool
in classRoi
-
setDefaultWidth
public static void setDefaultWidth(double width) -
getDefaultWidth
public static double getDefaultWidth() -
setStyle
public void setStyle(int style) -
setStyle
-
getStyle
public int getStyle() -
setDefaultStyle
public static void setDefaultStyle(int style) -
getDefaultStyle
public static int getDefaultStyle() -
setHeadSize
public void setHeadSize(double headSize) -
getHeadSize
public double getHeadSize() -
setDefaultHeadSize
public static void setDefaultHeadSize(double size) -
getDefaultHeadSize
public static double getDefaultHeadSize() -
setDoubleHeaded
public void setDoubleHeaded(boolean b) -
getDoubleHeaded
public boolean getDoubleHeaded() -
setDefaultDoubleHeaded
public static void setDefaultDoubleHeaded(boolean b) -
getDefaultDoubleHeaded
public static boolean getDefaultDoubleHeaded() -
setOutline
public void setOutline(boolean b) -
getOutline
public boolean getOutline() -
setDefaultOutline
public static void setDefaultOutline(boolean b) -
getDefaultOutline
public static boolean getDefaultOutline()
-