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);
}
}