// Copyright (c) 1995, 1996 Regents of the University of California. // All rights reserved. // // This software was developed by the Arcadia project // at the University of California, Irvine. // // Redistribution and use in source and binary forms are permitted // provided that the above copyright notice and this paragraph are // duplicated in all such forms and that any documentation, // advertising materials, and other materials related to such // distribution and use acknowledge that the software was developed // by the University of California, Irvine. The name of the // University may not be used to endorse or promote products derived // from this software without specific prior written permission. // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED // WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. // File: Globals.java // Classes: Globals // Original Author: Jason Robbins // $Id: Globals.java,v 1.2 2000/09/19 21:08:32 dougo Exp $ // Modified by : Kedar Patankar package edu.neu.ccs.demeter.tools.apstudio.graphedit; import java.awt.FontMetrics; import java.awt.Font; import java.awt.Rectangle; /** This class stores global info that is needed by all Editors. For * example, it aids in communication between the various Palette's * and Editor's by holding the next global Mode. */ public class Globals { private static Prefs _prefs = new Prefs(); /** reply the user's preferences */ public static Prefs prefs() { return _prefs; } private static Rectangle _printRect; public static void setPrintClip(int x,int y,int width,int height) { _printRect = new Rectangle(x,y,width,height); } public static Rectangle getPrintClip(){return _printRect;} private static FontMetrics _fm; public static FontMetrics getFontMetrics(){return _fm;} public static void setFontMetrics(FontMetrics fm){_fm=fm;} private static Font _font; public static Font getFont(){return _font;} public static void setFont(Font font){_font=font;} } /* end class Globals */