001/********************************************** 002 * Copyright (C) 2010 Lukas Laag 003 * This file is part of lib-gwt-svg. 004 * 005 * libgwtsvg is free software: you can redistribute it and/or modify 006 * it under the terms of the GNU Lesser General Public License as published by 007 * the Free Software Foundation, either version 3 of the License, or 008 * (at your option) any later version. 009 * 010 * libgwtsvg is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public License 016 * along with libgwtsvg. If not, see http://www.gnu.org/licenses/ 017 **********************************************/ 018/* 019 * Copyright (c) 2004 World Wide Web Consortium, 020 * 021 * (Massachusetts Institute of Technology, European Research Consortium for 022 * Informatics and Mathematics, Keio University). All Rights Reserved. This 023 * work is distributed under the W3C(r) Software License [1] in the hope that 024 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied 025 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 026 * 027 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 028 */ 029 030package org.vectomatic.dom.svg; 031 032import org.vectomatic.dom.svg.impl.SVGAltGlyphElement; 033import org.vectomatic.dom.svg.itf.ISVGURIReference; 034import org.vectomatic.dom.svg.utils.DOMHelper; 035import org.vectomatic.dom.svg.utils.SVGConstants; 036 037import com.google.gwt.core.client.JavaScriptException; 038import com.google.gwt.dom.client.TagName; 039 040/** 041 * The {@link org.vectomatic.dom.svg.OMSVGAltGlyphElement} interface corresponds 042 * to the <a href='http://www.w3.org/TR/SVG11/text.html#AltGlyphElement' title='altGlyph 043 * element specification'>altGlyph</a> element. 044 */ 045@TagName("altGlyph") 046public class OMSVGAltGlyphElement extends OMSVGTextPositioningElement implements ISVGURIReference { 047 public OMSVGAltGlyphElement() { 048 this((SVGAltGlyphElement)DOMHelper.createElementNS(DOMHelper.getCurrentDocument(), SVGConstants.SVG_NAMESPACE_URI, SVGConstants.SVG_ALT_GLYPH_TAG).cast()); 049 } 050 051 protected OMSVGAltGlyphElement(SVGAltGlyphElement ot) { 052 super(ot); 053 } 054 055 // Implementation of the svg::SVGAltGlyphElement W3C IDL interface 056 /** 057 * Corresponds to attribute <code>glyphRef attribute</code> on the given element. 058 */ 059 public final String getGlyphRef() { 060 return ((SVGAltGlyphElement)ot).getGlyphRef(); 061 } 062 /** 063 * Corresponds to attribute <code>glyphRef attribute</code> on the given element. 064 * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) Raised on an attempt 065 * to change the value of a <a href="svgdom.html#ReadOnlyNodes">read only 066 * attribute</a>. 067 */ 068 public final void setGlyphRef(java.lang.String value) throws JavaScriptException { 069 ((SVGAltGlyphElement)ot).setGlyphRef(value); 070 } 071 /** 072 * Corresponds to attribute {@link org.vectomatic.dom.svg.OMSVGAltGlyphElement#getFormat()} 073 * on the given element. 074 */ 075 public final String getFormat() { 076 return ((SVGAltGlyphElement)ot).getFormat(); 077 } 078 /** 079 * Corresponds to attribute {@link org.vectomatic.dom.svg.OMSVGAltGlyphElement#getFormat()} 080 * on the given element. 081 * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) Raised on an attempt 082 * to change the value of a <a href="svgdom.html#ReadOnlyNodes">read only 083 * attribute</a>. 084 */ 085 public final void setFormat(java.lang.String value) throws JavaScriptException { 086 ((SVGAltGlyphElement)ot).setFormat(value); 087 } 088 089 // Implementation of the svg::SVGURIReference W3C IDL interface 090 /** 091 * Corresponds to attribute <span class='attr-name'>'xlink:href'</span> on 092 * the given element. 093 */ 094 public final OMSVGAnimatedString getHref() { 095 return ((SVGAltGlyphElement)ot).getHref(); 096 } 097 098}