1 /* $RCSfile$ 2 * $Author$ 3 * $Date$ 4 * $Revision$ 5 * 6 * Copyright (C) 2011 The Jmol Development Team 7 * 8 * Contact: jmol-developers@lists.sf.net 9 * 10 * This library is free software; you can redistribute it and/or 11 * modify it under the terms of the GNU Lesser General Public 12 * License as published by the Free Software Foundation; either 13 * version 2.1 of the License, or (at your option) any later version. 14 * 15 * This library is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 * Lesser General Public License for more details. 19 * 20 * You should have received a copy of the GNU Lesser General Public 21 * License along with this library; if not, write to the Free Software 22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 23 * 02110-1301, USA. 24 */ 25 26 package org.jmol.c; 27 28 public enum STER { 29 NONE("OFF", false), 30 DOUBLE("", false), 31 REDCYAN("REDCYAN", true), 32 REDBLUE("REDBLUE", true), 33 REDGREEN("REDGREEN", true), 34 DTI("DTI", false), // left/right squished 35 CUSTOM("", true) 36 ; 37 38 private String name; 39 private boolean isBiColor; 40 STER(String name, boolean isBiColor)41 private STER(String name, boolean isBiColor) { 42 this.name = name; 43 this.isBiColor = isBiColor; 44 } 45 getName()46 public String getName() { 47 return name; 48 } 49 isBiColor()50 public boolean isBiColor() { 51 return isBiColor; 52 } 53 getStereoMode(String id)54 public static STER getStereoMode(String id) { 55 for (STER item : values()) 56 if (item.name.equalsIgnoreCase(id)) 57 return item; 58 return null; 59 } 60 } 61