|
Diamond Control Suite 3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent diamondedge.swing.DsLine
public class DsLine
A component that will display a line in the bounds of the component. This component allows lines to be added from an IDE and layed out with other components on the screen. The line is drawn by default from the lower left corner to the upper right. The slantUp property will reverse the direction. Setting the width or height to 0 or the line width will cause the line to be horizontal or vertical.
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 |
---|
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 | |
---|---|
DsLine()
Creates a DsLine with a solid line style. |
|
DsLine(int style)
Creates a DsLine with the specified style. |
Method Summary | |
---|---|
Paint |
getLineColor()
Returns the color used to draw the line. |
int |
getLineStyle()
Returns the style used to draw the line. |
double |
getLineWidth()
Returns the width of the line. |
boolean |
isLineSlantingUp()
Returns the direction the line is sloping in the bounding box. |
void |
paint(Graphics g)
|
void |
setBounds(int x,
int y,
int width,
int height)
|
void |
setForeground(Color c)
Sets the line color property. |
void |
setLineColor(Paint color)
Sets the color used to draw the line. |
void |
setLineSlantingUp(boolean slantUp)
Sets the direction the line is sloping in the bounding box. |
void |
setLineStyle(int style)
Sets the style used to draw the line. |
void |
setLineWidth(double width)
Sets the width of the line drawn. |
void |
updateUI()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DsLine()
public DsLine(int style)
setLineStyle(int)
Method Detail |
---|
public void updateUI()
updateUI
in class JComponent
public void paint(Graphics g)
paint
in class JComponent
public void setForeground(Color c)
setForeground
in class JComponent
public Paint getLineColor()
public void setLineColor(Paint color)
public double getLineWidth()
public void setLineWidth(double width)
public int getLineStyle()
public void setLineStyle(int style)
style
- One of: TRANSPARENT, SOLID, DASH, DOT, DASH_DOT, DASH_DOT_DOT
public boolean isLineSlantingUp()
public void setLineSlantingUp(boolean slantUp)
If you want a vertical line set the width to 1. If you want a horizontal line set the height to 1.
slantUp
- true
means the line starts in lower left corner and is drawn up to the upper right corner.
false
means the line starts in upper left corner and is drawn down to the lower right corner.public void setBounds(int x, int y, int width, int height)
setBounds
in class Component
|
Diamond Control Suite 3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |