Android Open Source - PassGraph Mutable Double






From Project

Back to project page PassGraph.

License

The source code is released under:

GNU General Public License

If you think the Android project PassGraph listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package littlesoft;
//from   ww w .  ja  v  a 2s. c o  m
public class MutableDouble extends Firer<Double>{
  
  private double v;
  private static double step=5;
  private double min;
  
  private void fire(){
    fire(v);
  }
  
  public MutableDouble(double d, double minValue){
    v = d;
    min = minValue;
  }
  public MutableDouble(double d){
    this(d, -1000000000000.0);
  }
  
  public static void setStep(double s){
    step = s;
  }

  public void increase(){
    set(v + step);
  }
  
  public void decrease(){
    set(v - step);
  }
  
  public void set(double d){
    d = Math.max(min, d);
    if (v!=d){
      v = d;
      fire();
    }
  }
  
  public double get(){
    return v;
  }
  
  public String toString(){
    Double obj = Double.valueOf(v);
    return obj.toString();
  }

}




Java Source Code List

littlesoft.FirerObserver.java
littlesoft.Firer.java
littlesoft.MutableDouble.java
littlesoft.widgets.PassGraphTest.java
littlesoft.widgets.PassGraphWidget.java
littlesoft.widgets.SensitivePoint.java
littlesoft.widgets.util.SystemUiHiderBase.java
littlesoft.widgets.util.SystemUiHiderHoneycomb.java
littlesoft.widgets.util.SystemUiHider.java