Package selector

Class SelectorApp

java.lang.Object
selector.SelectorApp
All Implemented Interfaces:
PropertyChangeListener, EventListener

public class SelectorApp extends Object implements PropertyChangeListener
A graphical application for selecting and extracting regions of images.
  • Constructor Details Link icon

    • SelectorApp Link icon

      public SelectorApp()
      Construct a new application instance. Initializes GUI components, so must be invoked on the Swing Event Dispatch Thread. Does not show the application window (call `start()` to do that).
  • Method Details Link icon

    • start Link icon

      public void start()
      Start the application by showing its window.
    • propertyChange Link icon

      public void propertyChange(PropertyChangeEvent evt)
      React to property changes in an observed model. Supported properties include: * "state": Update components to reflect the new selection state.
      Specified by:
      propertyChange in interface PropertyChangeListener
    • getSelectionModel Link icon

      public SelectionModel getSelectionModel()
      Return the model of the selection tool currently in use.
    • setSelectionModel Link icon

      public void setSelectionModel(SelectionModel newModel)
      Use `newModel` as the selection tool and update our view to reflect its state. This application will no longer respond to changes made to its previous selection model and will instead respond to property changes from `newModel`.
    • setImage Link icon

      public void setImage(BufferedImage img)
      Start displaying and selecting from `img` instead of any previous image. Argument may be null, in which case no image is displayed and the current selection is reset.
    • main Link icon

      public static void main(String[] args)
      Run an instance of SelectorApp. No program arguments are expected.