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
8
votes
2 answers

File Explorer using Java - how to go about it?

I am set to create a file explorer using Java. The aim is to emulate the behavior of the default explorer as closely as possible, whatever may be the underlying OS. I have done NO GUI programming in Java. I have looked-up Swing, SWT and JFace, and…
Chaitanya
  • 2,039
  • 4
  • 25
  • 32
8
votes
3 answers

JFace examples in Eclipse like SWT Examples?

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.
Grigory
  • 992
  • 2
  • 18
  • 34
8
votes
1 answer

How to disable scrollbar in ScrolledForm?

ScrolledForm's scrollBar can sometimes cause problems.I meet the same problem with this guy in EclipseZone Forum (it's a question asked in 2005 but seems to be unresolved). //The scrollbar should only be displayed in the TreeViewer,not the whole…
Sam Su
  • 6,532
  • 8
  • 39
  • 80
8
votes
4 answers

Adding a remove button to a column in a table

Is it possible to add a Remove button to a cell in a table? I have a table with 5 columns, I would like to add a 6th column. I want the 6th column to have a remove button in each row. Example Row: | 10002 | part | Metal | 001 | Yes | …
jkteater
  • 1,381
  • 3
  • 36
  • 69
8
votes
3 answers

SWT - Table vs. TableViewer

I am creating a new project using SWT. I will have 3 or 4 different tables in the project. I am fairly new to SWT and I find myself asking should I be using just the Table or should it be a TableViewer. I am wanting to learn some good guidelines on…
jkteater
  • 1,381
  • 3
  • 36
  • 69
7
votes
3 answers

How to use log4j in an Eclipse RCP?

How to use log4j logging API in an Eclipse RCP project? As a workaround U tried to create a new OSGI Bundle which has a log4j jars, below is the bundle structure: I've crated a basic RCP application with a view(template) named loggingtest.I've…
srk
  • 4,857
  • 12
  • 65
  • 109
7
votes
5 answers

Layout problems in FieldEditorPreferencePage

I have following problems with layout settings in the FieldEditorPreferencePage. My code is something like this: public void createFieldEditors () { Group pv = new group(getfieldEditorParent(), SWT.SHADOW_OUT); Group of = new…
Alex
7
votes
2 answers

Close SWT shell by clicking outside of it

I have this JFace dialog: setShellStyle(SWT.APPLICATION_MODAL | SWT.CLOSE); setBlockOnOpen(false); Is there a way to make it close by clicking somewhere outside the dialog? Maybe something like listening for a click event on the whole screen and…
adi.neag
  • 633
  • 2
  • 12
  • 27
7
votes
4 answers

Can you disable the back button in a JFace wizard?

I'm writing a wizard for an Eclipse RCP application. After doing some processing on a file and taking some user input, I don't want to let the user go back to make changes. At this point they must either accept or reject the changes they are about…
Tony Lenzi
  • 4,219
  • 5
  • 31
  • 25
7
votes
3 answers

SWT Table with variable row height: Working on Linux, but not Mac/Windows

Problem: I need an SWT Table (JFace TableViewer) with variable row height. In fact, I solved this on my development machine (running Ubuntu 10.10). Unfortunately, this doesn't work on Windows nor on Mac. Initially, I thought I didn't use the…
jastram
  • 733
  • 7
  • 19
7
votes
1 answer

How would one use IDecorationContext api from Eclipse JFace

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…
Roland Tepp
  • 8,301
  • 11
  • 55
  • 73
7
votes
2 answers

Can HTML-Style Links be added to SWT StyledText?

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…
thehiatus
  • 1,575
  • 13
  • 23
7
votes
1 answer

Check checkbox selection from within Listener

Working away at the moment but have come up with a small problem in JFace. I need to have a check box that allows the next button to become active. Here is the code: Button btnConfirm = new Button(container, SWT.CHECK); …
Keith Spriggs
  • 235
  • 1
  • 4
  • 10
7
votes
2 answers

How to install source/javadoc for Eclipse PDE?

I have installed Plugin Development Environment on my Eclipse 3.8 via http://download.eclipse.org/releases/juno update site. Now in PDE projects under the "Plugin Dependencies" tree I see that all PDE JARs have attached source set to the same JARs.…
Fixpoint
  • 9,619
  • 17
  • 59
  • 78
6
votes
1 answer

JFace/SWT multiline TableViewer rows

Is it possible to get multiline (say 2-line) row in JFace tableViewer? I want my long text part spreaded between two lines, and my short lines aligner vertically in the cell. How can I achive that result?
execc
  • 1,083
  • 12
  • 25