org.eclipse.jface.window.ToolTip Java Examples
The following examples show how to use
org.eclipse.jface.window.ToolTip.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CheckBoxToolTip.java From hop with Apache License 2.0 | 5 votes |
public CheckBoxToolTip( Control control ) { super( control, ToolTip.RECREATE, true ); image = control.getDisplay().getSystemImage( SWT.ICON_INFORMATION ); listeners = new ArrayList<ICheckBoxToolTipListener>(); visible = false; display = control.getDisplay(); super.setRespectMonitorBounds( true ); super.setRespectDisplayBounds( true ); super.setHideDelay( 50000 ); super.setPopupDelay( 0 ); super.setHideOnMouseDown( false ); }
Example #2
Source File: TaskSelectionDialog.java From workspacemechanic with Eclipse Public License 1.0 | 5 votes |
@Override protected Control createDialogArea(Composite container) { Control area = super.createDialogArea(container); TableViewer tableViewer = getTableViewer(); Table table = tableViewer.getTable(); tableViewer.setLabelProvider(new DefaultCellLabelProvider()); ColumnViewerToolTipSupport.enableFor(tableViewer, ToolTip.NO_RECREATE); table.setHeaderVisible(true); newTableColumn(table, "Description", 200); newTableColumn(table, "ID", 200); newTableColumn(table, "Name", 200); tableViewer.refresh(); return area; }
Example #3
Source File: NameBluemixWizardPage.java From XPagesExtensionLibrary with Apache License 2.0 | 5 votes |
@Override public void createControl(Composite parent) { super.createControl(parent); Composite container = new Composite(parent, SWT.NONE); GridLayout layout = WizardUtils.createGridLayout(1, 5); container.setLayout(layout); _newRadio = WizardUtils.createRadio(container, "Create a new application:", 1, this); // $NLX-NameBluemixWizardPage.Createanewapplication-1$ _newRadio.setSelection(true); _nameText = WizardUtils.createText(container, 1, 20); _nameText.addModifyListener(this); _existingRadio = WizardUtils.createRadio(container, "Overwrite an existing application:", 1, this); // $NLX-NameBluemixWizardPage.Overwriteanexistingapplication-1$ _appViewer = WizardUtils.createTableViewer(container, 1, 1, null, SWT.FULL_SELECTION | SWT.BORDER | SWT.V_SCROLL, 20); ColumnViewerToolTipSupport.enableFor(_appViewer, ToolTip.NO_RECREATE); _appViewer.getTable().setToolTipText("Choose application"); // $NLX-NameBluemixWizardPage.ChooseApplication-1$ _appViewer.getTable().setHeaderVisible(false); _appViewer.getTable().setLinesVisible(false); _appViewer.getTable().addControlListener(this); _appViewer.setContentProvider(new ArrayContentProvider()); _appViewer.addSelectionChangedListener(this); _appViewer.getTable().addSelectionListener(this); // Create the only column TableViewerColumn col = new TableViewerColumn(_appViewer, SWT.LEFT); col.getColumn().setResizable(false); col.setLabelProvider(new ColumnLabelProvider()); // Create Host Group _hostGroup = WizardUtils.createGroup(container, 3, 3); WizardUtils.createLabel(_hostGroup, "Host:", 1); // $NLX-NameBluemixWizardPage.Host-1$ _hostText = WizardUtils.createText(_hostGroup, 1, 0); _hostText.addModifyListener(this); _domainLabel = WizardUtils.createLabel(_hostGroup, "", 1); setControl(container); }
Example #4
Source File: MOOSETreePropertySection.java From ice with Eclipse Public License 1.0 | 5 votes |
/** * Creates the table that displays properties for viewing and editing. * * @param client * The client <code>Composite</code> that should contain the * table of properties. * @return The <code>TableViewer</code> for the table of properties. */ @Override protected TableViewer createTableViewer(Composite client) { CheckboxTableViewer tableViewer = null; if (client != null) { Table table; // Create the TableViewer and the underlying Table Control. tableViewer = CheckboxTableViewer.newCheckList(client, SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL); // Set some properties for the table. table = tableViewer.getTable(); table.setHeaderVisible(true); table.setLinesVisible(true); // Set up the content provider for the table viewer. Now the table // viewer's input can be set. tableViewer.setContentProvider(new TreePropertyContentProvider()); // Enable tool tips for the Table's cells. ColumnViewerToolTipSupport.enableFor(tableViewer, ToolTip.NO_RECREATE); // Populate the TableViewer with its columns. addTableViewerColumns(tableViewer); } return tableViewer; }
Example #5
Source File: EditExpressionDialog.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
protected void createExpressionTypePanel(final Composite parentForm) { final Composite parentComposite = new Composite(parentForm, SWT.NONE); parentComposite .setLayoutData(GridDataFactory.swtDefaults().align(SWT.BEGINNING, SWT.FILL).grab(false, true).create()); parentComposite.setLayout(GridLayoutFactory.fillDefaults().spacing(LayoutConstants.getSpacing().x, 1).create()); final Label expressionTypeLabel = new Label(parentComposite, SWT.NONE); expressionTypeLabel.setText(Messages.expressionTypeLabel); expressionTypeLabel.setLayoutData(GridDataFactory.swtDefaults().grab(true, false).create()); expressionTypeViewer = new TableViewer(parentComposite, SWT.FULL_SELECTION | SWT.BORDER | SWT.SINGLE); expressionTypeViewer.getTable().setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); expressionTypeViewer.setContentProvider(new ExpressionTypeContentProvider()); expressionTypeViewer.setLabelProvider(new ExpressionTypeLabelProvider()); expressionTypeViewer.setSorter(new ViewerSorter() { @Override public int compare(final Viewer viewer, final Object e1, final Object e2) { final IExpressionProvider p1 = (IExpressionProvider) e1; final IExpressionProvider p2 = (IExpressionProvider) e2; return p1.getTypeLabel().compareTo(p2.getTypeLabel()); } }); if (viewerTypeFilters != null) { expressionTypeViewer.setFilters(viewerTypeFilters); } if (!filteredEditor.isEmpty()) { expressionTypeViewer.addFilter(filterEditor()); } ColumnViewerToolTipSupport.enableFor(expressionTypeViewer, ToolTip.NO_RECREATE); expressionTypeViewer.setInput(expressionViewer.getInput()); }
Example #6
Source File: ParameterPropertySection.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
protected void createParameterComposite(final Composite parent) { final Composite parameterComposite = getWidgetFactory().createComposite(parent); parameterComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); parameterComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(2).create()); final Composite buttonsComposite = getWidgetFactory().createComposite(parameterComposite, SWT.NONE); buttonsComposite.setLayout(GridLayoutFactory.fillDefaults().spacing(0, 3).create()); buttonsComposite.setLayoutData(GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP).create()); createAddParameterButton(buttonsComposite); updateButton = createUpdateParameterButton(buttonsComposite); createRemoveParameterButton(buttonsComposite); parameterTableViewer = new TableViewer(widgetFactory.createTable(parameterComposite, GTKStyleHandler.removeBorderFlag(SWT.BORDER | SWT.MULTI | SWT.NO_FOCUS | SWT.H_SCROLL | SWT.V_SCROLL))); parameterTableViewer.getTable().setLayout(GridLayoutFactory.fillDefaults().create()); getWidgetFactory().adapt(parameterTableViewer.getTable(), false, false); parameterTableViewer.getTable() .setLayoutData(GridDataFactory.fillDefaults().grab(true, true).hint(200, 100).create()); parameterTableViewer.setSorter(new ViewerSorter()); parameterTableViewer.addDoubleClickListener(this); parameterTableViewer.addSelectionChangedListener(this); parameterTableViewer.getTable().addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { if (e.keyCode == SWT.DEL) { e.doit = false; remove(); } } }); parameterTableViewer.setContentProvider(new ArrayContentProvider()); parameterTableViewer.setLabelProvider(new ParameterStyledLabelProvider()); ColumnViewerToolTipSupport.enableFor(parameterTableViewer, ToolTip.RECREATE); }
Example #7
Source File: CheckBoxToolTip.java From pentaho-kettle with Apache License 2.0 | 5 votes |
public CheckBoxToolTip( Control control ) { super( control, ToolTip.RECREATE, true ); image = control.getDisplay().getSystemImage( SWT.ICON_INFORMATION ); listeners = new ArrayList<CheckBoxToolTipListener>(); visible = false; display = control.getDisplay(); super.setRespectMonitorBounds( true ); super.setRespectDisplayBounds( true ); super.setHideDelay( 50000 ); super.setPopupDelay( 0 ); super.setHideOnMouseDown( false ); }
Example #8
Source File: TestResultsView.java From n4js with Eclipse Public License 1.0 | 4 votes |
private ToolTip installToolTipSupport(final Control control) { return new CodeSnippetToolTip(control); }
Example #9
Source File: XLIFFEditorImplWithNatTable.java From translationstudio8 with GNU General Public License v2.0 | 4 votes |
public NoteToolTip(NatTable table) { super(table, ToolTip.RECREATE, true); }
Example #10
Source File: XLIFFEditorImplWithNatTable.java From translationstudio8 with GNU General Public License v2.0 | 4 votes |
public StateToolTip(NatTable table) { super(table, ToolTip.RECREATE, true); }
Example #11
Source File: XLIFFEditorImplWithNatTable.java From translationstudio8 with GNU General Public License v2.0 | 4 votes |
public StatusToolTips(NatTable table) {// the constructor super(table, ToolTip.RECREATE, true); }
Example #12
Source File: XLIFFEditorImplWithNatTable.java From tmxeditor8 with GNU General Public License v2.0 | 4 votes |
public NoteToolTip(NatTable table) { super(table, ToolTip.NO_RECREATE, true); }
Example #13
Source File: ImportWizardPagePreview.java From arx with Apache License 2.0 | 4 votes |
/** * Adds input to table once page gets visible to the user * * This retrieves the preview data {@link ImportWizardModel#getPreviewData()} and applies it to the given {@link #tableViewer}. Only columns that have been enabled will be shown. * New names and reordering is also considered. * * @param visible */ @Override public void setVisible(boolean visible) { super.setVisible(visible); if (visible) { /* Disable rendering until everything is finished */ table.setRedraw(false); /* Remove old columns */ while (table.getColumnCount() > 0) { table.getColumns()[0].dispose(); } /* Add enabled columns with appropriate label providers */ int columns = 0; for (ImportColumn column : wizardImport.getData().getEnabledColumns()) { columns++; if (columns > MAX_COLUMS) { setMessage(Resources.getMessage("ImportWizardPageCSV.21"), WARNING); //$NON-NLS-1$ break; } TableViewerColumn tableViewerColumn = new TableViewerColumn(tableViewer, SWT.NONE); tableViewerColumn.setLabelProvider(new PreviewColumnLabelProvider(((IImportColumnIndexed) column).getIndex())); TableColumn tblclmnColumn = tableViewerColumn.getColumn(); tblclmnColumn.setToolTipText(Resources.getMessage("ImportWizardPagePreview.5") + //$NON-NLS-1$ column.getDataType()); tblclmnColumn.setWidth(100); tblclmnColumn.setText(column.getAliasName()); } ColumnViewerToolTipSupport.enableFor(tableViewer, ToolTip.NO_RECREATE); /* Apply input to tableViewer */ tableViewer.setInput(wizardImport.getData().getPreviewData()); /* Make table visible again */ table.layout(); table.setRedraw(true); setPageComplete(true); } else { setPageComplete(false); } }
Example #14
Source File: FindingsNatTableTooltip.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
public FindingsNatTableTooltip(NatTable natTable, DynamicDataProvider dataProvider){ super(natTable, ToolTip.NO_RECREATE, false); this.natTable = natTable; this.dataProvider = dataProvider; }
Example #15
Source File: MedicationHistoryTableComposite.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
public MedicationHistoryTableComposite(Composite parent, int style){ super(parent, style); setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); layout = new TableColumnLayout(); setLayout(layout); viewer = new TableViewer(this, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI); viewer.getTable().setHeaderVisible(true); ColumnViewerToolTipSupport.enableFor(viewer, ToolTip.NO_RECREATE); viewer.addSelectionChangedListener(new ISelectionChangedListener() { @Override public void selectionChanged(SelectionChangedEvent e){ IStructuredSelection is = (IStructuredSelection) viewer.getSelection(); MedicationTableViewerItem presc = (MedicationTableViewerItem) is.getFirstElement(); // set last disposition information Identifiable identifiable = (presc != null) ? presc.getLastDisposed() : null; medicationComposite.setLastDisposal(identifiable); // set writable databinding value medicationComposite.setSelectedMedication(presc); if (presc != null) { IPrescription selectedObj = presc.getPrescription(); ContextServiceHolder.get().getRootContext().setTyped(selectedObj); } else { ContextServiceHolder.get().getRootContext().removeTyped(IPrescription.class); } } }); MedicationViewerHelper.createTypeColumn(viewer, layout, 0); MedicationViewerHelper.createArticleColumn(viewer, layout, 1); MedicationViewerHelper.createDosageColumn(viewer, layout, 2); MedicationViewerHelper.createBeginColumn(viewer, layout, 3); MedicationViewerHelper.createIntakeCommentColumn(viewer, layout, 4); MedicationViewerHelper.createStopColumn(viewer, layout, 5); MedicationViewerHelper.createStopReasonColumn(viewer, layout, 6); MedicationViewerHelper.createMandantColumn(viewer, layout, 7); viewer.setContentProvider(new MedicationTableViewerContentProvider(viewer)); }