public class RMShapePainterJ2D extends java.lang.Object implements RMShapePainter
| Constructor and Description |
|---|
RMShapePainterJ2D(java.awt.Graphics2D aGr)
Creates a new RMShapePainterJ2D.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clip(java.awt.Shape s) |
RMShapePainter |
clone()
Standard clone implementation.
|
void |
dispose() |
void |
draw(java.awt.Shape s) |
void |
drawButton(double x,
double y,
double w,
double h,
boolean isPressed)
Draws a button for the given rect with an option for pressed.
|
void |
drawButton(RMRect aRect,
boolean isPressed)
Draws a button for the given rect with an option for pressed.
|
void |
drawGlyphVector(java.awt.font.GlyphVector g,
float x,
float y) |
boolean |
drawImage(java.awt.Image img,
java.awt.geom.AffineTransform xform) |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int w,
int h) |
void |
drawLine(double x1,
double y1,
double x2,
double y2) |
void |
drawRect(double x,
double y,
double w,
double h) |
void |
drawString(java.lang.String str,
double x,
double y) |
void |
fill(java.awt.Shape s) |
void |
fill3DRect(double x,
double y,
double w,
double h,
boolean raised) |
void |
fillRect(double x,
double y,
double w,
double h) |
float |
getAlignmentX()
Returns the horizontal alignment.
|
float |
getAlignmentY()
Returns the vertical alignment.
|
java.awt.geom.Rectangle2D |
getBounds()
Returns the painting bounds (can be null).
|
java.awt.Shape |
getClip() |
java.awt.Rectangle |
getClipBounds() |
java.awt.Color |
getColor() |
java.awt.Font |
getFont() |
double |
getFontAscent()
Returns the ascender for the current font.
|
java.awt.Graphics2D |
getGraphics()
Returns the graphics.
|
double |
getOpacity()
Returns the opacity.
|
java.awt.Paint |
getPaint() |
float |
getScale()
Returns the default scale.
|
java.awt.geom.Rectangle2D |
getStringBounds(java.lang.String aString)
Returns the string bounds for current font.
|
java.awt.Stroke |
getStroke() |
boolean |
isEditing()
Returns whether painting is for editor.
|
boolean |
isGrowToFit()
Returns whether painter should scale painting of shape up to fit bounds
|
boolean |
isPrinting()
Returns whether shape painting is really printing.
|
boolean |
isSelected(RMShape aShape)
Returns whether given shape is selected.
|
boolean |
isShrinkToFit()
Returns whether painter should scale painting of shape down to fit bounds
|
boolean |
isSuperSelected(RMShape aShape)
Returns whether given shape is super selected.
|
boolean |
isSuperSelectedShape(RMShape aShape)
Returns whether given shape is THE super selected shape.
|
void |
paintShape(RMShape aShape)
Paints a simple shape.
|
void |
rotate(double theta) |
void |
scale(double sx,
double sy) |
void |
sendPaintShape(RMShape aShape)
Paints a child shape.
|
void |
setAlignmentX(float aValue)
Sets the horizontal alignment.
|
void |
setAlignmentY(float aValue)
Sets the vertical alignment.
|
boolean |
setAntialiasing(boolean aValue)
Sets whether antialiasing.
|
void |
setBounds(double x,
double y,
double w,
double h)
Sets the painting bounds.
|
void |
setBounds(java.awt.geom.Rectangle2D aRect)
Sets the painting bounds (can be null).
|
void |
setClip(java.awt.Shape clip) |
void |
setColor(java.awt.Color c) |
void |
setFont(java.awt.Font font) |
void |
setGrowToFit(boolean aValue)
Returns whether painter should scale painting of shape up to fit bounds
|
void |
setOpacity(double aValue)
Sets the opacity.
|
void |
setPaint(java.awt.Paint paint) |
void |
setPrinting(boolean aValue)
Sets whether shape painting is really printing.
|
void |
setScale(float aValue)
Sets the default scale.
|
void |
setShrinkToFit(boolean aValue)
Returns whether painter should scale painting of shape down to fit bounds
|
void |
setStroke(java.awt.Stroke s) |
java.lang.String |
toString()
Standard toString implementation.
|
void |
transform(java.awt.geom.AffineTransform Tx) |
void |
translate(double tx,
double ty) |
public RMShapePainterJ2D(java.awt.Graphics2D aGr)
public java.awt.geom.Rectangle2D getBounds()
public void setBounds(java.awt.geom.Rectangle2D aRect)
public void setBounds(double x,
double y,
double w,
double h)
public float getAlignmentX()
public void setAlignmentX(float aValue)
public float getAlignmentY()
public void setAlignmentY(float aValue)
public float getScale()
public void setScale(float aValue)
public boolean isGrowToFit()
public void setGrowToFit(boolean aValue)
public boolean isShrinkToFit()
public void setShrinkToFit(boolean aValue)
public boolean isPrinting()
isPrinting in interface RMPainterpublic void setPrinting(boolean aValue)
public void paintShape(RMShape aShape)
paintShape in interface RMShapePainterpublic void sendPaintShape(RMShape aShape)
sendPaintShape in interface RMShapePainterpublic boolean isEditing()
isEditing in interface RMShapePainterpublic boolean isSelected(RMShape aShape)
isSelected in interface RMShapePainterpublic boolean isSuperSelected(RMShape aShape)
isSuperSelected in interface RMShapePainterpublic boolean isSuperSelectedShape(RMShape aShape)
isSuperSelectedShape in interface RMShapePainterpublic double getOpacity()
getOpacity in interface RMPainterpublic void setOpacity(double aValue)
setOpacity in interface RMPainterpublic void drawLine(double x1,
double y1,
double x2,
double y2)
public void fillRect(double x,
double y,
double w,
double h)
public void drawRect(double x,
double y,
double w,
double h)
public void fill3DRect(double x,
double y,
double w,
double h,
boolean raised)
fill3DRect in interface RMPainterpublic void drawButton(RMRect aRect, boolean isPressed)
drawButton in interface RMPainterpublic void drawButton(double x,
double y,
double w,
double h,
boolean isPressed)
drawButton in interface RMPainterpublic boolean drawImage(java.awt.Image img,
java.awt.geom.AffineTransform xform)
public boolean drawImage(java.awt.Image img,
int x,
int y,
int w,
int h)
public void drawString(java.lang.String str,
double x,
double y)
drawString in interface RMPainterpublic void drawGlyphVector(java.awt.font.GlyphVector g,
float x,
float y)
drawGlyphVector in interface RMPainterpublic void translate(double tx,
double ty)
public void transform(java.awt.geom.AffineTransform Tx)
public java.awt.geom.Rectangle2D getStringBounds(java.lang.String aString)
getStringBounds in interface RMPainterpublic double getFontAscent()
getFontAscent in interface RMPainterpublic java.awt.Rectangle getClipBounds()
getClipBounds in interface RMPainterpublic boolean setAntialiasing(boolean aValue)
setAntialiasing in interface RMPainterpublic java.awt.Graphics2D getGraphics()
getGraphics in interface RMPainterpublic RMShapePainter clone()
clone in interface RMPainterclone in interface RMShapePainterclone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object