How to color rows in a TreeViewer?
It seems there have been a couple of changes since the previous version, now we are migrating to Eclipse 3.4.
It would be great if you can provide a code sample or point me to an open-source project that does this.
...
I have a TableViewer with an ICellModifier which seems to work fine. I set an ICellEditorValidator on one of the cell editors, though, and I can't get it to behave the way I would like. Here's my abbreviated code:
cellEditors[1] = new TextCellEditor(table);
cellEditors[1].setValidator(new ICellEditorValidator() {
public String isV...
In a elipse-rcp application I am setting the background color for a row in a jface table but I don't want the selection to change this color. I want to be able to specify the color change for a selected row.
...
I need a wizard which second page content depends on the first page's selection. The first page asks the user the "kind" of filter he wants to create and the second one asks the user to create one filter instance of the selected "kind".
JFace's wizards pages contents (createControl(...) method) are all created when the wizard is open an...
Now that I am able to set the content of my second wizard's page depending on the first page selection, I am looking for a way to give the focus to my 2nd page's content when the user clicks the next button on the first page.
By default, when the user click the next button, the focus is given to the button composite (next, back or finis...
I am applying a ViewerFilter to a tree of a few branches, but mostly leaves. The filter really applies to the leaves, using properties within the leaf. All branches are left untouched so that their leafs can appear.
However I would like to filter out branches that contain no selected leafs, and I can see no mechanism within ViewerFilter...
I create a JFace ListSelectionDialog as follows.
final ListSelectionDialog dialog = new ListSelectionDialog(
PlatformUI.getWorkbench().getDisplay().getActiveShell(),
List<SomeClass>,
new ArrayContentProvider(),
new LabelProvider(),
""); //$NON-NLS-1$
dialog.setTitle("Dialog Title"); //$NON-NLS...
I'm looking for a Combo(Viewer) in SWT/JFace which supports autocomplete / type-ahead, i.e. the user can enter a couple of characters and the drop down list should show all matching elements.
...
I 'm running bash shell in OS X and would like to try some SWT/JFace tutorials. I've downloaded eclipse (let's assume at $ECLIPSE_HOME) and swt.jar (let's assume at $SWT_HOME). Now, i would like to compile and run a SWT and/or JFace application from command line without running eclipse. I haven't set up CLASSPATH and i have both JDK 1.5 ...
Having implemented one of the above, can anyone say how I might wire it up directly to a viewer? None of the usual sources explain.
Martin.
...
Hello, I have been wondering about the parameter 'properties' in the method TreeViewer#update(Object element, String[] properties). What are they? What do they refer to? I am not sure what goes into the String[] - are there predefined constants to use? Or are these the names of my column headers? Something else?
I couldn't find any e...
I have set up the Following:
tv = new TableViewer(tableComposite, SWT.FULL_SELECTION | SWT.BORDER);
...//labelProvider, Properties, etc.
ColumnViewerEditorActivationStrategy actSupport = new ColumnViewerEditorActivationStrategy(tv) {
protected boolean isEditorActivationEvent(
ColumnViewerEditorActivationEvent event) {
...
This is using SWT, jface and eclipse 3.4.
I've set up a tableviewer with EditingSupport, and a ComboBoxCellEditor.
When I change the selection in the combobox and then click outside the combobox to deselect it, that's when it calls setValue in the EditingSupport.
However, I have this setup in a Dialog, and if I change the selection in ...
Hopefully someone can point me in the right direction. I'm trying to create a CellEditor in Eclipse and when I click on the field I get an Unhandled event loop exception with the stack trace below.
The cell editor code for this column looks like this
/** Cell Editor Row 2 **/
textEditor = new TextCellEditor(table);
((Text)textEditor....
trying to run the code
// Create a label with an image
Image image = new Image(display, "interspatial.gif");
Label imageLabel = new Label(shell, SWT.NONE);
imageLabel.setImage(image);
is giving me the error message
Exception in thread "main" org.eclipse.swt.SWTException:
i/o error (java.io.FileNotFoundException: interspatial...
I know SWT has a Link class to create HTML a href style links as widgets, but I wast trying to find a way to make certain text in a StyledText control appear and function as a link.
I feel like Eclipse does this in their code editor if you hold down control and hover over a method name, but I know the Eclipse java editor is much more ...
What I'd like to do is be able to tab between elements in table.
I currently am creating my table like this.
this.tableViewer =
new TableViewer(parent , SWT.FULL_SELECTION);
tableViewer.setUseHashlookup(true);
table = tableViewer.getTable();
GridData gridData = new GridData(GridData.FILL_BOTH);
...
Which are the reasons to choose the Eclipse Rich Client Platform as the base of my application, instead of just using SWT/JFace?
...
Anyone know if it's possible to enable/disable individual JFace TextCellEditor fields.
For instance if I have a table with 5 columns, I want the last cell to be empty unless field #4 is filled in.
...
How do I get a Font object representing the font set as the "Text Font" in the Eclipse Preferences -> General -> Appearance -> Colors and Fonts? I'm implementing a table-view where one of the columns is supposed to contained fixed-width text.
...