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