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;
20:
21: import org.apache.batik.css.engine.CSSEngine;
22: import org.w3c.css.sac.LexicalUnit;
23: import org.w3c.dom.DOMException;
24:
25: /**
26: * This interface represents the objects which provide support for
27: * shorthand properties.
28: *
29: * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
30: * @version $Id: ShorthandManager.java 478160 2006-11-22 13:35:06Z dvholten $
31: */
32: public interface ShorthandManager {
33:
34: /**
35: * Returns the name of the property handled.
36: */
37: String getPropertyName();
38:
39: /**
40: * Whether the handled property can be animated.
41: */
42: boolean isAnimatableProperty();
43:
44: /**
45: * Whether the handled property can be additively animated.
46: */
47: boolean isAdditiveProperty();
48:
49: /**
50: * Sets the properties which are affected by this shorthand
51: * property.
52: * @param eng The current CSSEngine.
53: * @param ph The property handler to use.
54: * @param lu The SAC lexical unit used to create the value.
55: * @param imp The property priority.
56: */
57: void setValues(CSSEngine eng, PropertyHandler ph, LexicalUnit lu,
58: boolean imp) throws DOMException;
59:
60: /**
61: * To handle a property value created by a ShorthandManager.
62: */
63: interface PropertyHandler {
64: void property(String name, LexicalUnit value, boolean important);
65: }
66: }
|