Beispiel #1
0
 void setFocusedKnob() {
   if (knobHandle.spacer != null) {
     knobHandle.spacer.knobPainter.knobOff(true);
   }
   knobHandle.spacer = this;
   knobPainter.knobOn(true);
 }
Beispiel #2
0
 public void mouseEntered(MouseEvent e) {
   if (knobHandle.spacer != null) {
     knobHandle.spacer.knobPainter.knobOff(false);
   }
   knobHandle.spacer = this;
   knobPainter.knobOn(false);
 }
Beispiel #3
0
  protected void paintComponent(Graphics graphics) {
    super.paintComponent(graphics);

    Graphics2D g = (Graphics2D) graphics;

    // If we are disabled, we don't draw our arrow, focus, and unstick
    // decorations:
    if (!isEnabled()) {
      return;
    }
    Color oldColor = g.getColor();
    RenderingHints oldHints = g.getRenderingHints();
    g.setColor(Color.black);
    g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    if (isStuck()) {
      paintHorizontalLine(g);
    }
    g.setRenderingHints(oldHints);
    g.setColor(oldColor);

    knobPainter.paint(g);
  }