use of org.jdesktop.swingx.graphics.ReflectionRenderer in project MtgDesktopCompanion by nicho92.
the class CardsPicPanel method initGUI.
private void initGUI() {
renderer = new ReflectionRenderer();
setBackgroundPainter(new MattePainter(PaintUtils.NIGHT_GRAY, true));
GestionnaireEvenements interactionManager = new GestionnaireEvenements(this);
this.addMouseListener(interactionManager);
this.addMouseMotionListener(interactionManager);
this.addMouseWheelListener(interactionManager);
timer = new Timer(30, e -> {
repaint();
xScale += xDelta;
if (xScale > 1 || xScale < -1) {
xDelta *= -1;
}
if (loop > 0 && ((int) xScale == 1 || (int) xScale == -1)) {
timer.stop();
launched = false;
}
loop++;
});
}
Aggregations