コード例 #1
0
  /*
   * (non-Javadoc)
   *
   * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
   */
  protected void createFormContent(IManagedForm managedForm) {

    ScrolledForm form = managedForm.getForm();
    form.setText(EditorMessages.OverviewPage_PageflowOverview_summary);
    form.setBackgroundImage(EditorPlugin.getDefault().getImage("form_banner.gif")); // $NON-NLS-1$
    Composite body = form.getBody();
    GridLayout gridLayout = new GridLayout();
    gridLayout.marginWidth = LAYOUT_MARGIN_WIDTH;
    gridLayout.marginHeight = LAYOUT_MARGIN_HEIGHT;
    body.setLayout(gridLayout);
    gridLayout = new GridLayout(2, true);
    form.getBody().setLayout(gridLayout);
    FormEditor editor = getEditor();
    FormToolkit toolkit = editor.getToolkit();

    // add overview general information
    generalSection =
        new OverviewGeneralSection(managedForm.getForm().getBody(), managedForm, this, toolkit);
    generalSection.initialize();
    GridData gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalSpan = 2;
    generalSection.getSection().setLayoutData(gd);

    // Navigation section
    navigationSection =
        new OverviewNavigationSection(managedForm.getForm().getBody(), managedForm, this, toolkit);
    navigationSection.initialize();
    gd = new GridData(GridData.FILL_BOTH);
    navigationSection.getSection().setLayoutData(gd);
    navigationSection.getSection().setExpanded(true);

    // ManagedBeans section
    beanSection =
        new OverviewManagedBeanSection(managedForm.getForm().getBody(), managedForm, this, toolkit);
    beanSection.initialize();
    gd = new GridData(GridData.FILL_BOTH);
    beanSection.getSection().setLayoutData(gd);
    beanSection.getSection().setExpanded(true);

    /* components section */
    componentsSection =
        new OverviewComponentsSection(managedForm.getForm().getBody(), managedForm, this, toolkit);
    componentsSection.initialize();
    gd = new GridData(GridData.FILL_BOTH);
    componentsSection.getSection().setLayoutData(gd);
    componentsSection.getSection().setExpanded(true);

    /* other sections */
    otherSection =
        new OverviewOthersSection(managedForm.getForm().getBody(), managedForm, this, toolkit);
    otherSection.initialize();
    gd = new GridData(GridData.FILL_BOTH);
    otherSection.getSection().setLayoutData(gd);
    otherSection.getSection().setExpanded(true);

    this.getSite().setSelectionProvider(this);
  }
コード例 #2
0
 public void refresh() {
   generalSection.refresh();
   navigationSection.refresh();
   beanSection.refresh();
   componentsSection.refresh();
   otherSection.refresh();
 }
コード例 #3
0
 public void dispose() {
   beanSection.dispose();
   componentsSection.dispose();
   generalSection.dispose();
   navigationSection.dispose();
   otherSection.dispose();
   super.dispose();
 }
コード例 #4
0
 public void setInput(Object input) {
   if (input instanceof FacesConfigType) {
     this.input = input;
     navigationSection.setInput(input);
     beanSection.setInput(input);
     componentsSection.setInput(input);
     otherSection.setInput(input);
   }
 }