Exemplo n.º 1
0
 /**
  * Draws this step.
  *
  * @param panel the drawing panel requesting the drawing
  * @param g the graphics context on which to draw
  */
 public void draw(DrawingPanel panel, Graphics g) {
   if (track.trackerPanel == panel) {
     AutoTracker autoTracker = track.trackerPanel.getAutoTracker();
     if (autoTracker.isInteracting(track)) return;
   }
   TrackerPanel trackerPanel = (TrackerPanel) panel;
   boolean highlighted = (trackerPanel.getFrameNumber() == n);
   if (trackerPanel.autoTracker != null
       && trackerPanel.autoTracker.getWizard().isVisible()
       && trackerPanel.autoTracker.getTrack() == track) {
     highlighted = false;
   }
   getMark(trackerPanel).draw((Graphics2D) g, highlighted);
 }
Exemplo n.º 2
0
 /**
  * Overrides Step draw method.
  *
  * @param panel the drawing panel requesting the drawing
  * @param _g the graphics context on which to draw
  */
 public void draw(DrawingPanel panel, Graphics _g) {
   if (track.trackerPanel == panel) {
     AutoTracker autoTracker = track.trackerPanel.getAutoTracker();
     if (autoTracker.isInteracting(track)) return;
   }
   if (panel instanceof TrackerPanel) {
     TrackerPanel trackerPanel = (TrackerPanel) panel;
     super.draw(trackerPanel, _g);
     Graphics2D g = (Graphics2D) _g;
     if (isLabelVisible()) {
       TextLayout layout = textLayouts.get(trackerPanel);
       if (layout == null) return;
       Point p = getLayoutPosition(trackerPanel);
       Paint gpaint = g.getPaint();
       Font gfont = g.getFont();
       g.setPaint(footprint.getColor());
       g.setFont(textLayoutFont);
       layout.draw(g, p.x, p.y);
       g.setPaint(gpaint);
       g.setFont(gfont);
     }
   }
 }