Android Open Source - infinitep Bar Element Data






From Project

Back to project page infinitep.

License

The source code is released under:

Apache License

If you think the Android project infinitep 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 es.daconstenla.infinip.customcomponents.pieces.data;
/*from   w  w  w .  j  a  v  a  2 s.  c  o  m*/
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.RectF;

public class BarElementData {
  private int mWidth;
  private RectF mRect = null;
  private Paint mPaint = null;
  private Paint mPaintAlt = null;
  
  private boolean complete = false;
  private boolean haveAlt = false;
  
  /*public BarElementData(int width, int color){
    mWidth = width; 
    setColor(color);
  }*/
  public BarElementData(int width, int color,int colorAlt){
    mWidth = width;
    setColor(color);
    setAltColor(colorAlt);
  }
  public BarElementData(BarElementData b){
    mWidth = b.mWidth;
    mRect = new RectF(b.mRect);
    mPaint = new Paint(b.mPaint);
    mPaintAlt = new Paint(b.mPaintAlt);
    complete = b.complete;
    haveAlt = true;
  }
  private void setColor(int col){
    mPaint = new Paint();
    mPaint.setStyle(Style.FILL);
    mPaint.setColor(col);
    
  }
  private void setAltColor(int col){
    mPaintAlt = new Paint();
    mPaintAlt.setStyle(Style.FILL);
    mPaintAlt.setColor(col);
    haveAlt = true;
  }
  public void setRect(float top,float left, float right,float bottom){mRect = new RectF(left,top,right,bottom);complete = true;}
  public void setRect(RectF rec){mRect = new RectF(rec);}

  public void setPaint(int color){setColor(color); }
  public void setPaint(int color,int altColor){ 
    setColor(color);
    setAltColor(altColor);
  }
  public void setPaint(Paint p){mPaint = new Paint(p); }
  public void setPaint(Paint p,Paint altP){
    mPaint = new Paint(p); 
    mPaintAlt = new Paint(altP);
    haveAlt = true;
  }
  
  public boolean haveAltColor(){return haveAlt;}
  public RectF getRect()throws NullPointerException
  { if(mRect != null)return mRect; else throw new NullPointerException(); }
  public Paint getPaint()throws NullPointerException
  { if(mPaint != null) return mPaint;else throw new NullPointerException();}
  public Paint getPaintAlt()throws NullPointerException
  { if(mPaintAlt != null) return mPaintAlt;else throw new NullPointerException();}
  public boolean isComplete(){return complete;}
  public int getWidth(){return mWidth;}
}




Java Source Code List

com.example.databasetest.FullscreenActivity.java
com.example.databasetest.util.SystemUiHiderBase.java
com.example.databasetest.util.SystemUiHiderHoneycomb.java
com.example.databasetest.util.SystemUiHider.java
com.example.datatest.MainActivity.java
com.example.datatest.database.InfinitepHelper.java
com.example.datatest.database.MovementRaw.java
com.example.datatest.database.MovementSummary.java
com.example.datatest.database.TableMovementRaw.java
com.example.datatest.database.TableMovementSummary.java
com.example.datatest.databaseTest.DatabaseTester.java
com.example.datatest.util.Utils.java
es.daconstenla.infinip.activity.CalendarActivity.java
es.daconstenla.infinip.activity.DayActivity.java
es.daconstenla.infinip.activity.MainActivity.java
es.daconstenla.infinip.activity.RangeActivity.java
es.daconstenla.infinip.activity.SettingsActivity.java
es.daconstenla.infinip.activity.SplashActivity.java
es.daconstenla.infinip.activity.SyncActivity.java
es.daconstenla.infinip.customcomponents.HorizontalGraph.java
es.daconstenla.infinip.customcomponents.InformationBox.java
es.daconstenla.infinip.customcomponents.MonthFragmentTest.java
es.daconstenla.infinip.customcomponents.MonthFragment.java
es.daconstenla.infinip.customcomponents.MonthView.java
es.daconstenla.infinip.customcomponents.MyFragmentMonthAdapter.java
es.daconstenla.infinip.customcomponents.events.OnSwipeTouchListener.java
es.daconstenla.infinip.customcomponents.pieces.ElementBackground.java
es.daconstenla.infinip.customcomponents.pieces.HorGraphBar.java
es.daconstenla.infinip.customcomponents.pieces.ItemCalendarDay.java
es.daconstenla.infinip.customcomponents.pieces.data.BarElementData.java
es.daconstenla.infinip.customcomponents.pieces.data.ColorMyCustom.java
es.daconstenla.infinip.customcomponents.pieces.data.CustomScrollView.java
es.daconstenla.infinip.customcomponents.pieces.data.ItemHorizontalBar.java
es.daconstenla.infinip.database.InfinitepHelper.java
es.daconstenla.infinip.database.MovementRaw.java
es.daconstenla.infinip.database.MovementSummary.java
es.daconstenla.infinip.database.TableMovementRaw.java
es.daconstenla.infinip.database.TableMovementSummary.java
es.daconstenla.infinip.database.utils.Utils.java
es.daconstenla.infinip.unused.AutoResizeTextView.java