use of java.awt.BasicStroke in project litiengine by gurkenlabs.
the class RectangleOutlineParticle method render.
@Override
public void render(final Graphics2D g, final Point2D emitterOrigin) {
final Point2D renderLocation = this.getLocation(emitterOrigin);
final Stroke oldStroke = g.getStroke();
g.setColor(this.getColor());
g.setStroke(new BasicStroke(this.stroke));
g.draw(new Rectangle2D.Double(renderLocation.getX(), renderLocation.getY(), this.getWidth(), this.getHeight()));
g.setStroke(oldStroke);
}
use of java.awt.BasicStroke in project litiengine by gurkenlabs.
the class VerticalSlider method render.
@Override
public void render(final Graphics2D g) {
final Stroke oldStroke = g.getStroke();
g.setStroke(new BasicStroke((float) (this.getWidth() / 8)));
g.setColor(this.getAppearance().getForeColor());
g.drawLine((int) (this.getX() + this.getWidth() / 2), (int) this.minSliderY, (int) (this.getX() + this.getWidth() / 2), (int) (this.getY() + this.getHeight() - this.getWidth()));
g.setStroke(oldStroke);
super.render(g);
}
use of java.awt.BasicStroke in project litiengine by gurkenlabs.
the class ListField method render.
@Override
public void render(final Graphics2D g) {
super.render(g);
if (this.selectedComponent != null) {
final Stroke oldStroke = g.getStroke();
g.setStroke(new BasicStroke(2));
final Rectangle2D border = new Rectangle2D.Double(this.selectedComponent.getX() - 1, this.selectedComponent.getY() - 1, this.selectedComponent.getWidth() + 2, this.selectedComponent.getHeight() + 2);
g.setColor(Color.WHITE);
g.draw(border);
g.setStroke(oldStroke);
}
}
use of java.awt.BasicStroke in project polyGembler by c-zhou.
the class JfreeChart method getRenderer2.
private XYLineAndShapeRenderer getRenderer2() {
// TODO Auto-generated method stub
XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
renderer.setStroke(new BasicStroke(stroke));
renderer.setPaint(Color.DARK_GRAY);
renderer.setShapesVisible(false);
renderer.setShapesFilled(false);
return renderer;
}
use of java.awt.BasicStroke in project polyGembler by c-zhou.
the class JfreeChart method getRenderer3.
private XYLineAndShapeRenderer getRenderer3() {
// TODO Auto-generated method stub
XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
renderer.setStroke(new BasicStroke(stroke));
renderer.setPaint(Color.DARK_GRAY);
renderer.setShapesVisible(false);
renderer.setShapesFilled(false);
return renderer;
}
Aggregations