jface

How to force a minimum height of a JFace Wizard in Eclipse?

二次信任 提交于 2019-12-01 21:03:01
I'm presenting a wizard (code here ) that gets too low, so the content does not show completely (see screenshot below): How can I force the wizard to have a minimum height? According to the answer on this question here on StackOverflow , the wizard will be the same height as the largest wizardpage in the wizard, but my wizard obvilusly does not get resized according to at least the content of the largest page, and I also tried to set the minimum height of the first visible wizard page with code like this in the WizardPage class: @Override public void createControl(Composite parent) { // create

swt table has limitation on text length in a cell?

大兔子大兔子 提交于 2019-12-01 11:01:35
I use JFace TableViewer and databinding to display data of a database table, some columns have very long text, I found the text is cut out. if I activate the text editor associated with that cell, I can see the full text. Does swt table has limitation on text length in a cell ? or the OS has such limitation ?(I am using eclipse 3.6 and windows 7 32 bit) /******************************************************************************* * Copyright (c) 2006 Tom Schindl and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse

how to add tooltip on the entries and NOT on the combo in JFace ComboViewer

血红的双手。 提交于 2019-12-01 10:39:20
I am loading my ComboViewer with over one thousand elements. Some elements are longer than the width of underlying combo . I want to add tooltip on the entries and NOT on the combo . I want it in such a way that, when the list drops down and the user places the mouse pointer over one of the value, the entire text should be displayable via tooltip similar to the tooltip shown for a JFace TableViewer . If you are using a ComboViewer and you provide your own CCombo instance, you can get children of the CCombo and one of them should be a List control that it shows as a dropdown menu. You can add

swt table has limitation on text length in a cell?

China☆狼群 提交于 2019-12-01 08:35:30
问题 I use JFace TableViewer and databinding to display data of a database table, some columns have very long text, I found the text is cut out. if I activate the text editor associated with that cell, I can see the full text. Does swt table has limitation on text length in a cell ? or the OS has such limitation ?(I am using eclipse 3.6 and windows 7 32 bit) /******************************************************************************* * Copyright (c) 2006 Tom Schindl and others. * All rights

Can HTML-Style Links be added to SWT StyledText?

泄露秘密 提交于 2019-12-01 04:51:44
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 know the Eclipse java editor is much more complicated than a StyledText control. Since JFace 3.5, there is a special style for links: styleRange.underlineStyle = SWT.UNDERLINE_LINK; styleRange.data = "http://www.google.com/"; This makes it much more simple to identify a link and you can store the URL in

Non-Modal JFace Dialog?

孤街醉人 提交于 2019-12-01 02:53:40
Simply put: Is there any way to create non-modal JFace dialog? I've tried calling setShellStyle to no avail. If I remember right this isn't a problem in swing - is this a shortcoming of SWT, or am I just misusing the widget? TIA Using setShellStyle(SWT.CLOSE | SWT.MODELESS | SWT.BORDER | SWT.TITLE); setBlockOnOpen(false); seems to be the practice. This doesn't work for you? Abdul Rehman @Override protected void setShellStyle(int newShellStyle) { super.setShellStyle(SWT.CLOSE | SWT.MODELESS| SWT.BORDER | SWT.TITLE); setBlockOnOpen(false); } The above code will solve the problem.. 来源: https:/

Can HTML-Style Links be added to SWT StyledText?

时光怂恿深爱的人放手 提交于 2019-12-01 02:00:54
问题 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 know the Eclipse java editor is much more complicated than a StyledText control. 回答1: Since JFace 3.5, there is a special style for links: styleRange.underlineStyle = SWT.UNDERLINE_LINK; styleRange.data

How to add a tooltip for TableViewer cell's in Java SWT

别来无恙 提交于 2019-11-30 17:49:01
问题 I have a TableViewer where each row represents different values. The string being kinda long, I would like that when I hover the mouse over the specific cell, a tooltip should pop-up with the information from the cell. I wrote this code but tooltip is not displayed and getToolTipText method is never executed: columnMessage.setLabelProvider(new ColumnLabelProvider() { @Override public void update(ViewerCell cell) { // ... as now } @Override public String getToolTipText(Object element) { return

SWT table: auto resize all columns

醉酒当歌 提交于 2019-11-30 17:38:21
Qt solution is a single call to resizeColumnsToContent() , in .NET one can use TextRenderer.MeasureText() , JTable could use AUTO_RESIZE_ALL_COLUMNS . In SWT, is there a way to programmaticaly resize columns after populating them? Calling computeSize(SWT.DEFAULT, SWT.DEFAULT) returns the same value thus disregarding character left overs in columns. TableColumn has setWidth() , but how do I obtain the size hint for the current content taking into account font face, etc? In many cases, the table entries change at run-time to reflect changes in the data model. Adding entry to the data model

Eclipse: OSGI Preferences vs. PreferenceStore

﹥>﹥吖頭↗ 提交于 2019-11-30 15:04:22
问题 I'm working on an Eclipse plugin (or in fact, a plugin for an Eclipse-based application) which needs some configuration to be entered by the user. From looking at the documentation, there seem to be two preference APIs - one in org.eclipse.core.runtime.preferences, extending/implementing the OSGI prefererence API, another one, JFace specific, in org.eclipse.jface.preference. Then we have org.eclipse.ui.preferences, too. The OSGI API has a hierarchic Node tree - a preference node ( Preferences