swt

Set the window of an eclipse e4 application to have the whole screen size

谁都会走 提交于 2020-01-02 03:49:04
问题 How do I define in the Application.e4xmi that I want my window to have as size the whole available screen? What values should we add to the Bounds(x,y,w,h) of the Trimmed Window ? I tried -1,-1,-1,-1 but it does not work. Any ideas? 回答1: Add the tag shellMaximized to the supplementary tab of your TrimmedWindow like this: See the Eclipse 4 RCP - Tutorial by Lars Vogel for more information. 来源: https://stackoverflow.com/questions/12543858/set-the-window-of-an-eclipse-e4-application-to-have-the

How do I make it possible to resize a composite by dragging the corner

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-01 19:20:35
问题 I am working with SWT and I would like to be able to resize a composite by dragging the corner of it, the same way that you can resize a shell. I'm sure someone out there has implemented a good solution. Thanks. 回答1: I think what you are looking for can be implemented with org.eclipse.swt.widgets.Tracker here is sample working code: public static void main(String[] args) { Display display = new Display(); final Shell shell = new Shell(display); shell.open(); final Composite b = new Composite

SWT Shell resize depending on children

半腔热情 提交于 2020-01-01 10:57:48
问题 I'm working on this Composite canvas on which other Composite s may be added and removed. My understanding of how the whole laying-out concept is still in the fog. When children are added to the container, given the fact that the container has a GridData which fills in the parent, shouldn't the parent also know that the child resized? Children remain hidden after their container has been laid out, because of the shell (top parent). If the question is too vague, do not hesitate to ask for more

ElementListSelectionDialog has no elements

你离开我真会死。 提交于 2020-01-01 06:13:34
问题 I'm trying to use a ElementListSelectionDialog. I've followed the example code but for whatever reason the dialog show but with no options My Code: ElementListSelectionDialog dialog = new ElementListSelectionDialog(shlSpriteCreator, new LabelProvider()); dialog.setMultipleSelection(false); dialog.setIgnoreCase(true); dialog.setAllowDuplicates(true); dialog.setMessage("Select an AI"); dialog.setTitle("What AI to use?"); dialog.setElements(new String[]{"HELLO","GOODBYE"}); if (dialog.open() ==

SWT Button Dropdown Control

谁说我不能喝 提交于 2020-01-01 03:13:11
问题 Is there a standard SWT control that resembles a button which displays an arrow and opens a dropdown menu when pressed and is not a toolbar-only control ? It would be something like this: It is similar to a combo box control, except that the "button" area would act more similarly to an actual button - its text would not change based on your selection, it would appear depressed when clicked, and the items would be used for actions or navigational purposes instead of for selection. It's also

JFace DialogCellEditor: how to make buttons always appear?

痴心易碎 提交于 2019-12-31 03:31:07
问题 I use JFace DialogCellEditor to show a button in a cell of a row of my JFace TableViewer which triggers a dialog when activated. This behaviour works well with the following code but the button only appears when the cell of the table hosting the button is explicitly selected. public class CompareDialogCellEditor extends DialogCellEditor { public CompareDialogCellEditor(Composite parent) { super(parent); } @Override protected Button createButton(Composite parent) { Button button = super

Does SWT distribute a JAR that works on any supported operating system?

混江龙づ霸主 提交于 2019-12-31 00:33:14
问题 The SWT project currently maintains one distributable for each supported operating system. For example: swt-3.4.2-win32-win32-x86.zip swt-3.4.2-gtk-linux-x86.zip swt-3.4.2-carbon-macosx.zip Is there a distributable that just Does the Right Thing™, regardless of which operating system the application is running on? 回答1: No, there isn't, and you can't make one either out of the standalone SWT distributions. That's because each os/windowing system/architecture combination has its own

Does SWT distribute a JAR that works on any supported operating system?

若如初见. 提交于 2019-12-31 00:31:06
问题 The SWT project currently maintains one distributable for each supported operating system. For example: swt-3.4.2-win32-win32-x86.zip swt-3.4.2-gtk-linux-x86.zip swt-3.4.2-carbon-macosx.zip Is there a distributable that just Does the Right Thing™, regardless of which operating system the application is running on? 回答1: No, there isn't, and you can't make one either out of the standalone SWT distributions. That's because each os/windowing system/architecture combination has its own

Eclipse SWT browser and Firebug lite?

拟墨画扇 提交于 2019-12-30 22:53:41
问题 Is there a way to use Firebug lite "bookmarklet" feature within eclipse SWT browser? 回答1: Depends on the system browser which your SWT browser is using. For Win7 and IE8, you can have something like this: Output Code import org.eclipse.swt.SWT; import org.eclipse.swt.browser.Browser; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets

Eclipse SWT browser and Firebug lite?

萝らか妹 提交于 2019-12-30 22:53:40
问题 Is there a way to use Firebug lite "bookmarklet" feature within eclipse SWT browser? 回答1: Depends on the system browser which your SWT browser is using. For Win7 and IE8, you can have something like this: Output Code import org.eclipse.swt.SWT; import org.eclipse.swt.browser.Browser; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets