|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.washington.cs.supple.render.utility.Factor
| Field Summary | |
protected java.lang.Class[] |
applicableWidgetTypes
|
protected java.lang.String |
name
|
protected FactorWeight |
weight
|
| Constructor Summary | |
Factor(java.lang.String name,
FactorWeight weight,
java.lang.Class widgetType)
Initialize the factor with the type of widget that it applies to |
|
Factor(java.lang.String name,
FactorWeight weight,
java.lang.Class[] widgetTypes)
Initialize the factor with the type of widget that it applies to |
|
| Method Summary | |
java.lang.Object |
clone()
|
java.lang.String |
getName()
Returns a descriptive name of this factor |
abstract double |
getValue(SuppleType type,
UiObject object,
WidgetDescriptor descriptor)
Returns the value of this factor |
double |
getValue(Widget widget)
Returns the value of this factor |
FactorWeight |
getWeight()
Returns the weight object for this factor |
protected boolean |
isApplcableType(SuppleType type,
UiObject object,
WidgetDescriptor descriptor)
An easy to override method that lets you finetune the applicability of a particular factor |
boolean |
isApplicable(java.util.Collection widgets)
Checks if the factor is applicable for any element in a collection of widgets |
boolean |
isApplicable(SuppleType type,
UiObject uiObject,
java.util.Collection descriptors)
|
boolean |
isApplicable(SuppleType type,
UiObject object,
WidgetDescriptor descriptor)
Checks if the factor is applicable for a particular widget |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.Class[] applicableWidgetTypes
protected java.lang.String name
protected FactorWeight weight
| Constructor Detail |
public Factor(java.lang.String name,
FactorWeight weight,
java.lang.Class widgetType)
name - a descriptive name of this factorweight - the weight for this factorwidgetType - the applicable wiget type
public Factor(java.lang.String name,
FactorWeight weight,
java.lang.Class[] widgetTypes)
name - a descriptive name of this factorweight - the weight for this factorwidgetTypes - the applicable wiget types| Method Detail |
public double getValue(Widget widget)
widget - the widget to apply this factor to
public abstract double getValue(SuppleType type,
UiObject object,
WidgetDescriptor descriptor)
type - underlying supple typeobject - underlying ui objectdescriptor - descriptor of the widget to apply this factor to
public FactorWeight getWeight()
public boolean isApplicable(SuppleType type,
UiObject object,
WidgetDescriptor descriptor)
type - underlying supple typeobject - underlying ui objectdescriptor - a widget descriptor
protected boolean isApplcableType(SuppleType type,
UiObject object,
WidgetDescriptor descriptor)
type - underlying supple typeobject - underlying ui objectdescriptor - widget descriptor
public boolean isApplicable(java.util.Collection widgets)
widgets - a collection of widgets
public boolean isApplicable(SuppleType type,
UiObject uiObject,
java.util.Collection descriptors)
type - uiObject - descriptors -
public java.lang.String getName()
public java.lang.String toString()
public java.lang.Object clone()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||