Android Open Source - TrafficChecker Traffic Region






From Project

Back to project page TrafficChecker.

License

The source code is released under:

GNU General Public License

If you think the Android project TrafficChecker 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

/*
 *  This File is licensed under GPL v3./*from www  . ja v  a  2s .  c o m*/
 *  Copyright (C) 2012 Rene Peinthor.
 *
 *  This file is part of TrafficChecker.
 *
 *  BlueMouse is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  TrafficChecker is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with TrafficChecker.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.oldsch00l.TrafficChecker;

import java.util.List;

import com.google.android.maps.GeoPoint;
import com.oldsch00l.TrafficChecker.TrafficChecker.Country;

public class TrafficRegion implements Comparable<TrafficRegion> {
    private String mRegionUrlAppend = "";
    private GeoPoint mCenterPoint = null;
    private int mZoom;
    private boolean mSelected;
    private int mOrder;
    private Country mCountry;
    private List<GeoPoint> mAreaPolygon = null;

//    public TrafficRegion( String sUrlAppend, GeoPoint center) {
//      mRegionUrlAppend = sUrlAppend;
//      mCenterPoint = center;
//      mZoom = 12;
//      mSelected = false;
//    }

    public TrafficRegion( Country country, String sUrlAppend, GeoPoint center, int order, int zoom) {
      mRegionUrlAppend = sUrlAppend;
      mCenterPoint = center;
      mZoom = zoom;
      mSelected = false;
      mCountry = country;
      mOrder = order;
    }

    public TrafficRegion( Country country, String sUrlAppend, GeoPoint center, int order, int zoom, List<GeoPoint> areaPolygon) {
      mRegionUrlAppend = sUrlAppend;
      mCenterPoint = center;
      mZoom = zoom;
      mSelected = false;
      mCountry = country;
      mAreaPolygon = areaPolygon;
      mOrder = order;
    }

    public String getRegionUrlAppend() {
      return mRegionUrlAppend;
    }

    public GeoPoint getGeoPoint() {
      return mCenterPoint;
    }

    public int getZoom() {
      return mZoom;
    }

    public void setSelected(boolean sel) {
      mSelected = sel;
    }

    public boolean isSelected() {
      return mSelected;
    }
    
    public Country getCountry() {
      return mCountry;
    }
    
    public List<GeoPoint> getAreaPolygon() {
      return mAreaPolygon;
    }

    public int compareTo(TrafficRegion other) {
      if( other == null)
        return 1;
      else
        return mOrder - other.mOrder;
    }
  }




Java Source Code List

com.oldsch00l.TrafficChecker.AboutDialog.java
com.oldsch00l.TrafficChecker.AndroidSaxFeedParser.java
com.oldsch00l.TrafficChecker.AndroidSaxRSSParser.java
com.oldsch00l.TrafficChecker.BaseFeedParser.java
com.oldsch00l.TrafficChecker.CacheTrafficEntries.java
com.oldsch00l.TrafficChecker.GermanyRegions.java
com.oldsch00l.TrafficChecker.Message.java
com.oldsch00l.TrafficChecker.Preferences.java
com.oldsch00l.TrafficChecker.SelectRegionActivity.java
com.oldsch00l.TrafficChecker.TrafficAdapter.java
com.oldsch00l.TrafficChecker.TrafficChecker.java
com.oldsch00l.TrafficChecker.TrafficMapItemizedOverlay.java
com.oldsch00l.TrafficChecker.TrafficOverlay.java
com.oldsch00l.TrafficChecker.TrafficParser.java
com.oldsch00l.TrafficChecker.TrafficRegion.java