Subversion Repository Public Repository

litesoft

Diff Revisions 949 vs 950 for /trunk/Java/GWT/OldClient/src/org/litesoft/GWT/forms/client/components/factories/others/SingleLayoutWidgetFactory.java

Diff revisions: vs.
  @@ -1,51 +1,51 @@
1 - // This Source Code is in the Public Domain per: http://unlicense.org
2 - package org.litesoft.GWT.forms.client.components.factories.others;
3 -
4 - import org.litesoft.GWT.forms.client.components.*;
5 - import org.litesoft.GWT.forms.client.components.nonpublic.*;
6 - import org.litesoft.GWT.forms.client.nonpublic.*;
7 - import org.litesoft.ui.def.*;
8 - import org.litesoft.ui.def.nonpublic.*;
9 - import org.litesoft.ui.def.nonpublic.support.*;
10 -
11 - import com.google.gwt.user.client.ui.*;
12 -
13 - import java.io.*;
14 -
15 - public class SingleLayoutWidgetFactory extends AbstractSingleLayoutWidgetFactory {
16 - public Widget createContainerWidget( FormInstanceComponentHandler pComponentHandler,
17 - UiDef pUiDef, FormMetaData pFormMetaData,
18 - DefWidgetStruct[] pChildDefWidgets ) {
19 - Widget widget = super.createContainerWidget( pComponentHandler, pUiDef,
20 - pFormMetaData, pChildDefWidgets );
21 - UiSingleLayoutDef zDef = (UiSingleLayoutDef) pUiDef;
22 - AttributeMetaData zMD = pFormMetaData.getAttribute( zDef );
23 - if ( zMD != null ) {
24 - new MyFormAdapter( pComponentHandler, zMD, new WidgetHidingFormComponent( widget ) ).init();
25 - }
26 - return widget;
27 - }
28 -
29 - private static final class MyFormAdapter extends AbstractFormAttributeAdapter {
30 - public MyFormAdapter( FormInstanceComponentHandler pComponentHandler, //
31 - AttributeMetaData pMD, IFormComponent pComponent ) {
32 - super( pComponentHandler, pMD, pComponent );
33 - }
34 -
35 - protected Widget initWidget() {
36 - return null;
37 - }
38 -
39 - protected Object convertSendableToComponentValue( Serializable pValue ) {
40 - return pValue;
41 - }
42 -
43 - protected String convertComponentValueToString( Object pValue ) {
44 - return null;
45 - }
46 -
47 - protected Object convertStringToComponentValue( String pValue ) {
48 - return null;
49 - }
50 - }
51 - }
1 + // This Source Code is in the Public Domain per: http://unlicense.org
2 + package org.litesoft.GWT.forms.client.components.factories.others;
3 +
4 + import org.litesoft.GWT.forms.client.components.*;
5 + import org.litesoft.GWT.forms.client.components.nonpublic.*;
6 + import org.litesoft.GWT.forms.client.nonpublic.*;
7 + import org.litesoft.ui.def.*;
8 + import org.litesoft.ui.def.nonpublic.*;
9 + import org.litesoft.ui.def.nonpublic.support.*;
10 +
11 + import com.google.gwt.user.client.ui.*;
12 +
13 + import java.io.*;
14 +
15 + public class SingleLayoutWidgetFactory extends AbstractSingleLayoutWidgetFactory {
16 + public Widget createContainerWidget( FormInstanceComponentHandler pComponentHandler,
17 + UiDef pUiDef, FormMetaData pFormMetaData,
18 + DefWidgetStruct[] pChildDefWidgets ) {
19 + Widget widget = super.createContainerWidget( pComponentHandler, pUiDef,
20 + pFormMetaData, pChildDefWidgets );
21 + UiSingleLayoutDef zDef = (UiSingleLayoutDef) pUiDef;
22 + AttributeMetaData zMD = pFormMetaData.getAttribute( zDef );
23 + if ( zMD != null ) {
24 + new MyFormAdapter( pComponentHandler, zMD, new WidgetHidingFormComponent( widget ) ).init();
25 + }
26 + return widget;
27 + }
28 +
29 + private static final class MyFormAdapter extends AbstractFormAttributeAdapter {
30 + public MyFormAdapter( FormInstanceComponentHandler pComponentHandler, //
31 + AttributeMetaData pMD, IFormComponent pComponent ) {
32 + super( pComponentHandler, pMD, pComponent );
33 + }
34 +
35 + protected Widget initWidget() {
36 + return null;
37 + }
38 +
39 + protected Object convertSendableToComponentValue( Serializable pValue ) {
40 + return pValue;
41 + }
42 +
43 + protected String convertComponentValueToString( Object pValue ) {
44 + return null;
45 + }
46 +
47 + protected Object convertStringToComponentValue( String pValue ) {
48 + return null;
49 + }
50 + }
51 + }