cz.cuni.pogamut.posh.widget.kidview
Class SimpleRoleActionPatternWidget

Package class diagram package SimpleRoleActionPatternWidget
java.lang.Object
  extended by org.netbeans.api.visual.widget.Widget
      extended by cz.cuni.pogamut.posh.widget.PoshWidget<T>
          extended by cz.cuni.pogamut.posh.widget.kidview.SimpleBasicWidget<T>
              extended by cz.cuni.pogamut.posh.widget.kidview.SimpleRoleActionPatternWidget
All Implemented Interfaces:
cz.cuni.amis.pogamut.sposh.elements.PoshElementListener, PropertyChangeListener, EventListener, Accessible, org.netbeans.api.visual.action.PopupMenuProvider

public class SimpleRoleActionPatternWidget
extends SimpleBasicWidget<T>

Widget that is showing as AP, but it is a triggered action. TriggerAction can be a multiple things and this widget is representing it as action pattern.

Author:
Honza

Nested Class Summary
protected static class SimpleRoleActionPatternWidget.APInplaceEditor
          Create inplace editor that changes name of action patten and the action
 
Nested classes/interfaces inherited from class cz.cuni.pogamut.posh.widget.PoshWidget
PoshWidget.PropertyNode
 
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.posh.widget.PoshWidget
height, propertyNode, width
 
Constructor Summary
SimpleRoleActionPatternWidget(PoshScene poshScene, cz.cuni.amis.pogamut.sposh.elements.TriggeredAction dataNode, PoshWidget<? extends cz.cuni.amis.pogamut.sposh.elements.PoshElement> parent, cz.cuni.amis.pogamut.sposh.elements.ActionPattern apNode)
           
 
Method Summary
protected  void addChildWidget(cz.cuni.amis.pogamut.sposh.elements.PoshElement dataNode)
          Create proper widget from child data node.
protected  List<AbstractMenuAction> createMenuActions()
          Create actions for context menu.
protected  PoshWidget.PropertyNode createPropertiesNode()
           
protected  org.openide.nodes.Sheet createSheet()
          Create Node.Sheet for poroperties of this widget.
protected  void deleteWidgetFromScene(cz.cuni.amis.pogamut.sposh.elements.PoshElement dataNode)
          Common function for deleting widget from scene
 void elementPropertyChange(PropertyChangeEvent evt)
          This is a method that is supposed to handle property changes of the lap element.
protected  List<AbstractAcceptAction> getAcceptProviders()
          Return list of acceptors that will do something when proper Transferable is dropped on the widget.
protected  PoshNodeType getType()
          Get type of widget, in this case type of PoshElement
 void regenerate()
          Remove all widget children of Ap and add them.
 
Methods inherited from class cz.cuni.pogamut.posh.widget.kidview.SimpleBasicWidget
addTriggeredActionWidgets, addTriggeredActionWidgets, changeTriggeredActionWidgets, getAssociatedWidget, getIndexOfElement, getPopupMenu, moveChildWidget, moveChildWidgetNode, nodeChanged
 
Methods inherited from class cz.cuni.pogamut.posh.widget.PoshWidget
calculateClientArea, doRepaint, getChildNodes, getCommentText, getConnection, getDataNode, getHeadlineText, getParent, getPoshScene, getPropertiesNode, getRootWidget, isAncestor, isCollapsed, paintWidget, propertyChange, select, setCollapsed, setCommentText, setHeadlineText, toString, updateSources
 
Methods inherited from class org.netbeans.api.visual.widget.Widget
addChild, addChild, addChild, addChild, addChildren, addDependency, bringToBack, bringToFront, 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, 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, wait, wait, wait
 

Constructor Detail

SimpleRoleActionPatternWidget

public SimpleRoleActionPatternWidget(PoshScene poshScene,
                                     cz.cuni.amis.pogamut.sposh.elements.TriggeredAction dataNode,
                                     PoshWidget<? extends cz.cuni.amis.pogamut.sposh.elements.PoshElement> parent,
                                     cz.cuni.amis.pogamut.sposh.elements.ActionPattern apNode)
Method Detail

createPropertiesNode

protected PoshWidget.PropertyNode createPropertiesNode()
Overrides:
createPropertiesNode in class PoshWidget<cz.cuni.amis.pogamut.sposh.elements.TriggeredAction>

regenerate

public void regenerate()
Remove all widget children of Ap and add them.


getType

protected PoshNodeType getType()
Description copied from class: PoshWidget
Get type of widget, in this case type of PoshElement

Specified by:
getType in class PoshWidget<cz.cuni.amis.pogamut.sposh.elements.TriggeredAction>
Returns:
type of PoshElement this Widget represents.

createMenuActions

protected List<AbstractMenuAction> createMenuActions()
Description copied from class: SimpleBasicWidget
Create actions for context menu.

Specified by:
createMenuActions in class SimpleBasicWidget<cz.cuni.amis.pogamut.sposh.elements.TriggeredAction>
Returns:
not null, list of actions for context menu

addChildWidget

protected void addChildWidget(cz.cuni.amis.pogamut.sposh.elements.PoshElement dataNode)
Create proper widget from child data node.

Specified by:
addChildWidget in class SimpleBasicWidget<cz.cuni.amis.pogamut.sposh.elements.TriggeredAction>
Parameters:
dataNode - DataNode that was added as child to associated data node

elementPropertyChange

public void elementPropertyChange(PropertyChangeEvent evt)
Description copied from class: PoshWidget
This is a method that is supposed to handle property changes of the lap element.

Specified by:
elementPropertyChange in class PoshWidget<cz.cuni.amis.pogamut.sposh.elements.TriggeredAction>
Parameters:
evt - description of change

getAcceptProviders

protected List<AbstractAcceptAction> getAcceptProviders()
Description copied from class: PoshWidget
Return list of acceptors that will do something when proper Transferable is dropped on the widget.

Specified by:
getAcceptProviders in class PoshWidget<cz.cuni.amis.pogamut.sposh.elements.TriggeredAction>
Returns:
List of DnD accepting providers. Never null.

deleteWidgetFromScene

protected void deleteWidgetFromScene(cz.cuni.amis.pogamut.sposh.elements.PoshElement dataNode)
Description copied from class: SimpleBasicWidget
Common function for deleting widget from scene

Overrides:
deleteWidgetFromScene in class SimpleBasicWidget<cz.cuni.amis.pogamut.sposh.elements.TriggeredAction>

createSheet

protected org.openide.nodes.Sheet createSheet()
Description copied from class: PoshWidget
Create Node.Sheet for poroperties of this widget.

Overrides:
createSheet in class PoshWidget<cz.cuni.amis.pogamut.sposh.elements.TriggeredAction>
Returns:


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