本文整理匯總了Java中org.eclipse.jface.viewers.ColumnViewerToolTipSupport類的典型用法代碼示例。如果您正苦於以下問題:Java ColumnViewerToolTipSupport類的具體用法?Java ColumnViewerToolTipSupport怎麽用?Java ColumnViewerToolTipSupport使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ColumnViewerToolTipSupport類屬於org.eclipse.jface.viewers包,在下文中一共展示了ColumnViewerToolTipSupport類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ServersViewer
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; //導入依賴的package包/類
public ServersViewer ( final Composite parent )
{
parent.setLayout ( new FillLayout () );
this.viewer = new TreeViewer ( parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL );
this.contentProvider = new ObservableSetTreeContentProvider ( new ObservableFactoryImpl (), null );
this.viewer.setContentProvider ( this.contentProvider );
this.labelProvider = new ServerLabelProvider ( this.contentProvider.getKnownElements () );
this.viewer.setLabelProvider ( this.labelProvider );
this.viewer.setInput ( HivesPlugin.getDefault ().getServerManager () );
this.viewer.getControl ().addDisposeListener ( new DisposeListener () {
@Override
public void widgetDisposed ( final DisposeEvent e )
{
handleDispose ();
}
} );
ColumnViewerToolTipSupport.enableFor ( this.viewer );
}
示例2: createColumns
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; //導入依賴的package包/類
private void createColumns(TreeViewer viewer) {
viewer.setColumnProperties(new String[] { "Name", "Value"});
ColumnViewerToolTipSupport.enableFor(viewer);
TreeViewerColumn nameColumn = new TreeViewerColumn(viewer, SWT.LEFT, 0);
nameColumn.getColumn().setText("Name");
nameColumn.getColumn().setWidth(200);
nameColumn.setLabelProvider(new ColumnLabelProvider() {
@Override
public String getText(Object element) {
INamedNode node = (INamedNode)element;
return node.getDisplayName();
}
});
nameColumn.setEditingSupport(new NameEditingSupport(this));
TreeViewerColumn valueColumn = new TreeViewerColumn(viewer, SWT.LEFT, 1);
valueColumn.getColumn().setText("Value");
valueColumn.getColumn().setWidth(300);
valueColumn.setLabelProvider(new DelegatingStyledCellLabelProvider(new ControlValueLabelProvider(cservice, this)));
valueColumn.setEditingSupport(new ControlEditingSupport(viewer, cservice, controlViewerMode));
}
示例3: createColumns
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; //導入依賴的package包/類
private void createColumns(final TableViewer tableViewer) {
final String[] titles = { "Icon", "Name", "Small", "Medium", "Large", "Source", "Class" };
final int[] bounds = { 40, 200, 60, 60, 60, 200, 200 };
for (int i = 0; i < titles.length; i++) {
final TableViewerColumn viewerColumn = new TableViewerColumn(tableViewer, SWT.NONE);
tableViewer.setSorter(new TableViewerSorter(titles));
viewerColumn.setLabelProvider(new TableCellLabelProvider());
final TableColumn column = viewerColumn.getColumn();
column.addSelectionListener(new ColumnSelectionListener(column, tableViewer));
column.setText(titles[i]);
column.setWidth(bounds[i]);
column.setResizable(true);
column.setMoveable(false);
}
final Table table = tableViewer.getTable();
table.setHeaderVisible(true);
table.setLinesVisible(true);
ColumnViewerToolTipSupport.enableFor(tableViewer, ToolTip.RECREATE);
}
示例4: createColumns
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; //導入依賴的package包/類
private void createColumns(final TableViewer tableViewer) {
final String[] titles = { "Relation", "Type", "Name" };
final int[] bounds = { 120, 100, 200 };
for (int i = 0; i < titles.length; i++) {
final TableViewerColumn viewerColumn = new TableViewerColumn(tableViewer, SWT.NONE);
tableViewer.setSorter(new TableViewerSorter(titles));
viewerColumn.setLabelProvider(new TableCellLabelProvider());
final TableColumn column = viewerColumn.getColumn();
column.addSelectionListener(new ColumnSelectionListener(column, tableViewer));
column.setText(titles[i]);
column.setWidth(bounds[i]);
column.setResizable(true);
column.setMoveable(false);
}
final Table table = tableViewer.getTable();
table.setHeaderVisible(true);
table.setLinesVisible(true);
ColumnViewerToolTipSupport.enableFor(tableViewer, ToolTip.RECREATE);
// Object[] projectsToSelect = openProjects.toArray();
// IViewPart view = window.getActivePage().showView( "org.eclipse.jdt.ui.PackageExplorer" );
// view.getSite().getSelectionProvider().setSelection( new StructuredSelection( projectsToSelect ) );
}
示例5: createColumns
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; //導入依賴的package包/類
private void createColumns(final TableViewer tableViewer) {
final String[] titles = { "Class" };
final int[] bounds = { 120, 100, 200 };
for (int i = 0; i < titles.length; i++) {
final TableViewerColumn viewerColumn = new TableViewerColumn(tableViewer, SWT.NONE);
tableViewer.setSorter(new TableViewerSorter(titles));
viewerColumn.setLabelProvider(new TableCellLabelProvider());
final TableColumn column = viewerColumn.getColumn();
column.addSelectionListener(new ColumnSelectionListener(column, tableViewer));
column.setText(titles[i]);
column.setWidth(bounds[i]);
column.setResizable(true);
column.setMoveable(false);
}
final Table table = tableViewer.getTable();
table.setHeaderVisible(true);
table.setLinesVisible(true);
ColumnViewerToolTipSupport.enableFor(tableViewer, ToolTip.RECREATE);
}
示例6: TranslatableTreeComposite
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; //導入依賴的package包/類
public TranslatableTreeComposite(Composite parent, ITreeContentProvider contentProvider, Object input, TranslatableSet languageSet, Set<TranslatableResourceBundle> updatedBundles) {
super(parent, SWT.NONE);
setLayout(new GridLayout(1, false));
final TreeViewer viewer = new TreeViewer(this, SWT.FULL_SELECTION | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
treeControl = viewer.getTree();
viewer.getTree().setHeaderVisible(true);
viewer.getTree().setLinesVisible(true);
viewer.getTree().setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
viewer.setContentProvider(contentProvider);
createTreeColumns(viewer, languageSet, updatedBundles);
viewer.setInput(input);
ColumnViewerToolTipSupport.enableFor(viewer);
createButtonsSection(this, viewer, languageSet, updatedBundles).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
}
示例7: createPartControl
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; //導入依賴的package包/類
@Override
public void createPartControl(Composite parent) {
GridLayoutFactory.fillDefaults().applyTo(parent);
initNoProjectHint(parent);
// init viewer
viewer = new TreeViewerWithModelElementSelectionProvider(parent);
GridDataFactory.fillDefaults().grab(true, true).applyTo(viewer.getControl());
Tree tree = viewer.getTree();
tree.setHeaderVisible(true);
ColumnViewerToolTipSupport.enableFor(viewer);
getSite().setSelectionProvider(viewer);
initMenuManager();
changeColumn = createColumn("Changes", 250);
branchColumn = createColumn("Branches", 150);
commitColumn = createColumn("Commit Message", 250);
authorColumn = createColumn("Author and Date", 250);
initContentAndLabelProvider();
initGraphRenderer();
initToolBar();
initProjectDeleteListener();
}
示例8: createPartControl
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; //導入依賴的package包/類
/**
* This is a callback that will allow us
* to create the viewer and initialize it.
*/
public void createPartControl(Composite parent) {
_viewer = new TreeViewer(parent, SWT.FULL_SELECTION | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
_contentProvider = new ViewContentProvider();
_viewer.setContentProvider(_contentProvider);
ColumnViewerToolTipSupport.enableFor(_viewer);
_viewer.addSelectionChangedListener(
new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
fireEngineSelectionChanged();
}
});
createColumns();
// _viewer.setColumnProperties( new String[] {"Status", "Identifier", "Step", "Status"} );
// _viewer.getTree().setHeaderVisible(true);
Font mono = JFaceResources.getFont(JFaceResources.TEXT_FONT);
_viewer.getTree().setFont(mono);
// Create the help context id for the viewer's control
PlatformUI.getWorkbench().getHelpSystem().setHelp(_viewer.getControl(), "org.eclipse.gemoc.executionframework.ui.views.engine.EngineStatusView");
// register for changes in the RunningEngineRegistry
//org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.addObserver(this);
buildMenu();
org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.addEngineRegistrationListener(this);
}
示例9: createMappingTable
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; //導入依賴的package包/類
private Table createMappingTable(Composite composite_6) {
mappingTableViewer = new TableViewer(composite_6, SWT.BORDER
| SWT.FULL_SELECTION | SWT.MULTI);
Table table = mappingTableViewer.getTable();
table.setLinesVisible(true);
table.setHeaderVisible(true);
GridData gd_table = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_table.widthHint = 374;
table.setLayoutData(gd_table);
mappingTableViewer.setContentProvider(new ArrayContentProvider());
ColumnViewerToolTipSupport.enableFor(mappingTableViewer);
return table;
}
示例10: createTable
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; //導入依賴的package包/類
public TableViewer createTable(final Composite parent, final WritableList<IDependencyRelation> descriptions) {
final TableViewer table = new TableViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
createColumns(table);
table.getTable().setLayoutData(new GridData(GridData.FILL_BOTH));
table.setContentProvider(new ObservableListContentProvider());
table.setInput(descriptions);
table.setLabelProvider(new TableLabelProvider());
ColumnViewerToolTipSupport.enableFor(table);
return table;
}
示例11: createTable
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; //導入依賴的package包/類
public TableViewer createTable(final Composite parent, final WritableList<IType> descriptions) {
final TableViewer table = new TableViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
createColumns(table);
table.getTable().setLayoutData(new GridData(GridData.FILL_BOTH));
table.setContentProvider(new ObservableListContentProvider());
table.setInput(descriptions);
table.setLabelProvider(new TableLabelProvider());
ColumnViewerToolTipSupport.enableFor(table);
return table;
}
示例12: createDialogArea
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; //導入依賴的package包/類
@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;
}
示例13: ResultsTable
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; //導入依賴的package包/類
public ResultsTable(final Composite parent, final Object layoutData, final EarthquakeBulletinGui gui) {
tableViewer = new TableViewer(parent, SWT.BORDER | SWT.FULL_SELECTION) {
// Auto resize columns on content change
@Override
protected void inputChanged(final Object input, final Object oldInput) {
super.inputChanged(input, oldInput);
if (!initialized) {
final Table table = tableViewer.getTable();
table.setRedraw(false);
final TableColumn sortedColumn = table.getSortColumn();
table.setSortColumn(null);
for (int j = 0; j < table.getColumns().length; j++) {
table.getColumn(j).pack();
}
table.setSortColumn(sortedColumn);
table.setRedraw(true);
initialized = true;
}
}
};
final Table table = tableViewer.getTable();
createColumns(table);
table.setLayoutData(layoutData);
table.setHeaderVisible(true);
table.setLinesVisible(true);
table.addListener(SWT.DefaultSelection, new ShowMapListener(gui));
tableViewer.setContentProvider(new ArrayContentProvider());
ColumnViewerToolTipSupport.enableFor(tableViewer);
comparator = new EarthquakeViewerComparator();
tableViewer.setComparator(comparator);
contextMenu = new ContextMenu(gui);
}
示例14: initialize
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; //導入依賴的package包/類
@Override
protected void initialize(ColumnViewer viewer, ViewerColumn column) {
super.initialize(viewer, column);
if (decorator != null) {
ColumnViewerToolTipSupport.enableFor(viewer);
}
}
示例15: createPartControl
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; //導入依賴的package包/類
@Override
public void createPartControl(final Composite parent) {
NavigationTreeService navigationTree;
try {
viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
viewer.setContentProvider(new NavigationViewContentProvider());
ColumnViewerToolTipSupport.enableFor(viewer);
viewer.setLabelProvider(new NavigationViewLabelProvider());
viewer.addDoubleClickListener(new TreeCollapseExpandListener(viewer));
viewer.addDoubleClickListener(new IDoubleClickListener() {
@Override
public void doubleClick(final DoubleClickEvent event) {
CommandExecutor.executeCommand(ICommandIds.CMD_MANAGE_BORROWER_MEDIUM);
}
});
viewer.setSorter(new ViewerSorter());
viewer.setAutoExpandLevel(2);
navigationTree = new NavigationTreeService(viewer);
viewer.setInput(navigationTree.getRoot());
// popup menu related stuff
final MenuManager manager = new MenuManager();
viewer.getTree().setMenu(manager.createContextMenu(viewer.getTree()));
getSite().registerContextMenu(manager, viewer);
getSite().setSelectionProvider(viewer);
} catch (final ConnectException e) {
e.printStackTrace();
}
}