BasePositionOverlay.java :  » UnTagged » android-friendconnect » com » friendconnect » views » Android Open Source

Android Open Source » UnTagged » android friendconnect 
android friendconnect » com » friendconnect » views » BasePositionOverlay.java
/*   **********************************************************************  **
 **   Copyright notice                                                       **
 **                                                                          **
 **   (c) 2009, FriendConnect                                      **
 **   All rights reserved.                                                   **
 **                                                                          **
 **    This program and the accompanying materials are made available under   **
 **   the terms of the GPLv3 license which accompanies this             **
 **   distribution. A copy is found in the textfile LICENSE.txt         **
 **                                                                          **
 **   This copyright notice MUST APPEAR in all copies of the file!           **
 **                                                                          **
 **   Main developers:                                                       **
 **     Juri Strumpflohner    http://blog.js-development.com               **
 **     Matthias Braunhofer    http://matthias.jimdo.com                   **
 **                                                                          **
 **  **********************************************************************  */

package com.friendconnect.views;

import com.google.android.maps.Overlay;

import android.graphics.Paint;
import android.graphics.Paint.Style;

public abstract class BasePositionOverlay  extends Overlay {
  private Paint innerPaint, borderPaint, textPaint;
  
  protected Paint getInnerPaint() {
    if ( innerPaint == null) {
      innerPaint = new Paint();
      innerPaint.setARGB(225, 75, 75, 75); //gray
      innerPaint.setAntiAlias(true);
    }
    return innerPaint;
  }

  protected Paint getBorderPaint() {
    if ( borderPaint == null) {
      borderPaint = new Paint();
      borderPaint.setARGB(255, 255, 255, 255);
      borderPaint.setAntiAlias(true);
      borderPaint.setStyle(Style.STROKE);
      borderPaint.setStrokeWidth(2);
    }
    return borderPaint;
  }

  protected Paint getTextPaint() {
    if ( textPaint == null) {
      textPaint = new Paint();
      textPaint.setARGB(255, 255, 255, 255);
      textPaint.setAntiAlias(true);
    }
    return textPaint;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.