edu.washington.cs.supple.wlib.java2
Class GridBagContainerWidget
java.lang.Object
edu.washington.cs.supple.render.AbstractWidget
edu.washington.cs.supple.render.AbstractContainerWidget
edu.washington.cs.supple.wlib.java2.ContainerSwingWidget
edu.washington.cs.supple.wlib.java2.GridBagContainerWidget
- All Implemented Interfaces:
- java.lang.Cloneable, ContainerWidget, java.util.EventListener, java.beans.PropertyChangeListener, SwingWidget, UnwrappedWidget, Widget
- public class GridBagContainerWidget
- extends ContainerSwingWidget
- Author:
- kgajos
Methods inherited from class edu.washington.cs.supple.wlib.java2.ContainerSwingWidget |
addActionButtonSize, addChildren, disengage, engage, getComponentForChild, getConcreteWidget, getListingWidget, getSize, getSwingComponent, hasListingWidget, makeActionButton, makeActionButtons, setEnabled, setListingWidget |
Methods inherited from class edu.washington.cs.supple.render.AbstractContainerWidget |
childIterator, getChild, getChildFor, getMaxChildSize, getMaxChildSize, getMinChildSize, getSumChildSize, getSumChildSize, hasChildren, makeVisible, setChildren |
Methods inherited from class edu.washington.cs.supple.render.AbstractWidget |
anotherPropertyChanged, clone, clone, dismissCurrentView, displayDynamic, equals, executeAction, getBag, getConcreteWidget, getCost, getParent, getPath, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, indexChanged, isEngaged, isEquivalent, legalValuesChanged, likelyValuesChanged, propertyChange, reportActionExecutionEvent, reportValueChangedEvent, setBag, setCost, setParent, setSizeCache, setValue, setWrapper, unwrapWidget, valueChanged |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.washington.cs.supple.render.Widget |
childIterator, clone, clone, getBag, getConcreteWidget, getCost, getPath, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, hasChildren, isEngaged, isEquivalent, setBag, setCost, setParent, setSizeCache, setWrapper, unwrapWidget |
HEIGHT_CONSTRAINT_PROPERTY
public static final java.lang.String HEIGHT_CONSTRAINT_PROPERTY
- See Also:
- Constant Field Values
WIDTH_CONSTRAINT_PROPERTY
public static final java.lang.String WIDTH_CONSTRAINT_PROPERTY
- See Also:
- Constant Field Values
widthConstraint
protected int widthConstraint
heightConstraint
protected int heightConstraint
numChildren
protected int numChildren
GridBagContainerWidget
public GridBagContainerWidget(UiObject object,
int widthConstraint,
int heightConstraint)
GridBagContainerWidget
public GridBagContainerWidget(UiObject object,
int widthConstraint,
int heightConstraint,
SwingWidget lWidget,
int placement)
GridBagContainerWidget
public GridBagContainerWidget(UiObject object,
WidgetDescriptor wd,
WidgetFactory f)
throws java.lang.Exception
rendersObject
public static boolean rendersObject(UiObject object)
- A static method for testing the applicability of the widget given a type
of the UI component to be rendered -- in this case it returns true for
regular container objets with at least 4 children
- Returns:
- true for all coumpound objects with at least 4 children
(including actions); false otherwise
getWidgetProperties
public WidgetProperties getWidgetProperties()
- Description copied from interface:
Widget
- Returns the corresponding WidgetProperties
- Specified by:
getWidgetProperties
in interface Widget
- Overrides:
getWidgetProperties
in class ContainerSwingWidget
- Returns:
- properties associated with this widget
generateWidgetDescriptor
protected WidgetDescriptor generateWidgetDescriptor()
- Description copied from class:
AbstractWidget
- Subclasses can override this method if their widget descriptor include
extra information
- Overrides:
generateWidgetDescriptor
in class ContainerSwingWidget
getContainerSize
protected java.awt.Dimension getContainerSize(int hints)
- Description copied from class:
ContainerSwingWidget
- Unless a child overrides getSize, it should override this method
- Overrides:
getContainerSize
in class ContainerSwingWidget
- Parameters:
hints
- rendering hints
- Returns:
- the size of the container object
makeSwingContainer
protected javax.swing.JComponent makeSwingContainer(int hints)
- Description copied from class:
ContainerSwingWidget
- To be overriden by children (unless they override getSwingComponent)
- Overrides:
makeSwingContainer
in class ContainerSwingWidget
- Parameters:
hints
- rendering hints
- Returns:
- the container with all elements listed in the type
getEffortEstimate
public float getEffortEstimate(ActionDescription a)
toString
public java.lang.String toString()
- Overrides:
toString
in class ContainerSwingWidget