litesoft
Diff Revisions
949
vs
950
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/datatables/StringFormatterDefault.java
|
@@ -1,26 +1,26 @@ |
1 |
|
- |
// This Source Code is in the Public Domain per: http://unlicense.org |
2 |
|
- |
package org.litesoft.GWT.client.widgets.datatables; |
3 |
|
- |
|
4 |
|
- |
public class StringFormatterDefault implements StringFormatter { |
5 |
|
- |
public static final StringFormatter INSTANCE = new StringFormatterDefault(); |
6 |
|
- |
|
7 |
|
- |
/** |
8 |
|
- |
* The default implementation invokes {@link #getString(Object)}. |
9 |
|
- |
* |
10 |
|
- |
* @return <code>{@link #getString(Object)}</code> |
11 |
|
- |
*/ |
12 |
|
- |
@Override |
13 |
|
- |
public String getEditingString( Object modelElement ) { |
14 |
|
- |
return getString( modelElement ); |
15 |
|
- |
} |
16 |
|
- |
|
17 |
|
- |
/** |
18 |
|
- |
* @return <code>{@link Object#toString() modelElement.toString()}</code>, |
19 |
|
- |
* or <code>""</code> if <code>modelElement</code> is |
20 |
|
- |
* <code>null</code> |
21 |
|
- |
*/ |
22 |
|
- |
@Override |
23 |
|
- |
public String getString( Object modelElement ) { |
24 |
|
- |
return modelElement != null ? modelElement.toString() : ""; |
25 |
|
- |
} |
26 |
|
- |
} |
|
1 |
+ |
// This Source Code is in the Public Domain per: http://unlicense.org |
|
2 |
+ |
package org.litesoft.GWT.client.widgets.datatables; |
|
3 |
+ |
|
|
4 |
+ |
public class StringFormatterDefault implements StringFormatter { |
|
5 |
+ |
public static final StringFormatter INSTANCE = new StringFormatterDefault(); |
|
6 |
+ |
|
|
7 |
+ |
/** |
|
8 |
+ |
* The default implementation invokes {@link #getString(Object)}. |
|
9 |
+ |
* |
|
10 |
+ |
* @return <code>{@link #getString(Object)}</code> |
|
11 |
+ |
*/ |
|
12 |
+ |
@Override |
|
13 |
+ |
public String getEditingString( Object modelElement ) { |
|
14 |
+ |
return getString( modelElement ); |
|
15 |
+ |
} |
|
16 |
+ |
|
|
17 |
+ |
/** |
|
18 |
+ |
* @return <code>{@link Object#toString() modelElement.toString()}</code>, |
|
19 |
+ |
* or <code>""</code> if <code>modelElement</code> is |
|
20 |
+ |
* <code>null</code> |
|
21 |
+ |
*/ |
|
22 |
+ |
@Override |
|
23 |
+ |
public String getString( Object modelElement ) { |
|
24 |
+ |
return modelElement != null ? modelElement.toString() : ""; |
|
25 |
+ |
} |
|
26 |
+ |
} |