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 used in the Shed visual view.

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 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 createCompetencePresenter(LapPath competencePath, TriggeredAction referencingAction, Competence competence, ShedVariableWidget competenceWidget, LapChain chain)
          Create presenter for competence widget.
 IPresenter createDriveCollectionPresenter(LapPath driveCollectionPath, DriveCollection driveCollection)
          Create presenter for drive collection, responsible for keeping track of added/moved/removed drives.
 IPresenter createDrivePresenter(LapPath drivePath, DriveElement drive, ShedVariableWidget widget)
          Create presenter for drive widget.
 IPresenter createExpandedActionPresenter(TriggeredAction action, ExpandedActionEnvelope envelope, LapChain chain)
          Create presenter for expanded action, i.e.
 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. The action doesn't have any children.

Specified by:
createActionPresenter in interface IPresenterFactory
Parameters:
actionPath - Path to the action in the plan
action - Action the presenter is presenting.
actionWidget - The widget that represents the @action in the scene.
actionChain - Parameter chain to the action.
Returns:
Presenter for action

createExpandedActionPresenter

public IPresenter createExpandedActionPresenter(TriggeredAction action,
                                                ExpandedActionEnvelope envelope,
                                                LapChain chain)
Description copied from interface: IPresenterFactory
Create presenter for expanded action, i.e. the whole expanded structure that can happen from unknown reference. This presenter must reflect that

Specified by:
createExpandedActionPresenter in interface IPresenterFactory
Parameters:
chain - Chain up to the branch before @action. The @action is not included.
action - Action that was expnanded
envelope - Envelope that contains expanded action in the scene
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
Parameters:
sensePath - Path to the sense in the plan
sense - Sense that is being presented
senseWidget - Widget that represents the sense in the scene.
senseChain - Parameter chain up to including sense.
Returns:
Presenter of sense

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
Type Parameters:
TRIGGER_PARENT - Owner of the trigger
Parameters:
parent - The posh element this trigger belongs to
trigger - Presented trigger
triggerEnvelope - Envelope representing the trigger in the scene.
chain - Parameter chain of the triggers owner
Returns:

createDriveCollectionPresenter

public IPresenter createDriveCollectionPresenter(LapPath driveCollectionPath,
                                                 DriveCollection driveCollection)
Description copied from interface: IPresenterFactory
Create presenter for drive collection, responsible for keeping track of added/moved/removed drives.

Specified by:
createDriveCollectionPresenter in interface IPresenterFactory
Parameters:
driveCollectionPath - Path to the DC
driveCollection - Presented drive collection
Returns:

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:?
referencingAction - The action that referenced the action pattern
actionPattern - Presented ActionPattern.
actionPatternWidget - Widget representing the AP.
chain - Parameter chain to AP (incl).
Returns:

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:?
referencingAction - Action referencing the competence.
competence - Presented competence.
competenceWidget - Widget representing the competence in the scene.
chain - Parameter chain up to incl. competence.
Returns:

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:?
choice - Presented choice.
choiceWidget - Widget representing the choice in the scene.
Returns:

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:?
drive - Presented drive
widget - Widget representing the drive in the scene.
Returns:

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:?.
actionPattern - AP that contains the presented actions
actionsEnvelope - Envelope that contains representations of the actions.
Returns:

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:?.
competence - Competence that contains presented choices.
choicesEnvelope - Envelope containing the representations of presented choices.


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