org.eclipse.cdt.internal.ui.wizards.dialogfields
Class SelectionButtonDialogFieldGroup

java.lang.Object
  extended by org.eclipse.cdt.internal.ui.wizards.dialogfields.DialogField
      extended by org.eclipse.cdt.internal.ui.wizards.dialogfields.SelectionButtonDialogFieldGroup

public class SelectionButtonDialogFieldGroup
extends DialogField

Dialog field describing a group with buttons (Checkboxes, radio buttons..)


Constructor Summary
SelectionButtonDialogFieldGroup(int buttonsStyle, java.lang.String[] buttonNames, int nColumns)
          Creates a group without border.
SelectionButtonDialogFieldGroup(int buttonsStyle, java.lang.String[] buttonNames, int nColumns, int borderStyle)
          Creates a group with border (label in border).
 
Method Summary
 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.
 void enableSelectionButton(int index, boolean enable)
          Sets the enable state of a button contained in the group.
 int getNumberOfControls()
          Returns the number of columns of the dialog field.
 org.eclipse.swt.widgets.Button getSelectionButton(int index)
          Returns a button from the group or null if not yet created.
 org.eclipse.swt.widgets.Composite getSelectionButtonsGroup(org.eclipse.swt.widgets.Composite parent)
          Returns the group widget.
 boolean isSelected(int index)
          Returns the selection state of a button contained in the group.
 void setSelection(int index, boolean selected)
          Sets the selection state of a button contained in the group.
 
Methods inherited from class org.eclipse.cdt.internal.ui.wizards.dialogfields.DialogField
createEmptySpace, createEmptySpace, dialogFieldChanged, getLabelControl, isEnabled, postSetFocusOnDialogField, setDialogFieldListener, setEnabled, setFocus, setLabelText
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionButtonDialogFieldGroup

public SelectionButtonDialogFieldGroup(int buttonsStyle,
                                       java.lang.String[] buttonNames,
                                       int nColumns)
Creates a group without border.


SelectionButtonDialogFieldGroup

public SelectionButtonDialogFieldGroup(int buttonsStyle,
                                       java.lang.String[] buttonNames,
                                       int nColumns,
                                       int borderStyle)
Creates a group with border (label in border). Accepted button styles are: SWT.RADIO, SWT.CHECK, SWT.TOGGLE For border styles see Group

Method Detail

doFillIntoGrid

public org.eclipse.swt.widgets.Control[] doFillIntoGrid(org.eclipse.swt.widgets.Composite parent,
                                                        int nColumns)
Description copied from class: DialogField
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.

Overrides:
doFillIntoGrid in class DialogField

getNumberOfControls

public int getNumberOfControls()
Description copied from class: DialogField
Returns the number of columns of the dialog field. To be reimplemented by dialog field implementors.

Overrides:
getNumberOfControls in class DialogField

getSelectionButtonsGroup

public org.eclipse.swt.widgets.Composite getSelectionButtonsGroup(org.eclipse.swt.widgets.Composite parent)
Returns the group widget. When called the first time, the widget will be created.

Parameters:
parent - the parent composite when called the first time, or null after.

getSelectionButton

public org.eclipse.swt.widgets.Button getSelectionButton(int index)
Returns a button from the group or null if not yet created.


isSelected

public boolean isSelected(int index)
Returns the selection state of a button contained in the group.

Parameters:
index - the index of the button

setSelection

public void setSelection(int index,
                         boolean selected)
Sets the selection state of a button contained in the group.


enableSelectionButton

public void enableSelectionButton(int index,
                                  boolean enable)
Sets the enable state of a button contained in the group.