cz.cuni.pogamut.shed.presenter
Class ShedPresenterFactory

Package class diagram package ShedPresenterFactory
java.lang.Object
  extended by cz.cuni.pogamut.shed.presenter.ShedPresenterFactory
All Implemented Interfaces:
IPresenterFactory

public class ShedPresenterFactory
extends Object
implements IPresenterFactory

Factory that is creating various presenters.

Author:
Honza

Constructor Summary
ShedPresenterFactory(ShedScene scene, PoshPlan plan, ShedPresenter presenter)
           
 
Method Summary
 IPresenter createActionPatternPresenter(LapPath actionPatternPath, TriggeredAction referencingAction, ActionPattern actionPattern, ShedVariableWidget actionPatternWidget, LapChain chain)
          Create presenter for action pattern widget.
 IPresenter createActionPresenter(LapPath actionPath, TriggeredAction action, ShedVariableWidget actionWidget, LapChain actionChain)
          Create presenter for primitive action.
 IPresenter createActionsPresenter(LapPath actionPatternPath, ActionPattern actionPattern, ShedActionsEnvelope actionsEnvelope, LapChain chain)
          Create presenter that will take care about keeping adding/moving/removing expanded actions in the ShedActionsEnvelope for ActionPattern.
 IPresenter createCompetencePresenter(LapPath competencePath, TriggeredAction referencingAction, Competence competence, ShedVariableWidget competenceWidget, LapChain chain)
          Create presenter for competence widget.
 IPresenter createDriveCollectionPresenter(LapPath driveCollectionPath, DriveCollection driveCollection)
           
 IPresenter createDrivePresenter(LapPath drivePath, DriveElement drive, ShedVariableWidget widget)
          Create presenter for drive widget.
 IPresenter createExpandedActionPresenter(TriggeredAction action, ExpandedActionEnvelope envelope, LapChain chain)
           
 IPresenter createChoicePresenter(LapPath choicePath, CompetenceElement choice, ShedVariableWidget choiceWidget)
          Create presenter for choice widget, only the widget, not its trigger nor action.
 IPresenter createChoicesPresenter(LapPath competencePath, Competence competence, ShedChoicesEnvelope choicesEnvelope, LapChain chain)
          Create presenter responsible for adding, moving and removing choices widgets in the ShedChoicesEnvelope.
 IPresenter createSensePresenter(LapPath sensePath, Sense sense, ShedSenseWidget senseWidget, LapChain senseChain)
          Create presenter for sense at @sensePath that will present the sense in the @senseWidget.
<TRIGGER_PARENT extends PoshElement>
IPresenter
createTriggerPresenter(TRIGGER_PARENT parent, Trigger<TRIGGER_PARENT> trigger, ShedTriggerEnvelope triggerEnvelope, LapChain chain)
          Create presenter for trigger, it is responsible for keepeing track of added/moved/removed senses.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShedPresenterFactory

public ShedPresenterFactory(ShedScene scene,
                            PoshPlan plan,
                            ShedPresenter presenter)
Method Detail

createActionPresenter

public IPresenter createActionPresenter(LapPath actionPath,
                                        TriggeredAction action,
                                        ShedVariableWidget actionWidget,
                                        LapChain actionChain)
Description copied from interface: IPresenterFactory
Create presenter for primitive action. It doesn;t have any children.

Specified by:
createActionPresenter in interface IPresenterFactory

createExpandedActionPresenter

public IPresenter createExpandedActionPresenter(TriggeredAction action,
                                                ExpandedActionEnvelope envelope,
                                                LapChain chain)
Specified by:
createExpandedActionPresenter in interface IPresenterFactory
Parameters:
chain - Chain up to the branch before @action. The @action is not included.
Returns:

createSensePresenter

public IPresenter createSensePresenter(LapPath sensePath,
                                       Sense sense,
                                       ShedSenseWidget senseWidget,
                                       LapChain senseChain)
Description copied from interface: IPresenterFactory
Create presenter for sense at @sensePath that will present the sense in the @senseWidget.

