Package sim.util.gui
Class Utilities
java.lang.Object
sim.util.gui.Utilities
Various static utility methods.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
doEnsuredRepaint
(Component component) Does a repaint that is guaranteed to work (on some systems, plain repaint()) fails if there's lots of updates going on as is the case in our simulator thread.static Thread
Schedule something to occur at some specified point in the future in the Swing Event thread.static String
ensureFileEndsWith
(String filename, String ending) Returns a filename guaranteed to end with the given ending.static void
Pops up an message dialog box.static void
informOfError
(Throwable error, String description, JFrame frame) Pops up an error dialog box.
-
Constructor Details
-
Utilities
public Utilities()
-
-
Method Details
-
ensureFileEndsWith
Returns a filename guaranteed to end with the given ending. -
doEnsuredRepaint
Does a repaint that is guaranteed to work (on some systems, plain repaint()) fails if there's lots of updates going on as is the case in our simulator thread. Notably, MacOS X 1.3.1 has problems. -
doLater
Schedule something to occur at some specified point in the future in the Swing Event thread. -
informOfError
Pops up an error dialog box. error should be the error proper, and description should be some user-informative item that's shown first (the user must explicitly ask to be shown the raw error itself). frame is a window on which the error box should be centered: if it is null, the error box will be centered in the screen. The error is also printed to the console. -
inform
Pops up an message dialog box. frame is a window on which the error box should be centered: if it is null, the error box will be centered in the screen. The error is also printed to the console.
-