|
@@ -1,67 +1,67 @@ |
1 |
|
- |
// This Source Code is in the Public Domain per: http://unlicense.org |
2 |
|
- |
package org.litesoft.GWT.forms.client.components; |
3 |
|
- |
|
4 |
|
- |
import org.litesoft.GWT.client.*; |
5 |
|
- |
import org.litesoft.core.util.*; |
6 |
|
- |
import org.litesoft.logger.*; |
7 |
|
- |
import org.litesoft.ui.*; |
8 |
|
- |
|
9 |
|
- |
public interface IFormComponent extends SizeManaged, |
10 |
|
- |
Enableable { |
11 |
|
- |
public static final Logger LOGGER = LoggerFactory.getLogger( IFormComponent.class ); |
12 |
|
- |
|
13 |
|
- |
public boolean isVisible(); |
14 |
|
- |
|
15 |
|
- |
public boolean setFocus(); |
16 |
|
- |
|
17 |
|
- |
/** |
18 |
|
- |
* @return the current value of the FormComponent. |
19 |
|
- |
* The actual type will vary, e.g.: String, SimpleKeyValuePair, Boolean, CalendarYMD, ... |
20 |
|
- |
*/ |
21 |
|
- |
public Object getCurrentValue(); |
22 |
|
- |
|
23 |
|
- |
/** |
24 |
|
- |
* @param pNewValue the desired current value for the FormComponent. |
25 |
|
- |
* The actual type MUST match the FormComponent's expected |
26 |
|
- |
* type, e.g.: String, SimpleKeyValuePair, Boolean, CalendarYMD, ... |
27 |
|
- |
*/ |
28 |
|
- |
public void setCurrentValue( Object pNewValue ); |
29 |
|
- |
|
30 |
|
- |
public boolean hasError(); |
31 |
|
- |
|
32 |
|
- |
public void setError( String pError ); |
33 |
|
- |
|
34 |
|
- |
public void setFocused( boolean pFocused ); |
35 |
|
- |
|
36 |
|
- |
public void setValueChanged( boolean pChanged ); |
37 |
|
- |
|
38 |
|
- |
public void publishAnyPendingChanges(); |
39 |
|
- |
|
40 |
|
- |
/** |
41 |
|
- |
* It is the responcibility of the IFormComponent to call the add() method on the passed in Listener! |
42 |
|
- |
*/ |
43 |
|
- |
public IFormComponent addFormComponentListener( Listener pFormComponentListener ); |
44 |
|
- |
|
45 |
|
- |
/** |
46 |
|
- |
* It is the responcibility of the IFormComponent to call the remove() method on the passed in Listener! |
47 |
|
- |
*/ |
48 |
|
- |
public IFormComponent removeFormComponentListener( Listener pFormComponentListener ); |
49 |
|
- |
|
50 |
|
- |
public interface Listener { |
51 |
|
- |
public void add( IFormComponent pComponent ); |
52 |
|
- |
|
53 |
|
- |
public void remove( IFormComponent pComponent ); |
54 |
|
- |
|
55 |
|
- |
public void changeOccurred(); |
56 |
|
- |
|
57 |
|
- |
public void blurOccurred(); |
58 |
|
- |
|
59 |
|
- |
public void focusOccured(); |
60 |
|
- |
|
61 |
|
- |
public void enterPressed( KeyboardKeyModifier pModifiers ); |
62 |
|
- |
|
63 |
|
- |
public interface Factory { |
64 |
|
- |
Listener createListenerFor( String pName, IFormComponent pComponent ); |
65 |
|
- |
} |
66 |
|
- |
} |
67 |
|
- |
} |
|
1 |
+ |
// This Source Code is in the Public Domain per: http://unlicense.org |
|
2 |
+ |
package org.litesoft.GWT.forms.client.components; |
|
3 |
+ |
|
|
4 |
+ |
import org.litesoft.GWT.client.*; |
|
5 |
+ |
import org.litesoft.core.util.*; |
|
6 |
+ |
import org.litesoft.logger.*; |
|
7 |
+ |
import org.litesoft.ui.*; |
|
8 |
+ |
|
|
9 |
+ |
public interface IFormComponent extends SizeManaged, |
|
10 |
+ |
Enableable { |
|
11 |
+ |
public static final Logger LOGGER = LoggerFactory.getLogger( IFormComponent.class ); |
|
12 |
+ |
|
|
13 |
+ |
public boolean isVisible(); |
|
14 |
+ |
|
|
15 |
+ |
public boolean setFocus(); |
|
16 |
+ |
|
|
17 |
+ |
/** |
|
18 |
+ |
* @return the current value of the FormComponent. |
|
19 |
+ |
* The actual type will vary, e.g.: String, SimpleKeyValuePair, Boolean, CalendarYMD, ... |
|
20 |
+ |
*/ |
|
21 |
+ |
public Object getCurrentValue(); |
|
22 |
+ |
|
|
23 |
+ |
/** |
|
24 |
+ |
* @param pNewValue the desired current value for the FormComponent. |
|
25 |
+ |
* The actual type MUST match the FormComponent's expected |
|
26 |
+ |
* type, e.g.: String, SimpleKeyValuePair, Boolean, CalendarYMD, ... |
|
27 |
+ |
*/ |
|
28 |
+ |
public void setCurrentValue( Object pNewValue ); |
|
29 |
+ |
|
|
30 |
+ |
public boolean hasError(); |
|
31 |
+ |
|
|
32 |
+ |
public void setError( String pError ); |
|
33 |
+ |
|
|
34 |
+ |
public void setFocused( boolean pFocused ); |
|
35 |
+ |
|
|
36 |
+ |
public void setValueChanged( boolean pChanged ); |
|
37 |
+ |
|
|
38 |
+ |
public void publishAnyPendingChanges(); |
|
39 |
+ |
|
|
40 |
+ |
/** |
|
41 |
+ |
* It is the responcibility of the IFormComponent to call the add() method on the passed in Listener! |
|
42 |
+ |
*/ |
|
43 |
+ |
public IFormComponent addFormComponentListener( Listener pFormComponentListener ); |
|
44 |
+ |
|
|
45 |
+ |
/** |
|
46 |
+ |
* It is the responcibility of the IFormComponent to call the remove() method on the passed in Listener! |
|
47 |
+ |
*/ |
|
48 |
+ |
public IFormComponent removeFormComponentListener( Listener pFormComponentListener ); |
|
49 |
+ |
|
|
50 |
+ |
public interface Listener { |
|
51 |
+ |
public void add( IFormComponent pComponent ); |
|
52 |
+ |
|
|
53 |
+ |
public void remove( IFormComponent pComponent ); |
|
54 |
+ |
|
|
55 |
+ |
public void changeOccurred(); |
|
56 |
+ |
|
|
57 |
+ |
public void blurOccurred(); |
|
58 |
+ |
|
|
59 |
+ |
public void focusOccured(); |
|
60 |
+ |
|
|
61 |
+ |
public void enterPressed( KeyboardKeyModifier pModifiers ); |
|
62 |
+ |
|
|
63 |
+ |
public interface Factory { |
|
64 |
+ |
Listener createListenerFor( String pName, IFormComponent pComponent ); |
|
65 |
+ |
} |
|
66 |
+ |
} |
|
67 |
+ |
} |