當前位置: 首頁>>代碼示例>>Java>>正文


Java StyledText.setBounds方法代碼示例

本文整理匯總了Java中org.eclipse.swt.custom.StyledText.setBounds方法的典型用法代碼示例。如果您正苦於以下問題:Java StyledText.setBounds方法的具體用法?Java StyledText.setBounds怎麽用?Java StyledText.setBounds使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.custom.StyledText的用法示例。


在下文中一共展示了StyledText.setBounds方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createContents

import org.eclipse.swt.custom.StyledText; //導入方法依賴的package包/類
private void createContents(String str) {
	aboutToolsShell = new Shell(getParent(), getStyle());
	aboutToolsShell.setImage(SWTResourceManager.getImage(ShortcutKeyExplain.class, Resource.IMAGE_ICON));
	aboutToolsShell.setSize(400, 391);
	aboutToolsShell.setText(getText());
	PubUtils.setCenterinParent(getParent(), aboutToolsShell);

	Link link = new Link(aboutToolsShell, SWT.NONE);
	link.setBounds(143, 336, 108, 17);
	link.setText("<a>www.itlaborer.com</a>");
	link.addSelectionListener(new LinkSelection());

	StyledText readMeTextLabel = new StyledText(aboutToolsShell,
			SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL);
	readMeTextLabel.setBounds(3, 33, 389, 297);
	readMeTextLabel.setText(str);

	Label label_2 = new Label(aboutToolsShell, SWT.NONE);
	label_2.setFont(org.eclipse.wb.swt.SWTResourceManager.getFont("微軟雅黑", 9, SWT.BOLD));
	label_2.setText("快捷鍵說明:");
	label_2.setBounds(3, 12, 136, 17);
}
 
開發者ID:cnldw,項目名稱:APITools,代碼行數:23,代碼來源:ShortcutKeyExplain.java

示例2: createContents

import org.eclipse.swt.custom.StyledText; //導入方法依賴的package包/類
private void createContents(String exlplain, String version) {
	aboutToolsShell = new Shell(getParent(), getStyle());
	aboutToolsShell.setImage(SWTResourceManager.getImage(AboutTools.class, Resource.IMAGE_ICON));
	aboutToolsShell.setSize(400, 391);
	aboutToolsShell.setText(getText());
	PubUtils.setCenterinParent(getParent(), aboutToolsShell);

	Label copyRightlabel = new Label(aboutToolsShell, SWT.CENTER);
	copyRightlabel.setBounds(10, 311, 375, 17);
	copyRightlabel.setText(Resource.AUTHOR);

	Link link = new Link(aboutToolsShell, SWT.NONE);
	link.setBounds(143, 336, 108, 17);
	link.setText("<a>www.itlaborer.com</a>");
	link.addSelectionListener(new LinkSelection());

	Label versionLabel = new Label(aboutToolsShell, SWT.NONE);
	versionLabel.setAlignment(SWT.CENTER);
	versionLabel.setBounds(156, 288, 82, 17);
	versionLabel.setText(version);

	StyledText readMeTextLabel = new StyledText(aboutToolsShell,
			SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL);
	readMeTextLabel.setBounds(3, 33, 389, 114);
	readMeTextLabel.setText(exlplain);

	StyledText lblgplV = new StyledText(aboutToolsShell, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL);
	lblgplV.setText(
			"Copyright itlaborer.com\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.");
	lblgplV.setBounds(3, 176, 389, 106);

	Label label_1 = new Label(aboutToolsShell, SWT.NONE);
	label_1.setFont(org.eclipse.wb.swt.SWTResourceManager.getFont("微軟雅黑", 9, SWT.BOLD));
	label_1.setText("Apache License:");
	label_1.setBounds(3, 155, 136, 17);

	Label label_2 = new Label(aboutToolsShell, SWT.NONE);
	label_2.setFont(org.eclipse.wb.swt.SWTResourceManager.getFont("微軟雅黑", 9, SWT.BOLD));
	label_2.setText("軟件說明:");
	label_2.setBounds(3, 12, 136, 17);
}
 
開發者ID:cnldw,項目名稱:APITools,代碼行數:42,代碼來源:AboutTools.java


注:本文中的org.eclipse.swt.custom.StyledText.setBounds方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。