001: /*
002:
003: Licensed to the Apache Software Foundation (ASF) under one or more
004: contributor license agreements. See the NOTICE file distributed with
005: this work for additional information regarding copyright ownership.
006: The ASF licenses this file to You under the Apache License, Version 2.0
007: (the "License"); you may not use this file except in compliance with
008: the License. You may obtain a copy of the License at
009:
010: http://www.apache.org/licenses/LICENSE-2.0
011:
012: Unless required by applicable law or agreed to in writing, software
013: distributed under the License is distributed on an "AS IS" BASIS,
014: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015: See the License for the specific language governing permissions and
016: limitations under the License.
017:
018: */
019: package org.apache.batik.css.engine.value.svg;
020:
021: import org.apache.batik.css.engine.value.IdentifierManager;
022: import org.apache.batik.css.engine.value.StringMap;
023: import org.apache.batik.css.engine.value.Value;
024: import org.apache.batik.css.engine.value.ValueManager;
025: import org.apache.batik.util.CSSConstants;
026: import org.apache.batik.util.SVGTypes;
027:
028: /**
029: * This class provides a manager for the 'image-rendering' property values.
030: *
031: * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
032: * @version $Id: ImageRenderingManager.java 478283 2006-11-22 18:53:40Z dvholten $
033: */
034: public class ImageRenderingManager extends IdentifierManager {
035:
036: /**
037: * The identifier values.
038: */
039: protected static final StringMap values = new StringMap();
040: static {
041: values.put(CSSConstants.CSS_AUTO_VALUE,
042: SVGValueConstants.AUTO_VALUE);
043: values.put(CSSConstants.CSS_OPTIMIZEQUALITY_VALUE,
044: SVGValueConstants.OPTIMIZEQUALITY_VALUE);
045: values.put(CSSConstants.CSS_OPTIMIZESPEED_VALUE,
046: SVGValueConstants.OPTIMIZESPEED_VALUE);
047: }
048:
049: /**
050: * Implements {@link
051: * org.apache.batik.css.engine.value.ValueManager#isInheritedProperty()}.
052: */
053: public boolean isInheritedProperty() {
054: return true;
055: }
056:
057: /**
058: * Implements {@link ValueManager#isAnimatableProperty()}.
059: */
060: public boolean isAnimatableProperty() {
061: return true;
062: }
063:
064: /**
065: * Implements {@link ValueManager#isAdditiveProperty()}.
066: */
067: public boolean isAdditiveProperty() {
068: return false;
069: }
070:
071: /**
072: * Implements {@link ValueManager#getPropertyType()}.
073: */
074: public int getPropertyType() {
075: return SVGTypes.TYPE_IDENT;
076: }
077:
078: /**
079: * Implements {@link
080: * org.apache.batik.css.engine.value.ValueManager#getPropertyName()}.
081: */
082: public String getPropertyName() {
083: return CSSConstants.CSS_IMAGE_RENDERING_PROPERTY;
084: }
085:
086: /**
087: * Implements {@link
088: * org.apache.batik.css.engine.value.ValueManager#getDefaultValue()}.
089: */
090: public Value getDefaultValue() {
091: return SVGValueConstants.AUTO_VALUE;
092: }
093:
094: /**
095: * Implements {@link IdentifierManager#getIdentifiers()}.
096: */
097: public StringMap getIdentifiers() {
098: return values;
099: }
100: }
|