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

java.lang.Object
  extended by org.eclipse.cdt.internal.ui.wizards.dialogfields.DialogField
      extended by org.eclipse.cdt.internal.ui.wizards.dialogfields.ListDialogField
          extended by org.eclipse.cdt.internal.ui.wizards.dialogfields.CheckedListDialogField
Direct Known Subclasses:
MethodStubsListDialogField

public class CheckedListDialogField
extends ListDialogField

A list with checkboxes and a button bar. Typical buttons are 'Check All' and 'Uncheck All'. List model is independend of widget creation. DialogFields controls are: Label, List and Composite containing buttons.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.cdt.internal.ui.wizards.dialogfields.ListDialogField
ListDialogField.ColumnsDescription
 
Constructor Summary
CheckedListDialogField(IListAdapter adapter, java.lang.String[] customButtonLabels, org.eclipse.jface.viewers.IBaseLabelProvider lprovider)
           
 
Method Summary
 void checkAll(boolean state)
          Sets the check state of all elements
 void dialogFieldChanged()
          Programatical invocation of a dialog field change.
 java.util.List getCheckedElements()
          Gets the checked elements.
 int getCheckedSize()
          Returns the number of checked elements.
 org.eclipse.swt.widgets.Control getListControl(org.eclipse.swt.widgets.Composite parent)
          Returns the list control.
 boolean isChecked(java.lang.Object obj)
          Returns true if the element is checked.
 void replaceElement(java.lang.Object oldElement, java.lang.Object newElement)
          Replace an element.
 void setCheckAllButtonIndex(int checkButtonIndex)
          Sets the index of the 'check' button in the button label array passed in the constructor.
 void setChecked(java.lang.Object object, boolean state)
          Sets the checked state of an element.
 void setCheckedElements(java.util.Collection list)
          Sets the checked elements.
 void setCheckedWithoutUpdate(java.lang.Object object, boolean state)
          Sets the checked state of an element.
 void setUncheckAllButtonIndex(int uncheckButtonIndex)
          Sets the index of the 'uncheck' button in the button label array passed in the constructor.
 
Methods inherited from class org.eclipse.cdt.internal.ui.wizards.dialogfields.ListDialogField
addElement, addElements, doFillIntoGrid, enableButton, getButtonBox, getElement, getElements, getIndexOfElement, getNumberOfControls, getSelectedElements, getSize, getTableViewer, insertElementAt, postSetSelection, refresh, removeAllElements, removeElement, removeElements, selectElements, selectFirstElement, setButtonsMinWidth, setDownButtonIndex, setElements, setRemoveButtonIndex, setTableColumns, setUpButtonIndex, setViewerComparator
 
Methods inherited from class org.eclipse.cdt.internal.ui.wizards.dialogfields.DialogField
createEmptySpace, createEmptySpace, 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

CheckedListDialogField

public CheckedListDialogField(IListAdapter adapter,
                              java.lang.String[] customButtonLabels,
                              org.eclipse.jface.viewers.IBaseLabelProvider lprovider)
Method Detail

setCheckAllButtonIndex

public void setCheckAllButtonIndex(int checkButtonIndex)
Sets the index of the 'check' button in the button label array passed in the constructor. The behaviour of the button marked as the check button will then be handled internally. (enable state, button invocation behaviour)


setUncheckAllButtonIndex

public void setUncheckAllButtonIndex(int uncheckButtonIndex)
Sets the index of the 'uncheck' button in the button label array passed in the constructor. The behaviour of the button marked as the uncheck button will then be handled internally. (enable state, button invocation behaviour)


getListControl

public org.eclipse.swt.widgets.Control getListControl(org.eclipse.swt.widgets.Composite parent)
Description copied from class: ListDialogField
Returns the list control. When called the first time, the control will be created.

Overrides:
getListControl in class ListDialogField
Parameters:
parent - the parent composite when called the first time, or null after.

dialogFieldChanged

public void dialogFieldChanged()
Description copied from class: DialogField
Programatical invocation of a dialog field change.

Overrides:
dialogFieldChanged in class ListDialogField

getCheckedElements

public java.util.List getCheckedElements()
Gets the checked elements.


getCheckedSize

public int getCheckedSize()
Returns the number of checked elements.


isChecked

public boolean isChecked(java.lang.Object obj)
Returns true if the element is checked.


setCheckedElements

public void setCheckedElements(java.util.Collection list)
Sets the checked elements.


setChecked

public void setChecked(java.lang.Object object,
                       boolean state)
Sets the checked state of an element.


setCheckedWithoutUpdate

public void setCheckedWithoutUpdate(java.lang.Object object,
                                    boolean state)
Sets the checked state of an element. No dialog changed listener is informed.


checkAll

public void checkAll(boolean state)
Sets the check state of all elements


replaceElement

public void replaceElement(java.lang.Object oldElement,
                           java.lang.Object newElement)
                    throws java.lang.IllegalArgumentException
Description copied from class: ListDialogField
Replace an element.

Overrides:
replaceElement in class ListDialogField
Throws:
java.lang.IllegalArgumentException