當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。