|
NextApp Echo2 v2.1.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo2.webcontainer.propertyrender.ExtentRender
public class ExtentRender
Utility class for rendering nextapp.echo2.app.Extent
properties to CSS.
Method Summary | |
---|---|
static boolean |
isZeroLength(nextapp.echo2.app.Extent extent)
Determines if the given Extent is of zero length. |
static java.lang.String |
renderCssAttributePixelValue(nextapp.echo2.app.Extent extent)
Attempts to render a given Extent to a pixel CSS attribute
value. |
static java.lang.String |
renderCssAttributePixelValue(nextapp.echo2.app.Extent extent,
java.lang.String invalidValue)
Attempts to render a given Extent to a pixel CSS attribute
value. |
static java.lang.String |
renderCssAttributeValue(nextapp.echo2.app.Extent extent)
Renders an Extent property value to a CSS dimensioned
attribute value. |
static java.lang.String |
renderCssAttributeValueHalf(nextapp.echo2.app.Extent extent)
Renders 1/2 the distance specified by an Extent property
value to a CSS dimensioned attribute. |
static void |
renderToStyle(nextapp.echo2.webrender.output.CssStyle cssStyle,
java.lang.String cssAttribute,
nextapp.echo2.app.Extent extent)
Renders an Extent property to the given CSS style. |
static java.lang.String |
renderUnits(int units)
Renders the given Extent units constant into a CSS
unit suffix. |
static nextapp.echo2.app.Extent |
toExtent(java.lang.String extentString)
Creates an Extent from the given CSS dimensioned attribute
value. |
static int |
toPixels(nextapp.echo2.app.Extent extent,
int defaultPixels)
Attempts to convert a given Extent to a pixel value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean isZeroLength(nextapp.echo2.app.Extent extent)
Extent
is of zero length.
This method interprets null Extent
s to be of zero
length.
extent
- the extent
public static final java.lang.String renderCssAttributePixelValue(nextapp.echo2.app.Extent extent)
Extent
to a pixel CSS attribute
value. Returns null if the the extent can not be represented by a pixel
value.
extent
- the property value
public static final java.lang.String renderCssAttributePixelValue(nextapp.echo2.app.Extent extent, java.lang.String invalidValue)
Extent
to a pixel CSS attribute
value. Returns the specified invalidValue
if the specified
Extent
is not valid.
extent
- the property value
public static final java.lang.String renderCssAttributeValue(nextapp.echo2.app.Extent extent)
Extent
property value to a CSS dimensioned
attribute value.
extent
- the property value
public static final java.lang.String renderCssAttributeValueHalf(nextapp.echo2.app.Extent extent)
Extent
property
value to a CSS dimensioned attribute.
For example, an extent that would normally render as "3px" would be
rendered as "1.5px" by this method.
extent
- the property value
public static final void renderToStyle(nextapp.echo2.webrender.output.CssStyle cssStyle, java.lang.String cssAttribute, nextapp.echo2.app.Extent extent)
Extent
property to the given CSS style.
Null property values are ignored.
cssStyle
- the target CssStyle
cssAttribute
- the CSS attribute name, e.g., "width" or "height".extent
- the property valuepublic static final java.lang.String renderUnits(int units)
Extent
units constant into a CSS
unit suffix.
units
- the Extent
units constant value
public static final nextapp.echo2.app.Extent toExtent(java.lang.String extentString)
Extent
from the given CSS dimensioned attribute
value.
extentString
- the CSS dimensioned attribute value
Extent
, or null if the input
is not valid.public static final int toPixels(nextapp.echo2.app.Extent extent, int defaultPixels)
Extent
to a pixel value.
Returns defaultPixels
if the conversion is not possible.
extent
- the Extent
to convertdefaultPixels
- the pixel value to return if conversion is
impossible.
extent
in pixels
|
NextApp Echo2 v2.1.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |