Exemplo n.º 1
0
 /** @return an image of the track (without its handle) */
 public BufferedImage getImage() {
   BufferedImage image =
       new BufferedImage(
           graphicsPanel.getWidth(), graphicsPanel.getHeight(), BufferedImage.TYPE_INT_ARGB);
   Graphics g = image.createGraphics();
   graphicsPanel.paint(g);
   return image;
 }
Exemplo n.º 2
0
 /**
  * Draws an animation in the middle of the track showing that the track is being loaded
  *
  * @param g graphics where to draw the animation
  */
 public void drawLoadingAnimation(Graphics g) {
   Image image = Images.getLoadingImage();
   int x = (graphicsPanel.getWidth() - image.getWidth(null)) / 2;
   int y = (graphicsPanel.getHeight() - image.getHeight(null)) / 2;
   g.drawImage(image, x, y, trackPanel);
 }