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

The following are Jave code examples for showing how to use setToolTipText() 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: neoscada   File: DescriptorLabel.java   View Source Code Vote up 6 votes
public DescriptorLabel ( final Composite parent, final int style, final String text, final DataItemDescriptor descriptor )
{
    super ( parent, SWT.NONE );

    setLayout ( new FillLayout () );
    Label label = new Label ( this, style );

    if ( text != null )
    {
        label.setText ( text );
    }

    // TODO: make properties
    if ( SessionManager.getDefault ().hasRole ( "developer" ) ) //$NON-NLS-1$
    {
        label.setToolTipText ( String.format ( "%s", descriptor ) ); //$NON-NLS-1$
    }

}
 
Example 2
Project: convertigo-eclipse   File: ConnectorEditorPart.java   View Source Code Vote up 6 votes
/**
 * This method initializes composite
 * 
 */
private void createComposite() {
	GridData gridData7 = new org.eclipse.swt.layout.GridData();
	gridData7.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	gridData7.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
	GridData gridData4 = new org.eclipse.swt.layout.GridData();
	gridData4.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	gridData4.grabExcessHorizontalSpace = false;
	gridData4.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
	GridLayout gridLayout4 = new GridLayout();
	gridLayout4.numColumns = 2;
	compositeOutputFooter = new Composite(compositeOutput, SWT.NONE);
	compositeOutputFooter.setBackground(new Color(Display.getCurrent(), 162, 194, 250));
	compositeOutputFooter.setLayout(gridLayout4);
	compositeOutputFooter.setLayoutData(gridData4);
	label1 = new Label(compositeOutputFooter, SWT.NONE);
	label1.setBackground(new Color(Display.getCurrent(), 162, 194, 250));
	label1.setText("Last detected screen class:");
	label1.setToolTipText("Displays the current screen class name");

	labelLastDetectedScreenClass = new Label(compositeOutputFooter, SWT.NONE);
	labelLastDetectedScreenClass.setBackground(new Color(Display.getCurrent(), 162, 194, 250));
	labelLastDetectedScreenClass.setText("(unknown)");
	labelLastDetectedScreenClass.setLayoutData(gridData7);
	labelLastDetectedScreenClass.setToolTipText("Displays the current screen class name");
}
 
Example 3
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 4
Project: gemoc-studio-modeldebugging   File: LaunchConfigurationTab.java   View Source Code Vote up 5 votes
/**
 * 
 * @param parent
 *            the Parent of this argument tab
 * @param labelString
 *            the label of the input text to create
 * @param toolTipText
 * 			  the text for tool tip
 */
protected void createTextLabelLayout(Composite parent, String labelString, String toolTipText) {
	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
	parent.setLayoutData(gd);
	Label inputLabel = new Label(parent, SWT.NONE);
	inputLabel.setText(labelString); //$NON-NLS-1$
	inputLabel.setToolTipText(toolTipText);
	//gd = new GridData();
	//gd.horizontalSpan = 2;
	//inputLabel.setLayoutData(gd);
}
 
Example 5
Project: Hydrograph   File: FTPProtocolWidget.java   View Source Code Vote up 5 votes
private void setPropertyHelpText(Label label, String message) {
	if(ShowHidePropertyHelpHandler.getInstance() != null 
			&& ShowHidePropertyHelpHandler.getInstance().isShowHidePropertyHelpChecked()){
		label.setToolTipText(message);
		label.setCursor(new Cursor(label.getDisplay(), SWT.CURSOR_HELP));
	}
	
}
 
Example 6
Project: Hydrograph   File: FTPAuthenticEditorDialog.java   View Source Code Vote up 5 votes
private void setPropertyHelpText(Label label, String message) {
	if(ShowHidePropertyHelpHandler.getInstance() != null 
			&& ShowHidePropertyHelpHandler.getInstance().isShowHidePropertyHelpChecked()){
		label.setToolTipText(message);
		label.setCursor(new Cursor(label.getDisplay(), SWT.CURSOR_HELP));
	}
	
}
 
