当前位置: 首页>>代码示例>>Java>>正文


Java Label.setToolTipText方法代码示例

本文整理汇总了Java中org.eclipse.swt.widgets.Label.setToolTipText方法的典型用法代码示例。如果您正苦于以下问题:Java Label.setToolTipText方法的具体用法?Java Label.setToolTipText怎么用?Java Label.setToolTipText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swt.widgets.Label的用法示例。


在下文中一共展示了Label.setToolTipText方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: DescriptorLabel

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
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$
    }

}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:20,代码来源:DescriptorLabel.java

示例2: createComposite

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
/**
 * 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");
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:30,代码来源:ConnectorEditorPart.java

示例3: createMiddleLayer

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
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);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:22,代码来源:CategoriesDialogTargetComposite.java

示例4: createTextLabelLayout

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
/**
 * 
 * @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);
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:20,代码来源:LaunchConfigurationTab.java

示例5: setPropertyHelpText

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
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));
	}
	
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:9,代码来源:FTPProtocolWidget.java

示例6: addButtonPanel

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
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;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:37,代码来源:HiveOutputFieldDialog.java

示例7: createTopComposite

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
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);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:32,代码来源:ExcelFormattingDialog.java

示例8: updateLinkedLabel

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
public static void updateLinkedLabel(Label label, String hyperlink) {
	label.setData(hyperlink);
	label.setToolTipText(hyperlink);
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:5,代码来源:LinkLabel.java


注:本文中的org.eclipse.swt.widgets.Label.setToolTipText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。