Class ConvolveFilter

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

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

    • ConvolveFilter

      public ConvolveFilter()
  • Method Details

    • edgeAction

      protected void edgeAction()
    • setAction

      protected void setAction()
    • blurAction

      protected void blurAction()
    • resetAction

      protected void resetAction()
    • sharpAction

      protected void sharpAction()
    • 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 image)
      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:
      image - a BufferedImage value
      Returns:
      Image
    • 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
    • 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
    • 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:
    • cancel

      public void cancel()
      Description copied from interface: IApplicable
      cancel is called when the user presses the cancel button. Expected behaviour is to close the window, eg getRootPane().getParent().setVisible(false);
      Specified by:
      cancel in interface IApplicable
    • apply

      public void apply()
      Description copied from interface: IApplicable
      apply is called when the user presses the apply button. Expected behaviour is to set all values on the model of the widget
      Specified by:
      apply in interface IApplicable
    • main

      public static void main(String[] args)