Runtime

## org.eclipse.gmf.runtime.diagram.ui.dialogs.sortfilter
Class SortFilterPage

    java.lang.Object
      org.eclipse.jface.dialogs.DialogPage
          org.eclipse.jface.preference.PreferencePage
              org.eclipse.ui.dialogs.PropertyPage
                  org.eclipse.gmf.runtime.diagram.ui.dialogs.sortfilter.SortFilterPage

All Implemented Interfaces:
  IDialogPage, IMessageProvider, IPreferencePage, IWorkbenchPropertyPage

public class SortFilterPage
extends PropertyPage

SortFilterPage extends `PropertyPage` by adding a Table and Filter controls for SortFilterPage.CHILD_PAGE types and only a Filter control for SortFilterPage.ROOT_PAGE types.

Nested Class Summary
`class` `SortFilterPage.SortFilterCellModifier` SortFilterCellModifiers.

Field Summary
`static java.lang.String` `CHILD_PAGE` the child page
`static java.lang.String` `ROOT_PAGE` the root page

Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
`ERROR, INFORMATION, NONE, WARNING`

Constructor Summary
`SortFilterPage(java.lang.String pageType, GraphicalEditPart editPart, java.util.List collectionColumns, SortFilterLabelProvider labelProvider)` Constructor for a Sort/Filter page.

Method Summary
`protected Control` `createContents(Composite ancestor)` Adds the filter list and the table for the Table's input.
`Command` `getApplyCommand()` Returns a `Command` that set both the sorting and filtering for this particular list compartment.
`Command` `getCommand()` Creates the command that needs to be executed for this page when "Ok" is pressed.
`protected GridData` `makeArrowButtonGridData(Control control)` Creates GridData for the moveup and movedown toolbar buttons.
`protected void` `performApply()` Writes the sorting/filtering specified by the dialog
`protected void` `performDefaults()` Resets all element to visible and uses the model storage ordering for the sorting.
`void` `setContents(java.util.List sortFilterElements, java.util.List hiddenContents)`
`void` `setFilter(java.util.Map filterMap, java.lang.String property)`
`void` `setInput(java.util.List sortFilterElements)` Sets the input for the table.

Methods inherited from class org.eclipse.ui.dialogs.PropertyPage
`getElement, setElement`

Methods inherited from class org.eclipse.jface.preference.PreferencePage

`applyData, applyDialogFont, computeSize, contributeButtons, createControl, createDescriptionLabel, createNoteComposite, doComputeSize, doGetPreferenceStore, getApplyButton, getContainer, getDefaultsButton, getPreferenceStore, isValid, noDefaultAndApplyButton, okToLeave, performCancel, performHelp, performOk, setContainer, setErrorMessage, setMessage, setPreferenceStore, setSize, setTitle, setValid, toString, updateApplyButton`

Methods inherited from class org.eclipse.jface.dialogs.DialogPage

`convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getImage, getMessage, getMessageType, getShell, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, setButtonLayoutData, setControl, setDescription, setImageDescriptor, setMessage, setVisible`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.eclipse.jface.preference.IPreferencePage
`computeSize, isValid, okToLeave, performCancel, performOk, setContainer, setSize`

Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
`createControl, dispose, getControl, getDescription, getErrorMessage, getImage, getMessage, getTitle, performHelp, setDescription, setImageDescriptor, setTitle, setVisible`

Field Detail

### ROOT_PAGE

    public static final java.lang.String ROOT_PAGE

  the root page

  See Also:
    Constant Field Values

### CHILD_PAGE

    public static final java.lang.String CHILD_PAGE

  the child page

  See Also:
    Constant Field Values

Constructor Detail

### SortFilterPage

    public SortFilterPage(java.lang.String pageType,
                          GraphicalEditPart editPart,
                          java.util.List collectionColumns,
                          SortFilterLabelProvider labelProvider)

  Constructor for a Sort/Filter page.

Parameters:
  `pageType` - either ROOT_PAGE or CHILD_PAGE
  `editPart` - an instance of `ListCompartmentEditPart`. Null for ROOT_PAGE types.
  `collectionColumns` - a list of `SortFilterColumns` that define the Sort/Filter table. Null for ROOT_PAGE types
  `labelProvider` - `SorFilterLabelProvider` which provides the data for the table

Method Detail

### createContents

    protected Control createContents(Composite ancestor)

  Adds the filter list and the table for the Table's input.

  Parameters:
    `ancestor` - the parent `Composite`
  See Also:
    `PreferencePage.createContents(Composite)`

### makeArrowButtonGridData

    protected GridData makeArrowButtonGridData(Control control)

  Creates GridData for the moveup and movedown toolbar buttons.

  Parameters:
    `control` - button
  Returns:
    the `GridData`

### setFilter

    public void setFilter(java.util.Map filterMap,
                          java.lang.String property)

  Parameters:
    `filterMap` -
    `property` -

### setInput

    public void setInput(java.util.List sortFilterElements)

  Sets the input for the table.

  Parameters:
    `sortFilterElements` - the semantic children for thie `IView`

### setContents

    public void setContents(java.util.List sortFilterElements,
                            java.util.List hiddenContents)

  Parameters:
    `sortFilterElements` -
    `hiddenContents` -

### performDefaults

    protected void performDefaults()

  Resets all element to visible and uses the model storage ordering for the sorting.

### performApply

    protected void performApply()

  Writes the sorting/filtering specified by the dialog

### getApplyCommand

    public Command getApplyCommand()

  Returns a `Command` that set both the sorting and filtering for this particular list compartment.

  Returns:
    the command

### getCommand

    public Command getCommand()

  Creates the command that needs to be executed for this page when "Ok" is pressed. It's different from `SortFilterPage.getApplyCommand()`, because it checks whether the page is dirty or not.

  Returns:
    `Command` to be executed per this page

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.