本文整理汇总了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();
}
示例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();
}
}
}
示例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);
}
});
}
}
示例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;
}