cz.cuni.pogamut.shed.widget
Class ShedCreationContainer<WIDGET extends org.netbeans.api.visual.widget.Widget>

Package class diagram package ShedCreationContainer
java.lang.Object
  extended by cz.cuni.pogamut.shed.widget.ShedCreationContainer<WIDGET>

public class ShedCreationContainer<WIDGET extends org.netbeans.api.visual.widget.Widget>
extends Object

The creation of widgets representing some part of plan consists from two parts, the widget itself and the arrows that connect them. Due to constraints of Widget.Dependency, the Anchor of the widget must be inserted into the scene before the arrows that use the widget position can be inserted into the scene (otherwise arrow has no idea to determine where it should start and where to end). Failure to do so (to first insert widget and then arrows) will result in something linke IllegalStateException - Widget was not added into the scene or AssertionError - Scene.validate was not called after last change. This container is used by ShedWidgetFactory for passing back created widgets.

Author:
Honza

Constructor Summary
ShedCreationContainer(WIDGET createdWidget)
          Create container for passed widget.
 
Method Summary
 void addArrow(ArrowWidget arrow)
          Add arrow to this container.
 Set<ArrowWidget> getArrows()
          Get arrows of this container.
 WIDGET getWidget()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShedCreationContainer

public ShedCreationContainer(WIDGET createdWidget)
Create container for passed widget. Arrows can be later added using addArrow(cz.cuni.pogamut.shed.widget.ArrowWidget).

Method Detail

addArrow

public void addArrow(ArrowWidget arrow)
Add arrow to this container.

Parameters:
arrow - Arrow to be added.

getWidget

public WIDGET getWidget()
Returns:
The widget of this container.

getArrows

public Set<ArrowWidget> getArrows()
Get arrows of this container.



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