| net.refractions.udig.ui.ZoomingDialog
ZoomingDialog | public class ZoomingDialog extends Dialog (Code) | | A dialog that, on opening, will zoom from the start location/size the location of the provided dialog.
IMPORTANT: Since there is no way for ZoomingDialog to determine whether setBlockOnOpen is
set on the wrapped/decorated Dialog setBlockOnOpen MUST be set on ZoomingDialog
author: Jesse since: 1.1.0 |
Field Summary | |
final public static int | FAST | final public static int | MEDIUM | final public static int | SLOW |
Constructor Summary | |
public | ZoomingDialog(Shell parentShell, Dialog delegate, Rectangle start) Creates a new instance. | public | ZoomingDialog(Shell parentShell, Dialog dialog, int x, int y, int width, int height) Create new instance. |
Method Summary | |
public static Rectangle | calculateBounds(Control control) Calculates the bounds of the Control in Display coordinates (Required by ZoomingDialog constructor). | public static Rectangle | calculateBounds(TreeItem item, int columnIndex) Calculates the bounds of the Control in Display coordinates (Required by ZoomingDialog constructor).
Parameters: item - TreeItem to use as the starting position Parameters: columnIndex - the index of the column to find the bounds for. | public boolean | close() | public void | create() | protected Control | createButtonBar(Composite parent) | protected Point | getInitialLocation(Point initialSize) | protected Point | getInitialSize() | public int | getReturnCode() | public int | open() Opens the dialog. | public static void | openErrorMessage(Rectangle start, Shell parentShell, String dialogTitle, String dialogMessage) | public static void | openInformationMessage(Rectangle start, Shell parentShell, String dialogTitle, String dialogMessage) | public static int | openMessageDialog(Rectangle start, Shell parentShell, String dialogTitle, Image dialogImage, String dialogMessage, int dialogImageType, String[] buttonLabels, int defaultIndex) Create a message dialog. | public static boolean | openQuestionMessage(Rectangle start, Shell parentShell, String dialogTitle, String dialogMessage) | public static void | openWarningMessage(Rectangle start, Shell parentShell, String dialogTitle, String dialogMessage) | public void | setBlockOnOpen(boolean shouldBlock) | public void | setZoomSpeed(int speed) Sets how long it takes for the Dialog to open, default is
ZoomingDialog.FAST . | public String | toString() |
FAST | final public static int FAST(Code) | | |
MEDIUM | final public static int MEDIUM(Code) | | |
SLOW | final public static int SLOW(Code) | | |
ZoomingDialog | public ZoomingDialog(Shell parentShell, Dialog delegate, Rectangle start)(Code) | | Creates a new instance.
Parameters: parentShell - shell to use as a parent Parameters: delegate - The dialog to open Parameters: start - the rectangle, in Display coordinates, to zoom from when opening. |
ZoomingDialog | public ZoomingDialog(Shell parentShell, Dialog dialog, int x, int y, int width, int height)(Code) | | Create new instance. Will zoom from the provided rectangle to the dialog location.
Parameters: parentShell - shell to use as a parent Parameters: dialog - dialog to open Parameters: x - Parameters: y - Parameters: width - Parameters: height - |
calculateBounds | public static Rectangle calculateBounds(Control control)(Code) | | Calculates the bounds of the Control in Display coordinates (Required by ZoomingDialog constructor).
Parameters: control - control to use as the starting position the bounds of the Control in Display coordinates |
calculateBounds | public static Rectangle calculateBounds(TreeItem item, int columnIndex)(Code) | | Calculates the bounds of the Control in Display coordinates (Required by ZoomingDialog constructor).
Parameters: item - TreeItem to use as the starting position Parameters: columnIndex - the index of the column to find the bounds for. If -1 bounds of entire item are found the bounds of the Control in Display coordinates |
close | public boolean close()(Code) | | |
create | public void create()(Code) | | |
createButtonBar | protected Control createButtonBar(Composite parent)(Code) | | |
getInitialLocation | protected Point getInitialLocation(Point initialSize)(Code) | | |
getInitialSize | protected Point getInitialSize()(Code) | | |
getReturnCode | public int getReturnCode()(Code) | | |
open | public int open()(Code) | | Opens the dialog.
IMPORTANT: Since there is no way for ZoomingDialog to determine whether setBlockOnOpen is
set on the wrapped/decorated Dialog setBlockOnOpen MUST be set on ZoomingDialog
|
openErrorMessage | public static void openErrorMessage(Rectangle start, Shell parentShell, String dialogTitle, String dialogMessage)(Code) | | |
openInformationMessage | public static void openInformationMessage(Rectangle start, Shell parentShell, String dialogTitle, String dialogMessage)(Code) | | |
openMessageDialog | public static int openMessageDialog(Rectangle start, Shell parentShell, String dialogTitle, Image dialogImage, String dialogMessage, int dialogImageType, String[] buttonLabels, int defaultIndex)(Code) | | Create a message dialog. Notethat the dialog will have no visual
representation (no widgets) until it is told to open.
The labels of the buttons to appear in the button bar are supplied in
this constructor as an array. The open method will return
the index of the label in this array corresponding to the button that was
pressed to close the dialog. If the dialog was dismissed without pressing
a button (ESC, etc.) then -1 is returned. Note that the open
method blocks.
Parameters: start - the location to zoom from. Parameters: parentShell - the parent shell Parameters: dialogTitle - the dialog title, or null if none Parameters: dialogTitleImage - the dialog title image, or null if none Parameters: dialogMessage - the dialog message Parameters: dialogImageType - one of the following values:MessageDialog.NONE for a dialog with noimageMessageDialog.ERROR for a dialog with anerror imageMessageDialog.INFORMATION for a dialogwith an information imageMessageDialog.QUESTION for a dialog with aquestion imageMessageDialog.WARNING for a dialog with awarning image
Parameters: dialogButtonLabels - an array of labels for the buttons in the button bar Parameters: defaultIndex - the index in the button label array of the default button |
openQuestionMessage | public static boolean openQuestionMessage(Rectangle start, Shell parentShell, String dialogTitle, String dialogMessage)(Code) | | |
openWarningMessage | public static void openWarningMessage(Rectangle start, Shell parentShell, String dialogTitle, String dialogMessage)(Code) | | |
setBlockOnOpen | public void setBlockOnOpen(boolean shouldBlock)(Code) | | |
|
|