/** @return the Design instance */ public static Design getInstance() { if (instance == null) { // instantiate the design panel instance = PmsFactory.getInstance().getDesign(); } return instance; }
private void createDesignPanel() { // create main panel mainContainer = new LayoutContainer(); final BorderLayout layout = new BorderLayout(); mainContainer.setLayout(layout); mainContainer.setAutoWidth(true); mainContainer.setHeight(HEIGHT); mainContainer.addStyleName("design-main-panel"); // north zone final BorderLayoutData upperLayoutData = new BorderLayoutData(LayoutRegion.NORTH); NorthPanel upperPanel = PmsFactory.getInstance().getNorthPanel(); upperPanel.init(page, pageLayoutDto); upperLayoutData.setSize(UPPER_PANEL_HEIGHT); // west zone final BorderLayoutData leftLayoutData = new BorderLayoutData(LayoutRegion.WEST, 220, 150, 320); palettesPanel = PmsFactory.getInstance().getPalettesPanel(); palettesPanel.init(pageLayoutDto); leftLayoutData.setSplit(true); leftLayoutData.setCollapsible(true); leftLayoutData.setSize(LEFT_PANEL_WIDTH); leftLayoutData.setMargins(new Margins(PANEL_MARGIN)); // east zone final BorderLayoutData rightLayoutData = new BorderLayoutData(LayoutRegion.EAST); ComponentsTreePanel rightPanel = PmsFactory.getInstance().getRightPanel(); rightPanel.init(page); rightLayoutData.setSplit(true); rightLayoutData.setCollapsible(true); // rightLayoutData.setSize(RIGHT_PANEL_WIDTH); rightLayoutData.setMargins(new Margins(PANEL_MARGIN)); // design zone final BorderLayoutData centerLayoutData = new BorderLayoutData(LayoutRegion.CENTER); designPanel = new DesignPanel(pageLayoutDto); centerLayoutData.setMargins(new Margins(PANEL_MARGIN, 0, PANEL_MARGIN, 0)); mainContainer.add(upperPanel, upperLayoutData); mainContainer.add(palettesPanel, leftLayoutData); mainContainer.add(designPanel, centerLayoutData); mainContainer.add(rightPanel, rightLayoutData); add(mainContainer); }
private void showcreationPanel() { CollectionCreationPanel detailEditor = PmsFactory.getInstance().getCollectionCreationPanel(); detailEditor.init(portalId, new SetFilterDTO()); detailEditor.show(); }
private void showEditionPanel(SetFilterModelData selected) { CollectionEditionPanel detailEditor = PmsFactory.getInstance().getCollectionEditionPanel(); detailEditor.init(portalId, selected.getDTO()); detailEditor.show(); }