1. the source code of the perspective class uses createinitiallayout to set the layout of the perspective.
PackageCom. yinger. patientims;
ImportOrg. Eclipse. UI. ifolderlayout;
ImportOrg. Eclipse. UI. ipagelayout;
ImportOrg. Eclipse. UI. iperspectivefactory;
ImportCom. yinger. patientims. util. pluginutil;
/**
* A Perspective factory generates the initial page layout and visible action set for a page.
* The Perspective class must implement the iperspectivefactory interface.
* The createinitiallayout method can layout the perspective chart.
*/
Public ClassPerspectiveImplementsIperspectivefactory {
// This method is used to initialize the layout of the perspective. You can register the view in the project here.
Public VoidCreateinitiallayout (ipagelayout layout ){
// Obtain the ID of the editing area.
String editorarea = layout. geteditorarea (); // returns the special identifier for the editor area in this page layout
// Add a navigation View
// String viewid, int relationship, float ratio, string refID
Layout. addview (pluginutil. navigatorview_id, ipagelayout. Left, 0.3f, editorarea );
// Add a search View to the bottom of the navigation View
// An ifolderlayout is used to define the initial views within a folder. The folder itself is contained within an ipagelayout.
// Ifolderlayout is used to add a folder (Folder function) to an existing view. This folder itself contains ipagelayout
Ifolderlayout leftbottom = layout. createfolder ("Left", ipagelayout. Bottom, 0.4f, pluginutil. navigatorview_id );
Leftbottom. addview (pluginutil. searchview_id );
// Adds a view of patient information and expense information, and overlays the two views.
Ifolderlayout rightbottom = layout. createfolder ("rightbottom", ipagelayout. Bottom, 0.7f, editorarea );
Rightbottom. addview (pluginutil. patientinfoview_id );
Rightbottom. addview (pluginutil. expenseinfoview_id );
}
} 2. conclusion (1) do not place the IDs of each component in pluginutil for unified management. You can add a static final string to each component implementation class. (2) the layout of the perspective is generally in the left-side navigation bar, with the editor mode on the right. The editor should be empty by default.
Publish via wiz