@@ -162,31 +162,31 @@ public abstract class PdfAnnotation extends PdfObjectWrapper<PdfDictionary> {
162
162
163
163
/**
164
164
* Annotation border style. See ISO-320001, Table 166 (S key).
165
- * Also see {@link PdfAnnotation#setBorderStyle( PdfName)}
165
+ * Also see {@link BorderStyleUtil#setStyle(PdfDictionary, PdfName)}
166
166
*/
167
167
public static final PdfName STYLE_SOLID = PdfName .S ;
168
168
169
169
/**
170
170
* Annotation border style. See ISO-320001, Table 166 (S key).
171
- * Also see {@link PdfAnnotation#setBorderStyle( PdfName)}
171
+ * Also see {@link BorderStyleUtil#setStyle(PdfDictionary, PdfName)}
172
172
*/
173
173
public static final PdfName STYLE_DASHED = PdfName .D ;
174
174
175
175
/**
176
176
* Annotation border style. See ISO-320001, Table 166 (S key).
177
- * Also see {@link PdfAnnotation#setBorderStyle( PdfName)}
177
+ * Also see {@link BorderStyleUtil#setStyle(PdfDictionary, PdfName)}
178
178
*/
179
179
public static final PdfName STYLE_BEVELED = PdfName .B ;
180
180
181
181
/**
182
182
* Annotation border style. See ISO-320001, Table 166 (S key).
183
- * Also see {@link PdfAnnotation#setBorderStyle( PdfName)}
183
+ * Also see {@link BorderStyleUtil#setStyle(PdfDictionary, PdfName)}
184
184
*/
185
185
public static final PdfName STYLE_INSET = PdfName .I ;
186
186
187
187
/**
188
188
* Annotation border style. See ISO-320001, Table 166 (S key).
189
- * Also see {@link PdfAnnotation#setBorderStyle( PdfName)}
189
+ * Also see {@link BorderStyleUtil#setStyle(PdfDictionary, PdfName)}
190
190
*/
191
191
public static final PdfName STYLE_UNDERLINE = PdfName .U ;
192
192
@@ -364,6 +364,7 @@ public void setLayer(IPdfOCG layer) {
364
364
* @param action {@link PdfAction} to set to this annotation.
365
365
* @return this {@link PdfAnnotation} instance.
366
366
*/
367
+ @ Deprecated
367
368
public PdfAnnotation setAction (PdfAction action ) {
368
369
return put (PdfName .A , action .getPdfObject ());
369
370
}
@@ -375,6 +376,7 @@ public PdfAnnotation setAction(PdfAction action) {
375
376
* @param action {@link PdfAction} to set as additional to this annotation.
376
377
* @return this {@link PdfAnnotation} instance.
377
378
*/
379
+ @ Deprecated
378
380
public PdfAnnotation setAdditionalAction (PdfName key , PdfAction action ) {
379
381
PdfAction .setAdditionalAction (this , key , action );
380
382
return this ;
@@ -891,6 +893,7 @@ public PdfAnnotation setStructParentIndex(int structParentIndex) {
891
893
* This flag has affect to not all kinds of annotations.
892
894
* @return true if annotation is initially open, false - if closed.
893
895
*/
896
+ @ Deprecated
894
897
public boolean getOpen () {
895
898
PdfBoolean open = getPdfObject ().getAsBoolean (PdfName .Open );
896
899
return open != null && open .getValue ();
@@ -902,6 +905,7 @@ public boolean getOpen() {
902
905
* @param open true if annotation shall initially be open, false - if closed.
903
906
* @return this {@link PdfAnnotation} instance.
904
907
*/
908
+ @ Deprecated
905
909
public PdfAnnotation setOpen (boolean open ) {
906
910
return put (PdfName .Open , PdfBoolean .valueOf (open ));
907
911
}
@@ -925,6 +929,7 @@ public PdfAnnotation setOpen(boolean open) {
925
929
* just as Acrobat and probably most other viewers expect.
926
930
* @return an {@link PdfArray} of 8 × n numbers specifying the coordinates of n quadrilaterals.
927
931
*/
932
+ @ Deprecated
928
933
public PdfArray getQuadPoints () {
929
934
return getPdfObject ().getAsArray (PdfName .QuadPoints );
930
935
}
@@ -944,6 +949,7 @@ public PdfArray getQuadPoints() {
944
949
* @param quadPoints an {@link PdfArray} of 8 × n numbers specifying the coordinates of n quadrilaterals.
945
950
* @return this {@link PdfAnnotation} instance.
946
951
*/
952
+ @ Deprecated
947
953
public PdfAnnotation setQuadPoints (PdfArray quadPoints ) {
948
954
return put (PdfName .QuadPoints , quadPoints );
949
955
}
@@ -955,6 +961,7 @@ public PdfAnnotation setQuadPoints(PdfArray quadPoints) {
955
961
* in drawing the annotation’s border.
956
962
* @return this {@link PdfAnnotation} instance.
957
963
*/
964
+ @ Deprecated
958
965
public PdfAnnotation setBorderStyle (PdfDictionary borderStyle ) {
959
966
return put (PdfName .BS , borderStyle );
960
967
}
@@ -973,13 +980,9 @@ public PdfAnnotation setBorderStyle(PdfDictionary borderStyle) {
973
980
* @return The annotation which this method was called on.
974
981
* @see PdfAnnotation#getBorderStyle()
975
982
*/
983
+ @ Deprecated
976
984
public PdfAnnotation setBorderStyle (PdfName style ) {
977
- PdfDictionary styleDict = getBorderStyle ();
978
- if (null == styleDict ) {
979
- styleDict = new PdfDictionary ();
980
- }
981
- styleDict .put (PdfName .S , style );
982
- return setBorderStyle (styleDict );
985
+ return setBorderStyle (BorderStyleUtil .setStyle (getBorderStyle (), style ));
983
986
}
984
987
985
988
/**
@@ -990,13 +993,9 @@ public PdfAnnotation setBorderStyle(PdfName style) {
990
993
* shall be used in drawing a dashed border.
991
994
* @return this {@link PdfAnnotation} instance.
992
995
*/
996
+ @ Deprecated
993
997
public PdfAnnotation setDashPattern (PdfArray dashPattern ) {
994
- PdfDictionary styleDict = getBorderStyle ();
995
- if (null == styleDict ) {
996
- styleDict = new PdfDictionary ();
997
- }
998
- styleDict .put (PdfName .D , dashPattern );
999
- return setBorderStyle (styleDict );
998
+ return setBorderStyle (BorderStyleUtil .setDashPattern (getBorderStyle (), dashPattern ));
1000
999
}
1001
1000
1002
1001
/**
@@ -1007,6 +1006,7 @@ public PdfAnnotation setDashPattern(PdfArray dashPattern) {
1007
1006
* precedence over the BS entry. For more info on BS entry see ISO-320001, Table 166.
1008
1007
* @return {@link PdfDictionary} which is a border style dictionary or null if it is not specified.
1009
1008
*/
1009
+ @ Deprecated
1010
1010
public PdfDictionary getBorderStyle () {
1011
1011
return getPdfObject ().getAsDictionary (PdfName .BS );
1012
1012
}
@@ -1037,6 +1037,7 @@ public PdfString getTitle() {
1037
1037
* @param characteristics the {@link PdfDictionary} with additional information for appearance stream.
1038
1038
* @return this {@link PdfAnnotation} instance.
1039
1039
*/
1040
+ @ Deprecated
1040
1041
public PdfAnnotation setAppearanceCharacteristics (PdfDictionary characteristics ) {
1041
1042
return put (PdfName .MK , characteristics );
1042
1043
}
@@ -1047,6 +1048,7 @@ public PdfAnnotation setAppearanceCharacteristics(PdfDictionary characteristics)
1047
1048
* This property affects {@link PdfWidgetAnnotation} and {@link PdfScreenAnnotation}.
1048
1049
* @return an appearance characteristics dictionary or null if it isn't specified.
1049
1050
*/
1051
+ @ Deprecated
1050
1052
public PdfDictionary getAppearanceCharacteristics () {
1051
1053
return getPdfObject ().getAsDictionary (PdfName .MK );
1052
1054
}
@@ -1056,6 +1058,7 @@ public PdfDictionary getAppearanceCharacteristics() {
1056
1058
* changing an annotation’s appearance state etc, when the annotation is activated.
1057
1059
* @return {@link PdfDictionary} which defines the characteristics and behaviour of an action.
1058
1060
*/
1061
+ @ Deprecated
1059
1062
public PdfDictionary getAction () {
1060
1063
return getPdfObject ().getAsDictionary (PdfName .A );
1061
1064
}
@@ -1066,6 +1069,7 @@ public PdfDictionary getAction() {
1066
1069
* @return an additional actions {@link PdfDictionary}.
1067
1070
* @see PdfAnnotation#getAction()
1068
1071
*/
1072
+ @ Deprecated
1069
1073
public PdfDictionary getAdditionalAction () {
1070
1074
return getPdfObject ().getAsDictionary (PdfName .AA );
1071
1075
}
0 commit comments