001    package org.jgnuplot;
002    
003    /**
004     * This class models all possible values for the style option for a graph in a
005     * plot command.
006     * 
007     * @author Pander
008     */
009    public final class Style {
010       private Style() {
011       }
012    
013       public static final int NOT_SPECIFIED = -2;
014    
015       public static final int LINES = 1;
016    
017       public static final int POINTS = 2;
018    
019       public static final int LINESPOINTS = 3;
020    
021       public static final int IMPULSES = 4;
022    
023       public static final int DOTS = 5;
024    
025       public static final int STEPS = 6;
026    
027       public static final int FSTEPS = 7;
028    
029       public static final int HISTEPS = 8;
030    
031       public static final int ERRORBARS = 9;
032    
033       public static final int XERRORBARS = 10;
034    
035       public static final int YERRORBARS = 11;
036    
037       public static final int XYERRORBARS = 12;
038    
039       public static final int BOXES = 13;
040    
041       public static final int FILLEDCURVES = 14;
042    
043       public static final int BOXERRORBARS = 15;
044    
045       public static final int BOXXYERRORBARS = 16;
046    
047       public static final int FINANCEBARS = 17;
048    
049       public static final int CANDLESTICKS = 18;
050    
051       public static final int VECTORS = 19;
052    
053       public static final int PM3D = 20;
054    
055       public static String toString(int theStyle) {
056          switch (theStyle) {
057          case NOT_SPECIFIED:
058             return null;
059          case LINES:
060             return "lines";
061          case POINTS:
062             return "points";
063          case LINESPOINTS:
064             return "linespoints";
065          case IMPULSES:
066             return "impulses";
067          case DOTS:
068             return "dots";
069          case STEPS:
070             return "steps";
071          case FSTEPS:
072             return "fsteps";
073          case HISTEPS:
074             return "histeps";
075          case ERRORBARS:
076             return "erorbars";
077          case XERRORBARS:
078             return "xerrorbars";
079          case YERRORBARS:
080             return "yerrorbars";
081          case XYERRORBARS:
082             return "xyerrorbars";
083          case BOXES:
084             return "boxes";
085          case FILLEDCURVES:
086             return "filledcurves";
087          case BOXERRORBARS:
088             return "boxerrorbars";
089          case BOXXYERRORBARS:
090             return "boxxyerrorbars";
091          case FINANCEBARS:
092             return "";
093          case CANDLESTICKS:
094             return "";
095          case VECTORS:
096             return "vectors";
097          case PM3D:
098             return "pm3d";
099          default:
100             throw new IllegalArgumentException("Unknown Style");
101          }
102       }
103    }