01: /*
02:
03: Licensed to the Apache Software Foundation (ASF) under one or more
04: contributor license agreements. See the NOTICE file distributed with
05: this work for additional information regarding copyright ownership.
06: The ASF licenses this file to You under the Apache License, Version 2.0
07: (the "License"); you may not use this file except in compliance with
08: the License. You may obtain a copy of the License at
09:
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.CSSEngine;
22: import org.apache.batik.css.engine.value.AbstractValueFactory;
23: import org.apache.batik.css.engine.value.ShorthandManager;
24: import org.apache.batik.css.engine.value.ValueManager;
25: import org.apache.batik.util.CSSConstants;
26: import org.w3c.css.sac.LexicalUnit;
27: import org.w3c.dom.DOMException;
28:
29: /**
30: * This class represents an object which provide support for the
31: * 'marker' shorthand properties.
32: *
33: * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
34: * @version $Id: MarkerShorthandManager.java 475685 2006-11-16 11:16:05Z cam $
35: */
36: public class MarkerShorthandManager extends AbstractValueFactory
37: implements ShorthandManager {
38:
39: /**
40: * Implements {@link ValueManager#getPropertyName()}.
41: */
42: public String getPropertyName() {
43: return CSSConstants.CSS_MARKER_PROPERTY;
44: }
45:
46: /**
47: * Implements {@link ShorthandManager#isAnimatableProperty()}.
48: */
49: public boolean isAnimatableProperty() {
50: return true;
51: }
52:
53: /**
54: * Implements {@link ShorthandManager#isAdditiveProperty()}.
55: */
56: public boolean isAdditiveProperty() {
57: return false;
58: }
59:
60: /**
61: * Implements {@link ShorthandManager#setValues(CSSEngine,ShorthandManager.PropertyHandler,LexicalUnit,boolean)}.
62: */
63: public void setValues(CSSEngine eng,
64: ShorthandManager.PropertyHandler ph, LexicalUnit lu,
65: boolean imp) throws DOMException {
66: ph.property(CSSConstants.CSS_MARKER_END_PROPERTY, lu, imp);
67: ph.property(CSSConstants.CSS_MARKER_MID_PROPERTY, lu, imp);
68: ph.property(CSSConstants.CSS_MARKER_START_PROPERTY, lu, imp);
69: }
70: }
|