Questions tagged [jface]

Use this tag for questions about JFace which is a Java application framework based on SWT. The goal of JFace is to provide a set of reusable components that make it easier to write a Java-based GUI application.

is a UI toolkit that provides helper classes for developing UI features that can be tedious to implement. operates above the level of a raw widget system. It includes classes for handling common UI programming tasks such as:

Viewers: Handle the drudgery of populating, sorting, filtering, and updating widgets.

Actions and contributions (Deprecated): Introduce semantics for defining user actions and specifying where to make them available.

Image and font registries: Provide common patterns for handling UI resources.

Dialogs and wizards: Define a framework for building complex interactions with the user.

Field assist: Provides classes that help guide the user in choosing appropriate content for fields in dialogs, wizards, or forms.

frees you up to focus on the implementation of your specific plug-in's function, rather than focusing on the underlying widget system or solving problems that are common in almost any UI application.

Eclipse is based upon the user interface toolkit . provides classes and frameworks which simplify common use cases. does not hide the API. Therefore knowledge is still required.

All JFace classes are in packages starting with org.eclipse.jface and are in the org.eclipse.jface plugin.

Useful Links:

1700 questions
6
votes
1 answer

Strange alignment and layout in tableviewer with image

I use a TableViewer with two columns. The first should contain text and the second an image depending on the state of the object. The label provider is a custom provider which extends LabelProvider and implements ITableLayoutProvider. When no image…
MatF
  • 1,728
  • 2
  • 14
  • 31
6
votes
2 answers

How to add a ViewerFilter on a JFace TableViewer that update dynamically?

I want to add in a SWT/JFace application a search functionality that filter a TableViewer as the user enter text in the search text field. final Text filterText = new Text(parent, SWT.NONE); filterText.addModifyListener(new ModifyListener() { …
fluminis
  • 3,575
  • 4
  • 34
  • 47
6
votes
2 answers

TextCellEditor with autocomplete in Eclipse SWT/JFace?

I'd like a TextCellEditor with the standard auto-complete behaviour, that that any user nowadays expects when typing inside an input cell with a list of suggested strings. For a good working example of what I'm after, in Javascript, see this jQuery…
leonbloy
  • 73,180
  • 20
  • 142
  • 190
6
votes
1 answer

how to add dynamically image in label with button click using rcp and swt / jface component

Button click to open FileDialog Box and selected any image to display on specific label. i try to set absolute path or relative path using selected images in Label control but not proper working dynamically. so please help to my question solve.
Chetan Bhagat
  • 610
  • 6
  • 21
6
votes
2 answers

Sort JFace TableViewer by Multiple Columns

I'm pretty sure what I'm asking is impossible, but I couldn't find a definitive no to the question anywhere, so here it goes: Consider the following working example: public class TableViewerSorter { private static final String DATA_COMPARATOR =…
Stefan S.
  • 3,950
  • 5
  • 25
  • 77
6
votes
1 answer

How to add a new button to buttons bar of JFace dialog

I need a button to be constantly placed at the bottom left corner of my JFace dialog even on re size of dialog. I have overridden the createButtonsForButtonBar() protected void createButtonsForButtonBar(Composite parent) { sampleButton =…
user1168608
  • 598
  • 2
  • 10
  • 27
6
votes
2 answers

Change SWT tree node text foreground when highlighted

I’m pretty new in SWT/JFace technology and I’ve found a problem that it’s driving me crazy. In an Eclipse RCP application I have a view where I’ve placed a SWT tree with a JFace TreeViewer which provides the labels and the icons by means of a label…
6
votes
2 answers

How do I make part of a TreeViewer cell bold?

I currently want to write an Eclipse editor based on a JFace TreeViewer. I added a CellLabelProvider to the TreeViewer. If I set the font of a cell with directly in the update method of the CellLabelProvider to a bold font the label is shown bold.…
manuel
  • 627
  • 7
  • 7
6
votes
3 answers

How to always show vertical scroll bar in SWT table?

Is it possible to always show the vertical scroll bar in a SWT table even if the table is empty? By always showing a (possible disabled) vertical scroll bar one can avoid that the last column get partially hidden when the columns use…
Claude
  • 1,724
  • 3
  • 17
  • 46
6
votes
1 answer

Eclipse RCP - ILazyTreeContentProvider implementation is unexpectedly eager

I am developing an Eclipse RCP application, and am trying to use a ILazyTreeContentProvider implementation in order to show only the visible items at a certain time. The code: Inside the class extending ViewPart: public void…
Vlad Ilie
  • 1,389
  • 1
  • 13
  • 37
6
votes
1 answer

Is there a better way to use sorting and filtering with ILazyTreeContentProvider

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,…
Svilen
  • 1,377
  • 1
  • 16
  • 23
6
votes
2 answers

Best practise for data binding a list in Eclipse RCP application

I am having trouble understanding the databinding in my Eclipse RCP application. I just can't figure out how it's supposed to work.. Here's what I want to do I have a View where a list of texts should be displayed. The texts are "stored" in a simple…
Friederike
  • 1,252
  • 15
  • 29
6
votes
3 answers

TableViewer, defining an initial sorting order has no effect on data

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…
Steel Plume
  • 2,260
  • 3
  • 26
  • 35
6
votes
2 answers

JFace dialog button translation

I am creating a standalone SWT/JFace application. I used to use plain old SWT MessageBox: int style = SWT.APPLICATION_MODAL | SWT.YES | SWT.NO; MessageBox messageBox = new MessageBox (getShell(), style); messageBox.setText…
Steph
  • 1,989
  • 14
  • 18
6
votes
5 answers

Tab between fields in TableViewer

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 =…
ist_lion
  • 3,149
  • 9
  • 43
  • 73