|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectUtils
public class Utils
Utilities class.
Field Summary | |
---|---|
static FilterFactory |
filterFactory
The default FilterFactory to use. |
static StyleBuilder |
sb
The default StyleBuilder to use. |
static StyleFactory |
styleFactory
The default StyleFactory to use. |
Constructor Summary | |
---|---|
Utils()
|
Method Summary | |
---|---|
static Style |
createFromSLD(File sld)
Create a Style object from a definition in a SLD document |
static Style |
createLineStyle()
Create a default line style. |
static Style |
createPointStyle()
Create a default point style. |
static Style |
createPolygonStyle()
Create a default polygon style. |
static Style |
createRGBStyle(GridCoverage2DReader reader)
This method examines the names of the sample dimensions in the provided coverage looking for "red |
static Style |
createStyle(File file,
SimpleFeatureSource featureSource)
Create a Style to display the features. |
static Style |
createStyle2(SimpleFeatureSource featureSource)
Create a default Style ofr the featureSource. |
static String |
getGridAttributeName(Layer layer)
|
static boolean |
isGridLayer(Layer layer)
Check if the given map layer contains a grid coverage or a grid coverage reader. |
static void |
runGuiRunnableSafe(Runnable runner,
boolean sync)
Run a Runnable that needs to run in the Display thread. |
static void |
setShellLocation(Shell shell)
Sets the location of the shell to the center of the screen. |
static Rectangle |
toAwtRectangle(Rectangle rect)
Transform a swt Rectangle instance into an awt one. |
static File |
toSLDFile(File file)
Figure out if a valid SLD file is available. |
static Rectangle |
toSwtRectangle(Rectangle rect2d)
Transform an awt Rectangle instance into a swt one. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static StyleFactory styleFactory
StyleFactory
to use.
public static FilterFactory filterFactory
FilterFactory
to use.
public static StyleBuilder sb
StyleBuilder
to use.
Constructor Detail |
---|
public Utils()
Method Detail |
---|
public static void setShellLocation(Shell shell)
shell
- the shell to place.public static Rectangle toSwtRectangle(Rectangle rect2d)
Rectangle
instance into a swt one.
The coordinates are rounded to integer for the swt object.
rect2d
- The awt rectangle to map.
Rectangle
object.public static Rectangle toAwtRectangle(Rectangle rect)
rect
- the swt Rectangle
Rectangle
instance with
the appropriate location and size.public static Style createStyle(File file, SimpleFeatureSource featureSource)
If an SLD file is in the same directory as the shapefile then we will create the Style by processing this.
public static File toSLDFile(File file)
file
- the file to search for style sidecar file.
public static Style createFromSLD(File sld)
sld
- the sld file.
Style
or null
.public static Style createStyle2(SimpleFeatureSource featureSource)
Style
ofr the featureSource.
featureSource
- the source on which to create the style.
public static Style createPolygonStyle()
public static Style createLineStyle()
public static Style createPointStyle()
public static void runGuiRunnableSafe(Runnable runner, boolean sync)
Runnable
that needs to run in the Display thread.
runner
- the runnable to run.sync
- if true
, the runnable is run in sync mode, else in async.public static Style createRGBStyle(GridCoverage2DReader reader)
reader
-
public static boolean isGridLayer(Layer layer)
Implementation note: we avoid referencing org.geotools.coverage.grid classes directly here so that applications dealing only with other data types are not forced to have JAI in the classpath.
layer
- the map layer
public static String getGridAttributeName(Layer layer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |