Class RoiControlPanel

All Implemented Interfaces:
IImageManipulator, IImagePanel, IControlee, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class RoiControlPanel extends JPanel implements IImageManipulator, IImagePanel
See Also:
  • Constructor Details

    • RoiControlPanel

      public RoiControlPanel()
  • Method Details

    • setModel

      public void setModel(IImageViewer viewer)
      Description copied from interface: IImageManipulator
      setModel
      Specified by:
      setModel in interface IImageManipulator
      Parameters:
      viewer - an IImageViewer value
    • setImageViewer

      public void setImageViewer(IImageViewer viewer)
      Description copied from interface: IImageManipulator
      setImageViewer is called from an IImageViewer when the IImageViewer receives an addImageManipulator call. This gives you access to the IImageViewer this controller is controlling.
      Specified by:
      setImageViewer in interface IImageManipulator
      Parameters:
      viewer - an IImageViewer value
    • getName

      public String getName()
      Description copied from interface: IImagePanel
      getName returns the name by which this controller is to be presented by in the control-panel.
      Specified by:
      getName in interface IImagePanel
      Overrides:
      getName in class Component
      Returns:
      a String value
    • getComponent

      public JComponent getComponent()
      Description copied from interface: IImagePanel
      getComponent returns the visual part of this controller. Normally the visual part is a panel.
      Specified by:
      getComponent in interface IImagePanel
      Returns:
      a JComponent value
    • filter

      public BufferedImage filter(BufferedImage i)
      Description copied from interface: IImageManipulator
      filter is called on each repaint from the IImageViewer. You can manipulate the image in any way you want.
      Specified by:
      filter in interface IImageManipulator
      Parameters:
      i - a BufferedImage value
      Returns:
      Image
    • ok

      public void ok()
      Description copied from interface: IControlee
      ok will be called when the component is visible and the user presses the OK button on the ButtonBar Expected behaviour is to set all the values on the model the widget is representing followed by a getRootPane().getParent().setVisible(false);
      Specified by:
      ok in interface IControlee
      See Also:
    • roiChanged

      public void roiChanged(int startx, int endx, int starty, int endy)
      Description copied from interface: IImageManipulator
      roiChanged is called each time the roi of the image is called.
      Specified by:
      roiChanged in interface IImageManipulator
      Parameters:
      startx - an int value
      endx - an int value
      starty - an int value
      endy - an int value