Все вопросы: [swt]

181 вопросов

похожие теги: swt-awt
2
голосов
1ответов
195 просмотров

Obtaining the Eclipse text font

How do I get a Font object representing the font set as the "Text Font" in the Eclipse Preferences -> General -> Appearance -> Colors and Fonts? I'm implementing a table-view where one of the columns is supposed to contained fixed-width text.

1
голосов
2ответов
371 просмотров

how to add menu to section title?

I have a section with TITLE_BAR, and i try to add a menu to the section header (like in the PDE editors). All I could find is the context menu.

1
голосов
1ответов
1447 просмотров

KeyListener or TraverseListener in SWT Menu

I'd like to be able to detect keyboard input (namely the TAB key) when an SWT menu is open, but it doesn't seem to broadcast any events when listeners are added with the addListener method, and there are no addKeyListener or addTraverseListener methods. I've also tried adding listeners to the c...

4
голосов
1ответов
856 просмотров

Is there a prefabricated magnifying glass cursor for SWT somewhere available?

I would like to use a "magnifying glass" (with + and -) cursor in my SWT application. I'm aware that it is pretty easy to create a cursor for oneself, I just don't want to invest the time right now. Has anyone a link, or a codesnippet with a "zoom in" and "zoom out" cursor which I could use?

0
голосов
2ответов
1381 просмотров

How to underline text in draw2d

Is there a simple way to draw underlined text in draw2d without manually drawing a line under the text?

1
голосов
1ответов
932 просмотров

DIsable JFace TextCellEditor Field

Anyone know if it's possible to enable/disable individual JFace TextCellEditor fields. For instance if I have a table with 5 columns, I want the last cell to be empty unless field #4 is filled in.

1
голосов
2ответов
80 просмотров

Obtain x,y coords of individual Chars in a SWT text widget

If I write a text on SWT say "this text" in a particular font/style , I want the individual coords of 't' 'h' 'i' 's' and so on. Is there any way to obtain the same?

3
голосов
1ответов
1103 просмотров

UI: Month selector

For my UI, I need a month selector (i.e. not a day but "what happened in August 2008"). Has anyone seen such an UI element? Obviously, I'm looking for more than two combo boxes (one for the months and one for the year). What I want to know if someone has encountered a cool month selector. :)

19
голосов
4ответов
7673 просмотров

SWT/JFace or Eclipse RCP?

Which are the reasons to choose the Eclipse Rich Client Platform as the base of my application, instead of just using SWT/JFace?

6
голосов
5ответов
6809 просмотров

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 = tableViewer.getTable(); GridData gridData...

4
голосов
2ответов
2451 просмотров

Call crystal reports through java

I have one crystal report and i want to create one front end application using java to show the reports to user. Can any one give me the code how can i invoke crystal reports through a java application?

4
голосов
2ответов
2336 просмотров

How to disable SWT event listening if the action is not triggered by user

I notice that the ModifyListener will be triggered regardless the action is caused by user or system itself, for instance, Text t = new Text(shell, SWT.BORDER); t.addModifyListener(new TModifyListener()); ............................................... private class TModifyListener implements...

7
голосов
2ответов
3600 просмотров

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 down control and hover over a method name, but I ...

2
голосов
2ответов
1365 просмотров

Threaded drawing onto a canvas in Java SWT

I've been working quite a bit on something I can only describe as a "threaded canvas" for some time now. In a moment I'll describe what I have, but since I'm really open to new ideas, existing solutions or a completely fresh start, I'll formulate the problem. The canvas is intended to display ge...

1
голосов
2ответов
851 просмотров

SWT and Java WebStart on Mac OS X 10.5

I am using the most stable SWT Cocoa downloads for Mac OS X and and launching my app via Java WebStart. All jnilib files are within my app jar on its root. The app downloads, verifies, but I cannot get any buttons to respond. I can enter data into all my UI components. My VM arguements are "-d32"...

2
голосов
2ответов
10424 просмотров

Date time picker control

I look for date time picker control which look like this: (source: functionx.com) All controls which I found don't use system layout. It would be great if this control use system style and layout.

0
голосов
4ответов
3187 просмотров

How to add a Processing PApplet in SWT

I have a problem when trying to add a PApplet into SWT, it turns up an empty window when it should just render the PApplet. I.e. the PApplet works by itself, but not in a SWT window. I thought that just adding the PApplet into the frame should initially do the trick, using the SWT tutorial code...

