Dear all,
I'm trying to implement a small-scale strategy, taking turns game
implemented in Java, GUI is made with JFace and SWT.
My challenge is to write a GUI implementation of the world map,
where countries will act as clickable buttons. However, countries
have no fixed boundaries, no rectangular shape, and simply no way
I can think...
In my application I've a main shell window and lots of dialogs (classes extends Dialog). I use setSize(width,height) when initializing them, but I know that users constantly resize them for their taste.
What is a smarty way to get notified when the size changes so I can store/load them?
(And why don't do toolkit provide such a thing ou...
I'm looking for a fast and easy way to plot arbitrarily colored pixels in an SWT Canvas.
So far I'm using something like that:
// initialization:
GC gc = new GC(canvas);
// inside the drawing loop:
Color cc = new Color(display, r, g, b);
gc.setForeground(cc);
gc.drawPoint(x, y);
cc.dispose();
This is horribly horribly slow. it takes ...
Group group = new Group(parent, SWT.NONE);
StyledText comment = new StyledText(group, SWT.BORDER_DASH);
This creates a group with a text area inside.
How can I later delete the text (remove it from the screen so that I can replace it with something else)?
...
I extend org.eclipse.swt.widgets.Composite and create many widgets on it, (labels, table, text etc). The problem I am facing is that the labels' text is getting truncated on linux while it appears fine on windows. When I change the linux's font to gothic the truncation is little less but still there. Is there way to homogenize the wind...
Anyone know of an SWT widget that can be a text editor with support for syntax highlighting? I'm aware of the StyledText widget but I'm hoping that somebody has already written some libraries so one can just specify the keywords that should be highlighted.
...
I would like to draw the contents of a StyledText widget in to an Image; this will then provide a convenient way to stick the image into a Table cell.
Any suggestions about the best way to go about this?
...
If I create a set of actions to be used in a JFace application and I assign images to those actions, those images show up in both the toolbar (where I want them) and in the menus (where I don't want them).
Other than supplying two completely separate sets of actions (which eliminates part of the point of actions in the first place), how...
Hi all,
I'm a total noob in SWT, just getting started, but I have previously worked with GUI frameworks such as Swing.
I have a Composite which contains a Group and a Button. The Group is initially set to invisible (using group.setVisible(false)), and is set to visible when clicking the button. This starts a thread which perform some c...
HI.. i have this piece of code in java...
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.RowLayout;
import or...
In the Eclipse RCP application I'm building, I noticed that when I rebuild parts of the GUI (by adding/removing controls), the GUI gets updated and redrawn immediately upon each modification, which causes a flicker effect.
Is there a way to enable double buffering, so that the GUI refresh will happen only once at the end of the event di...
I have built a graphical editor as an Eclipse plugin. Users may zoom into and pan about the graphical image.
I would like to employ the Back and Forward arrow icons in the Eclipse icon bar to step back and forth through the graphical image, in a similar manner to what is already possible in textual editors. All of my references go quiet...
I'm writing an SWT application which needs to sit in the system tray and pop up automatically whenever the user connects some USB device (the application serves as its control panel).
The way to do this in the native environment (win32 in this case, but I should be platform-independent ultimately) is to listen to the WM_DEVICECHANGE eve...
I can't find any method for making a tab invisible or otherwise hidden in an SWT/JFace application --- I want a second tab to be available (or not) based on some other preferences set by the user.
It shouldn't be so hard to figure this out!
...
Hi,
Can anyone show me how to use org.eclipse.jface.viewers.ColumnViewerToolTipSupport to create a tooltip similar to the one shown in Eclipse IDE when you hover your mouse to any Java element? That is, I want the tooltip to be resizable, I also want to hook an F2 key to show the tooltip on demand in addition to mouse hover.
I have ...
I am writing an Eclipse Plugin that opens a file and displays all the images contained within the file. This image display is part of a GUI application. Each image is rendered by associating it with an SWT Canvas widget. When I open the file I have all the information I need to determine the number of images I will have to display. I...
I have an plugin that displays a composite with a horizontal scrolled bar. I can't figure out how to get GridLayout() to position each widget one row, one after another. If the number of widgets exceed the composite width, you should be able to scroll right to see the rest of the widgets. The horizontal scroll bar appears, but has no ...
Is it possible to create a virtual composite using SWT, i.e. one could scroll horizontally or vertically beyond the maximum display area of the composite?
I want the length and height of my widgets (images) to stay constant regardless what size the composite is changed to.
If there are 50 images to display and only 10 can be viewed at ...
I have created a class by subclassing SWT Canvas. The class (SceneImage) contains two standard SWT Widgets:
Image
Label
The class code follows:
class SceneImage extends Canvas {
private int sceneNumber;
private IFrame sceneFrame;
private Image sceneImage;
private Label sceneLabel;
/**
* @param...
Hi there,
Is there anyway to create a dialog that is modal to a view and not the entire shell (application)? So if say, I have one view called A that is overlaying another view called B, I want to open a dialog that is only modal to view A, so when I switch to view B, the dialog and the view A will be covered by view B. Is there anywa...