1 20 21 package org.apache.directory.ldapstudio.valueeditors; 22 23 24 import org.apache.directory.ldapstudio.browser.common.dialogs.HexDialog; 25 import org.eclipse.swt.widgets.Shell; 26 27 28 38 public class HexValueEditor extends AbstractDialogBinaryValueEditor 39 { 40 41 46 protected boolean openDialog( Shell shell ) 47 { 48 Object value = getValue(); 49 if ( value != null && value instanceof byte[] ) 50 { 51 byte[] initialData = ( byte[] ) value; 52 HexDialog dialog = new HexDialog( shell, initialData ); 53 if ( dialog.open() == HexDialog.OK && dialog.getData() != null ) 54 { 55 setValue( dialog.getData() ); 56 return true; 57 } 58 } 59 return false; 60 } 61 62 } 63 | Popular Tags |