From: <ha...@us...> - 2011-08-04 11:57:18
|
Revision: 15926 http://jmol.svn.sourceforge.net/jmol/?rev=15926&view=rev Author: hansonr Date: 2011-08-04 11:57:11 +0000 (Thu, 04 Aug 2011) Log Message: ----------- version=12.2.RC2_dev # code: enum class for axes modes Modified Paths: -------------- trunk/Jmol/src/org/jmol/shape/Axes.java trunk/Jmol/src/org/jmol/shape/AxesRenderer.java trunk/Jmol/src/org/jmol/shape/FontLineShapeRenderer.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties trunk/Jmol/src/org/jmol/viewer/StateManager.java trunk/Jmol/src/org/jmol/viewer/Viewer.java Added Paths: ----------- trunk/Jmol/src/org/jmol/constant/ trunk/Jmol/src/org/jmol/constant/EnumAxesMode.java Removed Paths: ------------- trunk/Jmol/src/org/jmol/viewer/EnumAxesMode.java Copied: trunk/Jmol/src/org/jmol/constant/EnumAxesMode.java (from rev 15924, trunk/Jmol/src/org/jmol/viewer/EnumAxesMode.java) =================================================================== --- trunk/Jmol/src/org/jmol/constant/EnumAxesMode.java (rev 0) +++ trunk/Jmol/src/org/jmol/constant/EnumAxesMode.java 2011-08-04 11:57:11 UTC (rev 15926) @@ -0,0 +1,68 @@ +/* $RCSfile$ + * $Author$ + * $Date$ + * $Revision$ + * + * Copyright (C) 2011 The Jmol Development Team + * + * Contact: jmo...@li... + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +package org.jmol.constant; + +/** + * Enum for axes mode. + */ +public enum EnumAxesMode { + + BOUNDBOX(0), + MOLECULAR(1), + UNITCELL(2); + + /** + * Code of axes mode. + */ + private final int code; + + /** + * @param code Code of axes mode. + */ + private EnumAxesMode(int code) { + this.code = code; + } + + /** + * @return Code of axes mode. + */ + public int getCode() { + return code; + } + + /** + * @param code Code of axes mode. + * @return Axes mode. + */ + public static EnumAxesMode getAxesMode(int code) { + for (EnumAxesMode mode : values()) { + if (mode.getCode() == code) { + return mode; + } + } + return null; + } +} Modified: trunk/Jmol/src/org/jmol/shape/Axes.java =================================================================== --- trunk/Jmol/src/org/jmol/shape/Axes.java 2011-08-04 03:03:00 UTC (rev 15925) +++ trunk/Jmol/src/org/jmol/shape/Axes.java 2011-08-04 11:57:11 UTC (rev 15926) @@ -29,8 +29,8 @@ import javax.vecmath.Vector3f; import org.jmol.api.SymmetryInterface; +import org.jmol.constant.EnumAxesMode; import org.jmol.util.Escape; -import org.jmol.viewer.EnumAxesMode; import org.jmol.viewer.JmolConstants; public class Axes extends FontLineShape { Modified: trunk/Jmol/src/org/jmol/shape/AxesRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/shape/AxesRenderer.java 2011-08-04 03:03:00 UTC (rev 15925) +++ trunk/Jmol/src/org/jmol/shape/AxesRenderer.java 2011-08-04 11:57:11 UTC (rev 15926) @@ -26,10 +26,10 @@ import java.awt.FontMetrics; import org.jmol.api.SymmetryInterface; +import org.jmol.constant.EnumAxesMode; import org.jmol.g3d.Font3D; import org.jmol.g3d.Graphics3D; import org.jmol.util.Point3fi; -import org.jmol.viewer.EnumAxesMode; import org.jmol.viewer.StateManager; import javax.vecmath.Point3f; Modified: trunk/Jmol/src/org/jmol/shape/FontLineShapeRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/shape/FontLineShapeRenderer.java 2011-08-04 03:03:00 UTC (rev 15925) +++ trunk/Jmol/src/org/jmol/shape/FontLineShapeRenderer.java 2011-08-04 11:57:11 UTC (rev 15926) @@ -29,12 +29,12 @@ import javax.vecmath.Point3i; import javax.vecmath.Vector3f; +import org.jmol.constant.EnumAxesMode; import org.jmol.g3d.Font3D; import org.jmol.g3d.Graphics3D; import org.jmol.modelset.TickInfo; import org.jmol.util.Point3fi; import org.jmol.util.TextFormat; -import org.jmol.viewer.EnumAxesMode; import org.jmol.viewer.JmolConstants; abstract class FontLineShapeRenderer extends ShapeRenderer { Deleted: trunk/Jmol/src/org/jmol/viewer/EnumAxesMode.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/EnumAxesMode.java 2011-08-04 03:03:00 UTC (rev 15925) +++ trunk/Jmol/src/org/jmol/viewer/EnumAxesMode.java 2011-08-04 11:57:11 UTC (rev 15926) @@ -1,68 +0,0 @@ -/* $RCSfile$ - * $Author$ - * $Date$ - * $Revision$ - * - * Copyright (C) 2011 The Jmol Development Team - * - * Contact: jmo...@li... - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -package org.jmol.viewer; - -/** - * Enum for axes mode. - */ -public enum EnumAxesMode { - - BOUNDBOX(0), - MOLECULAR(1), - UNITCELL(2); - - /** - * Code of axes mode. - */ - private final int code; - - /** - * @param code Code of axes mode. - */ - private EnumAxesMode(int code) { - this.code = code; - } - - /** - * @return Code of axes mode. - */ - public int getCode() { - return code; - } - - /** - * @param code Code of axes mode. - * @return Axes mode. - */ - public static EnumAxesMode getAxesMode(int code) { - for (EnumAxesMode mode : values()) { - if (mode.getCode() == code) { - return mode; - } - } - return null; - } -} Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2011-08-04 03:03:00 UTC (rev 15925) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2011-08-04 11:57:11 UTC (rev 15926) @@ -3,6 +3,7 @@ version=12.2.RC2_dev +# code: enum class for axes modes # new feature: contact VDW shows clash-contacts with equal-volume # -- combination with CLASH gives bulls-eyes -- plane only # bug fix: isosurface color density not picking up last yz points Modified: trunk/Jmol/src/org/jmol/viewer/StateManager.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/StateManager.java 2011-08-04 03:03:00 UTC (rev 15925) +++ trunk/Jmol/src/org/jmol/viewer/StateManager.java 2011-08-04 11:57:11 UTC (rev 15926) @@ -31,6 +31,7 @@ import java.util.Iterator; import java.util.Map; +import org.jmol.constant.EnumAxesMode; import org.jmol.g3d.Graphics3D; import org.jmol.modelset.Bond; import org.jmol.modelset.ModelSet; Modified: trunk/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Viewer.java 2011-08-04 03:03:00 UTC (rev 15925) +++ trunk/Jmol/src/org/jmol/viewer/Viewer.java 2011-08-04 11:57:11 UTC (rev 15926) @@ -48,6 +48,7 @@ import org.jmol.atomdata.AtomData; import org.jmol.atomdata.AtomDataServer; import org.jmol.atomdata.RadiusData; +import org.jmol.constant.EnumAxesMode; import org.jmol.g3d.*; import org.jmol.util.Base64; import org.jmol.util.BitSetUtil; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |