Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/*
 * Copyright (c) 2016 GcsSloop
 *
 * 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 in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * GitHub :  https://github.com/GcsSloop
 * Weibo  :  http://weibo,com/GcsSloop
 * Blog     :  http://www.gcssloop.com
 *
 * Last modify $2016-09-09 21:38:09
 */

import android.graphics.Point;

public class Main {
    private static int Cap_Axis_Distance = 15;
    private static int Cap_Head_Distance = 30;
    private static int XAxisPosLen_2D = 500;
    private static int XAxisNegLen_2D = 0;
    private static int YAxisPosLen_2D = 700;
    private static int YAxisNegLen_2D = 0;
    private static Point XHead_2D, XTail_2D, YHead_2D, YTail_2D;
    private static Point XCap1_2D, XCap2_2D, YCap1_2D, YCap2_2D;

    private static void init2DPoint() {

        XHead_2D = new Point(+XAxisPosLen_2D, 0);
        XTail_2D = new Point(-XAxisNegLen_2D, 0);
        XCap1_2D = new Point(XAxisPosLen_2D - Cap_Head_Distance, +Cap_Axis_Distance);
        XCap2_2D = new Point(XAxisPosLen_2D - Cap_Head_Distance, -Cap_Axis_Distance);

        YHead_2D = new Point(0, +YAxisPosLen_2D);
        YTail_2D = new Point(0, -YAxisNegLen_2D);
        YCap1_2D = new Point(+Cap_Axis_Distance, YAxisPosLen_2D - Cap_Head_Distance);
        YCap2_2D = new Point(-Cap_Axis_Distance, YAxisPosLen_2D - Cap_Head_Distance);
    }
}