fr.emn.examples.icondraw
Class DFreehand

java.lang.Object
  extended byfr.emn.reactiveinput.AbstractDevice
      extended byfr.emn.examples.icondraw.DTool
          extended byfr.emn.examples.icondraw.DBrushTool
              extended byfr.emn.examples.icondraw.DFreehand
All Implemented Interfaces:
Device, Processor
Direct Known Subclasses:
DEraser

public class DFreehand
extends DBrushTool


Field Summary
protected  LiteShape shape
           
 
Fields inherited from class fr.emn.examples.icondraw.DBrushTool
a, b, color, context, g, r, stroke, w_val, width, x, y
 
Fields inherited from class fr.emn.examples.icondraw.DTool
activate, use
 
Fields inherited from class fr.emn.reactiveinput.AbstractDevice
currIndex, ins, outs
 
Fields inherited from interface fr.emn.reactiveinput.Device
AUTO_PROPERTIES
 
Constructor Summary
DFreehand()
           
DFreehand(java.lang.String name, DrawView view)
           
 
Method Summary
 void update_abort()
          Not implemented.
 boolean update_begin()
          Initiates an interaction.
 void update_end()
          Ends and validates an interaction.
 void update_value(boolean force)
          Update interaction values.
 
Methods inherited from class fr.emn.examples.icondraw.DBrushTool
check, getColor, getContext, getStroke, open, paint
 
Methods inherited from class fr.emn.examples.icondraw.DTool
close, copy, getActivated, getScreenCoordinates, hasExternalOutput, isActive, isUsed, setActivated, setScreenCoordinates, toLocal, update
 
Methods inherited from class fr.emn.reactiveinput.AbstractDevice
addIn, addIn, addOut, doDisable, doEnable, finalize, getError, getIndex, getInfo, getIns, getName, getOuts, getProperties, hasExternalInput, init, insertAt, insertAtEnd, insertBefore, isCopiable, isEnabled, isOpenable, setEnabled, setInfo, setInfo, setLastError, setName
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shape

protected LiteShape shape
Constructor Detail

DFreehand

public DFreehand()

DFreehand

public DFreehand(java.lang.String name,
                 DrawView view)
Method Detail

update_abort

public void update_abort()
Not implemented.

Specified by:
update_abort in class DTool

update_begin

public boolean update_begin()
Description copied from class: DTool
Initiates an interaction.

You can refuse starting an interaction by returning false (e.g. if you do not have enough data). This method will be re-checked the next tick.

Overrides:
update_begin in class DBrushTool

update_end

public void update_end()
Description copied from class: DTool
Ends and validates an interaction.

Specified by:
update_end in class DTool

update_value

public void update_value(boolean force)
Description copied from class: DTool
Update interaction values.

This method is called during an interaction every time a value may have changed.

Additionnaly, it is called with first=true just after interaction has been initiated (provided that update_begin returned true) and just before interaction has been aborted or validated.

Overrides:
update_value in class DBrushTool