|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.washington.cs.supple.render.utility.OldFactor
| Field Summary | |
protected java.lang.Class |
applicableWidgetType
|
protected float |
lowerBound
|
protected java.lang.String |
name
|
protected float |
upperBound
|
| Constructor Summary | |
OldFactor(java.lang.String name,
java.lang.Class widgetType,
float lowerBound,
float upperBound)
Initialize the factor with the type of widget that it applies to |
|
| Method Summary | |
java.lang.Object |
clone()
|
protected float |
computeActualBound(float bound,
SuppleType type,
UiObject object,
Widget w)
An easy to override function that lets you scale the factor depending on the details of the underlying type, etc |
float |
getLowerBound(Widget w)
Returns the lower bound on the cost of a widget |
java.lang.String |
getName()
Returns a descriptive name of this factor |
float |
getUpperBound(Widget w)
Returns the upper bound on the cost of a widget |
protected boolean |
isApplcableType(SuppleType type,
UiObject object,
Widget w)
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(Widget w)
Checks if the factor is applicable for a particular widget |
void |
scaleBothBounds(float scale)
Scales both bounds on the factor's parameter |
void |
scaleLowerBound(float scale)
Scales the lower bound on the factor's parameter |
void |
scaleUpperBound(float scale)
Scales the upper bound on the factor's parameter |
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 applicableWidgetType
protected java.lang.String name
protected float lowerBound
protected float upperBound
| Constructor Detail |
public OldFactor(java.lang.String name,
java.lang.Class widgetType,
float lowerBound,
float upperBound)
name - a descriptive name of this factorwidgetType - the applicable wiget typelowerBound - lower bound on the factor's parameterupperBound - upper bound on the factor's parameter| Method Detail |
public boolean isApplicable(Widget w)
w - a widget
protected boolean isApplcableType(SuppleType type,
UiObject object,
Widget w)
type - underlying supple typeobject - underlying ui objectw - widget
public boolean isApplicable(java.util.Collection widgets)
widgets - a collection of widgets
public float getLowerBound(Widget w)
w - a widget to be evaluated
public float getUpperBound(Widget w)
w - a widget to be evaluated
protected float computeActualBound(float bound,
SuppleType type,
UiObject object,
Widget w)
bound - the bound to be scaledtype - underlying supple typeobject - underlying UI objectw - widget
public void scaleLowerBound(float scale)
scale - the scalepublic void scaleUpperBound(float scale)
scale - the scalepublic void scaleBothBounds(float scale)
scale - the scalepublic 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 | ||||||||||