Class PenSizePanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class PenSizePanel extends JPanel
A JPanel that can be used to select the size of a "pen" used to erase parts of IrregularROIs.
See Also:
  • Field Details

    • MIN_PEN_SIZE

      public static final int MIN_PEN_SIZE
      The minimum size (in pixels) for the ROI eraser/paint pen.
      See Also:
    • MAX_PEN_SIZE

      public static final int MAX_PEN_SIZE
      The maximum size (in pixels) for the ROI eraser/paint pen.
      See Also:
  • Constructor Details

    • PenSizePanel

      public PenSizePanel(String title, int orientation)
      Creates a new PenSizePanel with the specified title. The title is used as a label on the pen size Spinner.
      Parameters:
      title - a String that will be displayed above the JSpinner used to set the pen size.
      orientation - either SwingConstants.VERTICAL for a vertically stacked component, or SwingConstants.HORIZONTAL.
  • Method Details

    • getPenSize

      public int getPenSize()
      Returns the pen size set.
      Returns:
      the pen size.
    • setEnabled

      public void setEnabled(boolean b)
      Overrides:
      setEnabled in class JComponent
    • savePreferences

      public void savePreferences()
      Saves the current setting of the pen size in this PenSizePanel in the user Preferences. Next time a user uses a PenSizePanel, the pen size will be set to the current size.