GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Log in
  • Manage Cookies
  • Download
  • Projects
  • Working Groups
  • Members
  • Marketplace
  • Events
  • Planet Eclipse
  • Newsletter
  • Videos
  • Blogs
  • Report a Bug
  • Forums

This view

  • Original page
  • New address

GeezerVison is showing wiki.eclipse.org — Nebula ColumnBrowser - Eclipsepedia

Jump to: navigation, search

Nebula ColumnBrowser

< Back to Nebula Main Page

Introduction

ColumnBrowser.png

A widget that displays a tree structure a la mac in miller columns (look at http://en.wikipedia.org/wiki/Miller_Columns).

Contents

  • 1 Introduction
  • 2 Usage
    • 2.1 ColumnBrowserWidget
    • 2.2 Column item
  • 3 Example

Usage

ColumnBrowserWidget

The widget itself contains the following method :


   public ColumnBrowserWidget(final Composite parent, final int style)

Constructor of the widget

   public void addSelectionListener(final SelectionListener listener)
  • Add a selection listener
   public void clear(final boolean needPacking)
  • Remove all data of the widget
   public ColumnItem getSelection()
  • Get the ColumnItem selected (or null if none)
   public void removeSelectionListener(final SelectionListener listener)
  • Remove a selection listener
   public void select(final ColumnItem item)
  • Select a given item

Column item

The elements displayed in the widget are called ColumnItem


   public ColumnItem(final ColumnBrowserWidget widget)
  • Create an item and associate it to a given widget
   public ColumnItem(final ColumnBrowserWidget widget, final int index)
  • Create an item is at a zero-based given position
   public ColumnItem(final ColumnItem parent)
  • Create a item that is a child of another ColumnItem
   public ColumnItem(final ColumnItem parent, final int index)
  • Create a item that is a child of another ColumnItem at a zero-based given position
   public void remove(final ColumnItem item)
  • Remove a child of the current item
   public void remove(final int index)
  • Remove a child of the current item
   public void removeAll()
  • Remove all children of the current item
   public ColumnItem getItem(final int index)
  • Get a children at a given position
   public int getItemCount()
  • Get the number of children of the current item
   public ColumnItem[] getItems()
  • Get all children of the current item
   public ColumnBrowserWidget getParent()
  • Get the widget that is the parent of the current item
   public ColumnItem getParentItem()
  • Get the parent of the current item, or null if there is not
   public int indexOf(final ColumnItem item)
  • Returns the position of a children

You can notice that the behaviour of this widget is very similar to the couple Tree/TreeItem.

Example

An example called ColumnsSnippet.java is located in the plugin org.eclipse.nebula.widgets.opal.columnbrowser.snippets.

This example is also available here : ColumnsSnippet.java

Retrieved from "https://wiki.eclipse.org/index.php?title=Nebula_ColumnBrowser&oldid=438748"

This page was last modified 06:17, 19 March 2020 by Eclipsepedia anonymous user Unnamed Poltroon.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.