|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.miginfocom.layout.UnitConverter
public abstract class UnitConverter
Field Summary | |
---|---|
static int |
UNABLE
Value to return if this converter can not handle the unit sent in as an argument
to the convert method. |
Constructor Summary | |
---|---|
UnitConverter()
|
Method Summary | |
---|---|
abstract int |
convertToPixels(float value,
java.lang.String unit,
boolean isHor,
float refValue,
ContainerWrapper parent,
ComponentWrapper comp)
Converts value to pixels. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UNABLE
unit
sent in as an argument
to the convert method.
Constructor Detail |
---|
public UnitConverter()
Method Detail |
---|
public abstract int convertToPixels(float value, java.lang.String unit, boolean isHor, float refValue, ContainerWrapper parent, ComponentWrapper comp)
value
to pixels.
value
- The value to be converted.unit
- The unit of value
. Never null
and at least one character.refValue
- Some reference value that may of may not be used. If the unit is percent for instance this value
is the value to take the percent from. Usually the size of the parent component in the appropriate dimension.isHor
- If the value is horizontal (true
) or vertical (false
).parent
- The parent of the target component that value
is to be applied to.
Might for instance be needed to get the screen that the component is on in a multi screen environment.
May be null
in which case a "best guess" value should be returned.
comp
- The component, if applicable, or null
if none.
unit
is handled by this converter, UnitConverter.UNABLE
if not.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |