public final class UIHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
IMAGE_NAV_BACKWARD |
static java.lang.String |
IMAGE_NAV_BACKWARD_DIS |
static java.lang.String |
IMAGE_NAV_FORWARD |
static java.lang.String |
IMAGE_NAV_FORWARD_DIS |
Constructor and Description |
---|
UIHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
centerOnMonitor(org.eclipse.swt.widgets.Monitor monitor,
org.eclipse.swt.widgets.Shell shell)
Center shell on specified monitor.
|
static void |
centerOnScreen(org.eclipse.swt.widgets.Shell shell)
This is a helper method created to center a shell on the screen.
|
static org.eclipse.swt.graphics.Image |
getImage(java.lang.String sPluginRelativePath)
This is a convenience method to get an imgIcon from a URL.
|
static org.eclipse.swt.graphics.Point |
getScreenLocation(org.eclipse.swt.widgets.Composite cmpTarget)
This is a helper method created to get the location on screen of a
composite.
|
static java.net.URL |
getURL(java.lang.String sPluginRelativePath)
This method returns an URL for a resource given its plugin relative path.
|
static boolean |
isEclipseMode()
Returns if running in eclipse mode or stand-alone mode currently.
|
public static final java.lang.String IMAGE_NAV_FORWARD
public static final java.lang.String IMAGE_NAV_FORWARD_DIS
public static final java.lang.String IMAGE_NAV_BACKWARD
public static final java.lang.String IMAGE_NAV_BACKWARD_DIS
public static org.eclipse.swt.graphics.Point getScreenLocation(org.eclipse.swt.widgets.Composite cmpTarget)
cmpTarget
- The composite whose location on screen is requiredpublic static void centerOnScreen(org.eclipse.swt.widgets.Shell shell)
shell
- The shell to be centered on screenpublic static void centerOnMonitor(org.eclipse.swt.widgets.Monitor monitor, org.eclipse.swt.widgets.Shell shell)
monitor
- specified monitor will display shell.shell
- the shell to be centered on monitor.public static java.net.URL getURL(java.lang.String sPluginRelativePath)
sPluginRelativePath
- The path to the resource relative to the plugin location.public static org.eclipse.swt.graphics.Image getImage(java.lang.String sPluginRelativePath)
sPluginRelativePath
- The URL for the imgIcon.#setImageCached( boolean )
public static boolean isEclipseMode()
Copyright © 2008 Actuate Corp. All rights reserved.