Skip to content

Commit 511639c

Browse files
introfogiText-CI
authored andcommitted
Add JavaDocs to some classes from layer package and to PdfLinkAnnotation class
DEVSIX-5012 Autoported commit. Original commit hash: [3e2ca9805]
1 parent bc7b426 commit 511639c

File tree

5 files changed

+221
-7
lines changed

5 files changed

+221
-7
lines changed

itext/itext.kernel/itext/kernel/pdf/annot/PdfLinkAnnotation.cs

Lines changed: 190 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ source product.
4848
using iText.Kernel.Pdf.Navigation;
4949

5050
namespace iText.Kernel.Pdf.Annot {
51+
/// <summary>
52+
/// A link annotation represents either a hypertext link to a destination elsewhere in the document
53+
/// or an
54+
/// <see cref="iText.Kernel.Pdf.Action.PdfAction"/>
55+
/// to be performed.
56+
/// </summary>
57+
/// <remarks>
58+
/// A link annotation represents either a hypertext link to a destination elsewhere in the document
59+
/// or an
60+
/// <see cref="iText.Kernel.Pdf.Action.PdfAction"/>
61+
/// to be performed. See also ISO-320001 12.5.6.5, "Link Annotations".
62+
/// </remarks>
5163
public class PdfLinkAnnotation : PdfAnnotation {
5264
private static readonly ILog logger = LogManager.GetLogger(typeof(iText.Kernel.Pdf.Annot.PdfLinkAnnotation
5365
));
@@ -62,7 +74,7 @@ public class PdfLinkAnnotation : PdfAnnotation {
6274
public static readonly PdfName Push = PdfName.P;
6375

6476
/// <summary>
65-
/// Instantiates a new
77+
/// Creates a new
6678
/// <see cref="PdfLinkAnnotation"/>
6779
/// instance based on
6880
/// <see cref="iText.Kernel.Pdf.PdfDictionary"/>
@@ -78,6 +90,18 @@ protected internal PdfLinkAnnotation(PdfDictionary pdfObject)
7890
: base(pdfObject) {
7991
}
8092

93+
/// <summary>
94+
/// Creates a new
95+
/// <see cref="PdfLinkAnnotation"/>
96+
/// instance based on
97+
/// <see cref="iText.Kernel.Geom.Rectangle"/>
98+
/// instance, that define the location of the annotation on the page in default user space units.
99+
/// </summary>
100+
/// <param name="rect">
101+
/// the
102+
/// <see cref="iText.Kernel.Geom.Rectangle"/>
103+
/// that define the location of the annotation
104+
/// </param>
81105
public PdfLinkAnnotation(Rectangle rect)
82106
: base(rect) {
83107
}
@@ -86,10 +110,49 @@ public override PdfName GetSubtype() {
86110
return PdfName.Link;
87111
}
88112

113+
/// <summary>
114+
/// Gets the annotation destination as
115+
/// <see cref="iText.Kernel.Pdf.PdfObject"/>
116+
/// instance.
117+
/// </summary>
118+
/// <remarks>
119+
/// Gets the annotation destination as
120+
/// <see cref="iText.Kernel.Pdf.PdfObject"/>
121+
/// instance.
122+
/// <para />
123+
/// Destination shall be displayed when the annotation is activated. See also ISO-320001, Table 173.
124+
/// </remarks>
125+
/// <returns>
126+
/// the annotation destination as
127+
/// <see cref="iText.Kernel.Pdf.PdfObject"/>
128+
/// instance
129+
/// </returns>
89130
public virtual PdfObject GetDestinationObject() {
90131
return GetPdfObject().Get(PdfName.Dest);
91132
}
92133

134+
/// <summary>
135+
/// Sets the annotation destination as
136+
/// <see cref="iText.Kernel.Pdf.PdfObject"/>
137+
/// instance.
138+
/// </summary>
139+
/// <remarks>
140+
/// Sets the annotation destination as
141+
/// <see cref="iText.Kernel.Pdf.PdfObject"/>
142+
/// instance.
143+
/// <para />
144+
/// Destination shall be displayed when the annotation is activated. See also ISO-320001, Table 173.
145+
/// </remarks>
146+
/// <param name="destination">
147+
/// the destination to be set as
148+
/// <see cref="iText.Kernel.Pdf.PdfObject"/>
149+
/// instance
150+
/// </param>
151+
/// <returns>
152+
/// this
153+
/// <see cref="PdfLinkAnnotation"/>
154+
/// instance
155+
/// </returns>
93156
public virtual iText.Kernel.Pdf.Annot.PdfLinkAnnotation SetDestination(PdfObject destination) {
94157
if (GetPdfObject().ContainsKey(PdfName.A)) {
95158
GetPdfObject().Remove(PdfName.A);
@@ -102,10 +165,43 @@ public virtual iText.Kernel.Pdf.Annot.PdfLinkAnnotation SetDestination(PdfObject
102165
return (iText.Kernel.Pdf.Annot.PdfLinkAnnotation)Put(PdfName.Dest, destination);
103166
}
104167

168+
/// <summary>
169+
/// Sets the annotation destination as
170+
/// <see cref="iText.Kernel.Pdf.Navigation.PdfDestination"/>
171+
/// instance.
172+
/// </summary>
173+
/// <remarks>
174+
/// Sets the annotation destination as
175+
/// <see cref="iText.Kernel.Pdf.Navigation.PdfDestination"/>
176+
/// instance.
177+
/// <para />
178+
/// Destination shall be displayed when the annotation is activated. See also ISO-320001, Table 173.
179+
/// </remarks>
180+
/// <param name="destination">
181+
/// the destination to be set as
182+
/// <see cref="iText.Kernel.Pdf.Navigation.PdfDestination"/>
183+
/// instance
184+
/// </param>
185+
/// <returns>
186+
/// this
187+
/// <see cref="PdfLinkAnnotation"/>
188+
/// instance
189+
/// </returns>
105190
public virtual iText.Kernel.Pdf.Annot.PdfLinkAnnotation SetDestination(PdfDestination destination) {
106191
return SetDestination(destination.GetPdfObject());
107192
}
108193

194+
/// <summary>Removes the annotation destination.</summary>
195+
/// <remarks>
196+
/// Removes the annotation destination.
197+
/// <para />
198+
/// Destination shall be displayed when the annotation is activated. See also ISO-320001, Table 173.
199+
/// </remarks>
200+
/// <returns>
201+
/// this
202+
/// <see cref="PdfLinkAnnotation"/>
203+
/// instance
204+
/// </returns>
109205
public virtual iText.Kernel.Pdf.Annot.PdfLinkAnnotation RemoveDestination() {
110206
GetPdfObject().Remove(PdfName.Dest);
111207
return this;
@@ -120,7 +216,7 @@ public virtual iText.Kernel.Pdf.Annot.PdfLinkAnnotation RemoveDestination() {
120216
/// <returns>
121217
///
122218
/// <see cref="iText.Kernel.Pdf.PdfDictionary"/>
123-
/// which defines the characteristics and behaviour of an action.
219+
/// which defines the characteristics and behaviour of an action
124220
/// </returns>
125221
public virtual PdfDictionary GetAction() {
126222
return GetPdfObject().GetAsDictionary(PdfName.A);
@@ -135,12 +231,12 @@ public virtual PdfDictionary GetAction() {
135231
/// <param name="action">
136232
///
137233
/// <see cref="iText.Kernel.Pdf.PdfDictionary"/>
138-
/// that represents action to set to this annotation.
234+
/// that represents action to set to this annotation
139235
/// </param>
140236
/// <returns>
141237
/// this
142238
/// <see cref="PdfLinkAnnotation"/>
143-
/// instance.
239+
/// instance
144240
/// </returns>
145241
public virtual iText.Kernel.Pdf.Annot.PdfLinkAnnotation SetAction(PdfDictionary action) {
146242
return (iText.Kernel.Pdf.Annot.PdfLinkAnnotation)Put(PdfName.A, action);
@@ -154,12 +250,12 @@ public virtual iText.Kernel.Pdf.Annot.PdfLinkAnnotation SetAction(PdfDictionary
154250
/// <param name="action">
155251
///
156252
/// <see cref="iText.Kernel.Pdf.Action.PdfAction"/>
157-
/// to set to this annotation.
253+
/// to set to this annotation
158254
/// </param>
159255
/// <returns>
160256
/// this
161257
/// <see cref="PdfLinkAnnotation"/>
162-
/// instance.
258+
/// instance
163259
/// </returns>
164260
public virtual iText.Kernel.Pdf.Annot.PdfLinkAnnotation SetAction(PdfAction action) {
165261
if (GetDestinationObject() != null) {
@@ -169,27 +265,115 @@ public virtual iText.Kernel.Pdf.Annot.PdfLinkAnnotation SetAction(PdfAction acti
169265
return (iText.Kernel.Pdf.Annot.PdfLinkAnnotation)Put(PdfName.A, action.GetPdfObject());
170266
}
171267

268+
/// <summary>
269+
/// Removes a
270+
/// <see cref="iText.Kernel.Pdf.Action.PdfAction"/>
271+
/// from this annotation.
272+
/// </summary>
273+
/// <returns>
274+
/// this
275+
/// <see cref="PdfLinkAnnotation"/>
276+
/// instance
277+
/// </returns>
172278
public virtual iText.Kernel.Pdf.Annot.PdfLinkAnnotation RemoveAction() {
173279
GetPdfObject().Remove(PdfName.A);
174280
return this;
175281
}
176282

283+
/// <summary>Gets the annotation highlight mode.</summary>
284+
/// <remarks>
285+
/// Gets the annotation highlight mode.
286+
/// <para />
287+
/// The annotation’s highlighting mode is the visual effect that shall be used when the mouse
288+
/// button is pressed or held down inside its active area. See also ISO-320001, Table 173.
289+
/// </remarks>
290+
/// <returns>the name of visual effect</returns>
177291
public virtual PdfName GetHighlightMode() {
178292
return GetPdfObject().GetAsName(PdfName.H);
179293
}
180294

295+
/// <summary>Sets the annotation highlight mode.</summary>
296+
/// <remarks>
297+
/// Sets the annotation highlight mode.
298+
/// <para />
299+
/// The annotation’s highlighting mode is the visual effect that shall be used when the mouse
300+
/// button is pressed or held down inside its active area. See also ISO-320001, Table 173.
301+
/// </remarks>
302+
/// <param name="hlMode">the name of visual effect to be set</param>
303+
/// <returns>
304+
/// this
305+
/// <see cref="PdfLinkAnnotation"/>
306+
/// instance
307+
/// </returns>
181308
public virtual iText.Kernel.Pdf.Annot.PdfLinkAnnotation SetHighlightMode(PdfName hlMode) {
182309
return (iText.Kernel.Pdf.Annot.PdfLinkAnnotation)Put(PdfName.H, hlMode);
183310
}
184311

312+
/// <summary>
313+
/// Gets the annotation URI action as
314+
/// <see cref="iText.Kernel.Pdf.PdfDictionary"/>.
315+
/// </summary>
316+
/// <remarks>
317+
/// Gets the annotation URI action as
318+
/// <see cref="iText.Kernel.Pdf.PdfDictionary"/>.
319+
/// <para />
320+
/// When Web Capture (see ISO-320001 14.10, “Web Capture”) changes an annotation from a URI to a
321+
/// go-to action, it uses this entry to save the data from the original URI action so that it can
322+
/// be changed back in case the target page for the go-to action is subsequently deleted. See also
323+
/// ISO-320001, Table 173.
324+
/// </remarks>
325+
/// <returns>the URI action as pdfDictionary</returns>
185326
public virtual PdfDictionary GetUriActionObject() {
186327
return GetPdfObject().GetAsDictionary(PdfName.PA);
187328
}
188329

330+
/// <summary>
331+
/// Sets the annotation URI action as
332+
/// <see cref="iText.Kernel.Pdf.PdfDictionary"/>
333+
/// instance.
334+
/// </summary>
335+
/// <remarks>
336+
/// Sets the annotation URI action as
337+
/// <see cref="iText.Kernel.Pdf.PdfDictionary"/>
338+
/// instance.
339+
/// <para />
340+
/// When Web Capture (see ISO-320001 14.10, “Web Capture”) changes an annotation from a URI to a
341+
/// go-to action, it uses this entry to save the data from the original URI action so that it can
342+
/// be changed back in case the target page for the go-to action is subsequently deleted. See also
343+
/// ISO-320001, Table 173.
344+
/// </remarks>
345+
/// <param name="action">the action to be set</param>
346+
/// <returns>
347+
/// this
348+
/// <see cref="PdfLinkAnnotation"/>
349+
/// instance
350+
/// </returns>
189351
public virtual iText.Kernel.Pdf.Annot.PdfLinkAnnotation SetUriAction(PdfDictionary action) {
190352
return (iText.Kernel.Pdf.Annot.PdfLinkAnnotation)Put(PdfName.PA, action);
191353
}
192354

355+
/// <summary>
356+
/// Sets the annotation URI action as
357+
/// <see cref="iText.Kernel.Pdf.Action.PdfAction"/>
358+
/// instance.
359+
/// </summary>
360+
/// <remarks>
361+
/// Sets the annotation URI action as
362+
/// <see cref="iText.Kernel.Pdf.Action.PdfAction"/>
363+
/// instance.
364+
/// <para />
365+
/// A URI action (see ISO-320001 12.6.4.7, “URI Actions”) formerly associated with this annotation.
366+
/// When Web Capture (see ISO-320001 14.10, “Web Capture”) changes an annotation from a URI to a
367+
/// go-to action, it uses this entry to save the data from the original URI action so that it can
368+
/// be changed back in case the target page for the go-to action is subsequently deleted. See also
369+
/// ISO-320001, Table 173.
370+
/// </remarks>
371+
/// <param name="action">the action to be set</param>
372+
/// <returns>
373+
/// this
374+
/// <see cref="PdfLinkAnnotation"/>
375+
/// instance
376+
/// </returns>
193377
public virtual iText.Kernel.Pdf.Annot.PdfLinkAnnotation SetUriAction(PdfAction action) {
194378
return (iText.Kernel.Pdf.Annot.PdfLinkAnnotation)Put(PdfName.PA, action.GetPdfObject());
195379
}

itext/itext.kernel/itext/kernel/pdf/layer/PdfLayer.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,16 @@ protected internal override bool IsWrappedObjectMustBeIndirect() {
463463
return true;
464464
}
465465

466+
/// <summary>
467+
/// Gets the
468+
/// <see cref="iText.Kernel.Pdf.PdfDocument"/>
469+
/// that owns that layer.
470+
/// </summary>
471+
/// <returns>
472+
/// the
473+
/// <see cref="iText.Kernel.Pdf.PdfDocument"/>
474+
/// that owns that layer
475+
/// </returns>
466476
protected internal virtual PdfDocument GetDocument() {
467477
return GetPdfObject().GetIndirectReference().GetDocument();
468478
}

itext/itext.kernel/itext/kernel/pdf/layer/PdfLayerMembership.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,16 @@ protected internal override bool IsWrappedObjectMustBeIndirect() {
190190
return true;
191191
}
192192

193+
/// <summary>
194+
/// Gets the
195+
/// <see cref="iText.Kernel.Pdf.PdfDocument"/>
196+
/// that owns that layer membership.
197+
/// </summary>
198+
/// <returns>
199+
/// the
200+
/// <see cref="iText.Kernel.Pdf.PdfDocument"/>
201+
/// that owns that layer membership
202+
/// </returns>
193203
protected internal virtual PdfDocument GetDocument() {
194204
return GetPdfObject().GetIndirectReference().GetDocument();
195205
}

itext/itext.kernel/itext/kernel/pdf/layer/PdfOCProperties.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,16 @@ protected internal virtual void RegisterLayer(PdfLayer layer) {
246246
layers.Add(layer);
247247
}
248248

249+
/// <summary>
250+
/// Gets the
251+
/// <see cref="iText.Kernel.Pdf.PdfDocument"/>
252+
/// that owns that OCProperties.
253+
/// </summary>
254+
/// <returns>
255+
/// the
256+
/// <see cref="iText.Kernel.Pdf.PdfDocument"/>
257+
/// that owns that OCProperties
258+
/// </returns>
249259
protected internal virtual PdfDocument GetDocument() {
250260
return GetPdfObject().GetIndirectReference().GetDocument();
251261
}

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5fd7c7626e766ecec022cd1fc01023eb0fb774cc
1+
3e2ca980573e08f7ada522968c813c21485c5745

0 commit comments

Comments
 (0)