Package jto.processing.sketch.mapper
Interface Sketch
-
- All Known Implementing Classes:
AbstractSketch
public interface SketchThis represents a processing sketch.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddraw()The process draw method.StringgetName()Returns the name of the sketch.processing.core.PGraphicsgetPGraphics()Return the PGraphics associated with this sketch.booleanisAutoGenerated()voidkeyEvent(processing.event.KeyEvent event)This is the keyEvent callback method that will be propagated through theSketchMapperobject and called on this sketch.voidmouseEvent(processing.event.MouseEvent event)This is the mouseEvent callback method that will be propagated through theSketchMapperobject and called on this sketch.voidsetAutoGenerated(boolean autoGenerated)Set the autoGenerated property.voidsetup()The processing setup method.
-
-
-
Method Detail
-
draw
void draw()
The process draw method. This is invoked when draw is called onSketchMapper
-
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 theSketchMapperobject 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 theSketchMapperobject 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.
-
-