Interface Sketch

  • All Known Implementing Classes:
    AbstractSketch

    public interface Sketch
    This represents a processing sketch.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void draw()
      The process draw method.
      String getName()
      Returns the name of the sketch.
      processing.core.PGraphics getPGraphics()
      Return the PGraphics associated with this sketch.
      boolean isAutoGenerated()  
      void keyEvent​(processing.event.KeyEvent event)
      This is the keyEvent callback method that will be propagated through the SketchMapper object and called on this sketch.
      void mouseEvent​(processing.event.MouseEvent event)
      This is the mouseEvent callback method that will be propagated through the SketchMapper object and called on this sketch.
      void setAutoGenerated​(boolean autoGenerated)
      Set the autoGenerated property.
      void setup()
      The processing setup method.
    • Method Detail

      • draw

        void draw()
        The process draw method. This is invoked when draw is called on SketchMapper
      • getName

        String getName()
        Returns the name of the sketch. This is what will show up in the UI dropdown. Implement this to return custom labels if desired.
        Returns:
        the name of the class of the sketch
      • getPGraphics

        processing.core.PGraphics getPGraphics()
        Return the PGraphics associated with this sketch.
        Returns:
        the graphics object associated with this sketch.
      • isAutoGenerated

        boolean isAutoGenerated()
        Returns:
        true if this sketch was auto-generated by SketchMapper.
      • keyEvent

        void keyEvent​(processing.event.KeyEvent event)
        This is the keyEvent callback method that will be propagated through the SketchMapper object and called on this sketch.
        Parameters:
        event - the key event.
      • mouseEvent

        void mouseEvent​(processing.event.MouseEvent event)
        This is the mouseEvent callback method that will be propagated through the SketchMapper object and called on this sketch.
        Parameters:
        event - the mouse event.
      • setAutoGenerated

        void setAutoGenerated​(boolean autoGenerated)
        Set the autoGenerated property.
        Parameters:
        autoGenerated - the autogenerated property
      • setup

        void setup()
        The processing setup method. This is called when the surfaceMapperGui is initialized.