2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 package org.apache.pdfbox.pdmodel.interactive.annotation;
19 import org.apache.pdfbox.cos.COSBase;
20 import org.apache.pdfbox.cos.COSDictionary;
22 import org.apache.pdfbox.pdmodel.common.COSObjectable;
25 * This class represents a PDF /BE entry the border effect dictionary.
28 * @version $Revision: 1.1 $
30 public class PDBorderEffectDictionary implements COSObjectable
34 * The various values of the effect applied to the border as defined in the
35 * PDF 1.6 reference Table 8.14
39 * Constant for the name for no effect.
41 public static final String STYLE_SOLID = "S";
44 * Constant for the name of a cloudy effect.
46 public static final String STYLE_CLOUDY = "C";
48 private COSDictionary dictionary;
53 public PDBorderEffectDictionary()
55 dictionary = new COSDictionary();
62 * a border style dictionary.
64 public PDBorderEffectDictionary( COSDictionary dict )
70 * returns the dictionary.
72 * @return the dictionary
74 public COSDictionary getDictionary()
80 * returns the dictionary.
82 * @return the dictionary
84 public COSBase getCOSObject()
90 * This will set the intensity of the applied effect.
93 * the intensity of the effect values 0 to 2
95 public void setIntensity( float i )
97 getDictionary().setFloat( "I", i );
101 * This will retrieve the intensity of the applied effect.
103 * @return the intensity value 0 to 2
105 public float getIntensity()
107 return getDictionary().getFloat( "I", 0 );
111 * This will set the border effect, see the STYLE_* constants for valid values.
114 * the border effect to use
116 public void setStyle( String s )
118 getDictionary().setName( "S", s );
122 * This will retrieve the border effect, see the STYLE_* constants for valid
125 * @return the effect of the border
127 public String getStyle()
129 return getDictionary().getNameAsString( "S", STYLE_SOLID );