Back to project page android-plotter.
The source code is released under:
Apache License
If you think the Android project android-plotter listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * Copyright 2013 serso aka se.solovyev/*w ww .j a v a 2s . c om*/ * * 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. * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Contact details * * Email: se.solovyev@gmail.com * Site: http://se.solovyev.org */ package org.solovyev.android.plotter; import android.graphics.Color; import javax.annotation.Nonnull; public final class LineStyle { @Nonnull private static final Float DEFAULT_LINE_WIDTH = 0f; @Nonnull public ColorType colorType = ColorType.MONOCHROME; public int color = Color.WHITE; @Nonnull public Type type = Type.SOLID; public float width = DEFAULT_LINE_WIDTH; private LineStyle() { } @Nonnull public static LineStyle create() { return new LineStyle(); } @Nonnull public LineStyle copy() { final LineStyle copy = create(); copy.color = color; copy.colorType = colorType; copy.type = type; copy.width = width; return copy; } public enum Type { SOLID, DASHED, DOTTED, DASH_DOTTED } public enum ColorType { MONOCHROME, COLOR_MAP } }