swt

Resizable row/column headers in NatTable

我只是一个虾纸丫 提交于 2019-12-12 02:35:15
问题 I have NatTable with column and row headers, and use CornerLayer for it. How to make row and column headers resizable like any other column or row? 回答1: You need to register the necessary bindings to the header regions gridLayer.addConfiguration(new AbstractUiBindingConfiguration() { @Override public void configureUiBindings(UiBindingRegistry uiBindingRegistry) { uiBindingRegistry.registerFirstMouseMoveBinding( new ColumnResizeEventMatcher(SWT.NONE, GridRegion.ROW_HEADER, 0), new

Eclipse-RCP view not coming on fullscreen

自作多情 提交于 2019-12-12 02:34:55
问题 I am using RCP 3.x and trying to create a layout which i want full and on the left hand side. I tried many combinations but none seem to work. Here is the screenshot. and here is the code snippet that i used to create this public MonitorView(final Composite parent) { super(parent); setDisplayName(I18N("Visual Monitoring of iCommand")); setLayout(new GridLayout()); final Composite composite=GUIToolkit.newComposite(parent, SWT.NONE, new GridData(SWT.TOP,SWT.LEFT,false,false,0,0)); GridLayout

Vertical align 2 jface TreeViewers to specific element

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 02:28:35
问题 I have two TreeViewer objects on a page (2 columns, one TreeViewer in each column), and I want to vertically align a tree when the other is scrolled or selected. import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.swt.widgets.Tree; I think the solution should look something like treeViewer.addSelectionChangedListener(new ISelectionChangedListener() { @Override public void selectionChanged(SelectionChangedEvent arg0) { TreeViewer mirrorTree = (treeViewer == treeVwrSource ?

Empty entry in the SWT combo

天大地大妈咪最大 提交于 2019-12-12 02:24:05
问题 I have a SWT combo which have one empty entry and some values. When I select the empty entry it does not fire any event. But I need to fire an update event. If I do call firePropertyChange() method, I always get the following Exception in the console. In importMap , it has following values - { ,1,2,3,4} . The first value is an empty string. I am binding the combo values in the Databindingscontext IObservableValue observeSelectionCImportObserveWidget = WidgetProperties.selection().observe

Kepler RCP CoolBar + PerspectiveBar appearance

隐身守侯 提交于 2019-12-12 01:45:12
问题 The coolbars on all Kepler RCP applications look just terrible. This a project created from scratch on Windows 8. What is it with that thick black line sorrounding the coolbar? Can it be style-hacked with CSS? From my testing, it seems that it appears only when the perspective bar is present. 回答1: I think the CSS for this is the eclipse-perspective-keyline-color in the #PerspectiveSwitcher selector. 回答2: You can try to add this dependencies in your product file: org.eclipse.e4.ui.css.core ,

Can you create a resizable control in SWT?

血红的双手。 提交于 2019-12-12 01:13:18
问题 I am currently working with the SWT package in Eclipse. Is it possible to create a resizable control within a composite control. For instance, if I have a tree control which I would like to expand, but in order to view the sub tree items I would like to 'click and drag' the border of the tree to resize it, much like the draggable divider in the Eclipse help website. 回答1: I think the SWT Sash is what you are looking for. Here is a good example on how to use it. EDIT : Just found that SashForm

Java element icons SWT ECLIPSE

天大地大妈咪最大 提交于 2019-12-12 01:09:20
问题 How to add the java element icons (e.g. class, methods, package, etc as that in the package explorer) in SWT's Tree control? e.g, I have the following tree structure: somePackage --> somePackage | |--> someClass | |--> someMethod Here --> represents the folding icon. I want to keep this intact but additionally I want to have the appropriate icon for respective java element (as it is visible in the package explorer). I am using SWT Tree to built the tree view. following is the code to

Java Mac OS How do I get -XstartOnFirstThread to implement when launching from finder?

廉价感情. 提交于 2019-12-11 23:35:45
问题 I've created a jar file that uses SWT for the UI. When launching the jar file from finder it would return an error saying Exception in thread "main" org.eclipse.swt.SWTException: Invalid thread access I finally got it to launch from Terminal using java -XstartOnFirstThread -jar CommonDenom.jar That's all well and good, but how do I implement the -XstartOnFirstThread switch when launching from finder? Is there a simple way to do this through the manifest or something or do I have to package a

SWT browser not rendering until shell resize on mac

情到浓时终转凉″ 提交于 2019-12-11 23:33:45
问题 I have a problem with the SWT browser. I am using Mac OS X Yosemite. The browser is deeply placed in a composite hierarchy. i.e., The shell has say composite A, and composite A has composite B, and composite B has composite C and the Browser is placed inside this composite C. I've added location listeners and progress listeners for the browser. GridDataFactory, GridLayoutFactory are from org.eclipse.jface.layout package. Composite compositeC= new Composite(compositeB, SWT.BORDER);

Can you disable the cancel button in a jface wizard?

爱⌒轻易说出口 提交于 2019-12-11 22:35:35
问题 When the user presses the 'next' button in my jface wizard, it will be communicating with my server asynchronouly. However this operation cannnot be cancelled, so I want to basically disable the 'Cancel' button temporarily in my jface wizard and also if possible the 'close' button in the title bar. Is this possible? 回答1: How are you communicating with the server? Are you running it inside IWizardContainer.run()? you can pass cancellable = false. 回答2: pass your long-running code wrapped by