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


Java Shell.setText方法代码示例

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


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

示例1: main

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
/**
 * Starting point for the demonstration application.
 *
 * @param args  ignored.
 */
public static void main(String[] args) {
    final JFreeChart chart = createChart(createDataset());
    final Display display = new Display();
    Shell shell = new Shell(display);
    shell.setSize(600, 300);
    shell.setLayout(new FillLayout());
    shell.setText("Time series demo for jfreechart running with SWT");
    ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart, true);
    frame.setDisplayToolTips(true);
    frame.setHorizontalAxisTrace(false);
    frame.setVerticalAxisTrace(false);
    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:23,代码来源:SWTTimeSeriesDemo.java

示例2: createShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
@Override
protected Shell createShell(Display display) throws Exception {

	this.controlTree = getControlTree("control_tree.xml");

	this.viewer = new ControlTreeViewer(controlTree, Services.getConnector());
	viewer.setUseFilteredTree(false);

	Shell shell = new Shell(display);
	shell.setText("Control Tree");
	shell.setLayout(new GridLayout(1, false));
       viewer.createPartControl(shell, controlTree);

	shell.pack();
	shell.setSize(500, 500);
	shell.open();

	return shell;
}
 
开发者ID:eclipse,项目名称:scanning,代码行数:20,代码来源:ControlTreeViewerTest.java

示例3: StartupSplashShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
/**
 * create the startup splash shell and display it
 * @param display
 */
public StartupSplashShell(Display display){
	shell = new Shell(display, SWT.NO_TRIM);
	
	setupShell(); 				// place components in the main avoCADo shell
	
	shell.setText("avoCADo");
	shell.setBackgroundImage(ImageUtils.getIcon("./avoCADo-Splash.jpg", 360, 298));
	shell.setSize(360, 298);	//TODO: set intial size to last known size
	Rectangle b = display.getBounds();
	int xPos = Math.max(0, (b.width-360)/2);
	int yPos = Math.max(0, (b.height-298)/2);
	shell.setLocation(xPos, yPos);
	shell.setImage(ImageUtils.getIcon("./avoCADo.png", 32, 32));
	shell.open();
	
	// handle events while the shell is not disposed
	//while (!shell.isDisposed()) {
	//	if (!display.readAndDispatch())
	//		display.sleep();
	//}
}
 
开发者ID:avoCADo-3d,项目名称:avoCADo,代码行数:26,代码来源:StartupSplashShell.java

示例4: createShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
@Override
protected Shell createShell(Display display) throws Exception {

	this.bbox = new BoundingBox();
	bbox.setFastAxisName("stage_x");
	bbox.setSlowAxisName("T");
    bbox.setFastAxisStart(0);
	bbox.setSlowAxisStart(1);
	bbox.setFastAxisLength(10);
	bbox.setSlowAxisLength(11);
	bbox.setRegionName("fred");

	this.viewer = interfaceService.createModelViewer();

	Shell shell = new Shell(display);
	shell.setText("Bounding Box");
	shell.setLayout(new GridLayout(1, false));
       viewer.createPartControl(shell);
	viewer.setModel(bbox);

	shell.pack();
	shell.setSize(500, 500);
	shell.open();

	return shell;
}
 
开发者ID:eclipse,项目名称:scanning,代码行数:27,代码来源:BoundingBoxTest.java

示例5: createShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
@Override
protected Shell createShell(Display display) throws Exception {

	this.viewer = new ScannableViewer();

	Shell shell = new Shell(display);
	shell.setText("Monitors");
	shell.setLayout(new GridLayout(1, false));
       viewer.createPartControl(shell);

	shell.pack();
	shell.setSize(500, 500);
	shell.open();

	return shell;
}
 
开发者ID:eclipse,项目名称:scanning,代码行数:17,代码来源:ScannableViewerTest.java

