Package org.apache.log4j.lf5.viewer

Source Code of org.apache.log4j.lf5.viewer.TrackingAdjustmentListener

/*    */ package org.apache.log4j.lf5.viewer;
/*    */
/*    */ import java.awt.Adjustable;
/*    */ import java.awt.event.AdjustmentEvent;
/*    */ import java.awt.event.AdjustmentListener;
/*    */
/*    */ public class TrackingAdjustmentListener
/*    */   implements AdjustmentListener
/*    */ {
/* 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;
/*    */   }
/*    */ }

/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/thirdparty-all.jar
* Qualified Name:     org.apache.log4j.lf5.viewer.TrackingAdjustmentListener
* JD-Core Version:    0.6.0
*/
TOP

Related Classes of org.apache.log4j.lf5.viewer.TrackingAdjustmentListener

TOP
Copyright © 2018 www.massapi.com. 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.