當前位置: 首頁>>代碼示例>>Java>>正文


Java Combo.setToolTipText方法代碼示例

本文整理匯總了Java中org.eclipse.swt.widgets.Combo.setToolTipText方法的典型用法代碼示例。如果您正苦於以下問題:Java Combo.setToolTipText方法的具體用法?Java Combo.setToolTipText怎麽用?Java Combo.setToolTipText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.widgets.Combo的用法示例。


在下文中一共展示了Combo.setToolTipText方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addInverseChooser

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
/**
 * Creates the additional controls of the page.
 * @param parent parent component
 */
private void addInverseChooser(Composite parent) {
    
    Label label = new Label(parent, SWT.LEFT);
    label.setText(TexlipsePlugin.getResourceString("preferenceViewerInverseLabel"));
    label.setToolTipText(TexlipsePlugin.getResourceString("preferenceViewerInverseTooltip"));
    label.setLayoutData(new GridData());
    
    String[] list = new String[] {
            TexlipsePlugin.getResourceString("preferenceViewerInverseSearchNo"),
            TexlipsePlugin.getResourceString("preferenceViewerInverseSearchRun"),
            TexlipsePlugin.getResourceString("preferenceViewerInverseSearchStd")
    };
    
    // find out which option to choose by default
    int index = inverseSearchValues.length - 1;
    for (; index > 0 && !inverseSearchValues[index].equals(registry.getInverse()); index--) {}
    
    
    inverseChooser = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
    inverseChooser.setLayoutData(new GridData());
    inverseChooser.setToolTipText(TexlipsePlugin.getResourceString("preferenceViewerInverseTooltip"));
    inverseChooser.setItems(list);
    inverseChooser.select(index);
}
 
開發者ID:eclipse,項目名稱:texlipse,代碼行數:29,代碼來源:ViewerConfigDialog.java

示例2: createWidgets

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
@Override
protected void createWidgets(String text, String toolTip, String initialValue) {
	lbl = new Label(this, SWT.NONE);
	lbl.setText(text.concat(":"));
	lbl.setToolTipText(toolTip);

	comboBox = new Combo(this, SWT.READ_ONLY);
	comboBox.setToolTipText(toolTip);

	errorIcon = new Label(this, SWT.NONE);
	errorIcon.setImage(Icon.getImage(Icon.EXCLAMATION_RED));
	errorIcon.setVisible(false);
	comboBox.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent e) {
			String value = comboBox.getText();
			if (value != getValue()) {
				setValue(comboBox.getText(), true);
			}
		}
	});
}
 
開發者ID:turnus,項目名稱:turnus,代碼行數:23,代碼來源:WidgetComboBox.java

示例3: addFormatChooser

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
/**
 * Creates the file format chooser to the page.
 * @param composite parent component
 */
private void addFormatChooser(Composite composite) {
    
    Label formatLabel = new Label(composite, SWT.LEFT);
    formatLabel.setText(TexlipsePlugin.getResourceString("preferenceViewerFormatLabel"));
    formatLabel.setToolTipText(TexlipsePlugin.getResourceString("preferenceViewerFormatTooltip"));
    formatLabel.setLayoutData(new GridData());
    
    formatChooser = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);
    formatChooser.setLayoutData(new GridData());
    formatChooser.setToolTipText(TexlipsePlugin.getResourceString("preferenceViewerFormatTooltip"));
    formatChooser.setItems(registry.getFormatList());
    formatChooser.select(formatChooser.indexOf(registry.getFormat()));
}
 
開發者ID:eclipse,項目名稱:texlipse,代碼行數:18,代碼來源:ViewerConfigDialog.java

