|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--uci.gef.Globals
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.
| Field Summary | |
protected static Applet |
_applet
|
protected static AppletContext |
_appletContext
|
protected static Editor |
_curEditor
The Editor that most recently contained the mouse. |
protected static Mode |
_mode
The next global mode. |
protected static Hashtable |
_pcListeners
A global dictionary of PropertyChangeListeners for Figs. |
protected static Prefs |
_prefs
The user's preferences for various editor features. |
static IStatusBar |
_StatusBar
The place where status messages will be written. |
protected static boolean |
_sticky
True if the next global Mode should remain as the next global mode even after it has been given to one editor. |
protected static MediaTracker |
_tracker
|
static Vector |
clipBoard
Until jdk 1.2, this will be our clipboard |
static String |
defaultStatus
String to display when nothing important is being displayed. |
static String |
LastDirectory
The directory most recently used in an open or save dialog |
static int |
MAX_LISTENERS
The most listeners a Fig can have, 4. |
static String |
REMOVE
|
static boolean |
ShowFigTips
Determines if tool tips be are shown on Figs in diagrams, including ToDoItem headlines. |
| Constructor Summary | |
Globals()
|
|
| Method Summary | |
static void |
addPropertyChangeListener(Object src,
PropertyChangeListener l)
Add a listener to a Fig. |
static void |
clearStatus()
Sets the status to its default (blank) string. |
static Editor |
curEditor()
Reply the Editor that most recently contained the mouse. |
static void |
curEditor(Editor ce)
Set the current Editor. |
protected static Mode |
defaultMode()
What mode should Editor's go into if the Palette is not requesting a specific mode? |
static void |
firePropChange(Object src,
String propName,
boolean oldV,
boolean newV)
Send a property change event to listeners of the src Fig. |
static void |
firePropChange(Object src,
String propName,
int oldV,
int newV)
Send a property change event to listeners of the src Fig. |
static void |
firePropChange(Object src,
String propName,
Object oldValue,
Object newValue)
Send a property change event to listeners of the src Fig. |
static Applet |
getApplet()
|
static AppletContext |
getAppletContext()
|
static Image |
getImage(String urlStr)
Get an image from the given URL (usually a gif file). |
static Image |
getImage(URL url)
Get an image from the given URL (usually a gif file). |
static String |
getLastDirectory()
|
static Prefs |
getPrefs()
Reply the user's preferences. |
static boolean |
getShowFigTips()
|
static boolean |
getSticky()
|
static Mode |
mode()
Reply the next global mode. |
static void |
mode(Mode m)
Set the next global mode. |
static void |
mode(Mode m,
boolean s)
Set the next global mode, and set it's stickiness. |
static Mode |
nextMode()
Determine the next global mode. |
static void |
quit()
Try to exit the applet or application. |
static void |
removePropertyChangeListener(Object s,
PropertyChangeListener l)
|
static void |
setApplet(Applet a)
If we are running as an applet, Store the Applet and AppletContext in a well known place. |
static void |
setLastDirectory(String s)
|
static void |
setShowFigTips(boolean b)
|
static void |
setStatusBar(IStatusBar sb)
Sets the place where status messages will be written. |
static void |
setSticky(boolean b)
Set whether the next global mode should remain as the next global mode even after it has been given to one editor. |
static void |
showDocument(String urlString)
If we are running as an applet, ask the browser to display the given URL. |
static void |
showDocument(URL url)
If we are running as an applet, ask the browser to display the given URL. |
static void |
showDocument(URL url,
String target)
If we are running as an applet, ask the browser to display the given URL. |
static void |
showStatus(String s)
Show a string on the some status bar, or print a message on the console. |
static Frame |
someFrame()
Return an exisiting instance of class Frame. |
static void |
startPropertySheet()
Open the property sheet. |
static void |
waitForImages()
Wait for all images to download. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final String REMOVE
protected static AppletContext _appletContext
protected static Applet _applet
protected static MediaTracker _tracker
public static String defaultStatus
public static Vector clipBoard
public static String LastDirectory
public static boolean ShowFigTips
public static IStatusBar _StatusBar
protected static Prefs _prefs
protected static boolean _sticky
protected static Mode _mode
protected static Editor _curEditor
protected static Hashtable _pcListeners
Note: It is important that all listeners eventually remove themselves by calling removePropertyChangeListener. Otherwise this table will keep pointers that can reduce grabage collection.
public static int MAX_LISTENERS
| Constructor Detail |
public Globals()
| Method Detail |
public static void setApplet(Applet a)
public static AppletContext getAppletContext()
public static Applet getApplet()
public static String getLastDirectory()
public static void setLastDirectory(String s)
public static boolean getShowFigTips()
public static void setShowFigTips(boolean b)
public static void setStatusBar(IStatusBar sb)
public static void showStatus(String s)
public static void clearStatus()
public static void showDocument(URL url)
public static void showDocument(URL url,
String target)
public static void showDocument(String urlString)
public static Image getImage(URL url)
public static Image getImage(String urlStr)
public static void waitForImages()
public static void quit()
public static Prefs getPrefs()
public static void startPropertySheet()
public static Frame someFrame()
public static void setSticky(boolean b)
public static boolean getSticky()
protected static Mode defaultMode()
public static void mode(Mode m)
public static void mode(Mode m,
boolean s)
public static Mode mode()
public static Mode nextMode()
Mode.done()public static void curEditor(Editor ce)
public static Editor curEditor()
public static void addPropertyChangeListener(Object src,
PropertyChangeListener l)
public static void removePropertyChangeListener(Object s,
PropertyChangeListener l)
public static void firePropChange(Object src,
String propName,
boolean oldV,
boolean newV)
public static void firePropChange(Object src,
String propName,
int oldV,
int newV)
public static void firePropChange(Object src,
String propName,
Object oldValue,
Object newValue)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||