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