001/*
002 * ============================================================================
003 * Copyright © 2002-2023 by Thomas Thrien.
004 * All Rights Reserved.
005 * ============================================================================
006 * Licensed to the public under the agreements of the GNU Lesser General Public
007 * License, version 3.0 (the "License"). You may obtain a copy of the License at
008 *
009 *      http://www.gnu.org/licenses/lgpl.html
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
013 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
014 * License for the specific language governing permissions and limitations
015 * under the License.
016 */
017
018package org.tquadrat.foundation.svg;
019
020import static org.apiguardian.api.API.Status.STABLE;
021import static org.tquadrat.foundation.svg.SVGUtils.SVGATTRIBUTE_OnAbort;
022import static org.tquadrat.foundation.svg.SVGUtils.SVGATTRIBUTE_OnError;
023import static org.tquadrat.foundation.svg.SVGUtils.SVGATTRIBUTE_OnResize;
024import static org.tquadrat.foundation.svg.SVGUtils.SVGATTRIBUTE_OnScroll;
025import static org.tquadrat.foundation.svg.SVGUtils.SVGATTRIBUTE_OnUnload;
026
027import java.util.List;
028
029import org.apiguardian.api.API;
030import org.tquadrat.foundation.annotation.ClassVersion;
031
032/**
033 *  SVG elements that allow the document event attributes
034 *  {@value SVGUtils#SVGATTRIBUTE_OnAbort},
035 *  {@value SVGUtils#SVGATTRIBUTE_OnError},
036 *  {@value SVGUtils#SVGATTRIBUTE_OnResize},
037 *  {@value SVGUtils#SVGATTRIBUTE_OnScroll},
038 *  and
039 *  {@value SVGUtils#SVGATTRIBUTE_OnUnload}
040 *  will implement this interface.
041 *
042 *  @extauthor Thomas Thrien - thomas.thrien@tquadrat.org
043 *  @version $Id: AllowsDocumentEventAttributes.java 1074 2023-10-02 12:05:06Z tquadrat $
044 *  @since 0.0.5
045 *
046 *  @UMLGraph.link
047 */
048@ClassVersion( sourceVersion = "$Id: AllowsDocumentEventAttributes.java 1074 2023-10-02 12:05:06Z tquadrat $" )
049@API( status = STABLE, since = "0.0.5" )
050public sealed interface AllowsDocumentEventAttributes
051    permits SVG, SVGElementAdapter
052{
053        /*------------------------*\
054    ====** Static Initialisations **===========================================
055        \*------------------------*/
056    /**
057     *  The document event attributes.
058     */
059    @SuppressWarnings( "StaticCollection" )
060    public static final List<String> DOCUMENTEVENT_ATTRIBUTES = List.of(
061        SVGATTRIBUTE_OnAbort,
062        SVGATTRIBUTE_OnError,
063        SVGATTRIBUTE_OnResize,
064        SVGATTRIBUTE_OnScroll,
065        SVGATTRIBUTE_OnUnload
066    );
067
068        /*---------*\
069    ====** Methods **==========================================================
070        \*---------*/
071    /**
072     *  Sets the abort handler for this SVG element.
073     *
074     *  @param  value   The abort handler.
075     *
076     *  @see SVGUtils#SVGATTRIBUTE_OnAbort
077     */
078    public void setAbortHandler( final String value );
079
080    /**
081     *  Sets the error handler for this SVG element.
082     *
083     *  @param  value   The error handler.
084     *
085     *  @see SVGUtils#SVGATTRIBUTE_OnError
086     */
087    public void setErrorHandler( final String value );
088
089    /**
090     *  Sets the resize handler for this SVG element.
091     *
092     *  @param  value   The resize handler.
093     *
094     *  @see SVGUtils#SVGATTRIBUTE_OnResize
095     */
096    public void setResizeHandler( final String value );
097
098    /**
099     *  Sets the scroll handler for this SVG element.
100     *
101     *  @param  value   The scroll handler.
102     *
103     *  @see SVGUtils#SVGATTRIBUTE_OnScroll
104     */
105    public void setScrollHandler( final String value );
106
107    /**
108     *  Sets the &quot;unload&quot; handler for this SVG element.
109     *
110     *  @param  value   The unload handler.
111     *
112     *  @see SVGUtils#SVGATTRIBUTE_OnUnload
113     */
114    public void setUnloadHandler( final String value );
115}
116//  interface AllowsDocumentEventAttributes
117
118/*
119 *  End of File
120 */