|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.visad.ShapeUtility
public class ShapeUtility
A utility class for manipulating VisAD Shapes (VisADGeometryArrays). Adapted from RAP's ShapeFactory class.
| Field Summary | |
|---|---|
static String |
AIRPLANE
Id for a 2-D airplane shape |
static String |
AIRPLANE3D
Id for a 3-D airplane shape |
static float |
B_Y
coordinates |
static float |
C_X
coordinates |
static float |
C_Y
coordinates |
static float |
C_Z
coordinates |
static String |
CIRCLE
shape name from WeatherSymbols |
static String |
CROSS
Id for a cross shape |
static String |
CUBE
Id for a cube shape |
static float |
D_Z
coordinates |
static String |
DIAMOND
shape name from WeatherSymbols |
static String |
DOWNARROW
Id for a plus shape |
static String |
DOWNLINE
Id for a plus shape |
static String |
FILLED_CIRCLE
shape name from WeatherSymbols |
static String |
FILLED_DIAMOND
shape name from WeatherSymbols |
static String |
FILLED_SPHERE
Id for a filled triangle shape |
static String |
FILLED_SQUARE
Id for a filled square shape |
static String |
FILLED_STAR
shape name from WeatherSymbols |
static String |
FILLED_TRIANGLE
Id for a filled triangle shape |
static String |
HORLINE
Id for a horizontal line shape |
static float |
L_X
coordinates |
static String |
LEFTARROW
Id for a plus shape |
static float |
MB_Y
coordinates |
static String |
MINUS
Id for a plus shape |
static int |
MISC_ID_CIRCLE
The identifier for a circle station location marker |
static int |
MISC_ID_DIAMOND
The identifier for a diamond station location marker |
static int |
MISC_ID_FILLED_CIRCLE
The identifier for a filled circle station location marker |
static int |
MISC_ID_FILLED_DIAMOND
The identifier for a filled diamond station location marker |
static int |
MISC_ID_FILLED_SQUARE
The identifier for a filled square station location marker |
static int |
MISC_ID_FILLED_STAR
The identifier for a filled start station location marker |
static int |
MISC_ID_FILLED_TRIANGLE
The identifier for a filled triangle station location marker |
static int |
MISC_ID_MINUS
The identifier for a minus station location marker |
static int |
MISC_ID_PIN
The identifier for a pin station location marker |
static int |
MISC_ID_PLUS
The identifier for a plus station location marker |
static int |
MISC_ID_SQUARE
The identifier for a square station location marker |
static int |
MISC_ID_STAR
The identifier for a star station location marker |
static int |
MISC_ID_TRIANGLE
The identifier for a triangle station location marker |
static int[] |
MISC_IDS
shape ids from WeatherSymbols |
static String[] |
MISC_NAMES
shape names from WeatherSymbols |
static float |
ML_X
coordinates |
static float |
MR_X
coordinates |
static float |
MT_Y
coordinates |
static String |
NONE
Id for a null shape |
static String |
PIN
shape id |
static String |
PLUS
Id for a plus shape |
static String |
PYRAMID_4FACE
Id for a pyramid of 4 faces (triangular base) |
static String |
PYRAMID_5FACE
Id for a pyramid of 5 faces (square base) |
static float |
R_X
coordinates |
static String |
RIGHTARROW
Id for a plus shape |
static TwoFacedObject[] |
SHAPES
Array of all of the shapes |
static String |
SQUARE
Id for a square (unfilled) shape |
static String |
STAR
shape name from WeatherSymbols |
static float |
T_Y
coordinates |
static double[] |
TEXT_BASE
use in text calls |
static double[] |
TEXT_START
use in text calls |
static double[] |
TEXT_UP
use in text calls |
static String |
TRIANGLE
Id for a triangle (unfilled) shape |
static float |
U_Z
coordinates |
static String |
UPARROW
Id for a plus shape |
static String |
VERTLINE
Id for a vertical line shape |
| Constructor Summary | |
|---|---|
ShapeUtility()
Default constructor |
|
| Method Summary | |
|---|---|
static void |
blendColor(VisADGeometryArray shape,
Color color)
Blend the color for the shape specified with color. |
static void |
blendColor(VisADGeometryArray shape,
float R,
float G,
float B)
Blend the color for the shape specified with RGB components specified |
static Rectangle2D |
bounds2d(VisADGeometryArray shape)
Return the bounds of this shape |
static Rectangle2D |
bounds2d(VisADGeometryArray[] shapes)
Return the bounds of array of shapes |
static Rectangle2D |
bounds2d(VisADGeometryArray shape,
Rectangle2D rect)
Return the bounds of this shape |
static VisADGeometryArray[] |
clone(VisADGeometryArray[] shapes)
Do a deep clone of the given shapes array |
static VisADGeometryArray[] |
createShape(String s)
Create a shape from a string name |
static VisADGeometryArray |
makeShape(String s)
Deprecated. Use create shape |
static VisADGeometryArray |
offset(VisADGeometryArray shape,
float[] off)
Offset the shape by the amounts in off. |
static VisADGeometryArray |
offset(VisADGeometryArray shape,
float dx,
float dy,
float dz)
Offset the shape by the amounts in off. |
static void |
reScale(VisADGeometryArray[] shapes,
double scale)
Rescale the shapes |
static void |
reScale(VisADGeometryArray[] shapes,
double[] scale)
Rescale the shapes |
static void |
reScale(VisADGeometryArray[] shapes,
double[] scaleArray,
double scale)
Rescale the shapes |
static void |
reScale(VisADGeometryArray shape,
double scale)
Rescale the shape |
static void |
reScale(VisADGeometryArray shape,
double[] scale)
Rescale the shape |
static void |
reScale(VisADGeometryArray shape,
double[] scaleArray,
double scale)
Rescale the shape |
static void |
rotate(VisADGeometryArray shape,
float angle)
Rotate the given shape about the z axis the given angle (in radians). |
static void |
rotateX(VisADGeometryArray shape,
float angle)
Rotate the given shape about the x axis the given angle (in radians). |
static void |
rotateY(VisADGeometryArray shape,
float angle)
Rotate the given shape about the y axis the given angle (in radians). |
static void |
rotateZ(VisADGeometryArray shape,
float angle)
Rotate the given shape about the z axis the given angle (in radians). |
static void |
setColor(VisADGeometryArray[] shapes,
Color color)
Set the color for the shapes in the array. |
static void |
setColor(VisADGeometryArray[] shapes,
float[] RGB)
Set the color for the shapes in the array. |
static void |
setColor(VisADGeometryArray shape,
Color color)
Set the color for the shape specified. |
static void |
setColor(VisADGeometryArray shape,
float[] RGB)
Set the color for the shape specified. |
static void |
setColor(VisADGeometryArray shape,
float R,
float G,
float B)
Set the color for the shape specified. |
static VisADGeometryArray[] |
setSize(VisADGeometryArray[] shapes,
float size)
Set the size of the shapes. |
static VisADGeometryArray |
setSize(VisADGeometryArray shape,
float size)
Set the size of the shapes. |
static VisADGeometryArray |
setSize(VisADGeometryArray shape,
float x,
float y,
float z)
Set the size of the shapes. |
static VisADGeometryArray |
shapeFont(String s,
Font f)
Wrapper for PlotText using font. |
static VisADGeometryArray |
shapeFont(String s,
Font f,
boolean center)
Wrapper for PlotText. |
static VisADGeometryArray |
shapeText(String s)
Wrapper for PlotText. |
static VisADGeometryArray |
shapeText(String s,
boolean center)
Wrapper for PlotText. |
static VisADGeometryArray |
shapeText(String s,
int fontSize,
boolean center)
Wrapper for PlotText. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double[] TEXT_START
public static final double[] TEXT_BASE
public static final double[] TEXT_UP
public static final String PLUS
public static final String MINUS
public static final String DOWNLINE
public static final String RIGHTARROW
public static final String LEFTARROW
public static final String UPARROW
public static final String DOWNARROW
public static final String HORLINE
public static final String VERTLINE
public static final String CROSS
public static final String SQUARE
public static final String NONE
public static final String FILLED_SQUARE
public static final String CUBE
public static final String PYRAMID_4FACE
public static final String PYRAMID_5FACE
public static final String TRIANGLE
public static final String FILLED_TRIANGLE
public static final String FILLED_SPHERE
public static final String AIRPLANE
public static final String AIRPLANE3D
public static final String PIN
public static final int MISC_ID_SQUARE
public static final int MISC_ID_FILLED_SQUARE
public static final int MISC_ID_CIRCLE
public static final int MISC_ID_FILLED_CIRCLE
public static final int MISC_ID_TRIANGLE
public static final int MISC_ID_FILLED_TRIANGLE
public static final int MISC_ID_DIAMOND
public static final int MISC_ID_FILLED_DIAMOND
public static final int MISC_ID_STAR
public static final int MISC_ID_FILLED_STAR
public static final int MISC_ID_PLUS
public static final int MISC_ID_PIN
public static final int MISC_ID_MINUS
public static final String CIRCLE
public static final String FILLED_CIRCLE
public static final String DIAMOND
public static final String FILLED_DIAMOND
public static final String STAR
public static final String FILLED_STAR
public static final String[] MISC_NAMES
public static final int[] MISC_IDS
public static final TwoFacedObject[] SHAPES
public static final float L_X
public static final float ML_X
public static final float C_X
public static final float MR_X
public static final float R_X
public static final float T_Y
public static final float MT_Y
public static final float C_Y
public static final float MB_Y
public static final float B_Y
public static final float D_Z
public static final float C_Z
public static final float U_Z
| Constructor Detail |
|---|
public ShapeUtility()
| Method Detail |
|---|
public static VisADGeometryArray makeShape(String s)
setSize() methods to rescale.
s - shape to create
public static VisADGeometryArray[] createShape(String s)
s - name of the staring
public static VisADGeometryArray shapeText(String s)
s - string to turn into a shape.
public static VisADGeometryArray shapeText(String s,
boolean center)
s - string to turn into a shape.center - center the text
public static VisADGeometryArray shapeText(String s,
int fontSize,
boolean center)
s - string to turn into a shape.fontSize - the font sizecenter - center the text
public static VisADGeometryArray shapeFont(String s,
Font f)
s - string to turn into a shape.f - font to use
public static VisADGeometryArray shapeFont(String s,
Font f,
boolean center)
s - string to turn into a shape.f - font to usecenter - center the text
public static VisADGeometryArray[] setSize(VisADGeometryArray[] shapes,
float size)
shapes - shapes to resizesize - scaling factor
public static VisADGeometryArray setSize(VisADGeometryArray shape,
float size)
shape - shapes to resizesize - scaling factor
public static VisADGeometryArray setSize(VisADGeometryArray shape,
float x,
float y,
float z)
shape - shapes to resizex - scaling factory - scaling factorz - scaling factor
public static VisADGeometryArray offset(VisADGeometryArray shape,
float[] off)
shape - shape to offsetoff - offset (x, y, z)
public static VisADGeometryArray offset(VisADGeometryArray shape,
float dx,
float dy,
float dz)
shape - shape to offsetdx - delta xdy - delta ydz - delta z
public static Rectangle2D bounds2d(VisADGeometryArray shape)
shape - shape to bound
public static Rectangle2D bounds2d(VisADGeometryArray shape,
Rectangle2D rect)
shape - shape to boundrect - The rectangle to set. If null then create a new one.
public static Rectangle2D bounds2d(VisADGeometryArray[] shapes)
shapes - shape to bound
public static void setColor(VisADGeometryArray[] shapes,
Color color)
shapes - array of shapes to colorcolor - color to use.
public static void setColor(VisADGeometryArray[] shapes,
float[] RGB)
shapes - array of shapes to colorRGB - array of color components (R, G, B) to use.
public static void setColor(VisADGeometryArray shape,
Color color)
shape - shape to colorcolor - color to use.
public static void blendColor(VisADGeometryArray shape,
Color color)
shape - shape to colorcolor - color to use for blending.
public static void setColor(VisADGeometryArray shape,
float R,
float G,
float B)
shape - shape to colorR - red color componentG - green color componentB - blue color component
public static void setColor(VisADGeometryArray shape,
float[] RGB)
shape - shape to colorRGB - array of color components (R, G, B) to use.
public static void blendColor(VisADGeometryArray shape,
float R,
float G,
float B)
shape - shape to colorR - red color componentG - green color componentB - blue color component
public static void reScale(VisADGeometryArray[] shapes,
double scale)
shapes - shapes to scalescale - scale factor
public static void reScale(VisADGeometryArray shape,
double scale)
shape - shape to scalescale - scale factor
public static void reScale(VisADGeometryArray[] shapes,
double[] scale)
shapes - shapes to scalescale - xyz scale factor
public static void reScale(VisADGeometryArray[] shapes,
double[] scaleArray,
double scale)
shapes - shapes to scalescaleArray - xyz scale factorscale - extra scale factorpublic static VisADGeometryArray[] clone(VisADGeometryArray[] shapes)
shapes - shape to clone
public static void reScale(VisADGeometryArray shape,
double[] scale)
shape - shape to scalescale - xyz scale factor
public static void reScale(VisADGeometryArray shape,
double[] scaleArray,
double scale)
shape - shape to scalescaleArray - xyz scale factorscale - scale factor
public static void rotate(VisADGeometryArray shape,
float angle)
shape - The shape to rotateangle - Radians
public static void rotateZ(VisADGeometryArray shape,
float angle)
shape - The shape to rotateangle - Radians
public static void rotateX(VisADGeometryArray shape,
float angle)
shape - The shape to rotateangle - Radians
public static void rotateY(VisADGeometryArray shape,
float angle)
shape - The shape to rotateangle - Radians
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||