|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.sketch.toolbox.CompositeTransducer
public class CompositeTransducer
A composite class that can be used to multiplex between different transducers. This transducer supports the union of all the data flavors of the children.
Constructor Summary | |
---|---|
CompositeTransducer(Transducer[] children)
This constructor should only be called once, to create the prototype object. |
Method Summary | |
---|---|
Object |
getTransferData(DataFlavor flavor)
Perform recognition on the sketch model and return the transfer data as a string, or as plain text (based on StringSelection's implementation of getTransferData(); |
DataFlavor[] |
getTransferDataFlavors()
Return the union of all the children's data flavors. |
boolean |
isDataFlavorSupported(DataFlavor in)
Return whether any of the child transducers support the given flavor. |
void |
lostOwnership(Clipboard clipboard,
Transferable contents)
Do nothing. |
Transducer |
newInstance(SketchModel in)
Apply the transducer to the given set of strokes by performing sketch recognition on the given strokes. |
protected void |
setSketchModel(SketchModel in)
Set the sketch model for a new instance of the transducer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompositeTransducer(Transducer[] children)
Method Detail |
---|
public DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors
in interface Transferable
public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
getTransferData
in interface Transferable
UnsupportedFlavorException
IOException
public boolean isDataFlavorSupported(DataFlavor in)
isDataFlavorSupported
in interface Transferable
public void lostOwnership(Clipboard clipboard, Transferable contents)
lostOwnership
in interface ClipboardOwner
public Transducer newInstance(SketchModel in)
newInstance
in interface Transducer
protected void setSketchModel(SketchModel in) throws RuntimeException
RuntimeException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |