| java.lang.Object net.refractions.udig.ui.PlatformGIS
PlatformGIS | public class PlatformGIS (Code) | | A facade into udig to simplify operations relating to performing platform operations.
author: jeichar since: 1.1 |
Method Summary | |
public static ColorBrewer | getColorBrewer() | public static void | run(IRunnableWithProgress request) Runs the given runnable in a separate thread, providing it a progress monitor. | public static void | run(ISafeRunnable request) Runs the given runnable in a protected mode. | public static void | runBlockingOperation(IRunnableWithProgress runnable, IProgressMonitor monitor2) This method runs the runnable in a separate thread. | public static void | runInProgressDialog(String dialogTitle, boolean showRunInBackground, IRunnableWithProgress runnable, boolean runASync) Runs a blocking task in a ProgressDialog. | public static void | syncInDisplayThread(Runnable runnable) Acts as a safer alternative to Display.syncExec(). | public static void | syncInDisplayThread(Display display, Runnable runnable) | public static void | wait(long interval, long timeout, WaitCondition condition, Object mutex) Waits for the condition to become true. |
getColorBrewer | public static ColorBrewer getColorBrewer()(Code) | | |
run | public static void run(IRunnableWithProgress request)(Code) | | Runs the given runnable in a separate thread, providing it a progress monitor. Exceptions
thrown by the runnable are logged, and not rethrown.
|
run | public static void run(ISafeRunnable request)(Code) | | Runs the given runnable in a protected mode. Exceptions thrown in the runnable are logged and
passed to the runnable's exception handler. Such exceptions are not rethrown by this method.
|
runBlockingOperation | public static void runBlockingOperation(IRunnableWithProgress runnable, IProgressMonitor monitor2) throws InvocationTargetException, InterruptedException(Code) | | This method runs the runnable in a separate thread. It is useful in cases where a thread must
wait for a long running and potentially blocking operation (for example an IO operation). If
the IO is done in the UI thread then the user interface will lock up. This allows synchronous
execution of a long running thread in the UI thread without locking the UI.
Parameters: runnable - The runnable(operation) to run Parameters: monitor - the progress monitor to update. throws: InvocationTargetException - throws: InterruptedException - |
runInProgressDialog | public static void runInProgressDialog(String dialogTitle, boolean showRunInBackground, IRunnableWithProgress runnable, boolean runASync)(Code) | | Runs a blocking task in a ProgressDialog. It is ran in such a way that even if the task
blocks it can be cancelled. This is unlike the normal ProgressDialog.run(...) method which
requires that the
IProgressMonitor be checked and the task to "nicely" cancel.
Parameters: dialogTitle - The title of the Progress dialog Parameters: showRunInBackground - if true a button added to the dialog that will make the job be ranin the background. Parameters: runnable - the task to execute. Parameters: runASync - TODO |
syncInDisplayThread | public static void syncInDisplayThread(Runnable runnable)(Code) | | Acts as a safer alternative to Display.syncExec(). If readAndDispatch is being called from
the display thread syncExec calls will not be executed only Display.asyncExec calls are
executed. So this method uses Display.asyncExec and patiently waits for the result to be
returned. Can be called from display thread or non-display thread. Runnable should not be
blocking or it will block the display thread.
Parameters: runnable - runnable to execute |
syncInDisplayThread | public static void syncInDisplayThread(Display display, Runnable runnable)(Code) | | |
wait | public static void wait(long interval, long timeout, WaitCondition condition, Object mutex) throws InterruptedException(Code) | | Waits for the condition to become true. Will call Display#readAndDispatch() if currently in
the display thread.
Parameters: interval - the time to wait between testing of condition, in milliseconds. Must be apositive number and is recommended to be larger than 50 Parameters: timeout - maximum time to wait. Will throw an InterruptedException if reached.If -1 then it will not timeout. Parameters: condition - condition to wait on. Parameters: mutex - if not null mutex will be waited on so that a notify will interrupt the wait. throws: InterruptedException - |
|
|