}
@Override
public void paint(Graphics2D graphics) {
MovieView movieView = (MovieView)getComponent();
Movie movie = movieView.getMovie();
int width = getWidth();
int height = getHeight();
if (backgroundColor != null) {
graphics.setPaint(backgroundColor);
graphics.fillRect(0, 0, width, height);
}
if (movie != null) {
if (scale != 1) {
graphics.scale(scale, scale);
}
graphics.translate(movieX, movieY);
movie.paint(graphics);
}
}