public class P2DFrame extends java.lang.Object implements P2DFrameInterface
| Modifier and Type | Field and Description |
|---|---|
protected int |
armedHandle |
static float |
handleSize
The handle size in pixel.
|
static java.lang.String |
version |
| Constructor and Description |
|---|
P2DFrame()
The constructor.
|
P2DFrame(java.awt.Color c)
Constructor that receives the color of the frame.
|
P2DFrame(FwkAppearanceInterface ap)
Constructor that receives the appearance of the frame.
|
P2DFrame(P2DFrameInterface source)
A constructor receiving another frame.
|
| Modifier and Type | Method and Description |
|---|---|
void |
allHandles()
Order all handles.
|
FwkAppearanceInterface |
getAppearance()
Get the appearance of the frame.
|
int |
getArmedHandle()
Returns the last calculated the armed handle.
|
int |
getArmedHandle(java.awt.geom.Point2D ap)
Calculate the armed handle for the given point.
|
P2DBoundingBoxInterface |
getBoundingBox()
Retrieve the bounding box the component.
|
java.awt.Color |
getColor()
Gets the background color.
|
float[] |
getDashArray()
Returns the array representing the lengths of the
dash segments.
|
float |
getDashPhase()
Returns the current dash phase.
|
int |
getEndCap()
Returns the end cap style.
|
boolean |
getHandle(int index)
Retrieves the handle at the specified position.
|
boolean |
getHandlesVisible()
Returns a boolean whether the handles are visible.
|
int |
getLineJoin()
Returns the line join style.
|
boolean |
getLinesVisible()
Returns a boolean whether the handles are visible.
|
float |
getLineWidth()
Returns the line width.
|
float |
getMiterLimit()
Returns the limit of miter joins.
|
java.awt.Stroke |
getStroke()
Gets the Stroke for the Graphics2D context.
|
float |
getTransparency()
Gets the transparency of the background.
|
java.lang.String |
getVersion()
Return the version string of the FWK component.
|
boolean |
getVisible()
Get the frame visibility.
|
boolean |
hasHandles()
Returns a boolean whether the frame has handles.
|
void |
hideHandles()
Hide all the handles.
|
void |
hideLines()
Hide the lines.
|
boolean |
isVisible()
Get the visibility.
|
void |
noHandles()
Order no handles.
|
void |
paint(java.awt.Graphics2D g)
Paint the frame.
|
void |
release()
Release the object.
|
void |
resetArmedHandle()
Reset the active handle.
|
void |
setAppearance(FwkAppearanceInterface appearance)
Set the appearance of the frame.
|
void |
setArmedHandle(int index)
Sets the armed handle.
|
void |
setBoundingBox(P2DBoundingBoxInterface bb)
Set the the bounding box of the component.
|
void |
setColor(java.awt.Color color)
Sets the background color.
|
void |
setDashArray(float[] arr)
Sets the array representing the lengths of the
dash segments.
|
void |
setDashPhase(float phase)
Sets the current dash phase.
|
void |
setEndCap(int cap)
Retrieves the end cap style.
|
void |
setHandle(int index,
boolean flag)
Set the handle at the specified position.
|
void |
setHandlesVisible(boolean flag)
Set the handle visibility.
|
void |
setLineJoin(int join)
Retrieves the line join style.
|
void |
setLinesVisible(boolean flag)
Set the line visiblility.
|
void |
setLineWidth(float w)
Sets the line width of the stroke.
|
void |
setMiterLimit(float limit)
Retrieves the limit of miter joins.
|
void |
setStroke(java.awt.Stroke s)
Sets the Stroke for the Graphics2D context.
|
void |
setTransparency(float transparency)
Sets the transparency of the background.
|
void |
setVisible(boolean flag)
Set the frame visibility.
|
void |
showHandles()
Show all handles.
|
void |
showLines()
Show lines.
|
void |
updateGeometry()
Update the geometry.
|
public static final java.lang.String version
public static final float handleSize
protected int armedHandle
public P2DFrame()
public P2DFrame(java.awt.Color c)
c - The color of the background.public P2DFrame(FwkAppearanceInterface ap)
ap - The appearance of the background.public P2DFrame(P2DFrameInterface source)
source - the source frame.public java.lang.String getVersion()
FwkInterfacegetVersion in interface FwkInterfacepublic void release()
release in interface FwkInterfacepublic void paint(java.awt.Graphics2D g)
paint in interface P2DFrameInterfaceg - The graphical context.public void updateGeometry()
updateGeometry in interface P2DFrameInterfacepublic FwkAppearanceInterface getAppearance()
getAppearance in interface P2DFrameInterfacepublic void setAppearance(FwkAppearanceInterface appearance)
setAppearance in interface P2DFrameInterfaceappearance - The appearance of the frame.public boolean isVisible()
isVisible in interface P2DFrameInterfacepublic void setVisible(boolean flag)
setVisible in interface P2DFrameInterfaceflag - true if the frame should be visible.public boolean getVisible()
getVisible in interface P2DFrameInterfacepublic P2DBoundingBoxInterface getBoundingBox()
getBoundingBox in interface P2DFrameInterfacepublic void setBoundingBox(P2DBoundingBoxInterface bb)
setBoundingBox in interface P2DFrameInterfacebb - The new bounding box of the component.public boolean hasHandles()
hasHandles in interface P2DFrameInterfacepublic void noHandles()
noHandles in interface P2DFrameInterfacepublic void allHandles()
allHandles in interface P2DFrameInterfacepublic void setHandle(int index,
boolean flag)
0 - 1 - 2 3 - 4 - 5 6 - 7 - 8 setHandle in interface P2DFrameInterfaceindex - The index of the handles to be set.flag - true if the flag should be enabled.P2DFrameInterface.getHandle(int)public boolean getHandle(int index)
0 - 1 - 2 3 - 4 - 5 6 - 7 - 8 getHandle in interface P2DFrameInterfaceindex - The index of the handles to be set.setHandle(int, boolean)public void setHandlesVisible(boolean flag)
setHandlesVisible in interface P2DFrameInterfaceflag - true if the handle should be visible.public void hideHandles()
hideHandles in interface P2DFrameInterfacepublic void showHandles()
showHandles in interface P2DFrameInterfacepublic boolean getHandlesVisible()
getHandlesVisible in interface P2DFrameInterfacepublic void setLinesVisible(boolean flag)
setLinesVisible in interface P2DFrameInterfaceflag - true if the frame lines are visible.public void hideLines()
hideLines in interface P2DFrameInterfacepublic void showLines()
showLines in interface P2DFrameInterfacepublic boolean getLinesVisible()
getLinesVisible in interface P2DFrameInterfacepublic void setColor(java.awt.Color color)
setColor in interface P2DFrameInterfaceP2DShapepublic java.awt.Color getColor()
getColor in interface P2DFrameInterfacecom.highqsoft.P2D.P2DShapepublic void setTransparency(float transparency)
setTransparency in interface P2DFrameInterfacetransparency - The new transparency value.public float getTransparency()
getTransparency in interface P2DFrameInterfacepublic void setLineWidth(float w)
setLineWidth in interface P2DFrameInterfacew - The line width.BasicStrokepublic float getLineWidth()
getLineWidth in interface P2DFrameInterfaceBasicStrokepublic void setDashArray(float[] arr)
setDashArray in interface P2DFrameInterfacearr - The segment array.BasicStrokepublic float[] getDashArray()
getDashArray in interface P2DFrameInterfaceBasicStrokepublic void setDashPhase(float phase)
setDashPhase in interface P2DFrameInterfacephase - the dash phase.BasicStrokepublic float getDashPhase()
getDashPhase in interface P2DFrameInterfaceBasicStrokepublic void setEndCap(int cap)
setEndCap in interface P2DFrameInterfaceBasicStrokepublic int getEndCap()
getEndCap in interface P2DFrameInterfaceBasicStrokepublic void setLineJoin(int join)
setLineJoin in interface P2DFrameInterfacejoin - the line join style.BasicStrokepublic int getLineJoin()
getLineJoin in interface P2DFrameInterfaceBasicStrokepublic void setMiterLimit(float limit)
setMiterLimit in interface P2DFrameInterfacelimit - the limit.BasicStrokepublic float getMiterLimit()
getMiterLimit in interface P2DFrameInterfaceBasicStrokepublic void setStroke(java.awt.Stroke s)
setStroke in interface P2DFrameInterfaces - The Stroke style.Strokepublic java.awt.Stroke getStroke()
getStroke in interface P2DFrameInterfaceStrokepublic int getArmedHandle()
getArmedHandle in interface P2DFrameInterfacepublic int getArmedHandle(java.awt.geom.Point2D ap)
getArmedHandle in interface P2DFrameInterfacep - The point for that the active handle should be calculated.public void resetArmedHandle()
resetArmedHandle in interface P2DFrameInterfacepublic void setArmedHandle(int index)
setArmedHandle in interface P2DFrameInterfaceindex - The index of the active handle.
It returns -1, if no handle could be activated.