|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.pogamut.shed.presenter.AcceptActionFactory
public class AcceptActionFactory
Factory for accept actions used for presenter (IPresenter.getAcceptProviders()).
| Constructor Summary | |
|---|---|
AcceptActionFactory()
|
|
| Method Summary | |
|---|---|
static AbstractAcceptAction |
createAction2Action(TriggeredAction action)
This is complex accept action for an action with any parent. |
static AbstractAcceptAction<ActionPattern,TriggeredAction> |
createActionPatternAction(TriggeredAction targetAction)
Create accept action the the TriggeredAction that will accept the ActionPattern. |
static AbstractAcceptAction<Competence,TriggeredAction> |
createCompetence2Action(TriggeredAction targetAction)
Create an accept action for the @targetAction that will accept an competence, when dropped on it. |
static AbstractAcceptAction<DriveElement,DriveElement> |
createDrive2Drive(DriveElement drive)
Move the drive in the DriveCollection. |
static AbstractAcceptAction<CompetenceElement,CompetenceElement> |
createChoice2Choice(CompetenceElement targetChoice)
Create accept action for the @targetChoice for another CompetenceElement. |
static AbstractAcceptAction<Sense,DriveElement> |
createSense2Drive(DriveElement drive)
When sense is dropped to the @drive, remove the sense from its parent (it it has one) and add it as first trigger sense of the drive. |
static AbstractAcceptAction |
createSense2Choice(CompetenceElement targetChoice)
Create accept action where target choice will acc dropped sense as its first trigger sense. |
static AbstractAcceptAction<Sense,Sense> |
createSense2Sense(Sense sense)
Create accept action for the @sense that will accept another sense at the position of the target. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AcceptActionFactory()
| Method Detail |
|---|
public static AbstractAcceptAction<Sense,DriveElement> createSense2Drive(DriveElement drive)
drive - Drive whcih will accept the sense
public static AbstractAcceptAction<Sense,Sense> createSense2Sense(Sense sense)
Trigger.moveSense(int, cz.cuni.amis.pogamut.sposh.elements.Sense), if it is another trigger, delete dropped sense from the original
trigger and add it to the target trigger. If the sense is newly created
one, simply add it.
sense - Sense that will accept another sense that will be dropped at
it.
public static AbstractAcceptAction<DriveElement,DriveElement> createDrive2Drive(DriveElement drive)
DriveCollection.
drive - Drive that will be the target, the one that when another
drive is dropped at it, will be movied to make place for the antoher
drive.
public static AbstractAcceptAction<CompetenceElement,CompetenceElement> createChoice2Choice(CompetenceElement targetChoice)
CompetenceElement.
When user drops a CompetenceElement to the @targetChoice, it will
check if the dropped choice is in same Competence as the
targetChoice - Choice that will be accepting another choice to be
dropped on it.
public static AbstractAcceptAction<Competence,TriggeredAction> createCompetence2Action(TriggeredAction targetAction)
targetAction -
public static AbstractAcceptAction<ActionPattern,TriggeredAction> createActionPatternAction(TriggeredAction targetAction)
TriggeredAction that will accept the ActionPattern.
If the pattern is not part of the PoshPlan, add it. Once we are
sure that AP is in the plan, change reference of the @targetAction to the
AP.
targetAction - Target action that will accept dropped AP.
public static AbstractAcceptAction createAction2Action(TriggeredAction action)
ActionPattern, CompetenceElement, DriveElement
and none for newly created action from palette.
Possible parents of target action: ActionPattern, CompetenceElement, DriveElement.
That gives us 12 combinations, that can be categorized like this: If
source is AP, the source action will be removed from the AP, otherwise
nothing will happen to the source. If target is AP, action will be
inserted at the index of the target action, otherwise the target action
will be synchronized with the source.
If both target and source are from same AP, move source to the index of
the target.
action -
public static AbstractAcceptAction createSense2Choice(CompetenceElement targetChoice)
targetChoice - Choice that will accept having sense dropped at it.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||