|
@@ -19,20 +19,16 @@ |
19 |
19 |
|
* A {@link ColumnProperty} that describes whether or not the contents of the |
20 |
20 |
|
* column can be truncated. |
21 |
21 |
|
*/ |
22 |
|
- |
public class TruncationProperty extends ColumnProperty |
23 |
|
- |
{ |
|
22 |
+ |
public class TruncationProperty extends ColumnProperty { |
24 |
23 |
|
/** |
25 |
24 |
|
* Property type. |
26 |
25 |
|
*/ |
27 |
|
- |
public static final Type<TruncationProperty> TYPE = new Type<TruncationProperty>() |
28 |
|
- |
{ |
|
26 |
+ |
public static final Type<TruncationProperty> TYPE = new Type<TruncationProperty>() { |
29 |
27 |
|
private TruncationProperty instance; |
30 |
28 |
|
|
31 |
29 |
|
@Override |
32 |
|
- |
public TruncationProperty getDefault() |
33 |
|
- |
{ |
34 |
|
- |
if ( instance == null ) |
35 |
|
- |
{ |
|
30 |
+ |
public TruncationProperty getDefault() { |
|
31 |
+ |
if ( instance == null ) { |
36 |
32 |
|
instance = new TruncationProperty( true ); |
37 |
33 |
|
} |
38 |
34 |
|
return instance; |
|
@@ -46,8 +42,7 @@ |
46 |
42 |
|
/** |
47 |
43 |
|
* Construct a new {@link TruncationProperty}. |
48 |
44 |
|
*/ |
49 |
|
- |
public TruncationProperty() |
50 |
|
- |
{ |
|
45 |
+ |
public TruncationProperty() { |
51 |
46 |
|
this( true ); |
52 |
47 |
|
} |
53 |
48 |
|
|
|
@@ -56,8 +51,7 @@ |
56 |
51 |
|
* |
57 |
52 |
|
* @param isTruncatable true if the column is truncatable, false if not |
58 |
53 |
|
*/ |
59 |
|
- |
public TruncationProperty( boolean isTruncatable ) |
60 |
|
- |
{ |
|
54 |
+ |
public TruncationProperty( boolean isTruncatable ) { |
61 |
55 |
|
this.isTruncatable = isTruncatable; |
62 |
56 |
|
this.isHeaderTruncatable = true; |
63 |
57 |
|
this.isFooterTruncatable = true; |
|
@@ -66,24 +60,21 @@ |
66 |
60 |
|
/** |
67 |
61 |
|
* @return true (default) if the column is truncatable |
68 |
62 |
|
*/ |
69 |
|
- |
public boolean isColumnTruncatable() |
70 |
|
- |
{ |
|
63 |
+ |
public boolean isColumnTruncatable() { |
71 |
64 |
|
return isTruncatable; |
72 |
65 |
|
} |
73 |
66 |
|
|
74 |
67 |
|
/** |
75 |
68 |
|
* @return true (default) if column in the footer is truncatable |
76 |
69 |
|
*/ |
77 |
|
- |
public boolean isFooterTruncatable() |
78 |
|
- |
{ |
|
70 |
+ |
public boolean isFooterTruncatable() { |
79 |
71 |
|
return isFooterTruncatable; |
80 |
72 |
|
} |
81 |
73 |
|
|
82 |
74 |
|
/** |
83 |
75 |
|
* @return true (default) if column in the header is truncatable |
84 |
76 |
|
*/ |
85 |
|
- |
public boolean isHeaderTruncatable() |
86 |
|
- |
{ |
|
77 |
+ |
public boolean isHeaderTruncatable() { |
87 |
78 |
|
return isHeaderTruncatable; |
88 |
79 |
|
} |
89 |
80 |
|
|
|
@@ -92,8 +83,7 @@ |
92 |
83 |
|
* |
93 |
84 |
|
* @param isTruncatable true to make truncatable |
94 |
85 |
|
*/ |
95 |
|
- |
public void setColumnTruncatable( boolean isTruncatable ) |
96 |
|
- |
{ |
|
86 |
+ |
public void setColumnTruncatable( boolean isTruncatable ) { |
97 |
87 |
|
this.isTruncatable = isTruncatable; |
98 |
88 |
|
} |
99 |
89 |
|
|
|
@@ -102,8 +92,7 @@ |
102 |
92 |
|
* |
103 |
93 |
|
* @param isTruncatable true to make truncatable |
104 |
94 |
|
*/ |
105 |
|
- |
public void setFooterTruncatable( boolean isTruncatable ) |
106 |
|
- |
{ |
|
95 |
+ |
public void setFooterTruncatable( boolean isTruncatable ) { |
107 |
96 |
|
this.isFooterTruncatable = isTruncatable; |
108 |
97 |
|
} |
109 |
98 |
|
|
|
@@ -112,8 +101,7 @@ |
112 |
101 |
|
* |
113 |
102 |
|
* @param isTruncatable true to make truncatable |
114 |
103 |
|
*/ |
115 |
|
- |
public void setHeaderTruncatable( boolean isTruncatable ) |
116 |
|
- |
{ |
|
104 |
+ |
public void setHeaderTruncatable( boolean isTruncatable ) { |
117 |
105 |
|
this.isHeaderTruncatable = isTruncatable; |
118 |
106 |
|
} |
119 |
107 |
|
} |