swt

SWT Radio button rollback selection change

Hi, I have some problem with button withs flag SWT.RADIO; What i want to is to prevent the change of some button in some circumstances case scenario We have three buttons, on selection change the system verifies that this is allowed. if not then we don want to set new selection. So what the real problem, i am operating on selec...

JFace/SWT: Change the labels for buttons in InputDialog

I want to create an InputDialog with custom labels for the OK/Cancel buttons. I'm using org.eclipse.jface.dialogs.InputDialog. I tried to override the button creation method: @Override protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); getButton(IDialogConstants.OK_ID).se...

JFace ApplicationWindow white line at top of Window

I've created the most basic JFace ApplicationWindow I can think of and I get this 1 pixel white border at the top of the screen: And the code to create it: import org.eclipse.jface.window.ApplicationWindow; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import...

SWT OleClientSite: How to load a no-real xls file in Excel?

I have an Excel file in OfficeML format, MyData.xls, but it's not really a XLS format but a HTMLfile with a XLS extension. Since I upgraded to Office 2007 from Office 2003 I get a warning message saying that the file content does not match the file extension. It seems that OfficeML now check if the file is a pure XLS file or not. In my ...

SWT Style Flag - which are applicable for a composite?

Hi, after googleing a bit im stuck in finding out which SWT. flags I can use for a composite. The reference here Ref does not give me any idea...e.g. the constructor details list NO_BACKGROUND, NO_FOCUS, NO_MERGE_PAINTS, NO_REDRAW_RESIZE, NO_RADIO_GROUP, EMBEDDED, DOUBLE_BUFFERED but you can also pass SWT.BORDER, and it has an effect. M...

Linking JComboBox & JTable

Requirement: I have a list of strings displayed in the ComboBox. Each of these Strings can have some properties. These properties are displayed in PropertyTable. ComboBox's selected Item's properties are displayed in the table. In addition, we use PropertyTable for editing or setting property values to the selected item in the comboBox. ...

SWT Global KeyListener Button Focus Problem

Hi there, for my app I need the space key to call a function independent from the focused widget, everywhere in the app but only if the according tab is opend. I found that one can add a filter to the display, like this: getShell().getDisplay().addFilter(SWT.KeyDown, new Listener() { public void handleEvent(Event arg0) { ...

How to add Filter to my Combo?

Hi Everyone! I have a SWT combo box which has items more than 100. For more efficient selecting, I want to add filter on combo box. I have searched for this, but I cannot find appropriate comments. Please let me know what is the best way for this. Thanks. ...

How to determine that a JFace or SWT Dialog is currently open?

In our RCP application, we need to resort to using a global key event handler (via Display.addFilter()) for more advanced key event handling/routing irrespective of current focus. We need to be able to determine if a dialog box is currently open for some of the routing logic. Seems like a fairly trivial question but I keep hitting dead ...

No projects are found to import - Helios eclipse

When downloading the 64 bit for Helios eclipse claims that there are no projects found to import - the file is swt-3.6-win32-win32-x86_64.zip This should be fairly straight forward!!!! ...

SWT RowLayout right-to-left ?

Hi, I've read the article Understand SWT Layout, but I cannot find a way to put several buttons in a container in right-to-left way. How can I do this? ...

Layout issue: autogrow label (SWT)

Hi, I'm using a GridLayout trying to make a label autogrow without hiding anything of its content. Here's a simple code to test: Everytime I press the button the label text grows larger, but only after I resize the window horizontally I get the correct layout. Is there any way to fix this without having to resize the window? I think I'v...

Eclipse won't load my javadocs

Hi all, I'm trying to create a SWT application in eclipse. I've followed the instructions and loaded the org.eclipse.swt project to my workspace, and made it a dependency of my project by adding it to my build path. However i cannot see the javadoc when i'm referencing the SWT libraries. I tried extracting the 'src.zip' into the org.ec...

Changing the look and feel of an SWT tabs

I'm using SWT CTabFolder to build tabs in my application. I kind of dislike the visual appearance of tabs, it too Eclipse-like. Is there a way to change the aspects of tabs? I'd like to change the close button for example, the placement of tabs, their appearance maybe... ...

How can I put a "(de)select all" check box in an SWT Table header?

I have an SWT Table that I'm instantiating with the SWT.CHECK style in order to display a check box next to every row. My users have requested another check box in the header row of the table in order to allow them to select/deselect all the rows with one click. I can't see any obvious way to do it, and I've only found Swing/JTable e...

Eclipse SWT - WizardPage widgets validation

What is the best way to validate Text, Combo and any other SWT widget included in Eclipse Wizard? Recently, I got into a project in which there are many different wizards. I tried to add FocusListeners, ModifyListeners etc. however the size of code and it's complexity was not what I expected. Let's say there are two Text elements in Wi...

Learning Eclipse RCP and SWT/JFace

I am new to to Eclipse RCP and SWT/JFace. I intend to purchase the Second Edition of the well known Eclipse Rich Client Platform book by Jeff McAffer, Jean-Michel Lemieux, Chris Aniszczyk. I wish to know from people who have read any of the editions of the book whether the book serves as a good introduction to both the topics (RCP and SW...

Scrolling SWT Table programmatically

How to do vertical scroll of SWT table programatically? I'm implementing search function on the table. When an item was found then it will be scrolled to the item found. ...

Modify Java SWT Browser User-agent

How is it possible to set the user agent header sent by SWT Browser? edit: Or is there any browser lib for java that allows specifying the user agent? ...

The java swt tabcontrol is stealing my focus

I have my cursor in the form in my swt browser. I minimized and maximized the screen then I hit tab and nothing is happening on my form instead my tab control is focused (the tab control is also the first control on the form) What could be causing this? What can I do to prevent it? ...