@@ -50,6 +50,14 @@ This file is part of the iText (R) project.
50
50
import com .itextpdf .layout .border .Border ;
51
51
import com .itextpdf .layout .hyphenation .HyphenationConfig ;
52
52
import com .itextpdf .layout .layout .LayoutPosition ;
53
+ import com .itextpdf .layout .property .Background ;
54
+ import com .itextpdf .layout .property .BaseDirection ;
55
+ import com .itextpdf .layout .property .FontKerning ;
56
+ import com .itextpdf .layout .property .HorizontalAlignment ;
57
+ import com .itextpdf .layout .property .Property ;
58
+ import com .itextpdf .layout .property .TextAlignment ;
59
+ import com .itextpdf .layout .property .Underline ;
60
+ import com .itextpdf .layout .property .UnitValue ;
53
61
import com .itextpdf .layout .splitting .ISplitCharacters ;
54
62
55
63
import java .util .Arrays ;
@@ -123,9 +131,9 @@ public <T> T getDefaultProperty(Property property) {
123
131
* Gets the width property of the Element.
124
132
*
125
133
* @return the width of the element, with a value and a measurement unit.
126
- * @see Property. UnitValue
134
+ * @see UnitValue
127
135
*/
128
- public Property . UnitValue getWidth () {
136
+ public UnitValue getWidth () {
129
137
return getProperty (Property .WIDTH );
130
138
}
131
139
@@ -136,7 +144,7 @@ public Property.UnitValue getWidth() {
136
144
* @return this Element.
137
145
*/
138
146
public Type setWidth (float width ) {
139
- return setProperty (Property .WIDTH , Property . UnitValue .createPointValue (width ));
147
+ return setProperty (Property .WIDTH , UnitValue .createPointValue (width ));
140
148
}
141
149
142
150
/**
@@ -146,16 +154,16 @@ public Type setWidth(float width) {
146
154
* @return this Element.
147
155
*/
148
156
public Type setWidthPercent (float widthPercent ) {
149
- return setProperty (Property .WIDTH , Property . UnitValue .createPercentValue (widthPercent ));
157
+ return setProperty (Property .WIDTH , UnitValue .createPercentValue (widthPercent ));
150
158
}
151
159
152
160
/**
153
- * Sets the width property of the Element with a {@link com.itextpdf.layout.Property. UnitValue}.
161
+ * Sets the width property of the Element with a {@link UnitValue}.
154
162
*
155
- * @param width a {@link com.itextpdf.layout.Property. UnitValue} object
163
+ * @param width a {@link UnitValue} object
156
164
* @return this Element.
157
165
*/
158
- public Type setWidth (Property . UnitValue width ) {
166
+ public Type setWidth (UnitValue width ) {
159
167
return setProperty (Property .WIDTH , width );
160
168
}
161
169
@@ -214,7 +222,7 @@ public Type setRelativePosition(float left, float top, float right, float bottom
214
222
* @return this Element.
215
223
*/
216
224
public Type setFixedPosition (float x , float y , float width ) {
217
- return setFixedPosition (x , y , Property . UnitValue .createPointValue (width ));
225
+ return setFixedPosition (x , y , UnitValue .createPointValue (width ));
218
226
}
219
227
220
228
/**
@@ -224,10 +232,10 @@ public Type setFixedPosition(float x, float y, float width) {
224
232
*
225
233
* @param x horizontal position on the page
226
234
* @param y vertical position on the page
227
- * @param width a {@link com.itextpdf.layout.Property. UnitValue}
235
+ * @param width a {@link UnitValue}
228
236
* @return this Element.
229
237
*/
230
- public Type setFixedPosition (float x , float y , Property . UnitValue width ) {
238
+ public Type setFixedPosition (float x , float y , UnitValue width ) {
231
239
return (Type ) setProperty (Property .POSITION , LayoutPosition .FIXED ).
232
240
setProperty (Property .X , x ).
233
241
setProperty (Property .Y , y ).
@@ -261,7 +269,7 @@ public Type setFixedPosition(int pageNumber, float x, float y, float width) {
261
269
* @param width a floating point value measured in points.
262
270
* @return this Element.
263
271
*/
264
- public Type setFixedPosition (int pageNumber , float x , float y , Property . UnitValue width ) {
272
+ public Type setFixedPosition (int pageNumber , float x , float y , UnitValue width ) {
265
273
return (Type ) setFixedPosition (x , y , width ).
266
274
setProperty (Property .PAGE_NUMBER , pageNumber );
267
275
}
@@ -275,10 +283,10 @@ public Type setFixedPosition(int pageNumber, float x, float y, Property.UnitValu
275
283
/**
276
284
* Sets the horizontal alignment of this Element.
277
285
*
278
- * @param horizontalAlignment an enum value of type {@link com.itextpdf.layout.Property. HorizontalAlignment}
286
+ * @param horizontalAlignment an enum value of type {@link HorizontalAlignment}
279
287
* @return this Element.
280
288
*/
281
- public Type setHorizontalAlignment (Property . HorizontalAlignment horizontalAlignment ) {
289
+ public Type setHorizontalAlignment (HorizontalAlignment horizontalAlignment ) {
282
290
return setProperty (Property .HORIZONTAL_ALIGNMENT , horizontalAlignment );
283
291
}
284
292
@@ -315,10 +323,10 @@ public Type setFontSize(float fontSize) {
315
323
/**
316
324
* Sets the font size of this Element.
317
325
*
318
- * @param alignment an enum value of type {@link com.itextpdf.layout.Property. TextAlignment}
326
+ * @param alignment an enum value of type {@link TextAlignment}
319
327
* @return this Element.
320
328
*/
321
- public Type setTextAlignment (Property . TextAlignment alignment ) {
329
+ public Type setTextAlignment (TextAlignment alignment ) {
322
330
return setProperty (Property .TEXT_ALIGNMENT , alignment );
323
331
}
324
332
@@ -352,7 +360,7 @@ public Type setWordSpacing(float wordSpacing) {
352
360
* @param fontKerning an enum value as a boolean wrapper specifying whether or not to apply kerning
353
361
* @return this Element.
354
362
*/
355
- public Type setFontKerning (Property . FontKerning fontKerning ) {
363
+ public Type setFontKerning (FontKerning fontKerning ) {
356
364
return setProperty (Property .FONT_KERNING , fontKerning );
357
365
}
358
366
@@ -378,7 +386,7 @@ public Type setBackgroundColor(Color backgroundColor) {
378
386
* @return this Element.
379
387
*/
380
388
public Type setBackgroundColor (Color backgroundColor , float extraLeft , float extraTop , float extraRight , float extraBottom ) {
381
- return setProperty (Property .BACKGROUND , new Property . Background (backgroundColor , extraLeft , extraTop , extraRight , extraBottom ));
389
+ return setProperty (Property .BACKGROUND , new Background (backgroundColor , extraLeft , extraTop , extraRight , extraBottom ));
382
390
}
383
391
384
392
/**
@@ -590,12 +598,12 @@ public Type setUnderline(float thickness, float yPosition) {
590
598
* @return this element
591
599
*/
592
600
public Type setUnderline (Color color , float thickness , float thicknessMul , float yPosition , float yPositionMul , int lineCapStyle ) {
593
- Property . Underline newUnderline = new Property . Underline (color , thickness , thicknessMul , yPosition , yPositionMul , lineCapStyle );
601
+ Underline newUnderline = new Underline (color , thickness , thicknessMul , yPosition , yPositionMul , lineCapStyle );
594
602
Object currentProperty = getProperty (Property .UNDERLINE );
595
603
if (currentProperty instanceof List ) {
596
604
((List ) currentProperty ).add (newUnderline );
597
- } else if (currentProperty instanceof Property . Underline ) {
598
- setProperty (Property .UNDERLINE , Arrays .asList ((Property . Underline )currentProperty , newUnderline ));
605
+ } else if (currentProperty instanceof Underline ) {
606
+ setProperty (Property .UNDERLINE , Arrays .asList ((Underline )currentProperty , newUnderline ));
599
607
} else {
600
608
setProperty (Property .UNDERLINE , newUnderline );
601
609
}
@@ -609,7 +617,7 @@ public Type setUnderline(Color color, float thickness, float thicknessMul, float
609
617
* @param baseDirection base direction
610
618
* @return this element
611
619
*/
612
- public Type setBaseDirection (Property . BaseDirection baseDirection ) {
620
+ public Type setBaseDirection (BaseDirection baseDirection ) {
613
621
return setProperty (Property .BASE_DIRECTION , baseDirection );
614
622
}
615
623
0 commit comments