java.lang.Objectcom.pdfjet.Point
public class Point
Used to create point objects with different shapes and draw them on a page. Please note: When we are mentioning (x, y) coordinates of a point - we are talking about the coordinates of the center of the point. Please see Example_05.
| Field Summary | |
|---|---|
static int |
BOX
|
static int |
CIRCLE
|
static boolean |
CONTROL_POINT
|
static int |
DIAMOND
|
static int |
DOWN_ARROW
|
static int |
H_DASH
|
static int |
INVISIBLE
|
static int |
LEFT_ARROW
|
static int |
MULTIPLY
|
static int |
PLUS
|
static int |
RIGHT_ARROW
|
static int |
STAR
|
static int |
UP_ARROW
|
static int |
V_DASH
|
static int |
X_MARK
|
| Constructor Summary | |
|---|---|
Point()
The default constructor. |
|
Point(double x,
double y)
Constructor for creating point objects. |
|
Point(double x,
double y,
boolean isControlPoint)
Constructor for creating point objects. |
|
Point(float x,
float y)
Constructor for creating point objects. |
|
Point(float x,
float y,
boolean isControlPoint)
Constructor for creating point objects. |
|
| Method Summary | |
|---|---|
float[] |
drawOn(Page page)
Draws this point on the specified page. |
int |
getAlignment()
Returns the point alignment. |
int |
getColor()
Returns the point color as an integer. |
boolean |
getFillShape()
Returns the value of the fillShape private variable. |
java.lang.String |
getLinePattern()
Returns the line dash pattern. |
float |
getLineWidth()
Returns the width of the lines used to draw this point. |
float |
getRadius()
Returns the radius of this point. |
int |
getShape()
Returns the point shape code value. |
java.lang.String |
getText()
Returns the text associated with this point. |
int |
getTextColor()
Returns the point's text color. |
int |
getTextDirection()
Returns the point's text direction. |
java.lang.String |
getURIAction()
Returns the URI for the "click point" action. |
float |
getX()
Returns the x coordinate of this point. |
float |
getY()
Returns the y coordinate of this point. |
void |
placeIn(Box box)
Places this point in the specified box at position (0f, 0f). |
void |
placeIn(Box box,
double x_offset,
double y_offset)
Places this point in the specified box. |
void |
placeIn(Box box,
float x_offset,
float y_offset)
Places this point in the specified box. |
void |
setAlignment(int align)
Sets the point alignment inside table cell. |
void |
setColor(int color)
Sets the pen color for this point. |
void |
setDrawLineTo(boolean drawLineTo)
Deprecated. Please use the setStartOfPath method. See Example_40. |
void |
setFillShape(boolean fillShape)
Sets the private fillShape variable. |
void |
setLinePattern(java.lang.String linePattern)
The line dash pattern controls the pattern of dashes and gaps used to stroke paths. |
void |
setLineWidth(double lineWidth)
Sets the width of the lines of this point. |
void |
setLineWidth(float lineWidth)
Sets the width of the lines of this point. |
void |
setLocation(float x,
float y)
Sets the location (x, y) of this point. |
void |
setPosition(double x,
double y)
Sets the position (x, y) of this point. |
void |
setPosition(float x,
float y)
Sets the position (x, y) of this point. |
void |
setRadius(double r)
Sets the radius of this point. |
void |
setRadius(float r)
Sets the radius of this point. |
void |
setShape(int shape)
Sets the shape of this point. |
void |
setStartOfPath()
Sets this point as the start of a path that will be drawn on the chart. |
void |
setText(java.lang.String text)
Sets the point text. |
void |
setTextColor(int textColor)
Sets the point's text color. |
void |
setTextDirection(int textDirection)
Sets the point's text direction. |
void |
setURIAction(java.lang.String uri)
Sets the URI for the "click point" action. |
void |
setX(double x)
Sets the x coordinate of this point. |
void |
setX(float x)
Sets the x coordinate of this point. |
void |
setY(double y)
Sets the y coordinate of this point. |
void |
setY(float y)
Sets the y coordinate of this point. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INVISIBLE
public static final int CIRCLE
public static final int DIAMOND
public static final int BOX
public static final int PLUS
public static final int H_DASH
public static final int V_DASH
public static final int MULTIPLY
public static final int STAR
public static final int X_MARK
public static final int UP_ARROW
public static final int DOWN_ARROW
public static final int LEFT_ARROW
public static final int RIGHT_ARROW
public static final boolean CONTROL_POINT
| Constructor Detail |
|---|
public Point()
public Point(double x,
double y)
x - the x coordinate of this point when drawn on the page.y - the y coordinate of this point when drawn on the page.
public Point(float x,
float y)
x - the x coordinate of this point when drawn on the page.y - the y coordinate of this point when drawn on the page.
public Point(double x,
double y,
boolean isControlPoint)
x - the x coordinate of this point when drawn on the page.y - the y coordinate of this point when drawn on the page.isControlPoint - true if this point is one of the points specifying a curve.
public Point(float x,
float y,
boolean isControlPoint)
x - the x coordinate of this point when drawn on the page.y - the y coordinate of this point when drawn on the page.isControlPoint - true if this point is one of the points specifying a curve.| Method Detail |
|---|
public void setPosition(double x,
double y)
x - the x coordinate of this point when drawn on the page.y - the y coordinate of this point when drawn on the page.
public void setPosition(float x,
float y)
x - the x coordinate of this point when drawn on the page.y - the y coordinate of this point when drawn on the page.
public void setLocation(float x,
float y)
x - the x coordinate of this point when drawn on the page.y - the y coordinate of this point when drawn on the page.public void setX(double x)
x - the x coordinate of this point when drawn on the page.public void setX(float x)
x - the x coordinate of this point when drawn on the page.public float getX()
public void setY(double y)
y - the y coordinate of this point when drawn on the page.public void setY(float y)
y - the y coordinate of this point when drawn on the page.public float getY()
public void setRadius(double r)
r - the radius.public void setRadius(float r)
r - the radius.public float getRadius()
public void setShape(int shape)
shape - the shape of this point. Supported values:
Point.INVISIBLE Point.CIRCLE Point.DIAMOND Point.BOX Point.PLUS Point.H_DASH Point.V_DASH Point.MULTIPLY Point.STAR Point.X_MARK Point.UP_ARROW Point.DOWN_ARROW Point.LEFT_ARROW Point.RIGHT_ARROW
public int getShape()
public void setFillShape(boolean fillShape)
fillShape - if true - fill the point with the specified brush color.public boolean getFillShape()
public void setColor(int color)
color - the color specified as an integer.public int getColor()
public void setLineWidth(double lineWidth)
lineWidth - the line width.public void setLineWidth(float lineWidth)
lineWidth - the line width.public float getLineWidth()
public void setLinePattern(java.lang.String linePattern)
Examples of line dash patterns:
"[Array] Phase" Appearance Description
_______________ _________________ ____________________________________
"[] 0" ----------------- Solid line
"[3] 0" --- --- --- 3 units on, 3 units off, ...
"[2] 1" - -- -- -- -- 1 on, 2 off, 2 on, 2 off, ...
"[2 1] 0" -- -- -- -- -- -- 2 on, 1 off, 2 on, 1 off, ...
"[3 5] 6" --- --- 2 off, 3 on, 5 off, 3 on, 5 off, ...
"[2 3] 11" - -- -- -- 1 on, 3 off, 2 on, 3 off, 2 on, ...
linePattern - the line dash pattern.public java.lang.String getLinePattern()
@Deprecated public void setDrawLineTo(boolean drawLineTo)
drawLineTo - the boolean value.public void setStartOfPath()
public void setURIAction(java.lang.String uri)
uri - the URIpublic java.lang.String getURIAction()
public void setText(java.lang.String text)
text - the text.public java.lang.String getText()
public void setTextColor(int textColor)
textColor - the text color.public int getTextColor()
public void setTextDirection(int textDirection)
textDirection - the text direction.public int getTextDirection()
public void setAlignment(int align)
align - the alignment value.public int getAlignment()
public void placeIn(Box box)
throws java.lang.Exception
box - the specified box.
java.lang.Exception
public void placeIn(Box box,
double x_offset,
double y_offset)
throws java.lang.Exception
box - the specified box.x_offset - the x offset from the top left corner of the box.y_offset - the y offset from the top left corner of the box.
java.lang.Exception
public void placeIn(Box box,
float x_offset,
float y_offset)
throws java.lang.Exception
box - the specified box.x_offset - the x offset from the top left corner of the box.y_offset - the y offset from the top left corner of the box.
java.lang.Exception
public float[] drawOn(Page page)
throws java.lang.Exception
drawOn in interface Drawablepage - the page to draw this point on.
java.lang.Exception