Exemplo n.º 1
0
 /**
  * Paints the background.
  *
  * @param g The graphics object to paint the background on.
  */
 public void paint(Graphics g) {
   if (isPageVisible()) paintBackgroundPages((Graphics2D) g);
   else setBackground(graph.getBackground());
   if (graph.getBackgroundImage() != null) {
     paintBackgroundImage((Graphics2D) g);
   }
   setOpaque(!isPageVisible() && graph.getBackgroundImage() == null);
   super.paint(g);
   setOpaque(true);
 }
Exemplo n.º 2
0
 @Override
 public void paint(Graphics g) {
   graphics = SwingGraphics.fromGraphics(g, this, graphics);
   super.paint(g);
   graphics.clear();
 }