@Override public void propertyChange(PropertyChangeEvent pe) { if ("lookAndFeel".equals(pe.getPropertyName())) { updateComponentTreeCG(getContentPane()); } if ("request.url".equals(pe.getPropertyName())) { setRequestURL((RequestURL) pe.getNewValue()); } }
public void setFullScreen(boolean fullScreen) { if (isDifferent(this.fullScreen, fullScreen)) { boolean oldFullScreen = this.fullScreen; this.fullScreen = fullScreen; if (fullScreen) getContentPane().setPreferredSize(SDimension.FULLAREA); reload(); propertyChangeSupport.firePropertyChange("fullScreen", oldFullScreen, this.fullScreen); } }
public void addComponent(String name, SComponent component) throws ServletException { SFrame frame = getFrame(this); frame.getContentPane().add(component, name); setProperty(name, component); }
public SComponent removeComponent(String name) throws ServletException { SFrame frame = getFrame(this); SComponent component = (SComponent) removeProperty(name); frame.getContentPane().remove(component); return component; }
private void updateControllerFrame() { controllerFrame.getContentPane().add(createApplicationMenuBar(), SBorderLayout.NORTH); updateFrameTitle(); }
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 static void fullScreenAttributes(SFrame frame) { Boolean fullScreenAttributesApplied = (Boolean)frame.getClientProperty("fullScreenAttributesApplied"); if (frame.isFullScreen() && !Boolean.TRUE.equals(fullScreenAttributesApplied)) { if (!Utils.isMSIE(frame)) { frame.getContentPane().setAttribute(CSSProperty.POSITION, "absolute"); frame.getContentPane().setAttribute(CSSProperty.HEIGHT, "100%"); frame.getContentPane().setAttribute(CSSProperty.WIDTH, "100%"); } frame.setAttribute(CSSProperty.POSITION, "absolute"); frame.setAttribute(CSSProperty.HEIGHT, "100%"); frame.setAttribute(CSSProperty.WIDTH, "100%"); frame.putClientProperty("fullScreenAttributesApplied", Boolean.TRUE); } else if (!frame.isFullScreen() && Boolean.TRUE.equals(fullScreenAttributesApplied)){ if (!Utils.isMSIE(frame)) { frame.getContentPane().setAttribute(CSSProperty.POSITION, null); frame.getContentPane().setAttribute(CSSProperty.HEIGHT, null); frame.getContentPane().setAttribute(CSSProperty.WIDTH, null); } frame.setAttribute(CSSProperty.POSITION, null); frame.setAttribute(CSSProperty.HEIGHT, null); frame.setAttribute(CSSProperty.WIDTH, null); frame.putClientProperty("fullScreenAttributesApplied", Boolean.FALSE); } }
STemplateLayout layout = new STemplateLayout(resourcePath); final SFrame errorFrame = new SFrame(); errorFrame.getContentPane().setLayout(layout); errorFrame.getContentPane().add(errorStackTraceLabel, "EXCEPTION_STACK_TRACE"); errorFrame.getContentPane().add(errorMessageLabel, "EXCEPTION_MESSAGE"); errorFrame.getContentPane().add(versionLabel, "WINGS_VERSION");
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); }