@Test public void testCreateFromFullXml() { ScreenOverlayLayer createdLayer = ScreenOverlayLayerFactory.createScreenOverlayLayer(load("screenOverlayLayerFull.xml"), null); assertNotNull(createdLayer); assertEquals("Overlay01", createdLayer.getName()); ScreenOverlayAttributes attributes = createdLayer.getAttributes(); assertEquals("http: assertEquals(null, attributes.getSourceHtml()); assertEquals(ScreenOverlayPosition.SOUTH, attributes.getPosition()); assertEquals(true, attributes.isDrawBorder()); assertEquals(4, attributes.getBorderWidth()); assertEquals(new Color(128, 128, 255), attributes.getBorderColor()); assertEquals(new LengthExpression("100px"), attributes.getMinHeight()); assertEquals(new LengthExpression("40%"), attributes.getMaxHeight()); assertEquals(new LengthExpression("400px"), attributes.getMinWidth()); assertEquals(new LengthExpression("500px"), attributes.getMaxWidth()); }
public static ScreenOverlayLayer createScreenOverlayLayer(Element domElement, AVList params) { Validate.isTrue(domElement != null || params != null, "Either an XML document or params must be provided."); if (domElement == null) { return new ScreenOverlayLayer(params); } if (params == null) { params = new AVListImpl(); } params = getLayerConfigParams(domElement, params); params = getScreenOverlayParams(domElement, params); return new ScreenOverlayLayer(params); }
ScreenOverlayLayerFactory { public static ScreenOverlayLayer createScreenOverlayLayer(Element domElement, AVList params) { Validate.isTrue(domElement != null || params != null, "Either an XML document or params must be provided."); if (domElement == null) { return new ScreenOverlayLayer(params); } if (params == null) { params = new AVListImpl(); } params = getLayerConfigParams(domElement, params); params = getScreenOverlayParams(domElement, params); return new ScreenOverlayLayer(params); } }
ScreenOverlayLayerFactory { public static ScreenOverlayLayer createScreenOverlayLayer(Element domElement, AVList params) { Validate.isTrue(domElement != null || params != null, "Either an XML document or params must be provided."); if (domElement == null) { return new ScreenOverlayLayer(params); } if (params == null) { params = new AVListImpl(); } params = getLayerConfigParams(domElement, params); params = getScreenOverlayParams(domElement, params); return new ScreenOverlayLayer(params); }  }
ScreenOverlayLayerFactory { public static ScreenOverlayLayer createScreenOverlayLayer(Element domElement, AVList params) { Validate.isTrue(domElement != null || params != null, "Either an XML document or params must be provided."); if (domElement == null) { return new ScreenOverlayLayer(params); } if (params == null) { params = new AVListImpl(); } params = getLayerConfigParams(domElement, params); params = getScreenOverlayParams(domElement, params); return new ScreenOverlayLayer(params); }  static ScreenOverlayLayer createScreenOverlayLayer(Element domElement, AVList params); }
ScreenOverlayLayerFactory { public static ScreenOverlayLayer createScreenOverlayLayer(Element domElement, AVList params) { Validate.isTrue(domElement != null || params != null, "Either an XML document or params must be provided."); if (domElement == null) { return new ScreenOverlayLayer(params); } if (params == null) { params = new AVListImpl(); } params = getLayerConfigParams(domElement, params); params = getScreenOverlayParams(domElement, params); return new ScreenOverlayLayer(params); }  static ScreenOverlayLayer createScreenOverlayLayer(Element domElement, AVList params);  }