本文整理汇总了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);
}
示例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();
}
示例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]);
// }
}
示例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();
}
}
示例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();
}
示例6: C8oBrowser
public C8oBrowser(Composite parent, int style) {
super(parent, style | SWT.EMBEDDED | SWT.NO_BACKGROUND);
init(parent, BrowserContext.defaultContext());
}
示例7: addModelPage
private void addModelPage(int index) {
this.modelEditor = new Composite(this.getContainer(), SWT.EMBEDDED);
index = this.addPage(this.modelEditor);
this.setPageText(index, "Specification");
}