Package eu.bandm.tools.graficUtils
Class ScalableDrawing
java.lang.Object
eu.bandm.tools.graficUtils.ScalableDrawing
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedScalableDrawing(float defWidth, float defHeight) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidantiAlias(boolean value) protected Colorcolor(int index) abstract voiddoDraw()Callback, must be overridden by the user.voiddrawCentered(Graphics2D gr, int drawWidth, int drawHeight, Color... colors) voiddrawCentered(Graphics2D gr, Component component, Color... colors) voiddrawMax(Graphics2D gr, int drawWidth, int drawHeight, Color... colors) voiddrawMax(Graphics2D gr, Component component, Color... colors) protected voidline(int... coordinates) protected intlinewidth(int lw) protected Pointprotected intx(int x) protected inty(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(linewidth.apply(3))), etc. To be usable as an icon, only *integer* coordinates should be used. -
antiAlias
protected void antiAlias(boolean value)
-