本文整理汇总了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$
}
}
示例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");
}
示例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);
}
示例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);
}
示例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));
}
}
示例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;
}
示例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);
}
示例8: updateLinkedLabel
import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
public static void updateLinkedLabel(Label label, String hyperlink) {
label.setData(hyperlink);
label.setToolTipText(hyperlink);
}