Skip to main content


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] Mon, 04 June 2012 03:14 Go to next message
ocean xue is currently offline ocean xueFriend
Messages: 107
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: Mon, 04 June 2012 03: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 08:52 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
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:Styling height of view tab folder
Next Topic:Toolitem of vetical toolbar are centered per default in 1.5
Goto Forum:
  


Current Time: Fri Apr 26 08:18:13 GMT 2024

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

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

Back to the top