|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jface.window.Window org.eclipse.jface.dialogs.Dialog org.fosstrak.llrp.commander.dialogs.ConnectDialog
public abstract class ConnectDialog
superclass for all the connect dialogs. all subclasses have to instantiate
the two members FIELDS and DEFAULTS as arrays providing the labels and the
default values for the fields available.
FIELDS = new String[]{ "test", "me" };
DEFAULTS = new String [] { "myTestDefault", "memuuDefault" };
will create two fields with labels "test" and "me" with the respective
default values.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window |
---|
org.eclipse.jface.window.Window.IExceptionHandler |
Field Summary | |
---|---|
protected java.lang.String |
caption
the caption. |
java.lang.String[] |
DEFAULTS
the default values for the fields. |
java.lang.String[] |
FIELDS
the label of the fields. |
protected org.eclipse.swt.layout.GridData |
gridAll
the grid settings for a horizontal filler. |
protected org.eclipse.swt.layout.GridData |
gridLabel
the grid settings for the label fields. |
protected org.eclipse.swt.layout.GridData |
gridText
the grid settings for the text fields. |
protected org.eclipse.swt.widgets.Text[] |
txts
the text fields. |
java.lang.String[] |
values
the values collected from the fields. |
Fields inherited from class org.eclipse.jface.dialogs.Dialog |
---|
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS |
Fields inherited from class org.eclipse.jface.window.Window |
---|
CANCEL, OK |
Constructor Summary | |
---|---|
ConnectDialog(org.eclipse.swt.widgets.Shell shell,
java.lang.String caption)
create a new connect dialog. |
Method Summary | |
---|---|
protected void |
addCancelButton(org.eclipse.swt.widgets.Composite parent)
adds a Cancel button. |
protected void |
addInvisibleButton(org.eclipse.swt.widgets.Composite parent)
adds an invisible button to the grid to keep the alignment. |
protected void |
addOKButton(org.eclipse.swt.widgets.Composite parent)
adds a OK button and installs the necessary listeners. |
protected void |
addTextFields(org.eclipse.swt.widgets.Composite parent)
adds the text fields. |
protected org.eclipse.swt.widgets.Control |
createContents(org.eclipse.swt.widgets.Composite parent)
Create GUI elements in the dialog. |
abstract org.eclipse.swt.widgets.Listener |
getListener(org.eclipse.swt.widgets.Text txt,
int offset,
org.eclipse.swt.widgets.Button ok)
this method allows the subclasses to put constraints via listeners on the content of the value fields. you can use the offset to determine the field. |
protected void |
registerTextFieldListeners(org.eclipse.swt.widgets.Button btnOK)
registers listeners to the text fields with the OK button as the parent. |
protected void |
setLayout(org.eclipse.swt.widgets.Composite parent)
sets the layout for the dialog. |
Methods inherited from class org.eclipse.jface.dialogs.Dialog |
---|
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, createButtonsForButtonBar, createDialogArea, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText |
Methods inherited from class org.eclipse.jface.window.Window |
---|
canHandleShellCloseEvent, configureShell, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String[] FIELDS
public java.lang.String[] DEFAULTS
public java.lang.String[] values
protected org.eclipse.swt.widgets.Text[] txts
protected final java.lang.String caption
protected org.eclipse.swt.layout.GridData gridLabel
protected org.eclipse.swt.layout.GridData gridText
protected org.eclipse.swt.layout.GridData gridAll
Constructor Detail |
---|
public ConnectDialog(org.eclipse.swt.widgets.Shell shell, java.lang.String caption)
shell
- the parent shell.caption
- the caption for the dialog.Method Detail |
---|
protected void setLayout(org.eclipse.swt.widgets.Composite parent)
parent
- the parent where to set the layout.protected void registerTextFieldListeners(org.eclipse.swt.widgets.Button btnOK)
btnOK
- the ok button to use as parent.protected void addTextFields(org.eclipse.swt.widgets.Composite parent)
parent
- the parent where to add.protected void addCancelButton(org.eclipse.swt.widgets.Composite parent)
parent
- the parent where to add.protected void addOKButton(org.eclipse.swt.widgets.Composite parent)
parent
- the parent where to add.protected void addInvisibleButton(org.eclipse.swt.widgets.Composite parent)
parent
- the parent where to add.protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
createContents
in class org.eclipse.jface.dialogs.Dialog
public abstract org.eclipse.swt.widgets.Listener getListener(org.eclipse.swt.widgets.Text txt, int offset, org.eclipse.swt.widgets.Button ok)
txt
- the field holding the changed text.offset
- the offset of the field.ok
- the OK button.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |