ij.plugin
Class ScaleBar

java.lang.Object
  extended by ij.plugin.ScaleBar
All Implemented Interfaces:
PlugIn

public class ScaleBar
extends java.lang.Object
implements PlugIn

This plugin implements the Analyze/Tools/Draw Scale Bar command. Divakar Ramachandran added options to draw a background and use a serif font on 23 April 2006.


Nested Class Summary
(package private)  class ScaleBar.BarDialog
           
 
Field Summary
(package private) static int AT_SELECTION
           
(package private) static int barHeightInPixels
           
(package private) static double barWidth
           
(package private)  int barWidthInPixels
           
(package private) static java.lang.String bcolor
           
(package private) static java.lang.String[] bcolors
           
(package private) static boolean boldText
           
(package private) static java.lang.String[] checkboxLabels
           
(package private)  boolean[] checkboxStates
           
(package private) static java.lang.String color
           
(package private) static java.lang.String[] colors
           
(package private) static int defaultBarHeight
           
(package private) static int defaultFontSize
           
(package private) static int fontSize
           
(package private) static boolean hideText
           
(package private)  double imageWidth
           
(package private)  ImagePlus imp
           
(package private) static boolean labelAll
           
(package private) static java.lang.String location
           
(package private) static java.lang.String[] locations
           
(package private) static int LOWER_LEFT
           
(package private) static int LOWER_RIGHT
           
(package private)  double mag
           
(package private)  int roiHeight
           
(package private)  int roiWidth
           
(package private)  int roiX
           
(package private)  int roiY
           
(package private)  boolean serifFont
           
(package private) static int UPPER_LEFT
           
(package private) static int UPPER_RIGHT
           
(package private)  int xloc
           
(package private)  int yloc
           
 
Constructor Summary
ScaleBar()
           
 
Method Summary
(package private)  void drawScaleBar(ImagePlus imp)
           
(package private)  java.awt.Color getBColor()
           
(package private)  java.awt.Color getColor()
           
(package private)  void labelSlices(ImagePlus imp)
           
 void run(java.lang.String arg)
          This method is called when the plugin is loaded.
(package private)  boolean showDialog(ImagePlus imp)
           
(package private)  boolean updateLocation()
           
(package private)  void updateScalebar()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

locations

static final java.lang.String[] locations

UPPER_RIGHT

static final int UPPER_RIGHT
See Also:
Constant Field Values

LOWER_RIGHT

static final int LOWER_RIGHT
See Also:
Constant Field Values

LOWER_LEFT

static final int LOWER_LEFT
See Also:
Constant Field Values

UPPER_LEFT

static final int UPPER_LEFT
See Also:
Constant Field Values

AT_SELECTION

static final int AT_SELECTION
See Also:
Constant Field Values

colors

static final java.lang.String[] colors

bcolors

static final java.lang.String[] bcolors

checkboxLabels

static final java.lang.String[] checkboxLabels

barWidth

static double barWidth

defaultBarHeight

static int defaultBarHeight

barHeightInPixels

static int barHeightInPixels

location

static java.lang.String location

color

static java.lang.String color

bcolor

static java.lang.String bcolor

boldText

static boolean boldText

hideText

static boolean hideText

defaultFontSize

static int defaultFontSize

fontSize

static int fontSize

labelAll

static boolean labelAll

imp

ImagePlus imp

imageWidth

double imageWidth

mag

double mag

xloc

int xloc

yloc

int yloc

barWidthInPixels

int barWidthInPixels

roiX

int roiX

roiY

int roiY

roiWidth

int roiWidth

roiHeight

int roiHeight

serifFont

boolean serifFont

checkboxStates

boolean[] checkboxStates
Constructor Detail

ScaleBar

public ScaleBar()
Method Detail

run

public void run(java.lang.String arg)
Description copied from interface: PlugIn
This method is called when the plugin is loaded. 'arg', which may be blank, is the argument specified for this plugin in IJ_Props.txt.

Specified by:
run in interface PlugIn

labelSlices

void labelSlices(ImagePlus imp)

showDialog

boolean showDialog(ImagePlus imp)

drawScaleBar

void drawScaleBar(ImagePlus imp)

updateLocation

boolean updateLocation()

getColor

java.awt.Color getColor()

getBColor

java.awt.Color getBColor()

updateScalebar

void updateScalebar()