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 RMPainter
public void setPrinting(boolean aValue)
public void paintShape(RMShape aShape)
paintShape
in interface RMShapePainter
public void sendPaintShape(RMShape aShape)
sendPaintShape
in interface RMShapePainter
public boolean isEditing()
isEditing
in interface RMShapePainter
public boolean isSelected(RMShape aShape)
isSelected
in interface RMShapePainter
public boolean isSuperSelected(RMShape aShape)
isSuperSelected
in interface RMShapePainter
public boolean isSuperSelectedShape(RMShape aShape)
isSuperSelectedShape
in interface RMShapePainter
public double getOpacity()
getOpacity
in interface RMPainter
public void setOpacity(double aValue)
setOpacity
in interface RMPainter
public 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 RMPainter
public void drawButton(RMRect aRect, boolean isPressed)
drawButton
in interface RMPainter
public void drawButton(double x, double y, double w, double h, boolean isPressed)
drawButton
in interface RMPainter
public 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 RMPainter
public void drawGlyphVector(java.awt.font.GlyphVector g, float x, float y)
drawGlyphVector
in interface RMPainter
public 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 RMPainter
public double getFontAscent()
getFontAscent
in interface RMPainter
public java.awt.Rectangle getClipBounds()
getClipBounds
in interface RMPainter
public boolean setAntialiasing(boolean aValue)
setAntialiasing
in interface RMPainter
public java.awt.Graphics2D getGraphics()
getGraphics
in interface RMPainter
public RMShapePainter clone()
clone
in interface RMPainter
clone
in interface RMShapePainter
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object