1 14 package org.wings; 15 16 import javax.swing.*; 17 18 19 26 public class SDefaultBoundedRangeModel 27 extends DefaultBoundedRangeModel 28 implements SBoundedRangeModel { 29 30 34 private boolean delayEvents = false; 35 36 39 protected boolean gotDelayedEvent = false; 40 41 public SDefaultBoundedRangeModel() { 42 super(); 43 } 44 45 public SDefaultBoundedRangeModel(int value, int extent, int min, int max) { 46 super(value, extent, min, max); 47 } 48 49 public boolean getDelayEvents() { 50 return delayEvents; 51 } 52 53 public void setDelayEvents(boolean b) { 54 delayEvents = b; 55 } 56 57 60 public void fireDelayedIntermediateEvents() {} 61 62 public void fireDelayedFinalEvents() { 63 if (!delayEvents && gotDelayedEvent) { 64 fireStateChanged(); 65 gotDelayedEvent = false; 66 } 67 } 68 69 protected void fireStateChanged() { 70 if (delayEvents) { 71 gotDelayedEvent = true; 72 } else { 73 super.fireStateChanged(); 74 } 75 } 76 77 } 78 79 80 | Popular Tags |