示例4: createDialogArea

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
@Override protected Control createDialogArea(Composite parent) {
		Composite container = (Composite) super.createDialogArea(parent);
		GridLayout gridLayout = (GridLayout)container.getLayout();
		gridLayout.numColumns = 3;
//		GridData gridData = (GridData)container.getLayoutData();
//		gridData.widthHint = 600;
//		gridData.heightHint = 500;
//		gridData.minimumWidth = 600;
//		gridData.minimumHeight = 500;
//		container.setSize(700, 600);

		
		Label lblDir = new Label(container, SWT.NONE);
		lblDir.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
		lblDir.setText("Location:");
		link = new Link(container, SWT.NONE);
	    final String linkText = "<a href=\"" + FtpConsts.FTP_PROT + ENC_USERNAME + "@" + FtpConsts.FTP_URL + "\">"+ FtpConsts.FTP_PROT + FtpConsts.FTP_URL + "</a>";
	    link.setText(linkText);
	    helpBtn = new Button(container, SWT.NONE);
		helpBtn.setImage(Images.getOrLoad("/icons/help.png"));
		helpBtn.setToolTipText("What's that?");
		
//		Label lblDir = new Label(container, SWT.NONE);
//		lblDir.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
//		lblDir.setText("Directory:");
		docDirTv = new MyTableViewer(container, SWT.MULTI | SWT.FULL_SELECTION);
		docDirTv.setContentProvider(new ArrayContentProvider());
		docDirTv.setLabelProvider(new DocDirTableLabelProvider(docDirTv));
		
		docDirTable = docDirTv.getTable();
		docDirTable.setHeaderVisible(true);
		docDirTable.setLinesVisible(true);
		docDirTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
		
		docDirTv.addColumns(DOC_DIR_COLS);
		new Label(container, SWT.NONE);
		new Label(container, SWT.NONE);
		reloadBtn = new Button(container, SWT.NONE);
		reloadBtn.setImage(Images.getOrLoad("/icons/refresh.gif"));
		reloadBtn.setToolTipText("Reload the directories from the FTP server");
		
		Label lblCollections = new Label(container, SWT.NONE);
		lblCollections.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
		lblCollections.setText("Collection:");
		
		collCombo = new Combo(container, SWT.READ_ONLY);
		collCombo.setToolTipText("This is the collection the document will be added to - you can only upload to collections with Owner / Editor rights");
		collCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
		new Label(container, SWT.NONE);
		
		Label lblCreateCollection = new Label(container, SWT.NONE);
		lblCreateCollection.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
		lblCreateCollection.setText("Create collection:");
		
		newCollText = new Text(container, SWT.BORDER);
		newCollText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
		newCollText.setToolTipText("The title of the new collection");
		
		addCollBtn = new Button(container, SWT.NONE);
		addCollBtn.setImage(Images.getOrLoad("/icons/add.png"));
		addCollBtn.setToolTipText("Creates a new collection with the name on the left - you will be the owner of the collection");
		
		updateDocDirs();
		updateCollections();
		addListener();
		return container;
	}
 
開發者ID:Transkribus,項目名稱:TranskribusSwtGui,代碼行數:68,代碼來源:UploadFromFtpDialog.java

示例5: createDialogArea

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
@Override protected Control createDialogArea(Composite parent) {
	Composite container = (Composite) super.createDialogArea(parent);
	GridLayout gridLayout = (GridLayout) container.getLayout();
	gridLayout.numColumns = 3;

	Label lblNewLabel = new Label(container, SWT.NONE);
	lblNewLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	lblNewLabel.setText("Local folder:");

	folderText = new Text(container, SWT.BORDER);
	folderText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	if (store.isLocalDoc())
		folderText.setText(store.getDoc().getMd().getLocalFolder().getAbsolutePath());

	Button setFolderBtn = new Button(container, SWT.NONE);
	setFolderBtn.addSelectionListener(new SelectionAdapter() {
		@Override public void widgetSelected(SelectionEvent e) {
			folder = DialogUtil.showOpenFolderDialog(getShell(), "Specify a folder to upload", folder);
			if (folder != null) {
				folderText.setText(folder);
			}
		}
	});
	setFolderBtn.setImage(Images.getOrLoad("/icons/folder.png"));

	Label lblTitle = new Label(container, SWT.NONE);
	lblTitle.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	lblTitle.setText("Title on server:");

	titleText = new Text(container, SWT.BORDER);
	titleText.setToolTipText("The title of the uploaded document - leave blank to generate a default title");
	titleText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	new Label(container, SWT.NONE);
	
	Label lblCollections = new Label(container, SWT.NONE);
	lblCollections.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	lblCollections.setText("Collection:");
	
	collCombo = new Combo(container, SWT.READ_ONLY);
	collCombo.setToolTipText("This is the collection the document will be added to - you can only upload to collections with Owner / Editor rights");
	collCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	new Label(container, SWT.NONE);
	
	Label lblCreateCollection = new Label(container, SWT.NONE);
	lblCreateCollection.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	lblCreateCollection.setText("Create collection:");
	
	newCollText = new Text(container, SWT.BORDER);
	newCollText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	newCollText.setToolTipText("The title of the new collection");
	
	addCollBtn = new Button(container, SWT.NONE);
	addCollBtn.setImage(Images.getOrLoad("/icons/add.png"));
	addCollBtn.setToolTipText("Creates a new collection with the name on the left - you will be the owner of the collection");
	
	Label l = new Label(container, 0);
	l.setText("Upload via: ");
	
	uploadTypeCombo = new Combo(container, SWT.READ_ONLY | SWT.DROP_DOWN);
	uploadTypeCombo.add("HTTP (default)");
	uploadTypeCombo.add("FTP");
	uploadTypeCombo.select(0);
	uploadTypeCombo.setToolTipText("The type of upload - usually HTTP should be fine but you can try FTP also if it does not work");
	
	new Label(container, 0); // spacer
	
	Label maxSizeInfoLabel = new Label(container, 0);
	maxSizeInfoLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
	maxSizeInfoLabel.setText("Note: for the HTTP upload the zip file can have at most "+TrpDocUploadZipHttp.MAX_UPLOAD_SIZE_MB+" MB.\nIf your document is larger use document ingest via your private FTP!" );
	
	updateCollections();
	addListener();
	
	return container;
}
 
開發者ID:Transkribus,項目名稱:TranskribusSwtGui,代碼行數:76,代碼來源:UploadDialog.java

示例6: createDialogArea

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
/**
 * Create contents of the dialog.
 * @param parent
 */
@Override protected Control createDialogArea(Composite parent) {
	Composite container = (Composite) super.createDialogArea(parent);
	container.setLayout(new GridLayout(2, false));

	Label l0 = new Label(container, 0);
	l0.setText("Name: ");
	nameTxt = new Text(container, SWT.BORDER);
	nameTxt.setToolTipText("The short name of the tag as it is encoded in the export format - must be unique!");
	nameTxt.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
	nameTxt.addModifyListener(new ModifyListener() {
		@Override public void modifyText(ModifyEvent e) {
			validateInput();
		}
	});
	
	if (!simple) {
		Label l1 = new Label(container, 0);
		l1.setText("Display name: ");
		displayNameTxt = new Text(container, SWT.BORDER);
		displayNameTxt.setToolTipText("The display name of the tag - can be empty!");
		displayNameTxt.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
	}
	
	if (!simple) {
		Label l2 = new Label(container, 0);
		l2.setText("Description: ");
		descriptionTxt = new Text(container, SWT.BORDER);
		descriptionTxt.setToolTipText("A descritpion for the tag - can be empty!");
		descriptionTxt.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
	
		Label l3 = new Label(container, 0);
		l3.setText("Data type: ");
		typeCombo = new Combo(container, SWT.READ_ONLY | SWT.DROP_DOWN);
		typeCombo.add("String");
		typeCombo.add("Floating point number");
		typeCombo.add("Integer (number without decimal)");
		typeCombo.add("Boolean (yes / no value)");
		typeCombo.select(0);
		typeCombo.setToolTipText("The datatype of the attribute - if uncertain leave set to 'String'");
		typeCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
	}
	
	status = new Text(container, SWT.MULTI | SWT.READ_ONLY | SWT.WRAP);
	status.setForeground(Colors.getSystemColor(SWT.COLOR_RED));
	status.setBackground(Colors.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
	status.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
	
	return container;
}
 
開發者ID:Transkribus,項目名稱:TranskribusSwtGui,代碼行數:54,代碼來源:AddTagAttributeDialog.java


注:本文中的org.eclipse.swt.widgets.Combo.setToolTipText方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。