Package java.awt

Examples of java.awt.Adjustable


        toStringSource());

  output.printGolden("Scroll ScrollPane to " + Double.toString(proportionalValue) + " proportional vertical value");

  Adjustable adj = getVAdjustable();

  scrollTo(new ValueScrollAdjuster((int)(adj.getMinimum() +

                (adj.getMaximum() -

                 adj.getVisibleAmount() -

                 adj.getMinimum()) * proportionalValue),

           Adjustable.VERTICAL,

           getVAdjustable()));

View Full Code Here


            ((ScrollPaneOperator)oper).getScrollPosition().x :
            ((ScrollPaneOperator)oper).getScrollPosition().y;
    }

    public void scrollToMinimum(ComponentOperator oper, final int orientation) {
  final Adjustable adj =
      (orientation == Scrollbar.HORIZONTAL) ?
      ((ScrollPaneOperator)oper).getHAdjustable() :
      ((ScrollPaneOperator)oper).getVAdjustable();
  scroll(oper,
         new ScrollAdjuster() {
    public int getScrollDirection() {
        return((adj.getMinimum() < adj.getValue()) ?
         DECREASE_SCROLL_DIRECTION :
         DO_NOT_TOUCH_SCROLL_DIRECTION);
    }
    public int getScrollOrientation() {
        return(orientation);
View Full Code Here

    }
      });
    }

    public void scrollToMaximum(ComponentOperator oper, final int orientation) {
  final Adjustable adj =
      (orientation == Scrollbar.HORIZONTAL) ?
      ((ScrollPaneOperator)oper).getHAdjustable() :
      ((ScrollPaneOperator)oper).getVAdjustable();
  scroll(oper,
         new ScrollAdjuster() {
    public int getScrollDirection() {
        return(((adj.getMaximum() - adj.getVisibleAmount()) > adj.getValue()) ?
         INCREASE_SCROLL_DIRECTION :
         DO_NOT_TOUCH_SCROLL_DIRECTION);
    }
    public int getScrollOrientation() {
        return(orientation);
View Full Code Here

  //--------------------------------------------------------------------------
  //   Public Methods:
  //--------------------------------------------------------------------------

  public void adjustmentValueChanged(AdjustmentEvent e) {
    Adjustable bar = e.getAdjustable();
    int currentMaximum = bar.getMaximum();
    if (bar.getMaximum() == _lastMaximum) {
      return; // nothing to do, the adjustable has not expanded
    }
    int bottom = bar.getValue() + bar.getVisibleAmount();

    if (bottom + bar.getUnitIncrement() >= _lastMaximum) {
      bar.setValue(bar.getMaximum()); // use the most recent maximum
    }
    _lastMaximum = currentMaximum;
  }
View Full Code Here

/*    */ {
/* 45 */   protected int _lastMaximum = -1;
/*    */
/*    */   public void adjustmentValueChanged(AdjustmentEvent e)
/*    */   {
/* 60 */     Adjustable bar = e.getAdjustable();
/* 61 */     int currentMaximum = bar.getMaximum();
/* 62 */     if (bar.getMaximum() == this._lastMaximum) {
/* 63 */       return;
/*    */     }
/* 65 */     int bottom = bar.getValue() + bar.getVisibleAmount();
/*    */
/* 67 */     if (bottom + bar.getUnitIncrement() >= this._lastMaximum) {
/* 68 */       bar.setValue(bar.getMaximum());
/*    */     }
/* 70 */     this._lastMaximum = currentMaximum;
/*    */   }
View Full Code Here

TOP

Related Classes of java.awt.Adjustable

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.