1 20 21 package org.apache.directory.ldapstudio.valueeditors; 22 23 24 import org.apache.directory.ldapstudio.browser.common.dialogs.TextDialog; 25 import org.eclipse.swt.widgets.Shell; 26 27 28 34 public class TextValueEditor extends AbstractDialogStringValueEditor 35 { 36 37 42 public boolean openDialog( Shell shell ) 43 { 44 Object value = getValue(); 45 if ( value != null && value instanceof String ) 46 { 47 TextDialog dialog = new TextDialog( shell, ( String ) value ); 48 if ( dialog.open() == TextDialog.OK && !"".equals( dialog.getText() ) ) 49 { 50 setValue( dialog.getText() ); 51 return true; 52 } 53 } 54 return false; 55 } 56 57 } 58 | Popular Tags |