cz.cuni.pogamut.shed.widget
Class AbstractShedEnvelope<T extends org.netbeans.api.visual.widget.Widget>

Package class diagram package AbstractShedEnvelope
java.lang.Object
  extended by org.netbeans.api.visual.widget.Widget
      extended by cz.cuni.pogamut.shed.widget.AbstractShedEnvelope<T>
Type Parameters:
T - Type of children the envelope will contain.
All Implemented Interfaces:
IPresentedWidget, IShedEnvelope<T>, Accessible
Direct Known Subclasses:
ShedActionsEnvelope, ShedDrivesEnvelope, ShedChoicesEnvelope, ShedTriggerEnvelope

public abstract class AbstractShedEnvelope<T extends org.netbeans.api.visual.widget.Widget>
extends org.netbeans.api.visual.widget.Widget
implements IShedEnvelope<T>, IPresentedWidget

Author:
Honza

Nested Class Summary
 
Nested classes/interfaces inherited from class org.netbeans.api.visual.widget.Widget
org.netbeans.api.visual.widget.Widget.Dependency
 
Field Summary
protected  ShedScene scene
           
 
Constructor Summary
protected AbstractShedEnvelope(ShedScene scene)
           
 
Method Summary
 void add(T newWidget)
          Add widget to the envelope behind the last element
 void add(T newWidget, int position)
          Add widget to the envelope at the specified position.
 T getChild(int position)
          Typed Wrapper for Widget.getChildren().
 IPresenter getPresenter()
           
 void move(int absoluteIndex, T movedWidget)
          Move the widget relative to the other widgets.
 int numberOfChildren()
          Get number of children, used for type safe looping.
 void remove(T removedWidget)
          Remove widget from the envelope.
 void setPresenter(IPresenter newPresenter)
           
protected abstract  void updateChildrenPositions()
           
 
Methods inherited from class org.netbeans.api.visual.widget.Widget
addDependency, addChild, addChild, addChild, addChild, addChildren, bringToBack, bringToFront, calculateClientArea, convertLocalToScene, convertLocalToScene, convertSceneToLocal, convertSceneToLocal, createActions, equals, getAccessibleContext, getActions, getActions, getBackground, getBorder, getBounds, getClientArea, getCursor, getCursorAt, getDependencies, getFont, getForeground, getGraphics, getChildConstraint, getChildren, getLayout, getLocation, getLookup, getMaximumSize, getMinimumSize, getParentWidget, getPreferredBounds, getPreferredLocation, getPreferredSize, getResourceTable, getScene, getState, getToolTipText, hashCode, isEnabled, isHitAt, isCheckClipping, isOpaque, isPreferredBoundsSet, isRepaintRequiredForRevalidating, isValidated, isVisible, notifyAdded, notifyBackgroundChanged, notifyFontChanged, notifyForegroundChanged, notifyRemoved, notifyStateChanged, paint, paintBackground, paintBorder, paintChildren, paintWidget, removeDependency, removeFromParent, removeChild, removeChildren, removeChildren, repaint, resolveBounds, revalidate, revalidate, setAccessibleContext, setBackground, setBackgroundFromResource, setBorder, setBorder, setCursor, setEnabled, setFont, setFontFromResource, setForeground, setForegroundFromResource, setCheckClipping, setChildConstraint, 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
 

Field Detail

scene

protected final ShedScene scene
Constructor Detail

AbstractShedEnvelope

protected AbstractShedEnvelope(ShedScene scene)
Method Detail

updateChildrenPositions

protected abstract void updateChildrenPositions()

add

public final void add(T newWidget,
                      int position)
Description copied from interface: IShedEnvelope
Add widget to the envelope at the specified position.

Specified by:
add in interface IShedEnvelope<T extends org.netbeans.api.visual.widget.Widget>
Parameters:
newWidget - widget to add
position - where to put widget

add

public final void add(T newWidget)
Add widget to the envelope behind the last element

Parameters:
newWidget - Widget that wll be added to the envelope at the last place

move

public final void move(int absoluteIndex,
                       T movedWidget)
Description copied from interface: IShedEnvelope
Move the widget relative to the other widgets.

Specified by:
move in interface IShedEnvelope<T extends org.netbeans.api.visual.widget.Widget>
movedWidget - widget to move

remove

public final void remove(T removedWidget)
Description copied from interface: IShedEnvelope
Remove widget from the envelope.

Specified by:
remove in interface IShedEnvelope<T extends org.netbeans.api.visual.widget.Widget>
Parameters:
removedWidget - widget to remove from the envelope.

getChild

public final T getChild(int position)
Typed Wrapper for Widget.getChildren().List.get(int). Get child at specified position and return it.

Parameters:
position - position of the child we want.
Returns:
Properly typed child.

numberOfChildren

public final int numberOfChildren()
Get number of children, used for type safe looping.

Returns:

getPresenter

public final IPresenter getPresenter()
Specified by:
getPresenter in interface IPresentedWidget

setPresenter

public final void setPresenter(IPresenter newPresenter)


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