public abstract class PositionMetric<LayoutType extends Enum> extends Object
| Modifier and Type | Class and Description | 
|---|---|
protected static class  | 
PositionMetric.LayoutMode  | 
protected static class  | 
PositionMetric.Origin  | 
| Constructor and Description | 
|---|
PositionMetric(float value,
              LayoutType layoutType)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected float | 
getAbsolutePosition(float size,
                   PositionMetric.Origin origin)  | 
LayoutType | 
getLayoutType()  | 
abstract float | 
getPixelValue(float size)  | 
protected float | 
getRelativePosition(float size,
                   PositionMetric.Origin origin)  | 
float | 
getValue()  | 
void | 
set(float value,
   LayoutType layoutType)  | 
void | 
setLayoutType(LayoutType layoutType)  | 
void | 
setValue(float value)  | 
protected abstract void | 
validatePair(float value,
            LayoutType layoutType)
Verifies that the values passed in are valid for the layout algorithm being used. 
 | 
protected static void | 
validateValue(float value,
             PositionMetric.LayoutMode layoutMode)
Throws IllegalArgumentException if there is a problem. 
 | 
public PositionMetric(float value,
                      LayoutType layoutType)
protected static void validateValue(float value,
                                    PositionMetric.LayoutMode layoutMode)
                             throws IllegalArgumentException
value - layoutMode - IllegalArgumentExceptionprotected float getAbsolutePosition(float size,
                                    PositionMetric.Origin origin)
protected float getRelativePosition(float size,
                                    PositionMetric.Origin origin)
protected abstract void validatePair(float value,
                                     LayoutType layoutType)
value - layoutType - public void set(float value,
                LayoutType layoutType)
public float getValue()
public void setValue(float value)
public abstract float getPixelValue(float size)
public LayoutType getLayoutType()
public void setLayoutType(LayoutType layoutType)