void setFocusedKnob() { if (knobHandle.spacer != null) { knobHandle.spacer.knobPainter.knobOff(true); } knobHandle.spacer = this; knobPainter.knobOn(true); }
public void mouseEntered(MouseEvent e) { if (knobHandle.spacer != null) { knobHandle.spacer.knobPainter.knobOff(false); } knobHandle.spacer = this; knobPainter.knobOn(false); }
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); }