Subversion Repository Public Repository

litesoft

Diff Revisions 949 vs 950 for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/datatables/StringFormatter.java

Diff revisions: vs.
  @@ -1,36 +1,36 @@
1 - // This Source Code is in the Public Domain per: http://unlicense.org
2 - package org.litesoft.GWT.client.widgets.datatables;
3 -
4 - /**
5 - * Defines methods for converting model values to displayable Strings and vice versa.
6 - *
7 - * @see <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSFormatter_Class/Reference/Reference.html">AppKit NSFormatter</a>
8 - */
9 - public interface StringFormatter {
10 - /*
11 - * TODO: add getAttributedString() or getRenderingHints() to enable, for
12 - * example, negative values to be rendered in red?
13 - */
14 -
15 - /**
16 - * Get the String value to be displayed in a view cell. Strings typically
17 - * <em>cannot</em> contain html markup.
18 - *
19 - * @param modelElement the model element being displayed
20 - *
21 - * @return the String representation of <code>modelElement</code>
22 - */
23 - String getString( Object modelElement );
24 -
25 - /**
26 - * Get the String value to be displayed in the cell editor. E.g. a financial
27 - * application may add a currency symbol for viewing, but the cell editor
28 - * uses numeric values only.
29 - *
30 - * @param modelElement
31 - *
32 - * @return a String, or <code>null</code> to use the
33 - * {@link #getString(Object)} value
34 - */
35 - String getEditingString( Object modelElement );
36 - }
1 + // This Source Code is in the Public Domain per: http://unlicense.org
2 + package org.litesoft.GWT.client.widgets.datatables;
3 +
4 + /**
5 + * Defines methods for converting model values to displayable Strings and vice versa.
6 + *
7 + * @see <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSFormatter_Class/Reference/Reference.html">AppKit NSFormatter</a>
8 + */
9 + public interface StringFormatter {
10 + /*
11 + * TODO: add getAttributedString() or getRenderingHints() to enable, for
12 + * example, negative values to be rendered in red?
13 + */
14 +
15 + /**
16 + * Get the String value to be displayed in a view cell. Strings typically
17 + * <em>cannot</em> contain html markup.
18 + *
19 + * @param modelElement the model element being displayed
20 + *
21 + * @return the String representation of <code>modelElement</code>
22 + */
23 + String getString( Object modelElement );
24 +
25 + /**
26 + * Get the String value to be displayed in the cell editor. E.g. a financial
27 + * application may add a currency symbol for viewing, but the cell editor
28 + * uses numeric values only.
29 + *
30 + * @param modelElement
31 + *
32 + * @return a String, or <code>null</code> to use the
33 + * {@link #getString(Object)} value
34 + */
35 + String getEditingString( Object modelElement );
36 + }