package com.topsun.posclient.application; import org.eclipse.ui.IFolderLayout; import org.eclipse.ui.IPageLayout; import org.eclipse.ui.IPerspectiveFactory; import com.topsun.posclient.common.POSClientApp; import com.topsun.posclient.common.ui.style.TouchModeApplication; public class Perspective implements IPerspectiveFactory { public void createInitialLayout(IPageLayout layout) { Object showmode = POSClientApp.get().getData("SHOWMODE"); if(showmode instanceof String ){ String str = (String)showmode; if("Touch Mode".equals(str)){ layout.setEditorAreaVisible(false); // IFolderLayout editor = layout.createFolder("editor", IPageLayout.TOP, 1f,layout.getEditorArea()); // editor.addPlaceholder("org.eclipse.ui.editorss"); // layout.setEditorAreaVisible(false); // layout.getViewLayout("topsun.menu").setCloseable(false); // layout.getViewLayout("topsun.menu").setMoveable(false); // layout.setFixed(true); //menu.addView("topsun.menu"); //menu.addPlaceholder("topsun.menu"); // editor.addView("com.topsun.sales"); // editor.addPlaceholder("com.topsun.sales"); //layout.setEditorAreaVisible(false); //layout.getViewLayout("topsun.menu").setCloseable(false); // layout.getViewLayout("topsun.menu").setMoveable(false); //layout.setEditorAreaVisible(true); }else{ IFolderLayout menu = layout.createFolder("menu", IPageLayout.LEFT,0.20f,layout.getEditorArea()); IFolderLayout editor = layout.createFolder("editor", IPageLayout.RIGHT, 0.80f,layout.getEditorArea()); menu.addView("topsun.menu"); menu.addPlaceholder("topsun.menu"); // editor.addView("com.topsun.sales"); // editor.addPlaceholder("com.topsun.sales"); layout.setEditorAreaVisible(false); layout.getViewLayout("topsun.menu").setCloseable(false); layout.getViewLayout("topsun.menu").setMoveable(false); layout.setFixed(true); } } ; // new LockSashMove().earlyStartup(); } }