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


Java Button.setToolTipText方法代码示例

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


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

示例1: SuperClassComponent

import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
/**
 * Creates a new super class component using the given model and container.
 *
 * @param model
 *            The model to bind this to
 * @param container
 *            The parent WizardComponentContainer
 */
public SuperClassComponent(N4JSClassWizardModel model, WizardComponentContainer container) {
	super(container);
	this.model = model;

	Label superClassLabel = new Label(container.getComposite(), SWT.NONE);
	superClassLabel.setText("Super class:");

	text = new Text(container.getComposite(), SWT.BORDER);
	text.setLayoutData(fillTextDefaults());

	browseButton = new Button(container.getComposite(), SWT.NONE);
	browseButton.setToolTipText("Opens a dialog to choose the super class");
	browseButton.setText("Browse...");

	setupBindings();
	setupDialog();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:26,代码来源:SuperClassComponentProvider.java

示例2: createAdvancedContent

import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
private Composite createAdvancedContent ( final Composite advWrapper )
{
    final Composite advContent = new Composite ( advWrapper, SWT.NONE );
    advContent.setLayout ( new GridLayout ( 1, false ) );

    final Button credentialsAsProperties = new Button ( advContent, SWT.CHECK );
    credentialsAsProperties.setText ( Messages.LoginDialog_CredentialsButtons_Text );
    credentialsAsProperties.setToolTipText ( Messages.LoginDialog_CredentialsButtons_ToolTip );

    credentialsAsProperties.setSelection ( this.flagCredentialsAsProperties );
    credentialsAsProperties.addSelectionListener ( new SelectionAdapter () {
        @Override
        public void widgetSelected ( final SelectionEvent e )
        {
            LoginDialog.this.flagCredentialsAsProperties = credentialsAsProperties.getSelection ();
        }
    } );

    return advContent;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:21,代码来源:LoginDialog.java

示例3: enableButton

import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
protected void enableButton(Button button, boolean enable) {
	Boolean b = Boolean.valueOf(enable);
	if (button.getData("enable") == null || !button.getData("enable").equals(b)) {
		String imageURL = "" + button.getData("image_url");
		String tooltip = "" + button.getData("tooltip");
		if (!enable) {
			if (button.getData("disable_msg") != null) {
				tooltip += " (To enable button, " + button.getData("disable_msg") + ")";
			}
			int index = imageURL.lastIndexOf('.');
			imageURL = imageURL.substring(0, index) + ".d" + imageURL.substring(index);
		}
		button.setImage(new Image(Display.getCurrent(), getClass().getResourceAsStream(imageURL)));
		button.setToolTipText(tooltip);
		button.setData("enable", b);
	}
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:18,代码来源:XpathEvaluatorComposite.java

示例4: createCopyButton

import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
/**
 * Creates the copy button 
 * @param buttonComposite
 */
private void createCopyButton(Composite buttonComposite){
	Button copyButton = new Button(buttonComposite, SWT.PUSH);
 
    	copyButton.setImage(ImagePathConstant.ENABLE_COPY_ICON.getImageFromRegistry());
    	copyButton.setToolTipText(COPY_BUTTON_TOOL_TIP);
    	copyButton.addSelectionListener(new SelectionAdapter() {
			@Override
			public void widgetSelected(SelectionEvent e) {
			if (StringUtils.isNotBlank(styledText.getSelectionText())) {
				styledText.copy();
			} else {
				styledText.selectAll();
				styledText.copy();
				styledText.setSelection(0);
			}

		}
	});
		copyButton.pack();
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:25,代码来源:TransformViewDataDialog.java

示例5: createOperationInputTable

import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
private void createOperationInputTable() {
	Composite operationInputFieldComposite = new Composite(mainComposite, SWT.NONE);
	operationInputFieldComposite.setLayout(new GridLayout(1, false));
	GridData gridDataOperationInputFieldComposite = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
	gridDataOperationInputFieldComposite.heightHint = 200;
	gridDataOperationInputFieldComposite.widthHint = 159;
	operationInputFieldComposite.setLayoutData(gridDataOperationInputFieldComposite);
	
	Composite buttonComposite = new Composite(operationInputFieldComposite, SWT.NONE);
	buttonComposite.setLayout(new GridLayout(2, false));
	GridData gd_buttonComposite = new GridData(SWT.LEFT, SWT.FILL, false, false, 1, 1);
	gd_buttonComposite.heightHint = 36;
	gd_buttonComposite.widthHint = 139;
	buttonComposite.setLayoutData(gd_buttonComposite);
	
	 addButtonInputTable = new Button(buttonComposite, SWT.NONE);
	 addButtonInputTable.setImage(ImagePathConstant.ADD_BUTTON.getImageFromRegistry());
	 deletButtonInputTable = new Button(buttonComposite, SWT.NONE);
	 deletButtonInputTable.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
	 deletButtonInputTable.setImage(ImagePathConstant.DELETE_BUTTON.getImageFromRegistry());
	
	 inputTableViewer = new TableViewer(operationInputFieldComposite, SWT.BORDER | SWT.FULL_SELECTION|SWT.MULTI);
	inputTable = inputTableViewer.getTable();
	inputTable.setLinesVisible(true);
	inputTable.setHeaderVisible(true);
	inputTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	inputTable.setVisible(true);
	
	addButtonInputTable.setToolTipText(Messages.ADD_SCHEMA_TOOLTIP);
	deletButtonInputTable.setToolTipText(Messages.DELETE_SCHEMA_TOOLTIP);
	
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:33,代码来源:OperationClassComposite.java

示例6: createRadioButton

import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
/**
 * Create a radio button for the disk image size list.
 */
protected void createRadioButton(Composite composite, String label, 
	final int size, String helpText) {
		
	Button button = new Button(composite, SWT.RADIO);
	button.setText(label);
	button.setToolTipText(helpText);
	button.setSelection(wizard.getSize() == size);
	button.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent e) {
			getWizard().setSize(size);
		}
	});
}
 
开发者ID:AppleCommander,项目名称:AppleCommander,代码行数:17,代码来源:DiskImageSizePane.java

示例7: createRadioButton

import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
/**
 * Create a radio button for the disk image size list.
 */
protected void createRadioButton(Composite composite, String label, 
	final int order, String helpText) {
		
	Button button = new Button(composite, SWT.RADIO);
	button.setText(label);
	button.setToolTipText(helpText);
	button.setSelection(wizard.getOrder() == order);
	button.setEnabled(!wizard.isHardDisk());
	button.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent e) {
			getWizard().setOrder(order);
		}
	});
}
 
