/** * Creates a panel. * * @param layout * the layout to apply to the panel. * @return the created panel. */ protected SPanel createSPanel(SLayoutManager layout) { SPanel panel = new SPanel(layout); panel.setPreferredSize(SDimension.FULLAREA); panel.setHorizontalAlignment(SConstants.LEFT_ALIGN); panel.setVerticalAlignment(SConstants.TOP_ALIGN); return panel; }
/** * Creates a panel. * * @param layout * the layout to apply to the panel. * @return the created panel. */ protected SPanel createSPanel(SLayoutManager layout) { SPanel panel = new SPanel(layout); panel.setPreferredSize(SDimension.FULLAREA); panel.setHorizontalAlignment(SConstants.LEFT_ALIGN); panel.setVerticalAlignment(SConstants.TOP_ALIGN); return panel; }
private IMapView<SComponent> createCardView( ICardViewDescriptor viewDescriptor, IActionHandler actionHandler, Locale locale) { SCardLayout layout = new SCardLayout(); SPanel viewComponent = createSPanel(layout); BasicMapView<SComponent> view = constructMapView(viewComponent, viewDescriptor); Map<String, IView<SComponent>> childrenViews = new HashMap<String, IView<SComponent>>(); viewComponent.add(createSPanel(new SBorderLayout()), ICardViewDescriptor.DEFAULT_CARD); viewComponent.add(createSecurityPanel(), ICardViewDescriptor.SECURITY_CARD); for (Map.Entry<String, IViewDescriptor> childViewDescriptor : viewDescriptor .getCardViewDescriptors().entrySet()) { IView<SComponent> childView = createView(childViewDescriptor.getValue(), actionHandler, locale); viewComponent.add(childView.getPeer(), childViewDescriptor.getKey()); childrenViews.put(childViewDescriptor.getKey(), childView); } viewComponent.setPreferredSize(SDimension.FULLAREA); view.setChildren(childrenViews); view.setConnector(createCardViewConnector(view, actionHandler)); return view; }
/** * {@inheritDoc} */ @Override protected IMapView<SComponent> createCardView( ICardViewDescriptor viewDescriptor, IActionHandler actionHandler, Locale locale) { SCardLayout layout = new SCardLayout(); SPanel viewComponent = createSPanel(layout); BasicMapView<SComponent> view = constructMapView(viewComponent, viewDescriptor); viewComponent.add(createEmptyComponent(), ICardViewDescriptor.DEFAULT_CARD); viewComponent.add(createSecurityComponent(), ICardViewDescriptor.SECURITY_CARD); for (Map.Entry<String, IViewDescriptor> childViewDescriptor : viewDescriptor .getCardViewDescriptors().entrySet()) { IView<SComponent> childView = createView(childViewDescriptor.getValue(), actionHandler, locale); viewComponent.add(childView.getPeer(), childViewDescriptor.getKey()); view.addToChildrenMap(childViewDescriptor.getKey(), childView); } viewComponent.setPreferredSize(SDimension.FULLAREA); view.setConnector(createCardViewConnector(view, actionHandler, locale)); return view; }
private SFrame createControllerFrame() { SFrame frame = new SFrame(); frame .setPreferredSize(new SDimension(frameWidth, frameHeight/* WingsUtil.FULL_DIM_PERCENT */)); cardPanel = new SPanel(new SCardLayout()); cardPanel.setPreferredSize(SDimension.FULLAREA); frame.getContentPane().add(createApplicationMenuBar(), SBorderLayout.NORTH); frame.getContentPane().add(cardPanel, SBorderLayout.CENTER); frame.getContentPane().setPreferredSize(SDimension.FULLAREA); return frame; }
private void createControllerFrame() { controllerFrame = new SFrame(); String w = "95%"; String h = "768px"; if (getFrameWidth() != null) { w = getFrameWidth().intValue() + "px"; } if (getFrameHeight() != null) { h = getFrameHeight().intValue() + "px"; } controllerFrame.setPreferredSize(new SDimension(w, h)); controllerFrame.getContentPane().setPreferredSize(SDimension.FULLAREA); cardPanel = new SPanel(new SCardLayout()); cardPanel.setPreferredSize(SDimension.FULLAREA); controllerFrame.getContentPane().add(cardPanel, SBorderLayout.CENTER); statusBar = new SLabel(); statusBar.setBorder(new SLineBorder(1)); statusBar.setVisible(false); controllerFrame.getContentPane().add(statusBar, BorderLayout.SOUTH); updateFrameTitle(); controllerFrame.setVisible(true); }
workspaceView.setPreferredSize(SDimension.FULLAREA);
mainPanel.add(mainView.getPeer(), SBorderLayout.CENTER); mainPanel.add(actionPanel, SBorderLayout.SOUTH); mainPanel.setPreferredSize(DIALOG_DIMENSION); dialog.add(mainPanel); if (defaultButton != null) {