1 4 package com.nightlabs.rcp.exceptionhandler.wizard; 5 6 import org.eclipse.swt.SWT; 7 import org.eclipse.swt.events.ModifyEvent; 8 import org.eclipse.swt.events.ModifyListener; 9 import org.eclipse.swt.layout.GridData; 10 import org.eclipse.swt.widgets.Composite; 11 import org.eclipse.swt.widgets.Control; 12 import org.eclipse.swt.widgets.Text; 13 14 import com.nightlabs.rcp.composite.TightWrapperComposite; 15 import com.nightlabs.rcp.wizard.DynamicPathWizardPage; 16 import com.nightlabs.rcp.wizard.DynamicPathWizard; 17 18 21 public class UserCommentPage extends DynamicPathWizardPage 22 { 23 private Text textUserComment; 24 25 26 27 31 public UserCommentPage() 32 { 33 super(UserCommentPage.class.getName(), "Send Message"); 34 setDescription("Create a description for the Exception"); 35 } 36 37 40 public Control createPageContents(Composite parent) 41 42 { 43 44 TightWrapperComposite page = new TightWrapperComposite(parent, SWT.NONE, true); 45 textUserComment = new Text(page, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.WRAP); 46 textUserComment.setToolTipText("Enter your comment here"); 47 textUserComment.addModifyListener(new ModifyListener() { 48 public void modifyText(ModifyEvent e) 49 { 50 ((DynamicPathWizard)getWizard()).updateDialog(); 51 ExceptionHandlerWizard wizard = (ExceptionHandlerWizard) getWizard(); 52 ErrorReport errorReport = wizard.getErrorReport(); 53 errorReport.setUserComment(textUserComment.getText()); 54 } 55 }); 56 textUserComment.setLayoutData(new GridData(GridData.FILL_BOTH)); 57 return page; 58 } 59 60 63 public boolean isPageComplete() 64 { 65 return true; 66 68 } 72 } 73 | Popular Tags |