I'm trying to save jface TreeViewer expansion state to refresh it after calling setInput() method. I tried getExpandedElements, setExpandedElements, getExpandedTreePaths, setExpandedTreePaths methods of TreeViewer bu it doesn't work.
Object[] expandedElements = viewer.getExpandedElements();
TreePath[] expandedTreePaths = viewer.getExpan...
I'm trying to update the input of JFace TreeViwer periodically using setInput() method. Also I use the
viewer.setExpandedElements(expandedElements);
viewer.setExpandedTreePaths(expandedTreePaths);
methods to save the state of the tree. But after each setInput() call the TreeViewer flickers. How can avoid from flickering ?
...
How would you go about displaying huge amount of rows in SWT table? Huge is something above 20K rows, 20 columns. Don't ask me why I need to show that much data, it's not the point. The point is how to make it work as fast as possible so that end user won't get bored waiting. Each row displays an instance of some object, columns are its ...
Hi, pratically I build up a tableviewer as usual, but initially it does not sort all the rows according the column defined for sorting.
The code I am using:
viewer.getTable().setSortColumn(viewer.getTable().getColumn(4));
viewer.getTable().setSortDirection(SWT.UP);
Only after clicking manually the column #4 I obtain the correct order...
Hello Everyone,
I have actually two questions but they are kind of related so here they go as one...
How to ensure garbage collection of tree nodes that are not currently displayed using TreeViewer(SWT.VIRTUAL) and ILazeTreeContentProvider?
If a node has 5000 children, once they are displayed by the viewer they are never let go,
hence ...
Apparently if using ILazyTree(TreePath)ContentProvider sorting and filtering is not supported by TreeViewers. So setting ViewerFilters or Sorters/Comparators to your TreeView won't do any good. Perhaps this is related to not knowing all elements, including those not visible at the moment.
In support to this statement here is javadoc ex...
The official site is quite scarce and most of the examples are EMF- related and for Eclipse 3.5 But what if one uses 3.4 target Eclipse platform and does not use EMF.
I am specifically interested in Tree Viewer examples, but good example and documentation is always appreciated.
...
The StyledCellLabelProvider is available in 3.5 onwards, but alas I am anchored to a platform that must use v3.3. Can anyone say how I might display rich text in a field of a JFace TableViewer?
Is it even possible at all?
M.
...
Hi,
I have a JFace TableViewer. The values in one column should normally be unique, but there are cases where it makes sense that they are not (e.g. when a row was copied and not yet changed). However I want to alert the user of the duplicate values by highlighting the rows which contain duplicate values in that column. What's the best ...
DISCLAIMER:
this is the classic case of .NET GUI trying to work his way around JAVA stuff.
PROBLEM DESCRIPTION:
I am trying to build a very simple GUI with JFace and SWT - the code is straightforward (there's plenty tutorials), what it's not so straightforward is that I can't seem to get JFace and SWT to work outside a plugin project...
Once I start drawing my own images in an Eclipse table cell, highlighting that table cell results in a strange highlight color. See for yourself:
While the transparency is actually preserved like in the first column, the highlight-blue isn't as blue as it should. Is this my fault or Eclipse's fault?
Here's the code snippet:
public ...
OK - I give up.
How can I set width and height of a JFace ListViewer?
This should be self-evident but can't seem to find anything and there's no obvious way of doing it looking at the methods of the class.
Tried this with no luck:
myListViewer.getControl().setSize(1000, 1000);
Any help appreciated.
...
Hello.
Are there any all-in-one JFace controls example out there like the SWT Examples in Eclipse? Searching (googling and searching here on stackoverflow.com) did not help me.
It would be nice if it was a standalone app or an eclipse plugin.
Thank you.
...
I'm writing a GUI app that I want to use Swing and SWT. The end-user will specify somehow which should be used (it won't use both at the same time!). SWT is what I prefer generally and I have been looking at JFace, but it seems like if I use its most powerful features I will increase the coupling between the GUI and the model, and make i...
Is there an example out there for using IDecorationContext for label decorations?
By the looks of it, IDecorationContext class seems to provide some sort of contextual decoration support, but for the life of me, I can not find any sample code using this feature...
Has anybody actually used decoration context feature and if so, what use...
http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/DisplayananimatedGIF.htm describes how to display an animated GIF in SWT - in general. While the code works and is easily comprehensible I'm facing serious issues displaying an animated GIF in a SWT/JFace table/tree viewer cell with that technique. -> all code below
Essentially, I implem...
I have a TreeViewer of custom content. I'd like to be able to reorder it, much in the same was as the Outline View does currently when viewing Java Source.
Is there any reference material or documentation out there on how to achieve this?
Martin.
...
I have a TableViewer widget with a single column, where each row in the table's contents is a Composite with a number of child widgets. The column has a label provider that is a subclass of OwnerDrawLabelProvider. The label provider is supposed to render the Composite children in the table cell, but when paint() is called, nothing is r...
Hello all, I am using jface Dialog for displaying some labels and texts. but i am getting all those displayed in the center, which i want to have as left aligned. so how to do that.
Thanks.
...
Eclipse 3.5 (on the Mac, at least) now has a slimmer look to its buttons and scroll bars, whereas previous versions' buttons and scroll bars used the larger, "puffier" look. I would like to adopt this same look in my RCP app, but I can't find in the SWT or JFace APIs anywhere how to force the widgets to use this slimmer look. How is th...