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, cz.cuni.amis.pogamut.sposh.elements.PoshPlan plan, ShedPresenter presenter)
           
 
Method Summary
 IPresenter createActionPatternPresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath actionPatternPath, ShedWidget actionPatternWidget)
          Create presenter for action pattern widget.
 IPresenter createActionPresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath actionPath, ShedWidget actionWidget)
          Create presenter for primitive action.
 IPresenter createActionsPresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath actionPatternPath, ShedActionsEnvelope actionsEnvelope)
          Create presenter that will take care about keeping adding/moving/removing expanded actions in the ShedActionsEnvelope for ActionPattern.
 IPresenter createCompetencePresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath competencePath, ShedWidget competenceWidget)
          Create presenter for competence widget.
 IPresenter createDriveCollectionPresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath driveCollectionPath)
          Create presenter for drive collection, responsible for keeping track of added/moved/removed drives.
 IPresenter createDrivePresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath drivePath, ShedWidget widget)
          Create presenter for drive widget.
 IPresenter createExpandedActionPresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath actionPath, ExpandedActionEnvelope envelope)
          Create presenter for expanded action, i.e. the whole expanded structure that can happen from unknown reference.
 IPresenter createChoicePresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath choicePath, ShedWidget choiceWidget)
          Create presenter for choice widget, only the widget, not its trigger nor action.
 IPresenter createChoicesPresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath competencePath, ShedChoicesEnvelope choicesEnvelope)
          Create presenter responsible for adding, moving and removing choices widgets in the ShedChoicesEnvelope.
 IPresenter createSensePresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath sensePath, ShedSenseWidget senseWidget)
          Create presenter for sense at @sensePath that will present the sense in the @senseWidget.
<TRIGGER_PARENT extends cz.cuni.amis.pogamut.sposh.elements.PoshElement>
IPresenter
createTriggerPresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath triggerOwner, ShedTriggerEnvelope triggerEnvelope)
          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,
                            cz.cuni.amis.pogamut.sposh.elements.PoshPlan plan,
                            ShedPresenter presenter)
Method Detail

createActionPresenter

public IPresenter createActionPresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath actionPath,
                                        ShedWidget actionWidget)
Description copied from interface: IPresenterFactory
Create presenter for primitive action. The action doesn't have any children. Presenter reflects changes in name and arguments of action.

Specified by:
createActionPresenter in interface IPresenterFactory
Parameters:
actionPath - Path to the action in the plan, ends with ../A:?.
actionWidget - The widget that represents the @action in the scene.
Returns:
Presenter for action

createExpandedActionPresenter

public IPresenter createExpandedActionPresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath actionPath,
                                                ExpandedActionEnvelope envelope)
Description copied from interface: IPresenterFactory
Create presenter for expanded action, i.e. the whole expanded structure that can happen from unknown reference. The presenter for expanded action should handle when the action is changed (the name of referenced action). ExpandedActionEnvelope is container for one widget: AttachmentEnvelope — the widget that really contains expanded action. When action reference changes its name, the whole AttachmentEnvelope in the ExpandedActionEnvelope is removed and replaced with new one.

Specified by:
createExpandedActionPresenter in interface IPresenterFactory
Parameters:
actionPath - Path to the @action.
envelope - Envelope that contains expanded action in the scene
Returns:
Presenter for expanded action.

createSensePresenter

public IPresenter createSensePresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath sensePath,
                                       ShedSenseWidget senseWidget)
Description copied from interface: IPresenterFactory
Create presenter for sense at @sensePath that will present the sense in the @senseWidget. Presenter should reflect changes in name and arguments of the sense.

Specified by:
createSensePresenter in interface IPresenterFactory
Parameters:
sensePath - Path to the sense in the plan we want to present.
senseWidget - Widget that represents the sense in the scene.
Returns:
Presenter of sense

createTriggerPresenter

public <TRIGGER_PARENT extends cz.cuni.amis.pogamut.sposh.elements.PoshElement> IPresenter createTriggerPresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath triggerOwner,
                                                                                                                  ShedTriggerEnvelope triggerEnvelope)
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, e.g. for a trigger of a drive, the drive would be the owner.
Parameters:
triggerOwner - Path to the node the trigger belongs to.
triggerEnvelope - Envelope representing the trigger in the scene.
Returns:

createDriveCollectionPresenter

public IPresenter createDriveCollectionPresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath driveCollectionPath)
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
Returns:

createActionPatternPresenter

public IPresenter createActionPatternPresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath actionPatternPath,
                                               ShedWidget actionPatternWidget)
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. parameters are changed. The presenter will take referencing action and the AP object from the

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

createCompetencePresenter

public IPresenter createCompetencePresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath competencePath,
                                            ShedWidget competenceWidget)
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:?
competenceWidget - Widget representing the competence in the scene.
Returns:

createChoicePresenter

public IPresenter createChoicePresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath choicePath,
                                        ShedWidget 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:?
choiceWidget - Widget representing the choice in the scene.
Returns:

createDrivePresenter

public IPresenter createDrivePresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath drivePath,
                                       ShedWidget 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:?
widget - Widget representing the drive in the scene.
Returns:

createActionsPresenter

public IPresenter createActionsPresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath actionPatternPath,
                                         ShedActionsEnvelope actionsEnvelope)
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:?.
actionsEnvelope - Envelope that contains representations of the actions.
Returns:

createChoicesPresenter

public IPresenter createChoicesPresenter(cz.cuni.amis.pogamut.sposh.elements.LapPath competencePath,
                                         ShedChoicesEnvelope choicesEnvelope)
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:?.
choicesEnvelope - Envelope containing the representations of presented choices.


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