public class Extent extends Extent
getInstance(int) method or its overloaded derivatives to avoid
replication across sessions.
The following shows the recommended way to use this class:
import com.sptci.echo2.style.Extent;
...
Extent width = Extent.getInstance( 400 );
Extent height = Extent.getInstance( 300 );
© Copyright 2007 Sans Pareil Technologies, Inc.
| Modifier and Type | Field and Description |
|---|---|
protected static Map<String,Extent> |
cache
The map used to maintain a cache of extent instances required by the
application.
|
| Constructor and Description |
|---|
Extent(int size)
Deprecated.
Use
getInstance( int ) instead. |
Extent(int size,
int units)
Deprecated.
Use
getInstance( int, int ) instead. |
| Modifier and Type | Method and Description |
|---|---|
static Extent |
getInstance(int size)
Fetch an extent instance that represents the specified size in the default
units.
|
static Extent |
getInstance(int size,
int units)
Fetch an extent instance that represents the specified size in the
specified units.
|
protected static String |
getKey(int size,
int units)
Return a unique key to use for the specified extent size expressed in the
specified units.
|
@Deprecated public Extent(int size)
getInstance( int ) instead.Extent.PX units.size - The size represented by this extent.@Deprecated public Extent(int size, int units)
getInstance( int, int ) instead.size - The size represented by this extent.units - The unit of measure used to express this extent.public static Extent getInstance(int size)
size - The size represented by this extent.getInstance( int, int )public static Extent getInstance(int size, int units)
size - The size represented by this extent.units - The unit of measure used to express this extent.getKey( int, int )protected static String getKey(int size, int units)
size - The size for which a key is to be generated.units - The unit of measure used to express the size.