Package eu.bandm.tools.graficUtils
Class ScalableDrawing
java.lang.Object
eu.bandm.tools.graficUtils.ScalableDrawing
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
ScalableDrawing
(float defWidth, float defHeight) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
antiAlias
(boolean value) protected Color
color
(int index) abstract void
doDraw()
Callback, must be overridden by the user.void
drawCentered
(Graphics2D gr, int drawWidth, int drawHeight, Color... colors) void
drawCentered
(Graphics2D gr, Component component, Color... colors) void
drawMax
(Graphics2D gr, int drawWidth, int drawHeight, Color... colors) void
drawMax
(Graphics2D gr, Component component, Color... colors) protected void
line
(int... coordinates) protected int
linewidth
(int lw) protected Point
protected int
x
(int x) protected int
y
(int y)
-
Field Details
-
gr
-
-
Constructor Details
-
ScalableDrawing
protected ScalableDrawing(float defWidth, float defHeight) -
ScalableDrawing
protected ScalableDrawing()
-
-
Method Details
-
color
-
linewidth
protected int linewidth(int lw) -
x
protected int x(int x) -
y
protected int y(int y) -
p
-
line
protected void line(int... coordinates) -
drawMax
-
drawMax
-
drawCentered
-
drawCentered
-
doDraw
public abstract void doDraw()Callback, must be overridden by the user. Can usegr.drawLine(..)
andgr.fillArea(..)
commands, andgr.setColor(colors[i])
andgr.setStroke(BasicStroke(linewidht.apply(3)))
, etc. To be usable as an icon, only *integer* coordinates should be used. -
antiAlias
protected void antiAlias(boolean value)
-