PageRenderTime 19ms CodeModel.GetById 9ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/src/main/java/com/googlecode/charts4j/Priority.java

http://charts4j.googlecode.com/
Java | 67 lines | 14 code | 5 blank | 48 comment | 0 complexity | 4322a45af916339d2d3e2560259a451f MD5 | raw file
 1/**
 2 *
 3 * The MIT License
 4 *
 5 * Copyright (c) 2011 the original author or authors.
 6 *
 7 * Permission is hereby granted, free of charge, to any person obtaining a copy
 8 * of this software and associated documentation files (the "Software"), to deal
 9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
13
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 * THE SOFTWARE.
24 */
25
26package com.googlecode.charts4j;
27
28/**
29 * Determines the order in which the chart elements (ex: shape markers) are
30 * drawn. LOW specifies the element is drawn before all other parts of the
31 * chart. This means the element will be at least partially obscured if another
32 * chart element is drawn in the same place. NORMAL is the default. HIGH
33 * specifies the element is drawn on top of all other parts of the chart. This
34 * means it will at least partially hide another chart elements if it is drawn
35 * in the same place.
36 *
37 * @author Julien Chastang (julien.c.chastang at gmail dot com)
38 */
39public enum Priority {
40    /** Low priority. **/
41    LOW(-1),
42    /** Normal priority. **/
43    NORMAL(0),
44    /** High priority. **/
45    HIGH(1);
46
47    /** Number for the Google Chart API. **/
48    private final int priority;
49
50    /**
51     * Constructor.
52     *
53     * @param priority
54     *            Number for the Google Chart API
55     */
56    Priority(final int priority) {
57        this.priority = priority;
58    }
59
60    /**
61     * {@inheritDoc}
62     */
63    @Override
64    public String toString() {
65        return priority + "";
66    }
67}