swt

Using main menu as toolbar in SWT

Hi, I'd like to create a toolbar that contains main menu, just like the standard main menu at the top of the window. Is there some fast way to do this in SWT ? I know that I can create a toolbar with buttons and context menus :-) Thx for help. ...

SWT toolbar questions

Hello, I've 2 questions regardind SWT: is there a quick way to align toolbar to the right side of a window (at startup) ? can I create a toolbar that occupies 100% with of the window ? Thanks for help :) ...

Is GC drawing on top of an SWT_AWT Bridged frame possible ?

I am trying to do something of this sort with no luck. Composite c = new Composite(shell); JFrame frame = SWT_AWT.new_Frame(c); GC gc = new GC(c); c.fillRectangle(0, 0, 100, 100); code runs fine but I can't get the rectangle to show on top. I think the frame hides it. Is there a way to put the GC drawings on top? Thanks, -Hadi ...

How can I change the button that is in the view.

I have a toggle button that is on the Viewer![alt text][1] the problem is , when it turn on , How can recover the last status . like even though the default value is false , how to set it true programmatically. In the plugin.xml , the default status is true. ...

SWT Tree Item Height

Is it possible to have an SWT tree with lines of different height ? Manuel ...

where does the SWT PaintEvent come from and how to influence it

I am trying to draw and animate with SWT using PaintListeners. I would like to influence the timing of the animation, so I have looked far and wide but could not found anything explaining where and how the PaintEvents are generated and how to influence that, e.g enforcing a framerate or sending the PaintEvent only to cetrain Widgets. So...

swt print\paint a tree to an image file full size without its scrollbars

hey all, I'm trying to print\paint\render a tree to an image\file\gc. the problem is i'm getting the tree limited to the current displayed size with it's scroll bars. I can't seem to 'go lower'. any advice? here's my code String saveTo = "C:\\tmp.jpg"; if (saveTo != null) { Tree g = m_flowTre...

select tab item on hover while in drag-and-drop operation in SWT

I need to select tab items from a SWT tab folder while in a drag-and-drop operation on hover, just like windows does with task bar buttons. My solution can be platform dependent (Windows). Unfortunately mouse track events do not fire while in DND operations. I decided to implement myself the hover event. I get some mouse events with the...

I have the exception as soon as shutting down my workbench

!SESSION 2010-10-05 15:59:54.026 ----------------------------------------------- eclipse.buildId=unknown java.version=1.6.0_20 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=ko_KR Framework arguments: -product JobSchedulerClient.product Command-line arguments: -product JobSchedulerClient.pro...

Handle key presses using swt.

Hi! I'm want do someStuff() when CTRL-C pressed. I had wrote some code, but it "not enough good". What can I do with it?) //org.eclipse.draw2d.Shape getShape(){....} getShape().addKeyListener(new KeyListener(){ @Override public void keyPressed(KeyEvent ke) { } @Override public void keyR...

Handle key presses using draw2d and swt.

Hi! Every org.eclipse.draw2d.Figure class has addKeyListener() method. But when key presses not every Figure handle it. What kind of figure handles key-events? Thanks. ...

How to determine if SWT is left-to-right?

Does SWT have a default left-to-right style? If so is there a way to query it from the SWT itself (rather than the component)? ...

MouseDown events are not delivered until MouseUp when a Drag Source is present

I have a mouse listener. It has some code to respond to mouseUp and mouseDown events. This works correctly. However, as soon as I add a DragSource, my mouseDown event is no longer delivered -- until I release the mouse button! This is trivial to reproduce - below is a simple program which contains a plain shell with just a mouse listen...

SWT: Position a dialog based upon the position of the caret in a StyledText control

I have SWT application that is a set of Groups that contain various controls including a StlyedText widget. They are all laid out using the Form layout. I want to show a dialog directly below the caret inside of the StyledText. However, I have to position the dialog relative to the parent shell. My first idea is to get the position of...

How to change the style of String in SWT?

I develop some features based on Eclispe GEF. I want to create a label with some string. for example: new Label("This is a good test stensece") Now, I want to get these effects "good" is in Bold font, and "test" is in italic. It looks like can use some HTML way to implement that So,is there any one knows that? Thank you very much...

Problems with loading resources during execution

Hi, Here's the background of the underlying problem, I am collaborating with a group on a project which uses Swt libraries and I am trying to package the software for deployment. As it turns out SWT is very platform/architecture dependent. I would like to be able to package all six jars (linux, mac, win and 32/64-bit) into the same pack...

How can I add a hyperlink to a SWT/Jface Dialog

How can I make a hyperlink in a jface Dialog that when clicked opens the link in the default web browser. A full example would be useful. I know there is a org.eclipse.jface.text.hyperlink package but I can't find a suitable example. ...

Running SWT based, cross-platform jar properly on a Mac

Hi, I have been working on a SWT-based project which is intended to be deployed as Java Web Start, and thus be used on multiple platforms. So far I have managed to tackle the exporting problem that arises due to the system-specific libraries SWT depends on (see relevant thread). The resultant jar seems to work start fine on 32/64-bit ...

Java Swt Browser and apostrophe

browser.execute("Function('" + parameter + "')"); I use swt to call a function like above. Using newlines crashed the java. I just found out using apostrophe crashes the browser. Is there a better way to do this? So I don't have to worry about handling these characters? For example: browser.executeFunction("Function", paramete...

Canvas too small to display Image in SWT

I'm trying to use a Canvas to display an animated gif. I have the animation working, but the canvas is too small to see the entire image, and I cannot get it to resize. I can't even get it to be the right size for the first frame, so the animation/threading code is being omitted. My code looks like: Composite comp = new Composite(paren...