Class sgraphics.figure.FigureKit
All Packages Class Hierarchy This Package Previous Next Index
Class sgraphics.figure.FigureKit
java.lang.Object
|
+----sgraphics.figure.FigureKit
- public class FigureKit
- extends Object
A kit for figures.
-
FigureKit()
-
-
blinkingLabel(FigureStyle, String)
- Get a blinking label.
-
circle(int, FigureStyle, float, float, float)
- Get a circle.
-
hiddenLabel(FigureStyle, String)
- Get a hidden label.
-
image(Image)
- Get an image figure.
-
image(Image, float, float)
- Get an image figure.
-
insertBar(FigureStyle)
- Get an insert bar.
-
label(FigureStyle, String)
- Get a label.
-
line(FigureStyle, float, float, float, float)
- Get a line.
-
oval(int, FigureStyle, float, float, float, float)
- Get a oval.
-
rectangle(int, FigureStyle, float, float, float, float)
- Get a rectangle.
-
verticalLabel(FigureStyle, String)
- Get a vertical label.
FigureKit
public FigureKit()
rectangle
public static Figure rectangle(int mode,
FigureStyle s,
float x1,
float y1,
float x2,
float y2)
- Get a rectangle.
- Parameters:
- mode - the mode of the figure. FigureMode.Stroke, FigureMode.Fill, or FigureMode.FillStroke.
- s - the style of the figure.
- x1 - the upper left x position.
- y1 - the upper left y position.
- x2 - the lower left x position.
- y2 - the lower left y position.
- Returns:
- the rectangle.
- See Also:
- FigureMode, FigureStyle
oval
public static Figure oval(int mode,
FigureStyle s,
float x1,
float y1,
float x2,
float y2)
- Get a oval.
- Parameters:
- mode - the mode of the figure. FigureMode.Stroke, FigureMode.Fill, or FigureMode.FillStroke.
- s - the style of the figure.
- x1 - the upper left x position.
- y1 - the upper left y position.
- x2 - the lower left x position.
- y2 - the lower left y position.
- Returns:
- the oval.
- See Also:
- FigureMode, FigureStyle
circle
public static Figure circle(int mode,
FigureStyle s,
float x,
float y,
float d)
- Get a circle.
- Parameters:
- mode - the mode of the figure. FigureMode.Stroke, FigureMode.Fill, or FigureMode.FillStroke.
- s - the style of the figure.
- x - the upper left x position.
- y - the upper left y position.
- d - the diameter.
- Returns:
- the circle.
- See Also:
- FigureMode, FigureStyle
line
public static Figure line(FigureStyle s,
float x1,
float y1,
float x2,
float y2)
- Get a line.
- Parameters:
- s - the style of the figure.
- x1 - the first x position.
- y1 - the first y position.
- x2 - the second x position.
- y2 - the second y position.
- Returns:
- the line.
- See Also:
- FigureStyle
label
public static Figure label(FigureStyle s,
String text)
- Get a label. The event generated is modified to reflect the
character position in the label. (0, 0) is the first character.
(1, 0) is the second character, etc.
A label is not scaleable, nor is its position. Therefore, it is
of no use on a CanvasGlyph.
Only chars 0-255 are supported.
- Parameters:
- s - the style of the figure.
- text - the string of the label.
- Returns:
- the label.
- See Also:
- FigureStyle
verticalLabel
public static Figure verticalLabel(FigureStyle s,
String text)
- Get a vertical label. The event generated is modified to reflect the
character position in the label. (0, 0) is the first character.
(1, 0) is the second character, etc.
A label is not scaleable, nor is its position. Therefore, it is
of no use on a CanvasGlyph.
Only chars 0-255 are supported.
- Parameters:
- s - the style of the figure.
- text - the string of the label.
- Returns:
- the label.
- See Also:
- FigureStyle
blinkingLabel
public static Figure blinkingLabel(FigureStyle s,
String text)
- Get a blinking label.
- Parameters:
- s - the style of the figure.
- text - the string of the label.
- Returns:
- the label.
- See Also:
- FigureStyle
hiddenLabel
public static Figure hiddenLabel(FigureStyle s,
String text)
- Get a hidden label. A hidden label takes up space, but does not draw it self.
Picking is still enabled.
- Parameters:
- s - the style of the figure.
- text - the string of the label.
- Returns:
- the label.
- See Also:
- FigureStyle
image
public static Figure image(Image image)
- Get an image figure. The image will not stretch or shrink. The image will give a
requirement of 0 until the image is loaded. The figure will observe the image
and call needRedraw() when the image is loaded. Therefore, large images
may not align properly and then suddenly they will be redrawn when they are
fully laoded.
- Parameters:
- image - the image to use.
image
public static Figure image(Image image,
float width,
float height)
- Get an image figure. The image will not stretch or shrink.
- Parameters:
- image - the image to use.
- width - the width of the image.
- height - the height of the image.
insertBar
public static Figure insertBar(FigureStyle s)
- Get an insert bar. The font of the FigureStyle should be set so that
the bar can calculate its alignment.
- Parameters:
- s - the style of the figure.
- Returns:
- the bar.
- See Also:
- FigureStyle
All Packages Class Hierarchy This Package Previous Next Index