Home » Eclipse Projects » Nebula » Several problems and questions
Several problems and questions [message #6890] |
Mon, 24 July 2006 10:42 |
Eclipse User |
|
|
|
Originally posted by: search-1984.gmx.ch
Hi everyone
I've been taking a look at this grid and made the following very simple
example:
package test;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.nebula.widgets.grid.Grid;
import org.eclipse.swt.nebula.widgets.grid.GridColumn;
import org.eclipse.swt.nebula.widgets.grid.GridItem;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class Test {
public static void main (String [] args)
{
Display display = new Display ();
Shell shell = new Shell (display);
shell.setLayout(new FillLayout());
Grid grid = new Grid(shell,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
grid.setHeaderVisible(true);
GridColumn column = new GridColumn(grid,SWT.NONE);
column.setText("1st");
column.setWidth(100);
GridColumn column2 = new GridColumn(grid,SWT.NONE);
column2.setText("2nd");
column2.setWidth(100);
column2.setTree(true);
GridColumn column3 = new GridColumn(grid,SWT.NONE);
column3.setText("3rd");
column3.setWidth(100);
GridItem item1 = new GridItem(grid,SWT.NONE);
item1.setText(0,"1st Item");
item1.setText(1,"1");
item1.setText(2,"2");
item1.setText(3,"3");
GridItem item11 = new GridItem(item1,SWT.NONE);
item11.setText(0,"2nd Item");
item11.setText(1,"4");
item11.setText(2,"5");
item11.setText(3,"6");
GridItem item2 = new GridItem(grid,SWT.NONE);
item2.setText(0,"3rd Item");
item2.setText(1,"7");
item2.setText(2,"8");
item2.setText(3,"9");
shell.setSize(500,250);
shell.open ();
while (!shell.isDisposed()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
}
When I run the application I can see the tree in the second column. when i
expand it the item in the second column (2nd row) is greyed out. can
someone tell me why i get this? is this a bug? i haven't managed to get
rid of it yet. further i wanted to insert a picture in one cell. but that
didn't work either (no picture was displayed). Is this a known bug or how
should that be done. when i run the application i noticed that when i
moved the cursor over the table it's kind of flickering. why is that? (i
haven't noticed that in the plugin-example). and one last question. is it
possible to have multiple lines in one row?
thanks in advance
regards
|
|
|
Re: Several problems and questions [message #6941 is a reply to message #6890] |
Mon, 24 July 2006 14:17 |
Chris Gross Messages: 253 Registered: July 2009 |
Senior Member |
|
|
Hi Pete,
1.) 2nd row, 2nd column looks grayed (or selected). Turns out when I
built the latest drop, I forgot to remove a piece of test code (Doh!).
The cell at 2,2 is always selected.
2.) Picture in cell, that is not yet implemented. I am actually in the
process of adding that code now. You will be able to see pictures in
the next drop.
3.) Flickering, are you seeing the whole table flicker or just the
border? What platform are you on? If you are on Windows and you are
just seeing the border flicker:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=150274
4.) Multiple lines in cells/rows, it is possible but not supported by
the default rendering. If you wish to have multiple lines in each cell,
you will have to supply a new cell renderer.
I will be putting up a new drop later today or tomorrow that solves #1
and #2.
-Chris
Pete wrote:
> Hi everyone
>
> I've been taking a look at this grid and made the following very simple
> example:
> package test;
>
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.layout.FillLayout;
> import org.eclipse.swt.nebula.widgets.grid.Grid;
> import org.eclipse.swt.nebula.widgets.grid.GridColumn;
> import org.eclipse.swt.nebula.widgets.grid.GridItem;
> import org.eclipse.swt.widgets.Display;
> import org.eclipse.swt.widgets.Shell;
>
> public class Test {
>
> public static void main (String [] args) {
> Display display = new Display ();
> Shell shell = new Shell (display);
> shell.setLayout(new FillLayout());
>
> Grid grid = new Grid(shell,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
> grid.setHeaderVisible(true);
> GridColumn column = new GridColumn(grid,SWT.NONE);
> column.setText("1st");
> column.setWidth(100);
> GridColumn column2 = new GridColumn(grid,SWT.NONE);
> column2.setText("2nd");
> column2.setWidth(100);
> column2.setTree(true);
> GridColumn column3 = new GridColumn(grid,SWT.NONE);
> column3.setText("3rd");
> column3.setWidth(100);
> GridItem item1 = new GridItem(grid,SWT.NONE);
> item1.setText(0,"1st Item");
> item1.setText(1,"1");
> item1.setText(2,"2");
> item1.setText(3,"3");
> GridItem item11 = new GridItem(item1,SWT.NONE);
> item11.setText(0,"2nd Item");
> item11.setText(1,"4");
> item11.setText(2,"5");
> item11.setText(3,"6");
> GridItem item2 = new GridItem(grid,SWT.NONE);
> item2.setText(0,"3rd Item");
> item2.setText(1,"7");
> item2.setText(2,"8");
> item2.setText(3,"9");
> shell.setSize(500,250);
> shell.open ();
> while (!shell.isDisposed()) {
> if (!display.readAndDispatch ()) display.sleep ();
> }
> display.dispose ();
> }
> }
> When I run the application I can see the tree in the second column. when
> i expand it the item in the second column (2nd row) is greyed out. can
> someone tell me why i get this? is this a bug? i haven't managed to get
> rid of it yet. further i wanted to insert a picture in one cell. but
> that didn't work either (no picture was displayed). Is this a known bug
> or how should that be done. when i run the application i noticed that
> when i moved the cursor over the table it's kind of flickering. why is
> that? (i haven't noticed that in the plugin-example). and one last
> question. is it possible to have multiple lines in one row?
> thanks in advance
>
> regards
>
|
|
|
Re: Several problems and questions [message #6988 is a reply to message #6941] |
Mon, 24 July 2006 18:31 |
Chris Gross Messages: 253 Registered: July 2009 |
Senior Member |
|
|
The new build is up.
-Chris
Chris Gross wrote:
> Hi Pete,
>
> 1.) 2nd row, 2nd column looks grayed (or selected). Turns out when I
> built the latest drop, I forgot to remove a piece of test code (Doh!).
> The cell at 2,2 is always selected.
>
> 2.) Picture in cell, that is not yet implemented. I am actually in the
> process of adding that code now. You will be able to see pictures in
> the next drop.
>
> 3.) Flickering, are you seeing the whole table flicker or just the
> border? What platform are you on? If you are on Windows and you are
> just seeing the border flicker:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=150274
>
> 4.) Multiple lines in cells/rows, it is possible but not supported by
> the default rendering. If you wish to have multiple lines in each cell,
> you will have to supply a new cell renderer.
>
> I will be putting up a new drop later today or tomorrow that solves #1
> and #2.
>
> -Chris
>
> Pete wrote:
>> Hi everyone
>>
>> I've been taking a look at this grid and made the following very
>> simple example:
>> package test;
>>
>> import org.eclipse.swt.SWT;
>> import org.eclipse.swt.layout.FillLayout;
>> import org.eclipse.swt.nebula.widgets.grid.Grid;
>> import org.eclipse.swt.nebula.widgets.grid.GridColumn;
>> import org.eclipse.swt.nebula.widgets.grid.GridItem;
>> import org.eclipse.swt.widgets.Display;
>> import org.eclipse.swt.widgets.Shell;
>>
>> public class Test {
>>
>> public static void main (String [] args) {
>> Display display = new Display ();
>> Shell shell = new Shell (display);
>> shell.setLayout(new FillLayout());
>>
>> Grid grid = new Grid(shell,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
>> grid.setHeaderVisible(true);
>> GridColumn column = new GridColumn(grid,SWT.NONE);
>> column.setText("1st");
>> column.setWidth(100);
>> GridColumn column2 = new GridColumn(grid,SWT.NONE);
>> column2.setText("2nd");
>> column2.setWidth(100);
>> column2.setTree(true);
>> GridColumn column3 = new GridColumn(grid,SWT.NONE);
>> column3.setText("3rd");
>> column3.setWidth(100);
>> GridItem item1 = new GridItem(grid,SWT.NONE);
>> item1.setText(0,"1st Item");
>> item1.setText(1,"1");
>> item1.setText(2,"2");
>> item1.setText(3,"3");
>> GridItem item11 = new GridItem(item1,SWT.NONE);
>> item11.setText(0,"2nd Item");
>> item11.setText(1,"4");
>> item11.setText(2,"5");
>> item11.setText(3,"6");
>> GridItem item2 = new GridItem(grid,SWT.NONE);
>> item2.setText(0,"3rd Item");
>> item2.setText(1,"7");
>> item2.setText(2,"8");
>> item2.setText(3,"9");
>> shell.setSize(500,250);
>> shell.open ();
>> while (!shell.isDisposed()) {
>> if (!display.readAndDispatch ()) display.sleep ();
>> }
>> display.dispose ();
>> }
>> }
>> When I run the application I can see the tree in the second column.
>> when i expand it the item in the second column (2nd row) is greyed
>> out. can someone tell me why i get this? is this a bug? i haven't
>> managed to get rid of it yet. further i wanted to insert a picture in
>> one cell. but that didn't work either (no picture was displayed). Is
>> this a known bug or how should that be done. when i run the
>> application i noticed that when i moved the cursor over the table it's
>> kind of flickering. why is that? (i haven't noticed that in the
>> plugin-example). and one last question. is it possible to have
>> multiple lines in one row?
>> thanks in advance
>>
>> regards
>>
|
|
|
Re: Several problems and questions [message #7027 is a reply to message #6988] |
Tue, 25 July 2006 12:19 |
Eclipse User |
|
|
|
Originally posted by: search-1984.gmx.ch
Hi Chris
thanks for your fast reply. I just downloaded the new release. The
selection of cell 2/2 is now ok, but I've still trouble with the image.
I'm keep getting an IllegalArgumentException. Can you maybe show me an
example of how you would insert the picture?
Regarding the flickering I can say that i'm running win xp pro. and it's
actually not just the borders it's the whole table that flickers. it looks
like as if the whole table is being redrawn or refreshed when moving the
cursor around. but as i said i don't have this problem with the example
plugin.
Ok, i'll have to see then. so multilines support is not planed in any near
future releases? about the releases in general: can you approximately say
when you'll be able to provide the first stable release?
thanks in advance.
regards
|
|
| |
Re: Several problems and questions [message #7143 is a reply to message #7051] |
Wed, 26 July 2006 06:56 |
Eclipse User |
|
|
|
Originally posted by: search-1984.gmx.ch
Hi Chris
thanks for your answer. i tried to insert a picture as follows:
item1.setImage(6,new
Image(display,getClass().getResourceAsStream("/images/test.gif ")));
this way i always get an exception (IAE). when using a *.bmp images it
works. how would i insert any other format than *.bmp's?
the flickering is gone now since i upgraded to the newest version. thanks
for the hint.
by the way. do you have an example of how to use a cell editor or is this
not implement yet?
regards
|
|
| |
Re: Several problems and questions [message #563102 is a reply to message #6890] |
Mon, 24 July 2006 14:17 |
Chris Gross Messages: 471 Registered: July 2009 |
Senior Member |
|
|
Hi Pete,
1.) 2nd row, 2nd column looks grayed (or selected). Turns out when I
built the latest drop, I forgot to remove a piece of test code (Doh!).
The cell at 2,2 is always selected.
2.) Picture in cell, that is not yet implemented. I am actually in the
process of adding that code now. You will be able to see pictures in
the next drop.
3.) Flickering, are you seeing the whole table flicker or just the
border? What platform are you on? If you are on Windows and you are
just seeing the border flicker:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=150274
4.) Multiple lines in cells/rows, it is possible but not supported by
the default rendering. If you wish to have multiple lines in each cell,
you will have to supply a new cell renderer.
I will be putting up a new drop later today or tomorrow that solves #1
and #2.
-Chris
Pete wrote:
> Hi everyone
>
> I've been taking a look at this grid and made the following very simple
> example:
> package test;
>
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.layout.FillLayout;
> import org.eclipse.swt.nebula.widgets.grid.Grid;
> import org.eclipse.swt.nebula.widgets.grid.GridColumn;
> import org.eclipse.swt.nebula.widgets.grid.GridItem;
> import org.eclipse.swt.widgets.Display;
> import org.eclipse.swt.widgets.Shell;
>
> public class Test {
>
> public static void main (String [] args) {
> Display display = new Display ();
> Shell shell = new Shell (display);
> shell.setLayout(new FillLayout());
>
> Grid grid = new Grid(shell,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
> grid.setHeaderVisible(true);
> GridColumn column = new GridColumn(grid,SWT.NONE);
> column.setText("1st");
> column.setWidth(100);
> GridColumn column2 = new GridColumn(grid,SWT.NONE);
> column2.setText("2nd");
> column2.setWidth(100);
> column2.setTree(true);
> GridColumn column3 = new GridColumn(grid,SWT.NONE);
> column3.setText("3rd");
> column3.setWidth(100);
> GridItem item1 = new GridItem(grid,SWT.NONE);
> item1.setText(0,"1st Item");
> item1.setText(1,"1");
> item1.setText(2,"2");
> item1.setText(3,"3");
> GridItem item11 = new GridItem(item1,SWT.NONE);
> item11.setText(0,"2nd Item");
> item11.setText(1,"4");
> item11.setText(2,"5");
> item11.setText(3,"6");
> GridItem item2 = new GridItem(grid,SWT.NONE);
> item2.setText(0,"3rd Item");
> item2.setText(1,"7");
> item2.setText(2,"8");
> item2.setText(3,"9");
> shell.setSize(500,250);
> shell.open ();
> while (!shell.isDisposed()) {
> if (!display.readAndDispatch ()) display.sleep ();
> }
> display.dispose ();
> }
> }
> When I run the application I can see the tree in the second column. when
> i expand it the item in the second column (2nd row) is greyed out. can
> someone tell me why i get this? is this a bug? i haven't managed to get
> rid of it yet. further i wanted to insert a picture in one cell. but
> that didn't work either (no picture was displayed). Is this a known bug
> or how should that be done. when i run the application i noticed that
> when i moved the cursor over the table it's kind of flickering. why is
> that? (i haven't noticed that in the plugin-example). and one last
> question. is it possible to have multiple lines in one row?
> thanks in advance
>
> regards
>
|
|
|
Re: Several problems and questions [message #563157 is a reply to message #6941] |
Mon, 24 July 2006 18:31 |
Chris Gross Messages: 471 Registered: July 2009 |
Senior Member |
|
|
The new build is up.
-Chris
Chris Gross wrote:
> Hi Pete,
>
> 1.) 2nd row, 2nd column looks grayed (or selected). Turns out when I
> built the latest drop, I forgot to remove a piece of test code (Doh!).
> The cell at 2,2 is always selected.
>
> 2.) Picture in cell, that is not yet implemented. I am actually in the
> process of adding that code now. You will be able to see pictures in
> the next drop.
>
> 3.) Flickering, are you seeing the whole table flicker or just the
> border? What platform are you on? If you are on Windows and you are
> just seeing the border flicker:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=150274
>
> 4.) Multiple lines in cells/rows, it is possible but not supported by
> the default rendering. If you wish to have multiple lines in each cell,
> you will have to supply a new cell renderer.
>
> I will be putting up a new drop later today or tomorrow that solves #1
> and #2.
>
> -Chris
>
> Pete wrote:
>> Hi everyone
>>
>> I've been taking a look at this grid and made the following very
>> simple example:
>> package test;
>>
>> import org.eclipse.swt.SWT;
>> import org.eclipse.swt.layout.FillLayout;
>> import org.eclipse.swt.nebula.widgets.grid.Grid;
>> import org.eclipse.swt.nebula.widgets.grid.GridColumn;
>> import org.eclipse.swt.nebula.widgets.grid.GridItem;
>> import org.eclipse.swt.widgets.Display;
>> import org.eclipse.swt.widgets.Shell;
>>
>> public class Test {
>>
>> public static void main (String [] args) {
>> Display display = new Display ();
>> Shell shell = new Shell (display);
>> shell.setLayout(new FillLayout());
>>
>> Grid grid = new Grid(shell,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
>> grid.setHeaderVisible(true);
>> GridColumn column = new GridColumn(grid,SWT.NONE);
>> column.setText("1st");
>> column.setWidth(100);
>> GridColumn column2 = new GridColumn(grid,SWT.NONE);
>> column2.setText("2nd");
>> column2.setWidth(100);
>> column2.setTree(true);
>> GridColumn column3 = new GridColumn(grid,SWT.NONE);
>> column3.setText("3rd");
>> column3.setWidth(100);
>> GridItem item1 = new GridItem(grid,SWT.NONE);
>> item1.setText(0,"1st Item");
>> item1.setText(1,"1");
>> item1.setText(2,"2");
>> item1.setText(3,"3");
>> GridItem item11 = new GridItem(item1,SWT.NONE);
>> item11.setText(0,"2nd Item");
>> item11.setText(1,"4");
>> item11.setText(2,"5");
>> item11.setText(3,"6");
>> GridItem item2 = new GridItem(grid,SWT.NONE);
>> item2.setText(0,"3rd Item");
>> item2.setText(1,"7");
>> item2.setText(2,"8");
>> item2.setText(3,"9");
>> shell.setSize(500,250);
>> shell.open ();
>> while (!shell.isDisposed()) {
>> if (!display.readAndDispatch ()) display.sleep ();
>> }
>> display.dispose ();
>> }
>> }
>> When I run the application I can see the tree in the second column.
>> when i expand it the item in the second column (2nd row) is greyed
>> out. can someone tell me why i get this? is this a bug? i haven't
>> managed to get rid of it yet. further i wanted to insert a picture in
>> one cell. but that didn't work either (no picture was displayed). Is
>> this a known bug or how should that be done. when i run the
>> application i noticed that when i moved the cursor over the table it's
>> kind of flickering. why is that? (i haven't noticed that in the
>> plugin-example). and one last question. is it possible to have
>> multiple lines in one row?
>> thanks in advance
>>
>> regards
>>
|
|
| | | | |
Goto Forum:
Current Time: Sat Oct 19 13:08:06 GMT 2024
Powered by FUDForum. Page generated in 0.05468 seconds
|