1
голосов
3ответов
776 просмотров

Strange Clipping Issue in OpenGL

I am very very new to OpenGL, so please bear with me. :) I'm working through NeHe's OpenGL tutorials, and I have developed my own version of Lesson 5, in which you rotate a 3D shape around the origin. I'm not sure what I did wrong, I copied the code nearly line-for-line, but I'm seeing strange ov...

2
голосов
1ответов
1810 просмотров

What is the state of SWT to WPF port?

A while ago I read about a WPF port of Eclipse and SWT. I can't find any recent information about it. What is the current status of the WPF port? Will it be available before E4? Any other details about the implementation also welcome.

2
голосов
2ответов
1580 просмотров

SWT Table with SWT.VIRTUAL raises StackOverflowError

After recently installing Windows 7 Professional, I'm getting a strange problem removing a TableItem from a populated Table in SWT. It is specific to Windows 7 and to the SWT.VIRTUAL style constant for the table. Consider the following code: table = new Table(parent, SWT.VIRTUAL | Skin.SCROLL_S...

0
голосов
2ответов
811 просмотров

How to remove "Input method" submenu selection from StyledText context menu?

I'm using StyledText widget in my SWT app. SWT by default appends "Input method" submenu to the end of existing context menu. Is there any way to remove it?

25
голосов
2ответов
30716 просмотров

Change just the font size in SWT

I need to use a larger font for one of the labels. label.setFont( new Font(display,"Arial", 14, SWT.BOLD ) ); but obviously Arial is not always the default font. I want to change just the size and keep everything else at default values. Can I do something like label.setFontSize( 14 ); to a...

8
голосов
4ответов
2816 просмотров

Develop desktop applications view with HTML, as a web application

I am used to develop web applications in Java (Struts, Spring, JSP...). But now I want to develop a desktop one. I never liked to design windows in Java (AWT, Swing, SWT): too much work for an ugly interface. So I think it could be a good idea if could take advantage of my web-app skills. One opt...

2
голосов
1ответов
1228 просмотров

SWT: Unable to resize buttons on a Mac

I am developing a Java application using SWT that contains some buttons with images. On my Windows machine, the button will automatically be large enough to show the entire image in the button. I tried this on a Mac however the button will not become tall enough to fit the entire image. I tr...

1
голосов
4ответов
2070 просмотров

image not loading

trying to run the code // Create a label with an image Image image = new Image(display, "interspatial.gif"); Label imageLabel = new Label(shell, SWT.NONE); imageLabel.setImage(image); is giving me the error message Exception in thread "main" org.eclipse.swt.SWTException: i/o error (j...

1
голосов
1ответов
747 просмотров

Vertical ruler in RCP applications

Eclipse text editors has this nice vertical rulers at both sides where bookmarks and annotations are shown with little dots, so that you navigate real quick to the line. I've got to do something similar, but not with the text editor, - with some large list or a table. How would you go about it? I...

3
голосов
1ответов
5172 просмотров

Align an image in a SWT TableViewer

I just found out, that its somehow impossible to align an image in a swt tableviewer. Creating a TableColumn with SWT.RIGHT (for instance) has no effect on that column if its labelprovider returns an image for it. Question: Is there any other way to align an image instead of modifiying the image ...

1
голосов
3ответов
4773 просмотров

CheckboxCellEditor shows text and not a check box

I'm using the following org.eclipse.jface.viewers.CheckboxCellEditor.CheckboxCellEditor(Composite parent) I'm creating a table viewer with cellEditors and doing the following CellEditor[] editors = new CellEditor[columnNames.length]; editors[7] = new CheckboxCellEditor(table); I have a Cell...

3
голосов
1ответов
9229 просмотров

AssertionFailedException while creating CellEditor in Eclipse

Hopefully someone can point me in the right direction. I'm trying to create a CellEditor in Eclipse and when I click on the field I get an Unhandled event loop exception with the stack trace below. The cell editor code for this column looks like this /** Cell Editor Row 2 **/ textEditor = new T...

0
голосов
1ответов
673 просмотров

IllegalArgumentException when setting Image in Jigloo

I am trying to make GUIs in SWT using Jigloo and when I want to set images to Labels or Buttons, I can see them in the preview pane. However, when i compile and run it, it throws SWTResourceManager.getImage: Error getting image img/game/front/test.png, java.lang.IllegalArgumentException: Argumen...