コード例 #1
0
 final void setBounds(Rectangle bounds) {
   Rectangle oldBounds = this.bounds.getBounds();
   this.bounds.setBounds(bounds);
   if (!oldBounds.equals(bounds)) {
     doRepaint();
   }
 }
コード例 #2
0
 void setValue(int type, int val) {
   int oldVal = value;
   value = Math.max(Math.min(val, maximum - visibleAmount), minimum);
   if (oldVal != value) {
     Rectangle oldRect = new Rectangle(state.getSliderRect());
     comp.toolkit.theme.layoutScrollbar(state); // TODO: FIXME
     Rectangle paintRect = oldRect.union(state.getSliderRect());
     paintRect.grow(0, 1);
     postAdjustmentEvent(type);
     doRepaint(paintRect);
   }
 }
コード例 #3
0
 /** Set parameters which cannot be set by public api methods */
 void setSizes(int vis, int min, int max) {
   boolean repaint = false;
   if (vis != visibleAmount) {
     visibleAmount = vis;
     repaint = true;
   }
   if (min != minimum) {
     minimum = min;
     repaint = true;
   }
   if (max != maximum) {
     maximum = max;
     repaint = true;
   }
   if (repaint) {
     doRepaint();
   }
 }
コード例 #4
0
 void doRepaint() {
   doRepaint(new Rectangle(new Point(), bounds.getSize()));
 }