text stringlengths 3 1.18M |
|---|
package multiplus.generator.provider.java.model;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import multiplus.generator.util.IOHelper;
import multiplus.ge... |
package multiplus.generator.provider.java.model;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import multiplus.generator.util.typemapping.ActionScriptDataTypesUtils;
public class JavaField {
private Field field;
private JavaClass clazz; //与field相关联的class
public JavaField(Fi... |
package multiplus.generator.provider.java.model;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;
import multiplus.generator.util.typemapping.ActionScriptDataTypesUtils;
import multiplus.generator.util.typemapping.JavaPrimitiveTypeMapping;
public class JavaProperty {
PropertyDescripto... |
package multiplus.generator.provider.java.model;
import java.beans.BeanInfo;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayLis... |
/**
* project:pomer
*
* Copyright 2008 [pomer], Inc. All rights reserved.
* Website: http://www.pomer.org.cn/
*
*/
package multiplus.generator.provider.java.model;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.LinkedHashSet;
i... |
package multiplus.generator.util;
import java.io.PrintStream;
public class GLogger {
public static final int TRACE = 60;
public static final int DEBUG = 70;
public static final int INFO = 80;
public static final int WARN = 90;
public static final int ERROR = 100;
public static int logLevel = INFO;
... |
package multiplus.generator.util.typemapping;
import java.sql.Types;
import java.util.HashMap;
/**
*
*/
public class DatabaseDataTypesUtils {
private final static IntStringMap _preferredJavaTypeForSqlType = new IntStringMap();
public static boolean isFloatNumber(String javaType) {
if(javaType.... |
package multiplus.generator.util.typemapping;
import java.util.Set;
import java.util.TreeSet;
import multiplus.generator.provider.java.model.JavaClass;
import multiplus.generator.util.StringHelper;
public class JavaImport {
TreeSet<String> imports = new TreeSet<String>();
public void addImport(St... |
package multiplus.generator.util.typemapping;
import java.util.HashMap;
import java.util.Map;
import multiplus.generator.util.StringHelper;
public class JavaPrimitiveTypeMapping {
static Map<String, String> wraper2primitive = new HashMap();
static Map<String, String> primitive2wraper = new HashMap();
st... |
/**
* project:pomer
*
* Copyright 2008 [pomer], Inc. All rights reserved.
* Website: http://www.pomer.org.cn/
*
*/
package multiplus.generator.util.typemapping;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 描述java类型和as类型对应关系
*
*/
public class ActionScriptDat... |
package multiplus.generator.util.typemapping;
public class DatabaseTypeUtils {
public static String getDatabaseTypeByJdbcDriver(String driver) {
if(driver == null) {
return null;
}
driver = driver.toLowerCase();
if(driver.indexOf("mysql") >= 0) {
return "mysql";
}
if(driver.indexOf("... |
package multiplus.generator.util.typemapping;
import java.sql.Types;
/**
* 用于ibatis的JdbcType
*/
public enum JdbcType {
BIT(Types.BIT),
TINYINT(Types.TINYINT),
SMALLINT(Types.SMALLINT),
INTEGER(Types.INTEGER),
BIGINT(Types.BIGINT),
FLOAT(Types.FLOAT),
REAL(Types.REAL),
DOUBLE(Types.DOU... |
package multiplus.generator.util;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.math... |
/*
* Created on Nov 23, 2004
*
*/
package multiplus.generator.util;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
/**
* @author MF1180
* Hashtable that maintains the input order of the data elements - Note
* only put, putall, clear and remove maintains the ordered l... |
package multiplus.generator.util;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
imp... |
package multiplus.generator.util.sqlparse;
public class SqlTypeChecker {
/**
* 当前的sourceSql是否是select语句
* @return
*/
public static boolean isSelectSql(String sourceSql) {
return SqlParseHelper.removeSqlComments(sourceSql).trim().toLowerCase().matches("(?is)\\s*select\\s.*\\sfrom\\s+.*");
}
/**
... |
package multiplus.generator.util.sqlparse;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import multiplus.generator.util.StringHelper;
public class ResultSetMetaDataHolder {
public ResultSetMetaDataHolder() {
}
public ResultSetMetaDataHolder(ResultSetMetaData m, int i) throws SQLExcep... |
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red ... |
package multiplus.generator.util.sqlparse;
import java.io.StringReader;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.LinkedHashSet;
import java.util.Random;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import multiplus.generator.pr... |
/*
* Copyright 2002-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... |
/*
* Copyright 2002-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... |
/***
*
* Portions Copyright (c) 2007 Paul Hammant
* Portions copyright (c) 2000-2007 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source... |
/***
*
* Copyright (c) 2007 Paul Hammant
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of co... |
/***
*
* Copyright (c) 2007 Paul Hammant
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of co... |
package multiplus.generator.util.paranamer;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.... |
/***
*
* Copyright (c) 2007 Paul Hammant
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of co... |
/***
*
* Copyright (c) 2007 Paul Hammant
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of co... |
/***
*
* Copyright (c) 2007 Paul Hammant
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of co... |
/*
* Copyright 2007 Paul Hammant
* Copyright 2007 ThinkTank Maths Limited
*
* ThinkTank Maths Limited grants a non-revocable, perpetual licence
* to Paul Hammant for unlimited use, relicensing and redistribution. No
* explicit permission is required from ThinkTank Maths Limited for
* any future decisions made w... |
/***
*
* Copyright (c) 2007 Paul Hammant
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of co... |
package multiplus.generator.util;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.StringReader;
import java.io.StringWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.... |
package multiplus.generator.util;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.List;
public class GeneratorException extends RuntimeException{
public List<Exception> exceptions = new ArrayList();
public GeneratorExc... |
package multiplus.generator.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.ut... |
package multiplus.generator.util;
public class ArrayHelper {
public static String getValue(String[] array, int indexOf) {
return getValue(array, indexOf,null);
}
public static String getValue(String[] array, int indexOf, String defaultValue) {
if(array.length - 1 >= indexOf) {
return array[index... |
/*
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... |
package multiplus.generator.util;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import multiplus.generator.provider.db.table.model.... |
package multiplus.generator.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringReader;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.HashMap;
... |
package multiplus.generator.util;
public class SystemHelper {
public static boolean isWindowsOS = System.getProperty("os.name").toLowerCase().indexOf("windows")>= 0;
}
|
/*
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... |
package multiplus.generator.util;
import java.sql.Timestamp;
/**
*
*
*/
public class TestDataGenerator {
public String getDBUnitTestData(String columnName,String javaType, int size) {
if(size <= 0) size = 2;
int MAX_SIZE = 3;
if(javaType.indexOf("Boolean") >= 0) {
return "0";
}
... |
package multiplus.generator.util;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class SqlEx... |
package multiplus.generator.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java... |
package multiplus.generator.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
public class DateHelper {
public static Date parseDate(String value,Class targetType,String... formats) {
for(String format : formats) {
... |
/*
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... |
package cn.lixiaodan.hqlbuilder.gen;
import cn.lixiaodan.hqlbuilder.model.ClassModel;
public class HqlGenerator implements IGenerator {
public String make(ClassModel[] cmarr, String[] conditions) {
StringBuffer sql = new StringBuffer();
sql.append(" SELECT \n");
// 查询字段
for (int i = 0; i != cmarr.l... |
package cn.lixiaodan.hqlbuilder.gen;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import cn.lixiaodan.hqlbuilder.model.ClassModel;
public class JavaHqlGenerator extends HqlGenerator {
public static final Pattern ptn = Pattern.compile("^(\t?)([^\\/\n]*)$", Pattern.M... |
package cn.lixiaodan.hqlbuilder.gen;
import cn.lixiaodan.hqlbuilder.util.AppPrefs;
/**
* 生成器工厂类
*
* @author lixiaodan
*
*/
public class GeneratorFactory {
private static IGenerator single = null;
public static IGenerator build() {
if (single == null) {
String clsname = AppPrefs.getString... |
package cn.lixiaodan.hqlbuilder.gen;
import cn.lixiaodan.hqlbuilder.model.ClassModel;
/**
* 代码生成接口
*
* @author lixiaodan
*
*/
public interface IGenerator {
String make(ClassModel[] cmarr, String[] conditions);
}
|
package cn.lixiaodan.hqlbuilder.gen;
import cn.lixiaodan.hqlbuilder.model.ClassModel;
public class DaoHqlGenerator extends JavaHqlGenerator {
@Override
public String make(ClassModel[] cmarr, String[] conditions) {
String hql = super.make(cmarr, conditions);
StringBuffer code = new StringBuffer(hql);
... |
package cn.lixiaodan.hqlbuilder.ui;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.Collectio... |
package cn.lixiaodan.hqlbuilder.ui;
import javax.swing.BoxLayout;
import javax.swing.DefaultComboBoxModel;
import javax.swing.DefaultListSelectionModel;
import javax.swing.JInternalFrame;
import javax.swing.JList;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTextField;
i... |
package cn.lixiaodan.hqlbuilder.ui;
import java.awt.Component;
import javax.swing.JCheckBox;
import javax.swing.JList;
import javax.swing.ListCellRenderer;
public class CheckListCellRenderer extends JCheckBox implements ListCellRenderer {
private static final long serialVersionUID = -2575287177726702542L;
... |
package cn.lixiaodan.hqlbuilder.ui;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JDesktopPane;
import javax.swing.JFrame;
import jav... |
package cn.lixiaodan.hqlbuilder.ui;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.lang.reflect.Method;
import java.util.ArrayList;... |
package cn.lixiaodan.hqlbuilder.packagescan;
import java.io.File;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import cn.lixiaodan.hqlbuilder.util.AppPrefs;
public class PackageScanner {
public static final St... |
package cn.lixiaodan.hqlbuilder.util;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class AppPrefs extends Properties {
public static AppPrefs prefs = null;
public synchronized static AppPrefs getApplicationPrefs() {
if (prefs == null) {
prefs = new App... |
package cn.lixiaodan.hqlbuilder.model;
import java.util.Date;
import java.util.List;
public class Project {
// 可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
// columns START
/**
* projectNum db_column: PROJECT_NUM
*/
private java.lang.String projectNum;
/**
* bussSrc db_column: BUSS_... |
package cn.lixiaodan.hqlbuilder.model;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import cn.lixiaodan.hqlbuilder.util.AppPrefs;
/**
* 类实体封装
*
* @author lixiaodan
*
*/
public class ClassModel {
... |
package cn.lixiaodan.hqlbuilder.model;
public class ConditionModel {
}
|
import cn.lixiaodan.hqlbuilder.ui.NewSingleFrameApplication;
public class BuildRunner {
/**
* @param args
*/
public static void main(String[] args) {
NewSingleFrameApplication.main(args);
}
}
|
package tyt.android.bigplanettracks;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.StringReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import javax.xml.parsers.SAXParser;
import javax.xml... |
package tyt.android.bigplanettracks;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.hardware.GeomagneticField;
import android.hardware.Sensor;
... |
package tyt.android.bigplanettracks.maps.providers;
public abstract class Layer {
public abstract int getId();
public abstract String getDescription();
public abstract String getURLPattern();
}
|
package tyt.android.bigplanettracks.maps.providers;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
public class GoogleVectorMapStrategy extends MapStrategy {
private List<Layer> layers = new ArrayList<Layer>();
public GoogleVectorMapStrategy() {
layers.add(new Layer() {
... |
package tyt.android.bigplanettracks.maps.providers;
import java.util.HashMap;
import java.util.Map;
public class MapStrategyFactory {
public static final int GOOGLE_VECTOR = 0;
public static final int GOOGLE_SATELLITE = 1;
public static final int GOOGLE_TERRAIN = 2;
public static final int OPENSTREET_VECTOR ... |
package tyt.android.bigplanettracks.maps.providers;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
public class OpenStreetMapStrategy extends MapStrategy {
private List<Layer> layers = new ArrayList<Layer>();
public OpenStreetMapStrategy() {
layers.add(new Layer() {
priva... |
package tyt.android.bigplanettracks.maps.providers;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
public class GoogleSatelliteMapStrategy extends MapStrategy {
private List<Layer> layers = new ArrayList<Layer>();
public GoogleSatelliteMapStrategy() {
layers.add(new Layer() ... |
package tyt.android.bigplanettracks.maps.providers;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
public class GoogleTerrainMapStrategy extends MapStrategy {
private List<Layer> layers = new ArrayList<Layer>();
public GoogleTerrainMapStrategy() {
layers.add(new Layer() {
... |
package tyt.android.bigplanettracks.maps.providers;
public abstract class MapStrategy {
public abstract String getURL(int x, int y, int z, int layout);
public abstract String getDescription();
}
|
package tyt.android.bigplanettracks.maps;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class SHA1Hash {
private static String convertToHex(byte[] data) {
StringBuffer buf = new StringBuffer();
for (int i = 0; i <... |
package tyt.android.bigplanettracks.maps.storage;
import tyt.android.bigplanettracks.maps.Preferences;
import tyt.android.bigplanettracks.maps.RawTile;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
public class SQLLocalStorage implements ILocalSt... |
package tyt.android.bigplanettracks.maps.storage;
import tyt.android.bigplanettracks.maps.RawTile;
public interface ILocalStorage {
/**
* Очистка файлового кеша
*/
public abstract void clear();
public abstract boolean isExists(RawTile tile);
/**
* Сохраняет тайл в файловый кеш
*
* @param tile
* ... |
package tyt.android.bigplanettracks.maps.storage;
import java.util.LinkedHashMap;
import java.util.Collection;
import java.util.Map;
import java.util.ArrayList;
/**
* An LRU cache, based on <code>LinkedHashMap</code>.<br>
* This cache has a fixed maximum number of elements (<code>cacheSize</code>).
* If the... |
package tyt.android.bigplanettracks.maps.storage;
import tyt.android.bigplanettracks.maps.RawTile;
import android.graphics.Bitmap;
/**
* @author tytung
*/
public class BitmapCache {
private LRUCache<RawTile, Bitmap> cacheMap;
public BitmapCache(int size) {
cacheMap = new LRUCache<RawTile, Bitmap>(size);
}
... |
package tyt.android.bigplanettracks.maps.storage;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import tyt.android.bigplanettracks.BigPlanet;
import tyt.android.bigplanettracks.maps.Handler;
import tyt.android.bigplanettracks.maps.RawTile;
import android.graphics.Bitmap;
import ... |
package tyt.android.bigplanettracks.maps.storage;
import tyt.android.bigplanettracks.BigPlanet;
import tyt.android.bigplanettracks.maps.RawTile;
import android.graphics.Bitmap;
/**
* Кеш скалированнных и обычных тайлов
*
* @author hudvin
*
*/
public class BitmapCacheWrapper {
/*
* размер кеша (для каждого... |
package tyt.android.bigplanettracks.maps.storage;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import tyt.android.bigplanettracks.maps.RawTile;
import android.graphics.Bitmap;
import android.util.Log;
/**
* Предоставляет возм... |
package tyt.android.bigplanettracks.maps.geoutils;
import tyt.android.bigplanettracks.maps.RawTile;
public class GeoUtils {
static int TILE_SIZE = 256;
/**
* returns a Rectangle2D with x = lon, y = lat, width=lonSpan,
* height=latSpan for an x,y,zoom as used by google.
*/
public static Point getLatLong(int ... |
package tyt.android.bigplanettracks.maps.geoutils;
public class Point {
public double x;
public double y;
public Point(double x, double y){
this.x = x;
this.y = y;
}
public Point(){
}
@Override
public String toString(){
return x + " ^ " + y;
}
public void set(double x, double y) {
this.x =... |
/*
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... |
package tyt.android.bigplanettracks.maps;
import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;
public class Utils {
public static int getZoomLevel(double x) {
if(x<1) x = 1/x;
int counter = 1;
while (x > 2) {
counter++;
x = x / 2;
}
if(x<1) return counter*-1;
... |
package tyt.android.bigplanettracks.maps.xml;
import java.util.ArrayList;
import java.util.List;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
import tyt.android.bigplanettracks.maps.Place;
/**
* Парсер списка найденных мест
* @author hudvin
*/
public ... |
package tyt.android.bigplanettracks.maps;
import tyt.android.bigplanettracks.maps.loader.TileLoader;
import tyt.android.bigplanettracks.maps.providers.MapStrategy;
import tyt.android.bigplanettracks.maps.providers.MapStrategyFactory;
import tyt.android.bigplanettracks.maps.storage.BitmapCacheWrapper;
import tyt.androi... |
package tyt.android.bigplanettracks.maps;
import tyt.android.bigplanettracks.maps.geoutils.GeoUtils;
import tyt.android.bigplanettracks.maps.ui.MapControl;
import tyt.android.bigplanettracks.maps.ui.SmoothZoomEngine;
//import java.util.concurrent.Semaphore;
import android.graphics.Bitmap;
import android.graphics.Poi... |
package tyt.android.bigplanettracks.maps.tools;
import java.util.Stack;
import tyt.android.bigplanettracks.maps.RawTile;
import tyt.android.bigplanettracks.maps.loader.BaseLoader;
import tyt.android.bigplanettracks.maps.providers.MapStrategy;
import tyt.android.bigplanettracks.maps.storage.LocalStorageWrapper;
impor... |
package tyt.android.bigplanettracks.maps.tools;
import java.text.MessageFormat;
import java.util.Stack;
import java.util.Timer;
import tyt.android.bigplanettracks.R;
import tyt.android.bigplanettracks.maps.RawTile;
import tyt.android.bigplanettracks.maps.geoutils.GeoUtils;
import tyt.android.bigplanettracks.maps.prov... |
package tyt.android.bigplanettracks.maps.ui;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Bitmap.Config;
/**
* Утилиты для работы с битмапами
*
* @author hudvin
*
*/
public class BitmapUtils {
/**
* Цве... |
package tyt.android.bigplanettracks.maps.ui;
/**
* Обработчик для кнопок в диалоговом окне
* @author hudvin
*
*/
public abstract class OnDialogClickListener {
public abstract void onOkClick(Object obj);
public abstract void onCancelClick();
}
|
package tyt.android.bigplanettracks.maps.ui;
import java.util.LinkedList;
import tyt.android.bigplanettracks.maps.AbstractCommand;
import tyt.android.bigplanettracks.maps.PhysicMap;
//import java.util.concurrent.Semaphore;
public class SmoothZoomEngine {
public static SmoothZoomEngine sze;
private LinkedList<In... |
package tyt.android.bigplanettracks.maps.ui;
public abstract class OnMapLongClickListener {
public abstract void onMapLongClick(int x, int y);
}
|
package tyt.android.bigplanettracks.maps.ui;
import android.content.Context;
import android.widget.RelativeLayout;
import android.widget.ZoomControls;
/**
* Панель с контролами для управления уровнем детализации
*
* @author hudvin
*
*/
public class ZoomPanel extends RelativeLayout {
private ZoomControls zoom... |
package tyt.android.bigplanettracks.maps.ui;
import tyt.android.bigplanettracks.R;
import tyt.android.bigplanettracks.maps.db.GeoBookmark;
import android.app.AlertDialog;
import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.wi... |
package tyt.android.bigplanettracks.maps.ui;
import java.util.ArrayList;
import java.util.List;
import tyt.android.bigplanettracks.BigPlanet;
import tyt.android.bigplanettracks.R;
import tyt.android.bigplanettracks.maps.AbstractCommand;
import tyt.android.bigplanettracks.maps.MarkerManager;
import tyt.android.bigplan... |
package tyt.android.bigplanettracks.maps.ui;
import android.graphics.Point;
import android.view.MotionEvent;
/**
* Предназначен для обработки двойного клика
*
* @author hudvin
*
*/
public class DoubleClickDetector {
/**
* Минимальный временной промежуток между двумя отдельными касаниями, при
* котором он... |
package tyt.android.bigplanettracks.maps;
import android.graphics.Bitmap;
/**
* Обработчик сообщений от потока
*
* @author hudvin
*
*/
public abstract class Handler {
public void handle(Object object) {
};
public void handle(RawTile tile, byte[] data) {
}
public void handle(RawTile tile, Bitmap bmp4sca... |
package tyt.android.bigplanettracks.maps;
import tyt.android.bigplanettracks.maps.storage.SQLLocalStorage;
import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Point;
/**
* Предназначен для хранения настроек
*
* @author hudvin
*
*/
p... |
package tyt.android.bigplanettracks.maps;
import android.app.Application;
public class BigPlanetApp extends Application {
public static boolean isDemo = false;
public BigPlanetApp() {
super();
}
@Override
public void onCreate() {
Preferences.init(this);
}
}
|
package tyt.android.bigplanettracks.maps.loader;
import java.util.Stack;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import tyt.android.bigplanettracks.maps.Handler;
import tyt.android.bigplanettracks.maps.RawTile;
import tyt.android.bigplanettracks.maps.providers.MapStrategy;
... |
package tyt.android.bigplanettracks.maps.loader;
import java.io.BufferedInputStream;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.SocketTimeoutException;
import java.net.URL;
import tyt.android.bigplanettracks.maps.Log;
import tyt.android.bigplanettracks.maps.RawTile;
import tyt.andr... |
package tyt.android.bigplanettracks.maps;
import tyt.android.bigplanettracks.maps.storage.BitmapCacheWrapper;
import tyt.android.bigplanettracks.maps.storage.LocalStorageWrapper;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
/**
* Предназначен для выполнения скалирования
*
* @author hudv... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.