edu.washington.cs.supple.rep
Class SameRenderingHint
java.lang.Object
edu.washington.cs.supple.rep.AbstractRenderingHint
edu.washington.cs.supple.rep.SameRenderingHint
- All Implemented Interfaces:
- RenderingHint, java.io.Serializable
- public class SameRenderingHint
- extends AbstractRenderingHint
- Author:
- kgajos
To change the template for this generated type comment go to
Window>Preferences>Java>Code Generation>Code and Comments
- See Also:
- Serialized Form
|
Method Summary |
float |
getWidgetFit(java.util.Vector widgetBags,
Widget widget)
Checks if all bags have a widget of the same type as widget |
protected boolean |
hasWidgetType(WidgetBag bag,
java.lang.Class type)
Checks if the bag is still considering any elements of the specified type |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
SameRenderingHint
public SameRenderingHint(int strength)
SameRenderingHint
public SameRenderingHint(int strength,
java.util.Collection objects)
getWidgetFit
public float getWidgetFit(java.util.Vector widgetBags,
Widget widget)
- Checks if all bags have a widget of the same type as widget
- Parameters:
widgetBags - all widget bags which a part of this hintwidget -
- Returns:
- 1 if all bags have the widget, 0 if at least one of the bags
does not have a widget of the same type
hasWidgetType
protected boolean hasWidgetType(WidgetBag bag,
java.lang.Class type)
- Checks if the bag is still considering any elements of the specified type
- Parameters:
bag - the bag under considerationtype - the widget type
- Returns:
- true if an element of a given type was found, false otherwise
toString
public java.lang.String toString()