/[classpath]/classpath/javax/swing/plaf/basic/BasicScrollBarUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/basic/BasicScrollBarUI.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7.2.5 by gnu_andrew, Tue Aug 2 20:12:38 2005 UTC revision 1.7.2.6 by gnu_andrew, Sat Sep 10 15:31:52 2005 UTC
# Line 233  public class BasicScrollBarUI extends Sc Line 233  public class BasicScrollBarUI extends Sc
233      {      {
234        if (block)        if (block)
235          {          {
236            // Only need to check it if it's block scrolling            // Only need to check it if it's block scrolling
237            // We only block scroll if the click occurs            // We only block scroll if the click occurs
238            // in the track.            // in the track.
239            if (! trackListener.shouldScroll(direction))            if (!trackListener.shouldScroll(direction))
240              {              {
241                trackHighlight = NO_HIGHLIGHT;                trackHighlight = NO_HIGHLIGHT;
242                scrollbar.repaint();                scrollbar.repaint();
243                return;                return;
244              }              }
245            scrollByBlock(direction);            scrollByBlock(direction);
246          }          }
247        else        else
248          scrollByUnit(direction);          scrollByUnit(direction);
249      }      }
250    }    }
251    
# Line 659  public class BasicScrollBarUI extends Sc Line 659  public class BasicScrollBarUI extends Sc
659          height = Math.max(incrButton.getPreferredSize().height,          height = Math.max(incrButton.getPreferredSize().height,
660                            decrButton.getPreferredSize().height);                            decrButton.getPreferredSize().height);
661          height = Math.max(getMinimumThumbSize().height, height);          height = Math.max(getMinimumThumbSize().height, height);
         height = Math.max(20, height);  
662          height = Math.min(getMaximumThumbSize().height, height);          height = Math.min(getMaximumThumbSize().height, height);
663        }        }
664      else      else
# Line 672  public class BasicScrollBarUI extends Sc Line 671  public class BasicScrollBarUI extends Sc
671          width = Math.max(incrButton.getPreferredSize().width,          width = Math.max(incrButton.getPreferredSize().width,
672                           decrButton.getPreferredSize().width);                           decrButton.getPreferredSize().width);
673          width = Math.max(getMinimumThumbSize().width, width);          width = Math.max(getMinimumThumbSize().width, width);
         width = Math.max(20, width);  
674          width = Math.min(getMaximumThumbSize().width, width);          width = Math.min(getMaximumThumbSize().width, width);
675        }        }
676    
# Line 875  public class BasicScrollBarUI extends Sc Line 873  public class BasicScrollBarUI extends Sc
873          trackRect = new Rectangle();          trackRect = new Rectangle();
874          thumbRect = new Rectangle();          thumbRect = new Rectangle();
875    
876          scrollTimer = new Timer(200, null);          scrollTimer = new Timer(50, null);
877          scrollTimer.setRepeats(true);          scrollTimer.setRepeats(true);
878    
879          installComponents();          installComponents();

Legend:
Removed from v.1.7.2.5  
changed lines
  Added in v.1.7.2.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26