Specified by:
createSensePresenter in interface IPresenterFactory

createTriggerPresenter

public <TRIGGER_PARENT extends PoshElement> IPresenter createTriggerPresenter(TRIGGER_PARENT parent,
                                                                              Trigger<TRIGGER_PARENT> trigger,
                                                                              ShedTriggerEnvelope triggerEnvelope,
                                                                              LapChain chain)
Description copied from interface: IPresenterFactory
Create presenter for trigger, it is responsible for keepeing track of added/moved/removed senses.

Specified by:
createTriggerPresenter in interface IPresenterFactory
chain - Chain of the parent.
Returns:

createDriveCollectionPresenter

public IPresenter createDriveCollectionPresenter(LapPath driveCollectionPath,
                                                 DriveCollection driveCollection)
Specified by:
createDriveCollectionPresenter in interface IPresenterFactory

createActionPatternPresenter

public IPresenter createActionPatternPresenter(LapPath actionPatternPath,
                                               TriggeredAction referencingAction,
                                               ActionPattern actionPattern,
                                               ShedVariableWidget actionPatternWidget,
                                               LapChain chain)
Description copied from interface: IPresenterFactory
Create presenter for action pattern widget. This doesn't affect anything else(APs actions...), only the actionPatternWidget. The presenter should update widget when its properties, e.g.g parameters are changed.

Specified by:
createActionPatternPresenter in interface IPresenterFactory
Parameters:
actionPatternPath - Path to the action pattern, path ends with ../A:?/AP:?

createCompetencePresenter

public IPresenter createCompetencePresenter(LapPath competencePath,
                                            TriggeredAction referencingAction,
                                            Competence competence,
                                            ShedVariableWidget competenceWidget,
                                            LapChain chain)
Description copied from interface: IPresenterFactory
Create presenter for competence widget. The presenter is responsible only for the widget of competence, not for its choices ect. It should for example update the widget when arguments or parameters of link are changed.

Specified by:
createCompetencePresenter in interface IPresenterFactory
Parameters:
competencePath - Path to the competence, path ends with ../A:?/C:?

createChoicePresenter

public IPresenter createChoicePresenter(LapPath choicePath,
                                        CompetenceElement choice,
                                        ShedVariableWidget choiceWidget)
Description copied from interface: IPresenterFactory
Create presenter for choice widget, only the widget, not its trigger nor action. Basically it is responsible only for showing changes of choice name in the widget.

Specified by:
createChoicePresenter in interface IPresenterFactory
Parameters:
choicePath - Path to the choice, it will end with ../A:?/C:?/CE:?

createDrivePresenter

public IPresenter createDrivePresenter(LapPath drivePath,
                                       DriveElement drive,
                                       ShedVariableWidget widget)
Description copied from interface: IPresenterFactory
Create presenter for drive widget. It reflects only changes of drive widget, not its trigger or action. Overall it only reflects chganges of name.

Specified by:
createDrivePresenter in interface IPresenterFactory
Parameters:
drivePath - Path to drive, ../DE:?

createActionsPresenter

public IPresenter createActionsPresenter(LapPath actionPatternPath,
                                         ActionPattern actionPattern,
                                         ShedActionsEnvelope actionsEnvelope,
                                         LapChain chain)
Description copied from interface: IPresenterFactory
Create presenter that will take care about keeping adding/moving/removing expanded actions in the ShedActionsEnvelope for ActionPattern.

Specified by:
createActionsPresenter in interface IPresenterFactory
Parameters:
actionPatternPath - Path to the action pattern, ends with ../AP:?.

createChoicesPresenter

public IPresenter createChoicesPresenter(LapPath competencePath,
                                         Competence competence,
                                         ShedChoicesEnvelope choicesEnvelope,
                                         LapChain chain)
Description copied from interface: IPresenterFactory
Create presenter responsible for adding, moving and removing choices widgets in the ShedChoicesEnvelope.

Specified by:
createChoicesPresenter in interface IPresenterFactory
Parameters:
competencePath - Path to the competence whose choices are managed. Ends with ../A:?/C:?.


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.