org.eclipse.cdt.debug.mi.internal.ui.dialogfields
Class DialogField

java.lang.Object
  extended by org.eclipse.cdt.debug.mi.internal.ui.dialogfields.DialogField
Direct Known Subclasses:
ComboDialogField, ListDialogField, SelectionButtonDialogField, SelectionButtonDialogFieldGroup, Separator, StringDialogField

public class DialogField
extends java.lang.Object

Base class of all dialog fields. Dialog fields manage controls together with the model, independed from the creation time of the widgets. - support for automated layouting. - enable / disable, set focus a concept of the base class. DialogField have a label.


Constructor Summary
DialogField()
           
 
Method Summary
static org.eclipse.swt.widgets.Control createEmptySpace(org.eclipse.swt.widgets.Composite parent)
          Creates a spacer control.
static org.eclipse.swt.widgets.Control createEmptySpace(org.eclipse.swt.widgets.Composite parent, int span)
          Creates a spacer control with the given span.
 void dialogFieldChanged()
          Programatical invocation of a dialog field change.
 org.eclipse.swt.widgets.Control[] doFillIntoGrid(org.eclipse.swt.widgets.Composite parent, int nColumns)
          Creates all controls of the dialog field and fills it to a composite.
 org.eclipse.swt.widgets.Label getLabelControl(org.eclipse.swt.widgets.Composite parent)
          Creates or returns the created label widget.
 int getNumberOfControls()
          Returns the number of columns of the dialog field.
 boolean isEnabled()
          Gets the enable state of the dialog field.
 void postSetFocusOnDialogField(org.eclipse.swt.widgets.Display display)
          Posts setFocus to the display event queue.
 void setDialogFieldListener(IDialogFieldListener listener)
          Defines the listener for this dialog field.
 void setEnabled(boolean enabled)
          Sets the enable state of the dialog field.
 boolean setFocus()
          Tries to set the focus to the dialog field.
 void setLabelText(java.lang.String labeltext)
          Sets the label of the dialog field.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialogField

public DialogField()
Method Detail

setLabelText

public void setLabelText(java.lang.String labeltext)
Sets the label of the dialog field.


setDialogFieldListener

public final void setDialogFieldListener(IDialogFieldListener listener)
Defines the listener for this dialog field.


dialogFieldChanged

public void dialogFieldChanged()
Programatical invocation of a dialog field change.


setFocus

public boolean setFocus()
Tries to set the focus to the dialog field. Returns true if the dialog field can take focus. To be reimplemented by dialog field implementors.


postSetFocusOnDialogField

public void postSetFocusOnDialogField(org.eclipse.swt.widgets.Display display)
Posts setFocus to the display event queue.


doFillIntoGrid

public org.eclipse.swt.widgets.Control[] doFillIntoGrid(org.eclipse.swt.widgets.Composite parent,
                                                        int nColumns)
Creates all controls of the dialog field and fills it to a composite. The composite is assumed to have MGridLayout as layout. The dialog field will adjust its controls' spans to the number of columns given. To be reimplemented by dialog field implementors.


getNumberOfControls

public int getNumberOfControls()
Returns the number of columns of the dialog field. To be reimplemented by dialog field implementors.


getLabelControl

public org.eclipse.swt.widgets.Label getLabelControl(org.eclipse.swt.widgets.Composite parent)
Creates or returns the created label widget.

Parameters:
parent - The parent composite or null if the widget has already been created.

createEmptySpace

public static org.eclipse.swt.widgets.Control createEmptySpace(org.eclipse.swt.widgets.Composite parent)
Creates a spacer control.

Parameters:
parent - The parent composite

createEmptySpace

public static org.eclipse.swt.widgets.Control createEmptySpace(org.eclipse.swt.widgets.Composite parent,
                                                               int span)
Creates a spacer control with the given span. The composite is assumed to have MGridLayout as layout.

Parameters:
parent - The parent composite

setEnabled

public final void setEnabled(boolean enabled)
Sets the enable state of the dialog field.


isEnabled

public final boolean isEnabled()
Gets the enable state of the dialog field.