/** * Adds a definition through its referring definition element (one * with a 'ref' attribute). */ protected void addDefinitionRef(Element defRef) { String ref = defRef.getAttributeNS(null, XBL_REF_ATTRIBUTE); Element e = ctx.getReferencedElement(defRef, ref); if (!XBL_NAMESPACE_URI.equals(e.getNamespaceURI()) || !XBL_DEFINITION_TAG.equals(e.getLocalName())) { throw new BridgeException (ctx, defRef, ErrorConstants.ERR_URI_BAD_TARGET, new Object[] { ref }); } ImportRecord ir = new ImportRecord(defRef, e); imports.put(defRef, ir); NodeEventTarget et = (NodeEventTarget) defRef; et.addEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMAttrModified", refAttrListener, false, null); XBLOMDefinitionElement d = (XBLOMDefinitionElement) defRef; String ns = d.getElementNamespaceURI(); String ln = d.getElementLocalName(); addDefinition(ns, ln, (XBLOMDefinitionElement) e, defRef); }
/** * Adds a definition through its referring definition element (one * with a 'ref' attribute). */ protected void addDefinitionRef(Element defRef) { String ref = defRef.getAttributeNS(null, XBL_REF_ATTRIBUTE); Element e = ctx.getReferencedElement(defRef, ref); if (!XBL_NAMESPACE_URI.equals(e.getNamespaceURI()) || !XBL_DEFINITION_TAG.equals(e.getLocalName())) { throw new BridgeException (ctx, defRef, ErrorConstants.ERR_URI_BAD_TARGET, new Object[] { ref }); } ImportRecord ir = new ImportRecord(defRef, e); imports.put(defRef, ir); NodeEventTarget et = (NodeEventTarget) defRef; et.addEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMAttrModified", refAttrListener, false, null); XBLOMDefinitionElement d = (XBLOMDefinitionElement) defRef; String ns = d.getElementNamespaceURI(); String ln = d.getElementLocalName(); addDefinition(ns, ln, (XBLOMDefinitionElement) e, defRef); }
/** * Adds a definition through its referring definition element (one * with a 'ref' attribute). */ protected void addDefinitionRef(Element defRef) { String ref = defRef.getAttributeNS(null, XBL_REF_ATTRIBUTE); Element e = ctx.getReferencedElement(defRef, ref); if (!XBL_NAMESPACE_URI.equals(e.getNamespaceURI()) || !XBL_DEFINITION_TAG.equals(e.getLocalName())) { throw new BridgeException (ctx, defRef, ErrorConstants.ERR_URI_BAD_TARGET, new Object[] { ref }); } ImportRecord ir = new ImportRecord(defRef, e); imports.put(defRef, ir); NodeEventTarget et = (NodeEventTarget) defRef; et.addEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMAttrModified", refAttrListener, false, null); XBLOMDefinitionElement d = (XBLOMDefinitionElement) defRef; String ns = d.getElementNamespaceURI(); String ln = d.getElementLocalName(); addDefinition(ns, ln, (XBLOMDefinitionElement) e, defRef); }
paintElement = ctx.getReferencedElement(paintElement, uri);
paintElement = ctx.getReferencedElement(paintElement, uri);
paintElement = ctx.getReferencedElement(paintElement, uri);
paintElement = ctx.getReferencedElement(paintElement, uri);
/** * Converts a Paint specified as a URI. * * @param paintedElement the element interested in a Paint * @param paintedNode the graphics node to paint (objectBoundingBox) * @param paintDef the paint definition * @param opacity the opacity to consider for the Paint * @param ctx the bridge context */ public static Paint convertURIPaint(Element paintedElement, GraphicsNode paintedNode, Value paintDef, float opacity, BridgeContext ctx) { String uri = paintDef.getStringValue(); Element paintElement = ctx.getReferencedElement(paintedElement, uri); Bridge bridge = ctx.getBridge(paintElement); if (bridge == null || !(bridge instanceof PaintBridge)) { throw new BridgeException (ctx, paintedElement, ERR_CSS_URI_BAD_TARGET, new Object[] {uri}); } return ((PaintBridge)bridge).createPaint(ctx, paintElement, paintedElement, paintedNode, opacity); }
/** * Converts a Paint specified as a URI. * * @param paintedElement the element interested in a Paint * @param paintedNode the graphics node to paint (objectBoundingBox) * @param paintDef the paint definition * @param opacity the opacity to consider for the Paint * @param ctx the bridge context */ public static Paint convertURIPaint(Element paintedElement, GraphicsNode paintedNode, Value paintDef, float opacity, BridgeContext ctx) { String uri = paintDef.getStringValue(); Element paintElement = ctx.getReferencedElement(paintedElement, uri); Bridge bridge = ctx.getBridge(paintElement); if (bridge == null || !(bridge instanceof PaintBridge)) { throw new BridgeException (ctx, paintedElement, ERR_CSS_URI_BAD_TARGET, new Object[] {uri}); } return ((PaintBridge)bridge).createPaint(ctx, paintElement, paintedElement, paintedNode, opacity); }
/** * Converts a Paint specified as a URI. * * @param paintedElement the element interested in a Paint * @param paintedNode the graphics node to paint (objectBoundingBox) * @param paintDef the paint definition * @param opacity the opacity to consider for the Paint * @param ctx the bridge context */ public static Paint convertURIPaint(Element paintedElement, GraphicsNode paintedNode, Value paintDef, float opacity, BridgeContext ctx) { String uri = paintDef.getStringValue(); Element paintElement = ctx.getReferencedElement(paintedElement, uri); Bridge bridge = ctx.getBridge(paintElement); if (bridge == null || !(bridge instanceof PaintBridge)) { throw new BridgeException (ctx, paintedElement, ERR_CSS_URI_BAD_TARGET, new Object[] {uri}); } return ((PaintBridge)bridge).createPaint(ctx, paintElement, paintedElement, paintedNode, opacity); }
Element cp = ctx.getReferencedElement(clippedElement, uri); Bridge bridge = ctx.getBridge(cp); if (bridge == null || !(bridge instanceof ClipBridge)) {
Element m = ctx.getReferencedElement(maskedElement, uri); Bridge bridge = ctx.getBridge(m); if (bridge == null || !(bridge instanceof MaskBridge)) {
Element m = ctx.getReferencedElement(maskedElement, uri); Bridge bridge = ctx.getBridge(m); if (bridge == null || !(bridge instanceof MaskBridge)) {
Element filter = ctx.getReferencedElement(filteredElement, uri); Bridge bridge = ctx.getBridge(filter); if (bridge == null || !(bridge instanceof FilterBridge)) {
Element filter = ctx.getReferencedElement(filteredElement, uri); Bridge bridge = ctx.getBridge(filter); if (bridge == null || !(bridge instanceof FilterBridge)) {
/** * Returns a <code>Marker</code> defined on the specified element by * the specified value, and for the specified shape node. * * @param e the painted element * @param v the CSS value describing the marker to construct * @param ctx the bridge context */ public static Marker convertMarker(Element e, Value v, BridgeContext ctx) { if (v.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) { return null; // 'none' } else { String uri = v.getStringValue(); Element markerElement = ctx.getReferencedElement(e, uri); Bridge bridge = ctx.getBridge(markerElement); if (bridge == null || !(bridge instanceof MarkerBridge)) { throw new BridgeException(ctx, e, ERR_CSS_URI_BAD_TARGET, new Object[] {uri}); } return ((MarkerBridge)bridge).createMarker(ctx, markerElement, e); } }
Element filter = ctx.getReferencedElement(filteredElement, uri); Bridge bridge = ctx.getBridge(filter); if (bridge == null || !(bridge instanceof FilterBridge)) {
/** * Returns a <code>Marker</code> defined on the specified element by * the specified value, and for the specified shape node. * * @param e the painted element * @param v the CSS value describing the marker to construct * @param ctx the bridge context */ public static Marker convertMarker(Element e, Value v, BridgeContext ctx) { if (v.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) { return null; // 'none' } else { String uri = v.getStringValue(); Element markerElement = ctx.getReferencedElement(e, uri); Bridge bridge = ctx.getBridge(markerElement); if (bridge == null || !(bridge instanceof MarkerBridge)) { throw new BridgeException(ctx, e, ERR_CSS_URI_BAD_TARGET, new Object[] {uri}); } return ((MarkerBridge)bridge).createMarker(ctx, markerElement, e); } }
t = element.getParentNode(); } else { t = ctx.getReferencedElement(element, uri); if (t.getOwnerDocument() != element.getOwnerDocument()) { throw new BridgeException
/** * Returns a <code>Marker</code> defined on the specified element by * the specified value, and for the specified shape node. * * @param e the painted element * @param v the CSS value describing the marker to construct * @param ctx the bridge context */ public static Marker convertMarker(Element e, Value v, BridgeContext ctx) { if (v.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) { return null; // 'none' } else { String uri = v.getStringValue(); Element markerElement = ctx.getReferencedElement(e, uri); Bridge bridge = ctx.getBridge(markerElement); if (bridge == null || !(bridge instanceof MarkerBridge)) { throw new BridgeException(ctx, e, ERR_CSS_URI_BAD_TARGET, new Object[] {uri}); } return ((MarkerBridge)bridge).createMarker(ctx, markerElement, e); } }