package caida.otter; /************************************************************************** * File: ShiftImage.java Class: ShiftImage * Goal: A class that maintains the amount of shift the image needs * based wheter or not names are to be drawn. * * Written: Wilfred Dittmer (02/20/01) * * For:Cooperative Association for Internet Data Analysis *************************************************************************** *************************************************************************** By accessing this software, SHIFTIMAGE, you are duly informed of and agree to be bound by the conditions described below in this notice: This software product, SHIFTIMAGE, is developed by Wilfred Dittmer and copyrighted(C) 1998 by the University of California, San Diego (UCSD), with all rights reserved. UCSD administers the NSF grant to CAIDA, number NCR-9711092, under which this code was developed. There is no charge for SHIFTIMAGE software. You can redistribute it and/or modify it under the terms of the GNU General Public License, v. 2 dated June 1991 which is incorporated by reference herein. SHIFTIMAGE is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS, OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that the use of it will not infringe on any third party's intellectual property rights. You should have received a copy of the GNU GPL along with the SHIFTIMAGE program. Copies can also be obtained from http://www.gnu.org/copyleft/gpl.html or by writing to University of California, San Diego SDSC/CAIDA 9500 Gilman Dr., MS-0505 La Jolla, CA 92093 - 0505 USA Or contact INFO@CAIDA.ORG **************************************************************************/ public class ShiftImage { private static final int X_SHIFT = 300; private static final int Y_SHIFT = 50; private static final int NORM_X_SHIFT = 20; private static final int NORM_Y_SHIFT = 20; private static boolean shiftImage = false; private static int xShift = NORM_X_SHIFT; private static int yShift = NORM_Y_SHIFT; public static synchronized void setShiftImage(boolean shift) { shiftImage = shift; if (shift) { xShift = X_SHIFT; yShift = Y_SHIFT; } else { xShift = NORM_X_SHIFT; yShift = NORM_Y_SHIFT; } } public static synchronized boolean getShiftImage() { return shiftImage; } public static synchronized int getXShift() { return xShift; } public static synchronized int getYShift() { return yShift; } public static synchronized void setXShift(int x) { xShift = x; } public static synchronized void setYShift(int y) { yShift = y; } public static synchronized void reset() { xShift = NORM_X_SHIFT; yShift = NORM_Y_SHIFT; } }