public abstract class TapChainEditor extends java.lang.Object implements ChainController.IControlCallback, ILogHandler, IActorEditor
Modifier and Type | Class and Description |
---|---|
static class |
TapChainEditor.EditMode |
static class |
TapChainEditor.FACTORY_KEY |
static class |
TapChainEditor.InteractionType |
Modifier and Type | Field and Description |
---|---|
protected ActorBlueprintManager<Actor> |
blueprintManager |
EditorManager |
editorManager |
protected java.util.List<Geometry> |
geos |
protected ActorBlueprintManager<Actor> |
goalBlueprintManager |
Modifier | Constructor and Description |
---|---|
protected |
TapChainEditor(IWindow w) |
Modifier and Type | Method and Description |
---|---|
EditorReturn |
addActorFromBlueprint(IBlueprint b,
IPoint pos)
Create an actor instance from its blueprint.
|
EditorReturn |
addActorFromBlueprint(TapChainEditor.FACTORY_KEY key,
int num,
IPoint pos)
Create an actor instance from its blueprint.
|
EditorReturn |
addActorFromBlueprint(TapChainEditor.FACTORY_KEY key,
java.lang.String tag,
IPoint pos)
Create an actor instance from its blueprint.
|
void |
changeFocus(LinkType al,
IFocusable spot,
ClassEnvelope clazz) |
boolean |
checkAndConnect(IActorTap actorTap)
Check if an actor tap touches any other actor taps, then connect their actors.
|
boolean |
connect(Actor a1,
LinkType al,
Actor a2) |
ActorManager |
edit()
Get a manager for editing actor and actor tap.
|
BlueprintManager<Actor> |
editBlueprint() |
ActorManager |
editTap()
Get a manager for editing only taps (not actors).
|
boolean |
freezeToggle() |
java.util.Collection<Actor> |
getActors()
Get a collection of all actors
|
Factory<Actor> |
getFactory() |
Factory<Actor> |
getFactory(TapChainEditor.FACTORY_KEY key)
Get factory from factory key
|
IActionStyle |
getInteract() |
java.util.Collection<IActorTap> |
getTaps()
Get a collection of all taps
|
java.util.List<IBlueprint<Actor>> |
highlightConnectables(LinkType ac,
IActorTap target,
ClassEnvelope classEnvelope) |
void |
kickTapDraw(ITap startTap2) |
void |
lockReleaseTap(IRelease t) |
void |
log(java.lang.String... s) |
boolean |
onCalled() |
boolean |
onSingleTouch(IPoint point)
Single touch.
|
boolean |
releaseTap(IActorTap selected,
IPoint point) |
void |
reset() |
void |
resetNextPos() |
ITap |
searchTouchedTap(IPoint iPoint,
IPiece... exclusive) |
java.util.List<IBlueprint<Actor>> |
setLastHighlighted(LinkType ac,
ClassEnvelope classEnvelope) |
void |
setLog(ILogHandler l) |
void |
setNextPos(IPoint nextConnectivity) |
void |
setStyle(StyleCollection s)
Set StyleCollection.
|
void |
setWindow(IWindow v) |
void |
shake(int duration) |
void |
show(java.lang.Object canvas) |
IBlueprintInitialization |
standbyRegistration(Factory<?> f,
IActorTap selected)
Standby registration
|
void |
start() |
Actor |
toActor(IActorTap tap)
Get actor from tap
|
IActorTap |
toTap(Actor actor)
Get tap from actor
|
void |
unhighlightAllConnectables() |
void |
userShow(java.lang.Object canvas) |
public EditorManager editorManager
protected ActorBlueprintManager<Actor> blueprintManager
protected ActorBlueprintManager<Actor> goalBlueprintManager
protected java.util.List<Geometry> geos
protected TapChainEditor(IWindow w)
public void reset()
public boolean onCalled()
onCalled
in interface ChainController.IControlCallback
public void setWindow(IWindow v)
public void log(java.lang.String... s)
public Factory<Actor> getFactory()
getFactory
in interface IEditor<Actor,IActorTap>
public Factory<Actor> getFactory(TapChainEditor.FACTORY_KEY key)
key
- factory keypublic ActorManager editTap()
IEditor
public ActorManager edit()
IEditor
public java.util.Collection<IActorTap> getTaps()
IEditor
public java.util.Collection<Actor> getActors()
IEditor
public BlueprintManager<Actor> editBlueprint()
public IActorTap toTap(Actor actor)
IEditor
public Actor toActor(IActorTap tap)
IEditor
public IActionStyle getInteract()
getInteract
in interface IEditor<Actor,IActorTap>
public void setLog(ILogHandler l)
public void setStyle(StyleCollection s)
s
- public void kickTapDraw(ITap startTap2)
kickTapDraw
in interface IEditor<Actor,IActorTap>
public boolean onSingleTouch(IPoint point)
point
- touched pointpublic void lockReleaseTap(IRelease t)
lockReleaseTap
in interface IEditor<Actor,IActorTap>
public boolean freezeToggle()
public EditorReturn addActorFromBlueprint(TapChainEditor.FACTORY_KEY key, int num, IPoint pos)
IActorEditor
addActorFromBlueprint
in interface IActorEditor
key
- the key for the factory in which actor blueprint is registerednum
- the number of the actor blueprintpos
- position where the actor instance sho0uld be addedpublic EditorReturn addActorFromBlueprint(TapChainEditor.FACTORY_KEY key, java.lang.String tag, IPoint pos)
IActorEditor
addActorFromBlueprint
in interface IActorEditor
key
- the key for the factory in which actor blueprint is registeredtag
- the tag of the actor blueprintpos
- position where the actor instance sho0uld be addedpublic EditorReturn addActorFromBlueprint(IBlueprint b, IPoint pos)
b
- the actor blueprintpos
- position where the actor instance is addedpublic void start()
public void show(java.lang.Object canvas)
public void userShow(java.lang.Object canvas)
public boolean checkAndConnect(IActorTap actorTap)
IEditor
checkAndConnect
in interface IEditor<Actor,IActorTap>
actorTap
- a target actor tap which is checkedpublic IBlueprintInitialization standbyRegistration(Factory<?> f, IActorTap selected)
f
- target factory for registeringselected
- actor tappublic void setNextPos(IPoint nextConnectivity)
setNextPos
in interface IEditor<Actor,IActorTap>
public void resetNextPos()
resetNextPos
in interface IEditor<Actor,IActorTap>
public java.util.List<IBlueprint<Actor>> highlightConnectables(LinkType ac, IActorTap target, ClassEnvelope classEnvelope)
highlightConnectables
in interface IEditor<Actor,IActorTap>
public java.util.List<IBlueprint<Actor>> setLastHighlighted(LinkType ac, ClassEnvelope classEnvelope)
public void unhighlightAllConnectables()
unhighlightAllConnectables
in interface IEditor<Actor,IActorTap>
public void changeFocus(LinkType al, IFocusable spot, ClassEnvelope clazz)
changeFocus
in interface IEditor<Actor,IActorTap>