Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Rap how to use the Nebula Grid Widget
Rap how to use the Nebula Grid Widget [message #881166] Sun, 03 June 2012 23:14 Go to next message
ocean xue is currently offline ocean xue
Messages: 105
Registered: November 2011
Senior Member
Rap how to use the Nebula Grid Widget?

add plugin:
org.eclipse.swt.win32.win32.x86_3.7.1.v3738a.jar
org.eclipse.swt_3.7.1.v3738a.jar

----------------------------------------------------------
public void createPartControl(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new FillLayout());
Grid grid = new Grid(composite, SWT.BORDER | SWT.V_SCROLL
| SWT.H_SCROLL);
grid.setHeaderVisible(true);
GridColumn column = new GridColumn(grid, SWT.NONE);
column.setText("Column 1");
column.setWidth(100);
GridColumnGroup columnGroup = new GridColumnGroup(grid, SWT.NONE);
columnGroup.setText("Column Group");
GridColumn column2 = new GridColumn(columnGroup, SWT.NONE);
column2.setText("Column 2");
column2.setWidth(60);
GridColumn column3 = new GridColumn(columnGroup, SWT.NONE);
column3.setText("Column 3");
column3.setWidth(60);
GridItem item1 = new GridItem(grid, SWT.NONE);
item1.setText("First Item");
item1.setText(1, "abc");
GridItem item2 = new GridItem(grid, SWT.NONE);
item2.setText("Second Item");
item2.setText(2, "def");
GridItem item3 = new GridItem(grid, SWT.NONE);
item3.setText("Third Item");
item3.setText(1, "xyz");
// browser = new Browser(parent, SWT.NONE);
// try {
// this.previewReport();
// } catch (EngineException e) {
// e.printStackTrace();
// }
}public void createPartControl(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new FillLayout());
Grid grid = new Grid(composite, SWT.BORDER | SWT.V_SCROLL
| SWT.H_SCROLL);
grid.setHeaderVisible(true);
GridColumn column = new GridColumn(grid, SWT.NONE);
column.setText("Column 1");
column.setWidth(100);
GridColumnGroup columnGroup = new GridColumnGroup(grid, SWT.NONE);
columnGroup.setText("Column Group");
GridColumn column2 = new GridColumn(columnGroup, SWT.NONE);
column2.setText("Column 2");
column2.setWidth(60);
GridColumn column3 = new GridColumn(columnGroup, SWT.NONE);
column3.setText("Column 3");
column3.setWidth(60);
GridItem item1 = new GridItem(grid, SWT.NONE);
item1.setText("First Item");
item1.setText(1, "abc");
GridItem item2 = new GridItem(grid, SWT.NONE);
item2.setText("Second Item");
item2.setText(2, "def");
GridItem item3 = new GridItem(grid, SWT.NONE);
item3.setText("Third Item");
item3.setText(1, "xyz");

}

-------------------------------------------------------
exception:

java.lang.LinkageError: loader constraint violation: when resolving method "org.eclipse.nebula.widgets.grid.Grid.<init>(Lorg/eclipse/swt/widgets/Composite;I)V" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, aaa/View, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, org/eclipse/nebula/widgets/grid/Grid, have different Class objects for the type org/eclipse/swt/widgets/Composite used in the signature

[Updated on: Sun, 03 June 2012 23:45]

Report message to a moderator

Re: Rap how to use the Nebula Grid Widget [message #881269 is a reply to message #881166] Mon, 04 June 2012 04:52 Go to previous message
Ralf Sternberg is currently offline Ralf Sternberg
Messages: 1290
Registered: July 2009
Senior Member

There are plans for a Nebula Grid implementation in the RAP incubator.

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:SWT.LINE_DOT not implemented
Next Topic:[WAR Product] What is the state of WAR Product?
Goto Forum:
  


Current Time: Thu Jul 31 01:32:36 EDT 2014

Powered by FUDForum. Page generated in 0.23129 seconds