@Override public final void setEnabled(final boolean enabled) { super.setEnabled(enabled); rend.setEnabled(enabled); scroll.setEnabled(enabled); caret(enabled); }
@Override public final void setEnabled(final boolean e) { super.setEnabled(e); rend.setEnabled(e); scroll.setEnabled(e); cursor(e); }
@Override public final void setFont(final Font f) { super.setFont(f); if (rend != null) { rend.setFont(f); scrollCode.invokeLater(true); } }
@Override public final void setFont(final Font f) { super.setFont(f); if (rend != null) { rend.setFont(f); rend.repaint(); } }
@Override public void paintComponent(final Graphics g) { super.paintComponent(g); final int w = getWidth(); final int h = getHeight(); final int hh = h / 2; final int s = (int) (3 * GUIConstants.SCALE); g.setColor(hasFocus() ? GUIConstants.BACK : GUIConstants.lgray); g.fillRect(0, hh - s, w, s * 2 - 1); g.setColor(GUIConstants.TEXT); g.drawLine(0, hh - s, w, hh - s); g.drawLine(0, hh - s, 0, hh + s - 1); g.setColor(GUIConstants.gray); g.drawLine(w - 1, hh - s, w - 1, hh + s - 1); g.drawLine(0, hh + s - 1, w, hh + s - 1); final double x = (value - min) * (w - SLIDERW) / (max - min); BaseXLayout.drawCell(g, (int) x, (int) (x + SLIDERW), hh - s * 2, hh + s * 2, oldValue != -1); }