本文整理匯總了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();
}
}
示例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;
}
示例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();
//}
}
示例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;
}
示例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;
}
示例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;
}
示例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));
}
示例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);
}
示例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);
}
示例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));
}
示例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();
}
示例12: configureShell
import org.eclipse.swt.widgets.Shell; //導入方法依賴的package包/類
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setText("Convertigo");
}
示例13: configureShell
import org.eclipse.swt.widgets.Shell; //導入方法依賴的package包/類
protected void configureShell(Shell shell) {
super.configureShell(shell);
shell.setText("列信息");
}
示例14: configureShell
import org.eclipse.swt.widgets.Shell; //導入方法依賴的package包/類
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setText(resourceBundle.getString("columns"));
}
示例15: configureShell
import org.eclipse.swt.widgets.Shell; //導入方法依賴的package包/類
protected void configureShell(Shell shell) {
super.configureShell(shell);
if (title != null) {
shell.setText(title);
}
}