|
Oxygen XML Editor 12.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Graphics
The graphics interface used to draw schema diagram.
Field Summary | |
---|---|
static int |
FILL_PATTERN_SQUARE
A pattern of squares. |
static int |
ICON_COMMENT_TREE
Icon code for comment nodes. |
static int |
ICON_PROCESSING_INSTRUCTION_TREE
Icon code for processing instruction nodes. |
static int |
ICON_TEXT_TREE
Icon code for text nodes. |
static int |
IMAGE_EXPANSION_BAR_BOTTOM
Image representing the bottom arrow of the expansion bar. |
static int |
IMAGE_EXPANSION_BAR_COLLAPSED
Image representing an arrow for the collapsed expansion bar. |
static int |
IMAGE_EXPANSION_BAR_MIDDLE_GRADIENT
Image representing the middle of the expansion bar gradient. |
static int |
IMAGE_EXPANSION_BAR_TOP
Image representing the top arrow of the expansion bar. |
static int |
STROKE_DASHED
Dotted stroke |
static int |
STROKE_DOT_DASH
Dot-dash stroke |
static int |
STROKE_DOT_DOT_DASH
Dot-dot-dash stroke |
static int |
STROKE_DOTTED
Dotted stroke |
static int |
STROKE_NORMAL
Normal stroke |
static int |
STROKE_WAVY
Wavy stroke |
Method Summary | |
---|---|
void |
activateAntialiasing()
Activate the antialiasing mode. |
Font |
deriveSize(Font current,
int size)
Derive the size of the font |
Font |
deriveStyle(Font current,
int style)
Derive the style of the font |
void |
disableAntialiasing()
Disable the antialiasing mode. |
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
draws an arc. |
void |
drawIcon(java.lang.Object hostComponent,
int iconCode,
int x,
int y)
Draw the icon at (x,y) coordinates. |
void |
drawImage(java.lang.Object image,
int x,
int y)
Draw an image object depending on the platform |
void |
drawImage(java.lang.Object image,
int x,
int y,
int width,
int height)
Draw an image object depending on the platform. |
void |
drawLine(int x1,
int y1,
int x2,
int y2)
Draw a line from (x1, y1) to (x2, y2). |
void |
drawOval(int x,
int y,
int width,
int height)
Draw an oval. |
void |
drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Draw a closed polygon defined by arrays of x and y coordinates. |
void |
drawPolyline(int[] xpoints,
int[] ypoints,
int npoints)
Draws a polyline which is not closed if the last point differs from the first. |
void |
drawRect(int x,
int y,
int width,
int height)
Draw a rect with (x,y) top-left corner. |
void |
drawShadow(Shape shape,
int displacement)
Draws a shadow using the shape of the polygon. |
void |
drawShape(Shape shape)
Draw a shape |
void |
drawString(java.lang.String text,
int x,
int y)
Draw a string. |
void |
fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Fills an arc. |
void |
fillOval(int x,
int y,
int width,
int height)
Fill an oval with curent fill color. |
void |
fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Fills a closed polygon defined by arrays of x and y coordinates. |
void |
fillRect(int x,
int y,
int width,
int height)
Fill a rect with (x,y) top-left corner. |
void |
fillRect(int x,
int y,
int width,
int height,
int fillPattern,
Color fillColor)
Fills a rectangle with a pattern. |
void |
fillRect(Rectangle rectangle)
Fill a rectangle. |
void |
fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Fills the specified rounded corner rectangle. |
void |
fillShape(Shape shape)
Fill a shape |
void |
fillWithGradient(Ellipse ellipse,
Color startColorCode,
Color endColorCode,
boolean isVertical)
|
void |
fillWithGradient(Rectangle rect,
Color startColorCode,
Color endColorCode,
boolean isVertical)
|
void |
fillWithGradient(Shape shape,
Color startColorCode,
Color endColorCode,
boolean isVertical)
|
java.lang.Object |
getAntialiasing()
|
Rectangle |
getClipBounds()
|
Color |
getDrawColor()
Get the current color code. |
Color |
getFillColor()
Get the color code for fill shapes. |
Font |
getFont()
Get current font. |
FontMetrics |
getFontMetrics(Font font)
|
int |
getStrokeType()
|
int |
getStrokeWidth()
|
void |
setAntialiasing(java.lang.Object value)
|
void |
setDrawColor(Color colorCode)
Set the color for draw methods. |
void |
setFillColor(Color colorCode)
Set the color for fill methods. |
void |
setFont(Font font)
Set the new font. |
void |
setStroke(int width,
int type)
Sets the line width for the stroke. |
Field Detail |
---|
static final int ICON_TEXT_TREE
static final int ICON_COMMENT_TREE
static final int ICON_PROCESSING_INSTRUCTION_TREE
static final int IMAGE_EXPANSION_BAR_TOP
static final int IMAGE_EXPANSION_BAR_BOTTOM
static final int IMAGE_EXPANSION_BAR_MIDDLE_GRADIENT
static final int IMAGE_EXPANSION_BAR_COLLAPSED
static final int STROKE_NORMAL
static final int STROKE_DOTTED
static final int STROKE_DASHED
static final int STROKE_WAVY
static final int STROKE_DOT_DASH
static final int STROKE_DOT_DOT_DASH
static final int FILL_PATTERN_SQUARE
Method Detail |
---|
void setFont(Font font)
font
- The font to be used.void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
xPoints
- a an array of x
coordinates.yPoints
- a an array of y
coordinates.nPoints
- a the total number of points.void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
xPoints
- a an array of x
coordinates.yPoints
- a an array of y
coordinates.nPoints
- a the total number of points.Font getFont()
void drawString(java.lang.String text, int x, int y)
text
- The text to be drawn.x
- The x coordinate.y
- The y coordinate(top-left).Color getDrawColor()
void drawLine(int x1, int y1, int x2, int y2)
x1
- x of first point.y1
- y of first point.x2
- x of second point.y2
- y of second point.void fillRect(int x, int y, int width, int height)
x
- The x coordinate.y
- The y coordinate.width
- The rect width.height
- The rect height.void fillRect(Rectangle rectangle)
rectangle
- The rectangle.void drawRect(int x, int y, int width, int height)
x
- The x coordinate.y
- The y coordinate.width
- The rect width.height
- The rect height.void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
x
- the x coordinate of the rectangle to be filled.y
- the y coordinate of the rectangle to be filled.width
- the width of the rectangle to be filled.height
- the height of the rectangle to be filled.arcWidth
- the horizontal diameter
of the arc at the four corners.arcHeight
- the vertical diameter
of the arc at the four corners.void drawPolyline(int[] xpoints, int[] ypoints, int npoints)
xpoints
- The xpoints array.ypoints
- The ypoints array.npoints
- The number of points.void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
x
- the x coordinate of the
upper-left corner of the arc to be drawn.y
- the y coordinate of the
upper-left corner of the arc to be drawn.width
- the width of the arc to be drawn.height
- the height of the arc to be drawn.startAngle
- the beginning angle.arcAngle
- the angular extent of the arc,
relative to the start angle.void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
x
- the x coordinate of the
upper-left corner of the arc to be drawn.y
- the y coordinate of the
upper-left corner of the arc to be drawn.width
- the width of the arc to be drawn.height
- the height of the arc to be drawn.startAngle
- the beginning angle.arcAngle
- the angular extent of the arc,
relative to the start angle.void setStroke(int width, int type)
width
- The width value.type
- The stroke type.int getStrokeWidth()
int getStrokeType()
Rectangle getClipBounds()
void setFillColor(Color colorCode)
colorCode
- The color code used by fill methods.void setDrawColor(Color colorCode)
colorCode
- The color code used by draw methods.void drawIcon(java.lang.Object hostComponent, int iconCode, int x, int y)
hostComponent
- Icon implementations may use the HostComponent argument to
get properties useful for painting, e.g. the foreground or background color.iconCode
- The icon code.x
- The x coordinate.y
- The y coordinate.void drawOval(int x, int y, int width, int height)
x
- The x coordinate.y
- The y coordinate.width
- The width.height
- The height.Color getFillColor()
void fillOval(int x, int y, int width, int height)
x
- The x coordinate.y
- The y coordinate.width
- The width.height
- The height.void fillWithGradient(Rectangle rect, Color startColorCode, Color endColorCode, boolean isVertical)
rect
- The rect to fill with a gradientstartColorCode
- Start color of gradientendColorCode
- End color of gradient.isVertical
- True if the gradient should be vertical.void fillShape(Shape shape)
shape
- The shapevoid drawShape(Shape shape)
shape
- The shapeFontMetrics getFontMetrics(Font font)
font
- The font
Font deriveStyle(Font current, int style)
current
- Current fontstyle
- New style
Font deriveSize(Font current, int size)
current
- Current fontsize
- New size
void drawImage(java.lang.Object image, int x, int y)
image
- The image datax
- image Xy
- image Yvoid drawImage(java.lang.Object image, int x, int y, int width, int height)
image
- The image datax
- image Xy
- image Ywidth
- image widthheight
- image heightvoid fillRect(int x, int y, int width, int height, int fillPattern, Color fillColor)
x
- The left corner x coordinate.y
- The left corner y coordinatewidth
- The width of the rectangle.height
- The hight of the rectangle.fillPattern
- One this class constants that begin with FILL_PATTERN_fillColor
- The color for building the pattern.void drawShadow(Shape shape, int displacement)
shape
- The shape of the real object.displacement
- The size of the shadow. This is the displacement to the original object, on X and Y.void fillWithGradient(Ellipse ellipse, Color startColorCode, Color endColorCode, boolean isVertical)
ellipse
- The ellipse to fill with a gradientstartColorCode
- Start color of gradientendColorCode
- End color of gradient.isVertical
- True if the gradient should be vertical.void fillWithGradient(Shape shape, Color startColorCode, Color endColorCode, boolean isVertical)
shape
- The shape to fill with a gradientstartColorCode
- Start color of gradientendColorCode
- End color of gradient.isVertical
- True if the gradient should be vertical.void setAntialiasing(java.lang.Object value)
value
- The antialising value to be set depending on the platform.java.lang.Object getAntialiasing()
void activateAntialiasing()
void disableAntialiasing()
|
Oxygen XML Editor 12.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |