Module ij
Package ij.gui

Class Arrow

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<java.awt.Point>

    public class Arrow
    extends Line
    This is an Roi subclass for creating and displaying arrows.
    See Also:
    Serialized Form
    • Constructor Detail

      • Arrow

        public Arrow​(double ox1,
                     double oy1,
                     double ox2,
                     double oy2)
      • Arrow

        public Arrow​(int sx,
                     int sy,
                     ImagePlus imp)
    • Method Detail

      • draw

        public void draw​(java.awt.Graphics g)
        Draws this arrow on the image.
        Overrides:
        draw in class Line
      • getMask

        public ImageProcessor getMask()
        Description copied from class: Roi
        Always returns null for rectangular Roi's
        Overrides:
        getMask in class Roi
      • 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.
        Overrides:
        contains in class Line
      • getBounds

        public java.awt.Rectangle getBounds()
        Return the bounding rectangle of this arrow.
        Overrides:
        getBounds in class Roi
      • handleMouseDown

        protected void handleMouseDown​(int sx,
                                       int sy)
        Overrides:
        handleMouseDown in class Line
      • clipRectMargin

        protected int clipRectMargin()
        Overrides:
        clipRectMargin in class Line
      • 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 class Roi
      • setDefaultWidth

        public static void setDefaultWidth​(double width)
      • getDefaultWidth

        public static double getDefaultWidth()
      • setStyle

        public void setStyle​(int style)
      • setStyle

        public void setStyle​(java.lang.String style)
      • 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()