当前位置: 首页>>代码示例>>Java>>正文


Java SWT.EMBEDDED属性代码示例

本文整理汇总了Java中org.eclipse.swt.SWT.EMBEDDED属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.EMBEDDED属性的具体用法?Java SWT.EMBEDDED怎么用?Java SWT.EMBEDDED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.swt.SWT的用法示例。


在下文中一共展示了SWT.EMBEDDED属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createPartControl

@Override
public void createPartControl(final Composite parent) {
  final Object viewer = Test.getViewer();

  final Composite composite = new Composite(parent, SWT.EMBEDDED);
  final Frame frame = SWT_AWT.new_Frame(composite);
  frame.setTitle("Antlr AST");

  scrollPane = new JScrollPane();
  scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
  scrollPane.setBounds(0, 0, 500, 500);

  scrollPane.getViewport().add((Component) viewer);

  frame.add(scrollPane);
  // frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
  frame.setSize(Toolkit.getDefaultToolkit().getScreenSize().width, 500);
  frame.setVisible(true);
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:20,代码来源:ParseTreeView.java

示例2: createGraphComposite

private void createGraphComposite(Composite parent) {
	try {
		UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
	} catch (ClassNotFoundException | InstantiationException | IllegalAccessException
			| UnsupportedLookAndFeelException e) {
		e.printStackTrace();
	}

	Composite composite = new Composite(parent, SWT.EMBEDDED | SWT.NO_BACKGROUND);
	ClassLoader loader = CFGView.class.getClassLoader();
	URL stylesheetUrl = loader.getResource("/styles/styleSheet.css");
	System.setProperty("sun.awt.noerasebackground", "true");
	System.setProperty("org.graphstream.ui.renderer", "org.graphstream.ui.j2dviewer.J2DGraphRenderer");
	GraphManager manager = new GraphManager("VisuFlow Graph", "url('"+stylesheetUrl.toString()+"')");
	Thread t = new Thread(manager);
	t.start();

	Frame frame = SWT_AWT.new_Frame(composite);
	frame.add(manager.getApplet());
	frame.pack();
}
 
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:21,代码来源:CFGView.java

示例3: createCompositeConnector

/**
 * This method initializes compositeConnector
 * 
 */
private void createCompositeConnector() {
	GridLayout gridLayout2 = new GridLayout();
	gridLayout2.horizontalSpacing = 0;
	gridLayout2.marginWidth = 0;
	gridLayout2.marginHeight = 0;
	gridLayout2.verticalSpacing = 0;

	try {
		int connectorCompositeStyle = (connector instanceof JavelinConnector ? SWT.EMBEDDED | SWT.LEFT
				: SWT.NONE);
		Constructor<?> constructor = compositeConnectorClass.getConstructor(new Class[] {
				ConnectorEditorPart.class, Connector.class, Composite.class, int.class });
		compositeConnector = (AbstractConnectorComposite) constructor.newInstance(new Object[] { this,
				connector, sashForm, new Integer(connectorCompositeStyle) });

		compositeConnector.setParent(sashForm);
		compositeConnector.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_BLACK));
		compositeConnector.setLayout(gridLayout2);
	} catch (Exception e) {
		ConvertigoPlugin.logException(e,
				"An unexpected exception has occured while creating the connector composite.");
	}

	// test if the compositeConnector needs a zoneListener
	// if (ILinkable.class.isAssignableFrom(compositeConnectorClass)) {
	// ToolItem[] ti_tab = toolBar.getItems();
	// // retrouve le tool item qui va bien pour le passer à la méthode
	// monitor
	// int i = ((Integer)toolItemsIds.get("Link")).intValue();
	// ((ILinkable) compositeConnector).monitor(ti_tab[i]);
	// }
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:36,代码来源:ConnectorEditorPart.java

示例4: createPages

@Override
protected void createPages() {
  this.kodKodEditor = new KodKodEditor();
  RelationModelEditor.animationEditor = new Composite(this.getContainer(), SWT.EMBEDDED);
  RelationModelEditor.frame = null;

  try {
    int pageIndex = this.addPage(this.kodKodEditor, this.getEditorInput());
    this.setPageText(pageIndex, "Specification");
    pageIndex = this.addPage(RelationModelEditor.animationEditor);
    this.setPageText(pageIndex, "Manager");
  } catch (final PartInitException e) {
    e.printStackTrace();
  }
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:15,代码来源:RelationModelEditor.java

示例5: createPartControl

@Override
public void createPartControl(final Composite parent) {
  Visualization.container = new Composite(parent, SWT.EMBEDDED | SWT.NO_BACKGROUND);
  Visualization.frame = null;
  Visualization.f = null;
  Visualization.graph = null;
  Visualization.myState = null;
  Visualization.evaluatorPanel = EvaluatorPanel.getInstance(Visualization.xmlFileName);
  Visualization.showViz();
  Visualization.createPopupMenu();
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:11,代码来源:Visualization.java

示例6: C8oBrowser

public C8oBrowser(Composite parent, int style) {
	super(parent, style | SWT.EMBEDDED | SWT.NO_BACKGROUND);
	init(parent, BrowserContext.defaultContext());
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:4,代码来源:C8oBrowser.java

示例7: addModelPage

private void addModelPage(int index) {
  this.modelEditor = new Composite(this.getContainer(), SWT.EMBEDDED);
  index = this.addPage(this.modelEditor);
  this.setPageText(index, "Specification");
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:5,代码来源:MetaModelEditor.java


注:本文中的org.eclipse.swt.SWT.EMBEDDED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。