示例6: createShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
@Override
protected Shell createShell(Display display) throws Exception {

	this.config = new SampleData();
	config.setName("Sample name");
	config.setDescription("Hello World");

	this.viewer = interfaceService.createModelViewer();

	Shell shell = new Shell(display);
	shell.setText("Sample");
	shell.setLayout(new GridLayout(1, false));
       viewer.createPartControl(shell);
	viewer.setModel(config);

	shell.pack();
	shell.setSize(500, 500);
	shell.open();

	return shell;
}
 
开发者ID:eclipse,项目名称:scanning,代码行数:22,代码来源:SampleInformationTest.java

示例7: configureShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
@Override
protected void configureShell(Shell newShell) {
	super.configureShell(newShell);
	String productName = ""; //$NON-NLS-1$
	IProduct product = Platform.getProduct();
	if (product != null && product.getName() != null)
		productName = product.getName();
	newShell.setText(NLS.bind(
			WorkbenchMessages.InstallationDialog_ShellTitle, productName));
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:11,代码来源:HydrographInstallationDialog.java

示例8: configureShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
@Override
protected void configureShell(Shell shell) {
	super.configureShell(shell);

	shell.setText("HtmlViewer example");
	shell.setSize(920, 450);
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:8,代码来源:Demo.java

示例9: configureShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
@Override
public void configureShell(Shell newShell) {
	super.configureShell(newShell);
	newShell.setText("Engine Log settings");
	newShell.setSize(nWidth, nHeight);

	int nLeft = 0;
	int nTop = 0;

	Display display = newShell.getDisplay();

	Point pt = display.getCursorLocation();
	Monitor[] monitors = display.getMonitors();

	for (int i = 0; i < monitors.length; i++) {
		if (monitors[i].getBounds().contains(pt)) {
			Rectangle rect = monitors[i].getClientArea();

			if (rect.x < 0)
				nLeft = ((rect.width - nWidth) / 2) + rect.x;
			else
				nLeft = (rect.width - nWidth) / 2;

			if (rect.y < 0)
				nTop = ((rect.height - nHeight) / 2) + rect.y;
			else
				nTop = (rect.height - nHeight) / 2;

			break;
		}
	}

	newShell.setBounds(nLeft, nTop, nWidth, nHeight);
	
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:36,代码来源:EnginePreferenceDialog.java

示例10: configureShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
@Override
protected void configureShell(Shell newShell) {
	super.configureShell(newShell);
	newShell.setText("Set custom attributes");
	InputStream in = getClass().getClassLoader().getResourceAsStream("/icons/sample.gif");
	newShell.setImage(new Image(newShell.getDisplay(), in));

}
 
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:9,代码来源:Attribute.java

示例11: configureShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
protected void configureShell(Shell newShell) {
	super.configureShell(newShell);
	newShell.setText("Undefined Global Symbols");
	//newShell.setSize(470,270); 
	display = newShell.getDisplay();
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:7,代码来源:GlobalsSymbolsWarnDialog.java

示例12: configureShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
protected void configureShell(Shell newShell) {
	super.configureShell(newShell);
	
	newShell.setText("Convertigo");
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:6,代码来源:ProjectDeployErrorDialog.java

示例13: configureShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
protected void configureShell(Shell shell) {
	super.configureShell(shell);
	shell.setText("列信息");
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:5,代码来源:ColumnDialog.java

示例14: configureShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
@Override
protected void configureShell(Shell newShell) {
    super.configureShell(newShell);
    newShell.setText(resourceBundle.getString("columns"));
}
 
开发者ID:technology16,项目名称:pgsqlblocks,代码行数:6,代码来源:TMTreeViewerColumnsDialog.java

示例15: configureShell

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
protected void configureShell(Shell shell) {
      super.configureShell(shell);
      if (title != null) {
	shell.setText(title);
}
  }
 
开发者ID:32kda,项目名称:com.onpositive.prefeditor,代码行数:7,代码来源:NewPreferenceDialog.java


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