|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Dialog net.refractions.udig.ui.ZoomingDialog
public class ZoomingDialog
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
Field Summary | |
---|---|
static int |
FAST
|
static int |
MEDIUM
|
static int |
SLOW
|
Constructor Summary | |
---|---|
ZoomingDialog(Shell parentShell,
Dialog dialog,
int x,
int y,
int width,
int height)
Create new instance. |
|
ZoomingDialog(Shell parentShell,
Dialog delegate,
Rectangle start)
Creates a new instance. |
Method Summary | |
---|---|
static Rectangle |
calculateBounds(Control control)
Calculates the bounds of the Control in Display coordinates (Required by ZoomingDialog constructor). |
static Rectangle |
calculateBounds(TreeItem item,
int columnIndex)
Calculates the bounds of the Control in Display coordinates (Required by ZoomingDialog constructor). |
boolean |
close()
|
void |
create()
|
protected Control |
createButtonBar(Composite parent)
|
protected Point |
getInitialLocation(Point initialSize)
|
protected Point |
getInitialSize()
|
int |
getReturnCode()
|
int |
open()
Opens the dialog. |
static void |
openErrorMessage(Rectangle start,
Shell parentShell,
java.lang.String dialogTitle,
java.lang.String dialogMessage)
|
static void |
openInformationMessage(Rectangle start,
Shell parentShell,
java.lang.String dialogTitle,
java.lang.String dialogMessage)
|
static int |
openMessageDialog(Rectangle start,
Shell parentShell,
java.lang.String dialogTitle,
Image dialogImage,
java.lang.String dialogMessage,
int dialogImageType,
java.lang.String[] buttonLabels,
int defaultIndex)
Create a message dialog. |
static boolean |
openQuestionMessage(Rectangle start,
Shell parentShell,
java.lang.String dialogTitle,
java.lang.String dialogMessage)
|
static void |
openWarningMessage(Rectangle start,
Shell parentShell,
java.lang.String dialogTitle,
java.lang.String dialogMessage)
|
void |
setBlockOnOpen(boolean shouldBlock)
|
void |
setZoomSpeed(int speed)
Sets how long it takes for the Dialog to open, default is FAST . |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int FAST
public static final int MEDIUM
public static final int SLOW
Constructor Detail |
---|
public ZoomingDialog(Shell parentShell, Dialog delegate, Rectangle start)
parentShell
- shell to use as a parentdelegate
- The dialog to openstart
- the rectangle, in Display coordinates, to zoom from when opening.public ZoomingDialog(Shell parentShell, Dialog dialog, int x, int y, int width, int height)
parentShell
- shell to use as a parentdialog
- dialog to openx
- y
- width
- height
- Method Detail |
---|
public void setZoomSpeed(int speed)
FAST
. Is one of
FAST
MEDIUM
SLOW
speed
- a constant indicating the speed at which the dialog zoomspublic void setBlockOnOpen(boolean shouldBlock)
public boolean close()
public void create()
public int getReturnCode()
protected Point getInitialLocation(Point initialSize)
protected Point getInitialSize()
public int open()
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
public java.lang.String toString()
protected Control createButtonBar(Composite parent)
public static int openMessageDialog(Rectangle start, Shell parentShell, java.lang.String dialogTitle, Image dialogImage, java.lang.String dialogMessage, int dialogImageType, java.lang.String[] buttonLabels, int defaultIndex)
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.
start
- the location to zoom from.parentShell
- the parent shelldialogTitle
- the dialog title, or null
if nonedialogTitleImage
- the dialog title image, or null
if nonedialogMessage
- the dialog messagedialogImageType
- one of the following values:
MessageDialog.NONE
for a dialog with no
imageMessageDialog.ERROR
for a dialog with an
error imageMessageDialog.INFORMATION
for a dialog
with an information imageMessageDialog.QUESTION
for a dialog with a
question imageMessageDialog.WARNING
for a dialog with a
warning imagedialogButtonLabels
- an array of labels for the buttons in the button bardefaultIndex
- the index in the button label array of the default button
public static void openErrorMessage(Rectangle start, Shell parentShell, java.lang.String dialogTitle, java.lang.String dialogMessage)
public static void openWarningMessage(Rectangle start, Shell parentShell, java.lang.String dialogTitle, java.lang.String dialogMessage)
public static void openInformationMessage(Rectangle start, Shell parentShell, java.lang.String dialogTitle, java.lang.String dialogMessage)
public static boolean openQuestionMessage(Rectangle start, Shell parentShell, java.lang.String dialogTitle, java.lang.String dialogMessage)
public static Rectangle calculateBounds(Control control)
control
- control to use as the starting position
public static Rectangle calculateBounds(TreeItem item, int columnIndex)
item
- TreeItem to use as the starting positioncolumnIndex
- the index of the column to find the bounds for. If -1 bounds of entire item are found
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |