1 /*
2
3    Licensed to the Apache Software Foundation (ASF) under one or more
4    contributor license agreements.  See the NOTICE file distributed with
5    this work for additional information regarding copyright ownership.
6    The ASF licenses this file to You under the Apache License, Version 2.0
7    (the "License"); you may not use this file except in compliance with
8    the License.  You may obtain a copy of the License at
9
10        http://www.apache.org/licenses/LICENSE-2.0
11
12    Unless required by applicable law or agreed to in writing, software
13    distributed under the License is distributed on an "AS IS" BASIS,
14    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15    See the License for the specific language governing permissions and
16    limitations under the License.
17
18  */

19 package org.apache.batik.css.engine.value.svg;
20
21 import org.apache.batik.css.engine.value.IdentifierManager;
22 import org.apache.batik.css.engine.value.StringMap;
23 import org.apache.batik.css.engine.value.Value;
24 import org.apache.batik.css.engine.value.ValueManager;
25 import org.apache.batik.util.CSSConstants;
26 import org.apache.batik.util.SVGTypes;
27
28 /**
29  * This class provides a manager for the 'pointer-events' property values.
30  *
31  * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
32  * @version $Id: PointerEventsManager.java 1733416 2016-03-03 07:07:13Z gadams $
33  */

34 public class PointerEventsManager extends IdentifierManager {
35
36     /**
37      * The identifier values.
38      */

39     protected static final StringMap values = new StringMap();
40     static {
41         values.put(CSSConstants.CSS_ALL_VALUE,
42                    SVGValueConstants.ALL_VALUE);
43         values.put(CSSConstants.CSS_FILL_VALUE,
44                    SVGValueConstants.FILL_VALUE);
45         values.put(CSSConstants.CSS_FILLSTROKE_VALUE,
46                    SVGValueConstants.FILLSTROKE_VALUE);
47         values.put(CSSConstants.CSS_NONE_VALUE,
48                    SVGValueConstants.NONE_VALUE);
49         values.put(CSSConstants.CSS_PAINTED_VALUE,
50                    SVGValueConstants.PAINTED_VALUE);
51         values.put(CSSConstants.CSS_STROKE_VALUE,
52                    SVGValueConstants.STROKE_VALUE);
53         values.put(CSSConstants.CSS_VISIBLE_VALUE,
54                    SVGValueConstants.VISIBLE_VALUE);
55         values.put(CSSConstants.CSS_VISIBLEFILL_VALUE,
56                    SVGValueConstants.VISIBLEFILL_VALUE);
57         values.put(CSSConstants.CSS_VISIBLEFILLSTROKE_VALUE,
58                    SVGValueConstants.VISIBLEFILLSTROKE_VALUE);
59         values.put(CSSConstants.CSS_VISIBLEPAINTED_VALUE,
60                    SVGValueConstants.VISIBLEPAINTED_VALUE);
61         values.put(CSSConstants.CSS_VISIBLESTROKE_VALUE,
62                    SVGValueConstants.VISIBLESTROKE_VALUE);
63     }
64
65     /**
66      * Implements {@link
67      * org.apache.batik.css.engine.value.ValueManager#isInheritedProperty()}.
68      */

69     public boolean isInheritedProperty() {
70         return true;
71     }
72
73     /**
74      * Implements {@link ValueManager#isAnimatableProperty()}.
75      */

76     public boolean isAnimatableProperty() {
77         return true;
78     }
79
80     /**
81      * Implements {@link ValueManager#isAdditiveProperty()}.
82      */

83     public boolean isAdditiveProperty() {
84         return false;
85     }
86
87     /**
88      * Implements {@link ValueManager#getPropertyType()}.
89      */

90     public int getPropertyType() {
91         return SVGTypes.TYPE_IDENT;
92     }
93
94     /**
95      * Implements {@link
96      * org.apache.batik.css.engine.value.ValueManager#getPropertyName()}.
97      */

98     public String getPropertyName() {
99         return CSSConstants.CSS_POINTER_EVENTS_PROPERTY;
100     }
101
102     /**
103      * Implements {@link
104      * org.apache.batik.css.engine.value.ValueManager#getDefaultValue()}.
105      */

106     public Value getDefaultValue() {
107         return SVGValueConstants.VISIBLEPAINTED_VALUE;
108     }
109
110     /**
111      * Implements {@link IdentifierManager#getIdentifiers()}.
112      */

113     public StringMap getIdentifiers() {
114         return values;
115     }
116 }
117