cz.cuni.pogamut.shed.widget
Class ShedWidgetFactory

Package class diagram package ShedWidgetFactory
java.lang.Object
  extended by cz.cuni.pogamut.shed.widget.ShedWidgetFactory

public class ShedWidgetFactory
extends Object

Factory for creating various shed widgets.

Author:
HonzaH

Field Summary
protected static int HORIZONTAL_GAP
          Horizontal gap between widgets, generally also right padding of widget envelope
static int VERTICAL_GAP
          Vertical gap between widgets, generally also bottom padding of widget envelope
 
Method Summary
 ShedCreationContainer<AttachmentEnvelope> createAttachmentEnvelope(LapPath actionPath, TriggeredAction action)
          Create proper attachment widget for the action and return it.
 ShedCreationContainer<SlotEnvelope> createChoiceEnvelope(LapPath choicePath, CompetenceElement choice, org.netbeans.api.visual.anchor.Anchor sourceAnchor)
          Create envelope with fully expanded choice along with all inside widgets and presenters.
 ShedCreationContainer<ExpandedActionEnvelope> createdExpandedActionEnvelope(LapPath actionPath)
          Create envelope containing expanded @action.
 ShedCreationContainer<SlotEnvelope> createDriveEnvelope(LapPath drivePath, DriveElement drive)
          Create envelope containing fully expanded drive along with all inside widgets and presenters.
 ShedSenseWidget createSenseWidget(LapPath sensePath)
          Create a widget representing the sense and the presenter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HORIZONTAL_GAP

protected static final int HORIZONTAL_GAP
Horizontal gap between widgets, generally also right padding of widget envelope

See Also:
Constant Field Values

VERTICAL_GAP

public static final int VERTICAL_GAP
Vertical gap between widgets, generally also bottom padding of widget envelope

See Also:
Constant Field Values
Method Detail

createSenseWidget

public ShedSenseWidget createSenseWidget(LapPath sensePath)
Create a widget representing the sense and the presenter. Register presenter.

Parameters:
sensePath - Path to the sense.
sense - Sense the widget will represent
Returns:
Newly created widget

createAttachmentEnvelope

public ShedCreationContainer<AttachmentEnvelope> createAttachmentEnvelope(LapPath actionPath,
                                                                          TriggeredAction action)
Create proper attachment widget for the action and return it. The created attachment is complete (i.e. all references are expanded).

Parameters:
actionPath - Path to the @action, ends with ../A:?
action - Action for which to create attachment. Must be part of the lap tree.

createdExpandedActionEnvelope

public ShedCreationContainer<ExpandedActionEnvelope> createdExpandedActionEnvelope(LapPath actionPath)
Create envelope containing expanded @action.

Parameters:
actionPath - Path to the @action, ends with ../A:?
action - Action that will be expanded
Returns:
created envelope.

createDriveEnvelope

public ShedCreationContainer<SlotEnvelope> createDriveEnvelope(LapPath drivePath,
                                                               DriveElement drive)
Create envelope containing fully expanded drive along with all inside widgets and presenters.

Parameters:
scene - Scene into which the widget belongs to.
drive - Drive that will be used to create the envelope and all elements inside.
Returns:
Newly created envelope for the drive

createChoiceEnvelope

public ShedCreationContainer<SlotEnvelope> createChoiceEnvelope(LapPath choicePath,
                                                                CompetenceElement choice,
                                                                org.netbeans.api.visual.anchor.Anchor sourceAnchor)
Create envelope with fully expanded choice along with all inside widgets and presenters. The presenters are already registered.

Parameters:
choicePath - Path to the @choice
choice - CompetenceElement used to create the expanded envelope
sourceAnchor - Source anchor for ArrowWidget between the expanded choice widget and its parent.
Returns:
Created visual representation.


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