本文整理汇总了Java中org.eclipse.gef.ui.parts.TreeViewer类的典型用法代码示例。如果您正苦于以下问题:Java TreeViewer类的具体用法?Java TreeViewer怎么用?Java TreeViewer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TreeViewer类属于org.eclipse.gef.ui.parts包,在下文中一共展示了TreeViewer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerAction
import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
private void registerAction(TreeViewer treeViewer,
ActionRegistry actionRegistry) {
IAction[] actions = { new CreateIndexAction(treeViewer),
new CreateSequenceAction(treeViewer),
new CreateTriggerAction(treeViewer),
new CreateTablespaceAction(treeViewer),
new ChangeOutlineViewToPhysicalAction(treeViewer),
new ChangeOutlineViewToLogicalAction(treeViewer),
new ChangeOutlineViewToBothAction(treeViewer),
new ChangeOutlineViewOrderByPhysicalNameAction(treeViewer),
new ChangeOutlineViewOrderByLogicalNameAction(treeViewer) };
for (IAction action : actions) {
actionRegistry.registerAction(action);
}
}
示例2: getAdapter
import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
@Override
public Object getAdapter(Object adaptableObject, @SuppressWarnings("rawtypes") Class adapterType) {
if (GFPreferences.getInstance().isGenericOutlineActive()) {
if (IContentOutlinePage.class.equals(adapterType)) {
if (adaptableObject instanceof DiagramEditor) {
DiagramEditor diagramEditor = (DiagramEditor) adaptableObject;
if (diagramEditor.getConfigurationProvider() != null) { // diagram editor initialized?
GraphicsEditorOutlinePage outlinePage = new GraphicsEditorOutlinePage(new TreeViewer(), diagramEditor
.getGraphicalViewer(), diagramEditor.getActionRegistryInternal(), diagramEditor.getEditDomain(),
diagramEditor.getCommonKeyHandler(), diagramEditor.getAdapter(ZoomManager.class), diagramEditor
.getSelectionSynchronizerInternal(), diagramEditor);
return outlinePage;
}
}
}
}
return null;
}
示例3: createOutline
import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
protected JDReportOutlineView createOutline(TreeViewer viewer) {
outlinePage = new JDReportOutlineView(this, viewer) {
protected void initActions(ActionRegistry registry, IActionBars bars) {
String id = CreateStyleTemplateReferenceAction.ID;
bars.setGlobalActionHandler(id, registry.getAction(id));
id = CreateStyleAction.ID;
bars.setGlobalActionHandler(id, registry.getAction(id));
}
protected org.eclipse.gef.ContextMenuProvider getMenuContentProvider() {
return createContextMenuProvider(getViewer());
}
};
outlinePage.setEditPartFactory(new StyleTreeEditPartFactory());
return outlinePage;
}
示例4: selectionChanged
import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
public void selectionChanged(SelectionChangedEvent event) {
StructuredSelection sel = (StructuredSelection) event.getSelection();
if ((event.getSource() instanceof TreeViewer) && (multieditor != null)) {
for (Iterator j = sel.iterator(); j.hasNext();) {
Object obj = j.next();
if (obj instanceof IndicatorTreeEditPart) {
if (currentSelection != null) {
currentSelection.setSelected(false);
}
currentSelection = (IndicatorTreeEditPart) obj;
Indicator cind = ((IndicatorTreeEditPart) obj).getIndicator();
currentIndicator = cind;
}
}
}
}
示例5: getDeleteCommand
import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
/**
* Returns either a DeletePathNodeCommand
*
* @see org.eclipse.gef.editpolicies.ComponentEditPolicy#getDeleteCommand(org.eclipse.gef.requests.GroupRequest)
*/
protected Command getDeleteCommand(GroupRequest request) {
Object parent = getHost().getParent().getModel();
Object node = getHost().getModel();
java.util.Map registry;
if (getHost().getViewer() instanceof TreeViewer) {
// we need an editpart registry with NodeConnectionEditParts
UCMNavMultiPageEditor editor = (UCMNavMultiPageEditor) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
registry = editor.getCurrentPage().getGraphicalViewer().getEditPartRegistry();
} else
registry = getHost().getViewer().getEditPartRegistry();
if (parent instanceof UCMmap && node instanceof PathNode) {
return new DeletePathNodeCommand((PathNode) node, registry);
}
return super.createDeleteCommand(request);
}
示例6: GW4EOutlinePage
import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
public GW4EOutlinePage() {
super(new TreeViewer());
gWGraph.addPropertyChangeListener(this);
filter = new OutLineFilter(this);
Map registry = getGraphicalViewer().getEditPartRegistry();
gwtpf = new GW4ETreeEditPartFactory(registry, filter);
}
示例7: getAdapter
import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
@Override
public Object getAdapter(Class adapter) {
if(adapter==IPropertySheetPage.class){
this.propertySheetPage=new GraphicalPropertySheetPage(this, getCommandStack());
return this.propertySheetPage;
}
if(adapter==IContentOutlinePage.class){
OutlinePage page=new OutlinePage(new TreeViewer());
return page;
}
return super.getAdapter(adapter);
}
示例8: getAdapter
import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
public Object getAdapter(Class type) {
if (type == IContentOutlinePage.class) {
return new DbToolGefEditorOutlinePage(new TreeViewer(), this);
} else if (type == IPropertySheetPage.class) {
return new TabbedPropertySheetPage(this);
} else if (type == ZoomManager.class) {
return getGraphicalViewer().getProperty(ZoomManager.class.toString());
}
return super.getAdapter(type);
}
示例9: ERDiagramOutlinePage
import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
public ERDiagramOutlinePage(final ERDiagram diagram) {
// GEFツリービューワを使用する
super(new TreeViewer());
viewer = (TreeViewer) getViewer();
this.diagram = diagram;
outlineActionRegistory = new ActionRegistry();
registerAction(viewer, outlineActionRegistory);
}
示例10: registerAction
import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
private void registerAction(final TreeViewer treeViewer, final ActionRegistry actionRegistry) {
final IAction[] actions = {new CreateIndexAction(treeViewer), new CreateSequenceAction(treeViewer), new CreateTriggerAction(treeViewer), new CreateTablespaceAction(treeViewer), new ChangeOutlineViewToPhysicalAction(treeViewer), new ChangeOutlineViewToLogicalAction(treeViewer), new ChangeOutlineViewToBothAction(treeViewer), new ChangeOutlineViewOrderByPhysicalNameAction(treeViewer), new ChangeOutlineViewOrderByLogicalNameAction(treeViewer)};
for (final IAction action : actions) {
actionRegistry.registerAction(action);
}
}
示例11: ERDiagramOutlinePage
import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
public ERDiagramOutlinePage(ERDiagram diagram) {
// GEFツリービューワを使用する
super(new TreeViewer());
this.viewer = (TreeViewer) this.getViewer();
this.diagram = diagram;
this.outlineActionRegistory = new ActionRegistry();
this.registerAction(this.viewer, outlineActionRegistory);
}
示例12: AbstractOutlineBaseAction
import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
public AbstractOutlineBaseAction(String id, String text, int style,
TreeViewer treeViewer) {
super(text, style);
this.setId(id);
this.treeViewer = treeViewer;
}
示例13: getOutlinePage
import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
protected IContentOutlinePage getOutlinePage() {
if (null == outline && null != getGraphicalViewer()) {
TreeViewer viewer = new TreeViewer();
viewer.setEditDomain(getEditDomain());
outline = new DiagramOutlinePage2(this, viewer, getDiagram(),
getGraphicalViewer().getRootEditPart());
}
return outline;
}
示例14: createOutline
import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
protected JDReportOutlineView createOutline(TreeViewer viewer) {
outlinePage = new JDReportOutlineView(this, viewer) {
protected void initActions(ActionRegistry registry, IActionBars bars) {
}
protected org.eclipse.gef.ContextMenuProvider getMenuContentProvider() {
return createContextMenuProvider(getViewer());
}
};
// outlinePage.setEditPartFactory(new StyleTreeEditPartFactory());
return outlinePage;
}
示例15: getOutlineView
import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
protected JDReportOutlineView getOutlineView() {
if (outlinePage == null) {
TreeViewer viewer = new TreeViewer();
outlinePage = createOutline(viewer);
}
return outlinePage;
}