當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。