Package javax.swing

Examples of javax.swing.BoundedRangeModel


    JScrollBar scrollBar = (horizontal) ? getHorizontalScrollBar()
        : getVerticalScrollBar();

    if (scrollBar != null)
    {
      BoundedRangeModel model = scrollBar.getModel();
      int newValue = (int) Math.round(model.getValue() * factor)
          + (int) Math.round((center) ? (model.getExtent()
              * (factor - 1) / 2) : 0);
      model.setValue(newValue);
    }
  }
View Full Code Here


    JScrollBar scrollBar = (horizontal) ? getHorizontalScrollBar()
        : getVerticalScrollBar();

    if (scrollBar != null)
    {
      final BoundedRangeModel model = scrollBar.getModel();
      final int newValue = ((model.getMaximum()) / 2) - model.getExtent()
          / 2;
      model.setValue(newValue);
    }
  }
View Full Code Here

TOP

Related Classes of javax.swing.BoundedRangeModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.