Java Code Examples for org.eclipse.swt.widgets.Label.setBounds()

The following are Jave code examples for showing how to use setBounds() of the org.eclipse.swt.widgets.Label class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: APITools   File: ShortcutKeyExplain.java   View Source Code Vote up 6 votes
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);
}
 
Example 2
Project: Hydrograph   File: CategoriesDialogTargetComposite.java   View Source Code Vote up 6 votes
private void createMiddleLayer() {
	Composite middleComposite = new Composite(this, SWT.NONE);
	middleComposite.setLayout(new GridLayout(1, false));
	middleComposite.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, true, 1, 1));
	
	addAllSelectedPackagesLabel = new Label(middleComposite, SWT.NONE);
	addAllSelectedPackagesLabel.setBounds(6, 70, 25, 25);
	addAllSelectedPackagesLabel.setImage(ImagePathConstant.SELECT_ALL_ICON.getImageFromRegistry());
	addAllSelectedPackagesLabel.setToolTipText("Add all packages");
	addListenerToSelectAllLable(addAllSelectedPackagesLabel);
	addAllSelectedPackagesLabel.setEnabled(false);
	
	Label dummyLabel = new Label(middleComposite, SWT.NONE);
	
	addSelectedPackagesLabel = new Label(middleComposite, SWT.NONE);
	addSelectedPackagesLabel.setBounds(6, 110, 25, 25);
	addSelectedPackagesLabel.setImage(ImagePathConstant.SELECT_ICON.getImageFromRegistry());
	addSelectedPackagesLabel.setToolTipText("Add selected packages");
	addListenerToSelectLable(addSelectedPackagesLabel);
	addSelectedPackagesLabel.setEnabled(false);
}
 
Example 3
Project: Hydrograph   File: ELTSWTWidgets.java   View Source Code Vote up 5 votes
public Label labelWidget(Composite parent, int style, int[] bounds,
		String value, Image image) {
	Label label = new Label(parent, style);
	label.setBounds(bounds[0], bounds[1], bounds[2], bounds[3]);
	label.setText(value);
	label.setImage(image);

	return label;
}
 
Example 4
Project: Hydrograph   File: ELTLookupMapWizard.java   View Source Code Vote up 5 votes
public Label labelWidget(Composite parent, int style, int[] bounds,
		String value) {
	Label label = new Label(parent, style);
	label.setBounds(bounds[0], bounds[1], bounds[2], bounds[3]);
	label.setText(value);
	// label.setImage(image);

	return label;
}
 
Example 5
Project: Hydrograph   File: ELTLookupConfigGrid.java   View Source Code Vote up 5 votes
public Label labelWidget(Composite parent, int style, int[] bounds, String value) {
	Label label = new Label(parent, style);
	label.setBounds(bounds[0], bounds[1], bounds[2], bounds[3]);
	label.setText(value);

	return label;
}
 
Example 6
Project: Hydrograph   File: JoinMapGrid.java   View Source Code Vote up 5 votes
public Label labelWidget(Composite parent, int style, int[] bounds,
		String value) {
	Label label = new Label(parent, style);
	label.setBounds(bounds[0], bounds[1], bounds[2], bounds[3]);
	label.setText(value);
	// label.setImage(image);

	return label;
}
 
Example 7
Project: Tarski   File: ActionSelectionDialog.java   View Source Code Vote up 5 votes
/**
 * Create contents of the dialog.
 *
 * @param parent
 */
@Override
protected Control createDialogArea(final Composite parent) {
  final Composite container = (Composite) super.createDialogArea(parent);
  container.setToolTipText("");
  container.setLayout(null);

  final Label lblNewLabel = new Label(container, SWT.NONE);
  lblNewLabel.setBounds(31, 10, 317, 13);
  lblNewLabel.setText("Which action do you want to do ?!");

  return container;
}
 
Example 8
Project: APITools   File: AboutTools.java   View Source Code Vote up 4 votes
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);
}