cz.cuni.pogamut.shed.widget
Class ShedTriggerEnvelope

Package class diagram package ShedTriggerEnvelope
java.lang.Object
  extended by org.netbeans.api.visual.widget.Widget
      extended by cz.cuni.pogamut.shed.widget.AbstractShedEnvelope<ShedSenseWidget>
          extended by cz.cuni.pogamut.shed.widget.ShedTriggerEnvelope
All Implemented Interfaces:
IPresentedWidget, IShedEnvelope<ShedSenseWidget>, Accessible

public class ShedTriggerEnvelope
extends AbstractShedEnvelope<ShedSenseWidget>

This envelope is containing the trigger senses. It can add/move/delete ShedSenseWidget.

The origin of the envelope ([0,0]) is at left top corner, its height is ShedWidget.height and its width is width of its children + ShedWidgetFactory.HORIZONTAL_GAP between each widget.

Author:
HonzaH

Nested Class Summary
 
Nested classes/interfaces inherited from class org.netbeans.api.visual.widget.Widget
org.netbeans.api.visual.widget.Widget.Dependency
 
Field Summary
 
Fields inherited from class cz.cuni.pogamut.shed.widget.AbstractShedEnvelope
scene
 
Constructor Summary
ShedTriggerEnvelope(ShedScene scene, org.netbeans.api.visual.anchor.Anchor anchor)
          Create envelope for the trigger senses.
 
Method Summary
 org.netbeans.api.visual.anchor.Anchor getCommonAnchor()
          Get anchor of the widget that is used as a common source anchor for the ArrowWidget, the target anchors will be provided by its children.
 void updateChildrenPositions()
          Method called when child widget is added/moved/deleted.
 
Methods inherited from class cz.cuni.pogamut.shed.widget.AbstractShedEnvelope
add, add, getChild, getPresenter, move, numberOfChildren, remove, setPresenter
 
Methods inherited from class org.netbeans.api.visual.widget.Widget
addChild, addChild, addChild, addChild, addChildren, addDependency, bringToBack, bringToFront, calculateClientArea, convertLocalToScene, convertLocalToScene, convertSceneToLocal, convertSceneToLocal, createActions, equals, getAccessibleContext, getActions, getActions, getBackground, getBorder, getBounds, getChildConstraint, getChildren, getClientArea, getCursor, getCursorAt, getDependencies, getFont, getForeground, getGraphics, getLayout, getLocation, getLookup, getMaximumSize, getMinimumSize, getParentWidget, getPreferredBounds, getPreferredLocation, getPreferredSize, getResourceTable, getScene, getState, getToolTipText, hashCode, isCheckClipping, isEnabled, isHitAt, isOpaque, isPreferredBoundsSet, isRepaintRequiredForRevalidating, isValidated, isVisible, notifyAdded, notifyBackgroundChanged, notifyFontChanged, notifyForegroundChanged, notifyRemoved, notifyStateChanged, paint, paintBackground, paintBorder, paintChildren, paintWidget, removeChild, removeChildren, removeChildren, removeDependency, removeFromParent, repaint, resolveBounds, revalidate, revalidate, setAccessibleContext, setBackground, setBackgroundFromResource, setBorder, setBorder, setCheckClipping, setChildConstraint, setCursor, setEnabled, setFont, setFontFromResource, setForeground, setForegroundFromResource, setLayout, setMaximumSize, setMinimumSize, setOpaque, setPreferredBounds, setPreferredLocation, setPreferredSize, setResourceTable, setState, setToolTipText, setVisible, updateResources
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShedTriggerEnvelope

public ShedTriggerEnvelope(ShedScene scene,
                           org.netbeans.api.visual.anchor.Anchor anchor)
Create envelope for the trigger senses. The @anchor is can used as source anchor for ArrowWidgets, through getCommonAnchor().

Parameters:
scene -
anchor -
Method Detail

updateChildrenPositions

public void updateChildrenPositions()
Description copied from class: AbstractShedEnvelope
Method called when child widget is added/moved/deleted. Its job is to make sure that children are correctly positioned. What it does depend on layout of the envelope. In many cases, there is no need to do anything, but e.g. absolute layout would require to manually update position of children. Use Widget.setPreferredLocation(java.awt.Point).

Specified by:
updateChildrenPositions in class AbstractShedEnvelope<ShedSenseWidget>

getCommonAnchor

public org.netbeans.api.visual.anchor.Anchor getCommonAnchor()
Get anchor of the widget that is used as a common source anchor for the ArrowWidget, the target anchors will be provided by its children. Related widget must be the widget of the anchor.

Returns:
Common source anchor


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