[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.platform.swt] Re: Multipage XML editor
|
- From: bkiran123@xxxxxxxxx (kiran)
- Date: Wed, 8 Jun 2005 15:16:56 +0000 (UTC)
- Newsgroups: eclipse.platform.swt
- Organization: not organized
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
Check with the forms plugin for creating a multipage editor similar what
the plugin.xml provides.
Create a MultiPageEditor class which extends
org.eclipse.ui.forms.editor.FormEditor class. Within this class add the
method
protected void addPages() {
// org.eclipse.ui.forms.editor.FormPage or subclass instances
addPage( /* instance */ );
addPage( /* instance */ );
addPage( /* instance */ );
}
Within each FormPage class override the method
protected void createFormContent(IManagedForm managedForm) {
ScrolledForm form = managedForm.getForm();
FormToolkit toolkit = managedForm.getToolkit();
form.setText( getResourceString( Constants.CONFIG_TITLE ) );
form.setBackgroundImage( getImage(IMG_FORM_BANNER ) );
toolkit.createCompositeSeparator( form );
GridLayout layout = new GridLayout();
layout.numColumns = 1;
layout.marginWidth = 10;
form.getBody().setLayout(layout);
}
Hope this helps.