Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.ViewerSorter


    viewer = new TableViewer(composite);
    viewer.getTable().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    viewer.setUseHashlookup(true);
    viewer.setLabelProvider(new LabelProvider());
    viewer.setContentProvider(new ContentProvider());
    viewer.setSorter(new ViewerSorter());
    viewer.addSelectionChangedListener(subscribeAction);
    viewer.getControl().setMenu(menuManager.createContextMenu(viewer.getControl()));
   
    sharedListViewer = new TableViewer(composite);
    sharedListViewer.getTable().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
View Full Code Here


    versionViewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER);
    versionViewer.getTable().setLayoutData(gd);
    versionViewer.setContentProvider(new VersionContentProvider());
    versionViewer.setLabelProvider(new VersionLabelProvider());
    versionViewer.setSorter(new ViewerSorter());

    versionViewer.addCheckStateListener(new ICheckStateListener() {
      public void checkStateChanged(final CheckStateChangedEvent event) {
        if (event.getChecked()) {
          versionViewer.setCheckedElements(new Object[] { event.getElement() });
View Full Code Here

    versionViewer = CheckboxTableViewer.newCheckList(client, SWT.BORDER);
    versionViewer.getTable().setLayoutData(data);
    versionViewer.setContentProvider(new VersionContentProvider());
    versionViewer.setLabelProvider(new VersionLabelProvider());
    versionViewer.setSorter(new ViewerSorter());

    versionViewer.addCheckStateListener(new ICheckStateListener() {
      public void checkStateChanged(final CheckStateChangedEvent event) {
        if (event.getChecked()) {
          versionViewer.setCheckedElements(new Object[] { event.getElement() });
View Full Code Here

    versionViewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER);
    versionViewer.getTable().setLayoutData(gd);
    versionViewer.setContentProvider(new VersionContentProvider());
    versionViewer.setLabelProvider(new VersionLabelProvider());
    versionViewer.setSorter(new ViewerSorter());

    versionViewer.addCheckStateListener(new ICheckStateListener() {
      public void checkStateChanged(final CheckStateChangedEvent event) {
        if (event.getChecked()) {
          versionViewer.setCheckedElements(new Object[] { event.getElement() });
View Full Code Here

    versionViewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER);
    versionViewer.getTable().setLayoutData(gd);
    versionViewer.setContentProvider(new VersionContentProvider());
    versionViewer.setLabelProvider(new VersionLabelProvider());
    versionViewer.setSorter(new ViewerSorter());

    versionViewer.addCheckStateListener(new ICheckStateListener() {
      public void checkStateChanged(final CheckStateChangedEvent event) {
        if (event.getChecked()) {
          versionViewer.setCheckedElements(new Object[] { event.getElement() });
View Full Code Here

  private void createTreeViewer() {
    treeViewer = new TreeViewer(pagebook, SWT.NONE);
    treeViewer.setContentProvider(new LiveBeansTreeContentProvider(this));
    treeViewer.setLabelProvider(new LiveBeansTreeLabelProvider());
    treeViewer.setSorter(new ViewerSorter());

    treeViewer.addDoubleClickListener(new IDoubleClickListener() {
      public void doubleClick(DoubleClickEvent event) {
        if (openBeanDefAction != null && openBeanDefAction.isEnabled()) {
          openBeanDefAction.run();
View Full Code Here

        }
        return null;
      }
    });

    treeViewer.setSorter(new ViewerSorter() {
      @Override
      public int compare(Viewer viewer, Object e1, Object e2) {
        if (e1 instanceof TemplateCategory && e2 instanceof Template) {
          return -1;
        }
View Full Code Here

    tree = new CheckboxTreeViewer(composite);
    tree.setUseHashlookup(true);
    final ITreeContentProvider treeContentProvider = new SpringExplorerAdaptingContentProvider();
    tree.setContentProvider(treeContentProvider);
    tree.setLabelProvider(new SpringExplorerAdaptingLabelProvider());
    tree.setSorter(new ViewerSorter());
    tree.setInput(IDEWorkbenchPlugin.getPluginWorkspace().getRoot());

    data = new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL);
    data.heightHint = SIZING_SELECTION_WIDGET_HEIGHT;
    data.widthHint = SIZING_SELECTION_WIDGET_WIDTH;
View Full Code Here

   * Sorts by the <code>String</code> columnKey.
   *
   * @param columnKey the <code>String</code> columnKey.
   */
  protected void sortBy(String columnKey) {
    ViewerSorter viewerSorter = ReviewPropertyViewerSorter.getViewerSorter(columnKey);
    if (viewerSorter != null) {
      ViewerSorter previousSorter = tableViewer.getSorter();
      if (previousSorter == viewerSorter) {
        ReviewPropertyViewerSorter.setReverse(!ReviewPropertyViewerSorter.isReverse());
        // Resets sorter.
        tableViewer.setSorter(null);
      }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.viewers.ViewerSorter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.