开发者ID:AppleCommander,项目名称:AppleCommander,代码行数:18,代码来源:DiskImageOrderPane.java

示例8: createRadioButton

import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
/**
 * Create a radio button for the disk image format list.
 */
protected void createRadioButton(Composite composite, String label, 
	final int format, String helpText) {
		
	Button button = new Button(composite, SWT.RADIO);
	button.setText(label);
	button.setSelection(wizard.getFormat() == format);
	button.setToolTipText(helpText);
	button.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent e) {
			getWizard().setFormat(format);
		}
	});
}
 
开发者ID:AppleCommander,项目名称:AppleCommander,代码行数:17,代码来源:DiskImageFormatPane.java

示例9: DirectoryParameter

import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
public
DirectoryParameter(
	final Composite pluginGroup,
	String			name,
	String			defaultValue )
{
 	super(name);
  	controls = new Control[2];

    sp = new StringParameter(pluginGroup, name, defaultValue);

    controls[0] = sp.getControl();
    GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
    controls[0].setLayoutData(gridData);

    Button browse = new Button(pluginGroup, SWT.PUSH);
    ImageLoader.getInstance().setButtonImage(browse, getBrowseImageResource());
    browse.setToolTipText(MessageText.getString("ConfigView.button.browse"));

    browse.addListener(SWT.Selection, new Listener() {
      @Override
      public void handleEvent(Event event) {
    	  String path = DirectoryParameter.this.openDialog(pluginGroup.getShell(), sp.getValue());
    	  if (path != null) {
    		  sp.setValue(path);
    	  }
      }
    });
    controls[1] = browse;
  }
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:31,代码来源:DirectoryParameter.java

示例10: createDeleteButton

import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
private void createDeleteButton(Composite composite_11) {
	btnDelete = new Button(composite_11, SWT.NONE);
	btnDelete.setImage(ImagePathConstant.DELETE_BUTTON.getImageFromRegistry());
	btnDelete.setToolTipText(Messages.DELETE_KEY_SHORTCUT_TOOLTIP);
	btnDelete.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			deleteRow();
		}
	});
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:12,代码来源:LookupMapDialog.java

示例11: addButtonPanel

import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
protected Composite addButtonPanel(Composite container) {
	container_1.setLayout(new GridLayout(1, false));
	Composite composite_1 = new Composite(container, SWT.NONE);
	composite_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));
	composite_1.setLayout(new GridLayout(5, false));

	addButton = new Button(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 Button(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 Button(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 Button(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);
	new Label(composite_1, SWT.NONE);
	return composite_1;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:36,代码来源:FieldDialog.java

示例12: addButtonPanel

import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
private void addButtonPanel(Composite container) {
	container_1.setLayout(new GridLayout(1, false));
	Composite composite_1 = new Composite(container, SWT.NONE);
	composite_1.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
	composite_1.setLayout(new GridLayout(4, false));

	Button addButton = new Button(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 Button(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 Button(composite_1, SWT.NONE);
	upButton.setToolTipText(Messages.MOVE_UP_KEY_SHORTCUT_TOOLTIP);
	upButton.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
	upButton.setImage(ImagePathConstant.MOVEUP_BUTTON.getImageFromRegistry());
	attachUpButtonListener(upButton);

	downButton = new Button(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);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:34,代码来源:SecondaryColumnKeysDialog.java

示例13: createUpButton

import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
private void createUpButton(Composite composite_11) {
	btnUp = new Button(composite_11, SWT.NONE);
	btnUp.setToolTipText(Messages.MOVE_UP_KEY_SHORTCUT_TOOLTIP);
	btnUp.setImage(ImagePathConstant.MOVEUP_BUTTON.getImageFromRegistry());
	btnUp.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			 moveRowUp();
		}
	});
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:12,代码来源:JoinMapDialog.java

示例14: createUpButton

import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
private void createUpButton(Composite composite_11) {
	btnUp = new Button(composite_11, SWT.NONE);
	btnUp.setImage(ImagePathConstant.MOVEUP_BUTTON.getImageFromRegistry());
	btnUp.setToolTipText(Messages.MOVE_UP_KEY_SHORTCUT_TOOLTIP);
	btnUp.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			moveRowUp();
		}
	});
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:12,代码来源:LookupMapDialog.java

示例15: createAddButton

import org.eclipse.swt.widgets.Button; //导入方法依赖的package包/类
private void createAddButton(Composite composite_11) {
	btnAdd = new Button(composite_11, SWT.NONE);
	btnAdd.setToolTipText(Messages.ADD_KEY_SHORTCUT_TOOLTIP);
	btnAdd.setImage(ImagePathConstant.ADD_BUTTON.getImageFromRegistry());
	btnAdd.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			addNewRow();
		}
	});
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:12,代码来源:JoinMapDialog.java


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