Esempio n. 1
0
    protected void paintComponent(Graphics g) {
      if (isFlipped) {
        Graphics2D g2 = (Graphics2D) g;
        g2.translate(0, getHeight());
        g2.scale(1.0, -1.0);
      }

      KEYFRAME_ICON.paintIcon(this, g, 0, SELECTION_ICON.getIconHeight());

      // Draw as selected.
      // Display selection above control so it is visible when multiple overlap.
      if (this == selectedControl)
        SELECTION_ICON.paintIcon(this, g, (getWidth() - SELECTION_ICON.getIconHeight()) / 2, 0);
    }