Wizard를 만들다 보면 개발자 각각의 패턴화된 Wizard 및 WizardPage 개발 방식이 있다.
WizardPage에 대한 샘플을 소개한다.
package com.archnal.amf.ui.wizards;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
public class NewRsMethodWizardPage extends WizardPage {
  private static final String PAGE_NAME = "newRsMethodWizardPage";
  public NewRsMethodWizardPage() {
    super(PAGE_NAME);
    
    setTitle("New Restful Method");
    setDescription("Restful Method Configuration Page");
  }
  @Override
  public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
  
    initialize();
    setControl(container);
  }
  private void initialize() {
    dialogChanged();
  }
  
  private void dialogChanged() {
    updateStatus(null);
  }
  private void updateStatus(String message) {
    setErrorMessage(message);
    setPageComplete(message == null);
  }
}
댓글 없음:
댓글 쓰기