Example 7
Project: Hydrograph   File: FTPOperationConfigDialog.java   View Source Code Vote up 5 votes
private void setPropertyHelpText(Label label, String message) {
	if(ShowHidePropertyHelpHandler.getInstance() != null 
			&& ShowHidePropertyHelpHandler.getInstance().isShowHidePropertyHelpChecked()){
		label.setToolTipText(message);
		label.setCursor(new Cursor(label.getDisplay(), SWT.CURSOR_HELP));
	}
	
}
 
Example 8
Project: Hydrograph   File: HiveOutputFieldDialog.java   View Source Code Vote up 5 votes
protected Composite addButtonPanel(Composite container) {
	Composite composite_1 = new Composite(container, SWT.NONE);
	composite_1.setLayout(new GridLayout(5, false));
	ColumnLayoutData cld_composite_1 = new ColumnLayoutData();
	cld_composite_1.horizontalAlignment = ColumnLayoutData.RIGHT;
	cld_composite_1.heightHint = 28;
	composite_1.setLayoutData(cld_composite_1);

	Label addButton = new Label(composite_1, SWT.NONE);
	addButton.setToolTipText(Messages.ADD_KEY_SHORTCUT_TOOLTIP);
	addButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	addButton.setImage(ImagePathConstant.ADD_BUTTON.getImageFromRegistry());
	attachAddButtonListern(addButton);

	deleteButton = new Label(composite_1, SWT.NONE);
	deleteButton.setToolTipText(Messages.DELETE_KEY_SHORTCUT_TOOLTIP);
	deleteButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	deleteButton.setImage(ImagePathConstant.DELETE_BUTTON.getImageFromRegistry());
	attachDeleteButtonListener(deleteButton);

	upButton = new Label(composite_1, SWT.NONE);
	upButton.setToolTipText(Messages.MOVE_UP_KEY_SHORTCUT_TOOLTIP);
	upButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	upButton.setImage(ImagePathConstant.MOVEUP_BUTTON.getImageFromRegistry());
	attachUpButtonListener(upButton);

	downButton = new Label(composite_1, SWT.NONE);
	downButton.setToolTipText(Messages.MOVE_DOWN_KEY_SHORTCUT_TOOLTIP);
	downButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	downButton.setImage(ImagePathConstant.MOVEDOWN_BUTTON.getImageFromRegistry());
	attachDownButtonListerner(downButton);
	deleteButton.setEnabled(false);
	upButton.setEnabled(false);
	downButton.setEnabled(false);
	return composite_1;
}
 
Example 9
Project: Hydrograph   File: ExcelFormattingDialog.java   View Source Code Vote up 5 votes
private void createTopComposite(Composite main_composite) {
	top_composite = new Composite(main_composite, SWT.NONE);
	top_composite.setLayout(new GridLayout(4, false));
	GridData gd_composite_1 = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
	gd_composite_1.heightHint = 45;
	top_composite.setLayoutData(gd_composite_1);

	Label applyAllLabel = new Label(top_composite, SWT.NONE);
	applyAllLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
	applyAllLabel.setText(Messages.REMAINING_FIELDS);
	applyAllLabel.setToolTipText(Messages.REMAINING_FIELDS_TOOLTIP);

	combo = new CCombo(top_composite, SWT.NONE);
	GridData gd_combo = new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1);
	gd_combo.widthHint = 143;
	combo.setLayoutData(gd_combo);
	draggedFields.add(0,"Select");
	combo.setItems(convertToArray(draggedFields));
	combo.select(0);
	
	Composite composite_2 = new Composite(top_composite, SWT.NONE);
	composite_2.setLayout(new GridLayout(3, false));
	composite_2.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, true, true, 1, 1));

	deleteButton = new Button(composite_2, SWT.NONE);
	deleteButton.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, true, false, 1, 1));
	deleteButton.setImage(ImagePathConstant.DELETE_BUTTON.getImageFromRegistry()); 
	attachDeleteButtonListener(deleteButton);

	deleteButton.setEnabled(false);
}
 
Example 10
Project: BiglyBT   File: LinkLabel.java   View Source Code Vote up 4 votes
public static void updateLinkedLabel(Label label, String hyperlink) {
	label.setData(hyperlink);
	label.setToolTipText(hyperlink);
}