|
Diamond Control Suite 3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
diamondedge.swing.DsShape
public class DsShape
A component that will display a basic shape in the bounds of the component. This component allows shapes to be added from an IDE and layed out with other components on the screen.
If the shape is set to opaque then the background color is used to paint the background of the shape. This is useful in combination with a fill style pattern.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
CIRCLE
|
static int |
OVAL
|
static int |
RECTANGLE
|
static int |
ROUNDED_RECTANGLE
|
static int |
ROUNDED_SQUARE
|
static int |
SQUARE
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface diamondedge.swing.DsConstants |
---|
ACCOUNTING, ALL, ASCENDING, ASCENDING_CASE, BORDER_BOTTOM, BORDER_LEFT, BORDER_NONE, BORDER_OUTLINE, BORDER_RIGHT, BORDER_TOP, CROSS_LINES, DASH, DASH_DOT, DASH_DOT_DOT, DEFAULT, DESCENDING, DESCENDING_CASE, DIAGONAL_CROSS_LINES, DOT, DOUBLE, DOUBLE_LINE, DOWNWARD_DIAGONAL_LINES, ETCHED, ETCHED_RAISED, FALSE, FIND_ALL, FIND_EQUALS, FIND_GT, FIND_GTE, FIND_LT, FIND_LTE, FIND_NE, FIND_PREFIX, FIND_REGEX, FIND_STRING, FIRST, FLAT, GRID_DASH, GRID_DASH_DOT, GRID_DASH_DOT_DOT, GRID_DOT, GRID_LINE, HIGHLIGHT_SELECTION_ALWAYS, HIGHLIGHT_SELECTION_NEVER, HIGHLIGHT_SELECTION_WITH_FOCUS, HORIZONTAL_LINES, LOWERED, LOWERED_LIGHT, NONE, RAISED, RAISED_LIGHT, SELECT_CELL, SELECT_NONE, SELECT_ROW, SINGLE, SINGLE_LINE, SOLID, STRETCH, TILE, TRANSPARENT, TRUE, UPWARD_DIAGONAL_LINES, VERTICAL_LINES |
Fields inherited from interface javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
DsShape()
Creates a DsShape which will draw various different shapes on its parent surface |
|
DsShape(int shape)
Creates a DsShape which will draw the specified shape on its parent surface. |
Method Summary | |
---|---|
Paint |
getBorderColor()
Returns the color used to draw the border. |
int |
getBorderStyle()
Returns the style used to draw the border. |
double |
getBorderWidth()
Returns the width of the border drawn around the shape. |
Paint |
getFillColor()
Returns the color or Paint object used to fill in the shape. |
int |
getFillStyle()
Returns the style used to fill in the shape. |
int |
getShape()
Returns a value indicating the type of shape to be drawn. |
void |
paint(Graphics g)
|
void |
setBorderColor(Paint color)
Sets the color used to draw the border. |
void |
setBorderStyle(int style)
Sets the style used to draw the border. |
void |
setBorderWidth(double width)
Sets the width of the border drawn around the shape. |
void |
setFillColor(Paint color)
Sets the color or Paint object used to fill in the shape. |
void |
setFillStyle(int style)
Sets the style used to draw inside the shape using the FillColor. |
void |
setShape(int shape)
Sets a value indicating the type of shape to be drawn. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int RECTANGLE
public static final int SQUARE
public static final int OVAL
public static final int CIRCLE
public static final int ROUNDED_RECTANGLE
public static final int ROUNDED_SQUARE
Constructor Detail |
---|
public DsShape()
public DsShape(int shape)
shape
- One of: RECTANGLE, SQUARE, OVAL, CIRCLE, ROUNDED_RECTANGLE, ROUNDED_SQUARE
Method Detail |
---|
public void paint(Graphics g)
paint
in class JComponent
public Paint getBorderColor()
public void setBorderColor(Paint color)
public double getBorderWidth()
public void setBorderWidth(double width)
public int getBorderStyle()
public void setBorderStyle(int style)
style
- One of: TRANSPARENT, SOLID, DASH, DOT, DASH_DOT, DASH_DOT_DOT
public Paint getFillColor()
public void setFillColor(Paint color)
setFillStyle(int)
public int getFillStyle()
public void setFillStyle(int style)
style
- One of: TRANSPARENT, SOLID, VERTICAL_LINE, HORIZONTAL_LINE, CROSS_LINES, DOWNWARD_DIAGONAL_LINE, UPWARD_DIAGONAL_LINE, DIAGONAL_CROSS_LINES
public int getShape()
public void setShape(int shape)
shape
- One of: RECTANGLE, SQUARE, OVAL, CIRCLE, ROUNDED_RECTANGLE, ROUNDED_SQUARE
|
Diamond Control Suite 3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |