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


Java Text.isDisposed方法代碼示例

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


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

示例1: canFlipToNextPage

import org.eclipse.swt.widgets.Text; //導入方法依賴的package包/類
@Override
public boolean canFlipToNextPage() {

    ZooKeeperServerNewWizardPage2 jmxPage = (ZooKeeperServerNewWizardPage2) getNextPage();

    if (jmxPage != null) {
        GridComposite jmxPageGridComposite = jmxPage.getGridComposite();

        if (jmxPageGridComposite != null) {

            String hostPortString = getHost() + ":" + String.valueOf(ZooKeeperServerDescriptor.DEFAULT_JMX_PORT);
            String defaultJmxServiceUrlString = "service:jmx:rmi:///jndi/rmi://" + hostPortString + "/jmxrmi";

            Text jmxUrlText = (Text) jmxPageGridComposite
                    .getControl(ZooKeeperServerNewWizardPage2.CONTROL_NAME_JMX_URL_TEXT);
            
            if (jmxUrlText != null && !jmxUrlText.isDisposed()) {
                jmxUrlText.setText(defaultJmxServiceUrlString);
            }
        }
    }

    return super.canFlipToNextPage();
}
 
開發者ID:baloise,項目名稱:eZooKeeper,代碼行數:25,代碼來源:ZooKeeperServerNewWizardPage1.java

示例2: setId

import org.eclipse.swt.widgets.Text; //導入方法依賴的package包/類
private void setId() {

        SetDigestIdDialog dialog = new SetDigestIdDialog(getShell());
        dialog.setBlockOnOpen(true);
        if (dialog.open() == SetDigestIdDialog.OK) {
            Text idEditor = (Text) _IdTableEditor.getEditor();
            if (idEditor != null && !idEditor.isDisposed()) {
                idEditor.setText(dialog.getDigestId());
                idEditor.forceFocus();
            }
        }

    }
 
開發者ID:baloise,項目名稱:eZooKeeper,代碼行數:14,代碼來源:ZnodeAclComposite.java

示例3: addModifyListener

import org.eclipse.swt.widgets.Text; //導入方法依賴的package包/類
private void addModifyListener(Text text){
	if(text != null && !text.isDisposed()){
		text.addModifyListener(new ModifyListener() {
			@Override
			public void modifyText(ModifyEvent e) {
				Utils.INSTANCE.addMouseMoveListener(text, cursor);	
			}
		});
	}
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:11,代碼來源:FTPProtocolWidget.java

示例4: addIdKeyComposite

import org.eclipse.swt.widgets.Text; //導入方法依賴的package包/類
/**
 * @param container
 * @return
 */
private Control addIdKeyComposite(Composite container) {
	Composite keyFileComposite = new Composite(container, SWT.BORDER);
	keyFileComposite.setLayout(new GridLayout(3, false));
	keyFileComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	
	FTPWidgetUtility ftpWidgetUtility = new FTPWidgetUtility();
	if(!StringUtils.equalsIgnoreCase(protocolText, "AWS S3 HTTPS")){
		Label userIdLbl = (Label) ftpWidgetUtility.createLabel(keyFileComposite, "User ID");
		text1 = (Text) ftpWidgetUtility.createText(keyFileComposite, "", SWT.BORDER);
		new Button(keyFileComposite, SWT.NONE).setVisible(false);
	}
	
	String label2Text = null;
	if(StringUtils.equalsIgnoreCase(protocolText, "AWS S3 HTTPS")){
		label2Text = "Porperty File";
	}else{
		label2Text = "Private Key";
	}
	
	Label privateKeyLbl = (Label) ftpWidgetUtility.createLabel(keyFileComposite, label2Text);
	setPropertyHelpText(privateKeyLbl, "Used to provide the value for authentication");
	privateKeyLbl.setCursor(new Cursor(privateKeyLbl.getDisplay(), SWT.CURSOR_HELP));
	text2 = (Text) ftpWidgetUtility.createText(keyFileComposite, "", SWT.BORDER);
	Utils.INSTANCE.addMouseMoveListener(text2, cursor);
	Button keyFileBrwsBtn = new Button(keyFileComposite, SWT.NONE);
	keyFileBrwsBtn.setText("...");
	
	selectionListener(keyFileBrwsBtn, text2);
	
	ControlDecoration text2ControlDecoration = WidgetUtility.addDecorator(text2,Messages.EMPTYFIELDMESSAGE);
	
	FTPWidgetUtility widgetUtility = new FTPWidgetUtility();
	if(text1 != null && !text1.isDisposed()){
		ControlDecoration text1ControlDecoration = WidgetUtility.addDecorator(text1,Messages.EMPTYFIELDMESSAGE);
		widgetUtility.validateWidgetText(text1, propertyDialogButtonBar, cursor, text1ControlDecoration);
	}
	widgetUtility.validateEmptyWidgetText(text2, propertyDialogButtonBar, cursor, text2ControlDecoration);
	
	if(text1!=null){
		addModifyListener(text1);
	}
	addModifyListener(text2);
	
	return keyFileComposite;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:50,代碼來源:FTPAuthenticEditorDialog.java


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