Skip to main content



      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
Eclipse UserFriend
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] by 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
Eclipse UserFriend
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:Styling height of view tab folder
Next Topic:Toolitem of vetical toolbar are centered per default in 1.5
Goto Forum:
  


Current Time: Mon Jun 16 09:50:44 EDT 2025

Powered by FUDForum. Page generated in 1.02801 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top