org.eaglei.datatools.client.ui
Class FormUtils

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.ComplexPanel
                  extended by com.google.gwt.user.client.ui.CellPanel
                      extended by com.google.gwt.user.client.ui.VerticalPanel
                          extended by org.eaglei.datatools.client.ui.FormUtils
All Implemented Interfaces:
com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasAlignment, com.google.gwt.user.client.ui.HasHorizontalAlignment, com.google.gwt.user.client.ui.HasVerticalAlignment, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.IndexedPanel, com.google.gwt.user.client.ui.InsertPanel, java.lang.Iterable<com.google.gwt.user.client.ui.Widget>

public class FormUtils
extends com.google.gwt.user.client.ui.VerticalPanel

This is a utility class for creating form and form fields

Author:
pp101

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment
com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasVerticalAlignment
com.google.gwt.user.client.ui.HasVerticalAlignment.VerticalAlignmentConstant
 
Field Summary
static org.eaglei.suggest.client.SharedClassChooser<OntologyDropdown> classChooser
           
static java.util.List<com.google.gwt.user.client.ui.TextBox> dataList
           
static java.util.List<com.google.gwt.user.client.ui.TextBox> dataListDialog
           
static java.lang.String dialogFormName
           
static org.eaglei.model.EIURI dialogSubType
           
static java.lang.String formName
           
static boolean isDialog
           
static boolean isEmailValid
           
static boolean isPhoneValid
           
static java.util.Map<org.eaglei.model.EIEntity,java.util.Set<java.lang.String>> nonOntLiteralList
           
static java.util.Map<org.eaglei.model.EIEntity,java.util.Set<org.eaglei.model.EIURI>> nonOntResourceList
           
static java.util.List<com.google.gwt.user.client.ui.ListBox> objList
           
static java.util.List<com.google.gwt.user.client.ui.ListBox> objListDialog
           
static org.eaglei.model.EIURI subType
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Fields inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment
ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT
 
Fields inherited from interface com.google.gwt.user.client.ui.HasVerticalAlignment
ALIGN_BOTTOM, ALIGN_MIDDLE, ALIGN_TOP
 
Constructor Summary
FormUtils()
           
 
Method Summary
static com.google.gwt.user.client.ui.VerticalPanel createLabelforView(org.eaglei.model.EIEntity entity, java.util.Set<java.lang.String> values, java.lang.String propertyLabel, boolean isPresent)
           
static com.google.gwt.user.client.ui.HorizontalPanel createRadioButon(org.eaglei.model.EIEntity entity, java.lang.String value)
          Creates a RadioButton
static com.google.gwt.user.client.ui.HorizontalPanel createTermWidget(org.eaglei.model.EIClass range, org.eaglei.model.EIClass selectedClass, org.eaglei.model.EIEntity propertyEntity, java.lang.String label)
          Creates a Term widget that displays the subclasses in a hierarchical form in a drop down list
static com.google.gwt.user.client.ui.VerticalPanel createTextField(org.eaglei.model.EIEntity entity, java.util.Set<java.lang.String> values, java.lang.String propertyLabel, boolean isPresent)
          Creates a Text field from the given entity value is passed when the formType is 'edit'
static com.google.gwt.user.client.ui.VerticalPanel displayDefaultFields(org.eaglei.model.EIClass eClass, java.lang.String nameValue, java.lang.String eagleIURI, org.eaglei.model.EIURI subTypeUri, boolean isTypeView)
          Every form will have ' ' & 'Sub-Type' fields even though they are not defined in the ontology When the user selects an item from the Sub-type drop down, the properties displayed on the form will change depending upon the class of the selected item
static com.google.gwt.user.client.ui.VerticalPanel displayFormFields(org.eaglei.model.EIClass eClass, org.eaglei.model.EIInstance instance, boolean isTypeView)
          Gets the class properties and displays appropriate UI field based on the property type
static com.google.gwt.user.client.ui.DisclosurePanel displayNonOntologyProperties(org.eaglei.model.EIInstance instance)
          Displays the properties that are removed from the new Ontology but still have some values associated
static com.google.gwt.user.client.ui.VerticalPanel handleObjectProperty(java.util.List<org.eaglei.model.EIClass> rangeList, org.eaglei.model.EIEntity propertyEntity, java.util.Set<org.eaglei.model.EIURI> propertyValues)
          This method deals with an Object type property.
static boolean isFormValid()
           
 
Methods inherited from class com.google.gwt.user.client.ui.VerticalPanel
add, getHorizontalAlignment, getVerticalAlignment, insert, onEnsureDebugId, remove, setHorizontalAlignment, setVerticalAlignment
 
Methods inherited from class com.google.gwt.user.client.ui.CellPanel
getBody, getSpacing, getTable, setBorderWidth, setCellHeight, setCellHorizontalAlignment, setCellHorizontalAlignment, setCellVerticalAlignment, setCellVerticalAlignment, setCellWidth, setSpacing
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, insert, insert, iterator, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, onLoad, onUnload, orphan
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addDomHandler, addHandler, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
 

Field Detail

formName

public static java.lang.String formName

subType

public static org.eaglei.model.EIURI subType

dialogFormName

public static java.lang.String dialogFormName

dialogSubType

public static org.eaglei.model.EIURI dialogSubType

isDialog

public static boolean isDialog

classChooser

public static org.eaglei.suggest.client.SharedClassChooser<OntologyDropdown> classChooser

dataList

public static java.util.List<com.google.gwt.user.client.ui.TextBox> dataList

objList

public static java.util.List<com.google.gwt.user.client.ui.ListBox> objList

nonOntLiteralList

public static java.util.Map<org.eaglei.model.EIEntity,java.util.Set<java.lang.String>> nonOntLiteralList

nonOntResourceList

public static java.util.Map<org.eaglei.model.EIEntity,java.util.Set<org.eaglei.model.EIURI>> nonOntResourceList

dataListDialog

public static java.util.List<com.google.gwt.user.client.ui.TextBox> dataListDialog

objListDialog

public static java.util.List<com.google.gwt.user.client.ui.ListBox> objListDialog

isPhoneValid

public static boolean isPhoneValid

isEmailValid

public static boolean isEmailValid
Constructor Detail

FormUtils

public FormUtils()
Method Detail

createTextField

public static com.google.gwt.user.client.ui.VerticalPanel createTextField(org.eaglei.model.EIEntity entity,
                                                                          java.util.Set<java.lang.String> values,
                                                                          java.lang.String propertyLabel,
                                                                          boolean isPresent)
Creates a Text field from the given entity value is passed when the formType is 'edit'

Parameters:
entity -
value -

createLabelforView

public static com.google.gwt.user.client.ui.VerticalPanel createLabelforView(org.eaglei.model.EIEntity entity,
                                                                             java.util.Set<java.lang.String> values,
                                                                             java.lang.String propertyLabel,
                                                                             boolean isPresent)

createRadioButon

public static com.google.gwt.user.client.ui.HorizontalPanel createRadioButon(org.eaglei.model.EIEntity entity,
                                                                             java.lang.String value)
Creates a RadioButton

Parameters:
lbl -
uri -

displayDefaultFields

public static com.google.gwt.user.client.ui.VerticalPanel displayDefaultFields(org.eaglei.model.EIClass eClass,
                                                                               java.lang.String nameValue,
                                                                               java.lang.String eagleIURI,
                                                                               org.eaglei.model.EIURI subTypeUri,
                                                                               boolean isTypeView)
Every form will have ' ' & 'Sub-Type' fields even though they are not defined in the ontology When the user selects an item from the Sub-type drop down, the properties displayed on the form will change depending upon the class of the selected item

Parameters:
EIClass -

handleObjectProperty

public static com.google.gwt.user.client.ui.VerticalPanel handleObjectProperty(java.util.List<org.eaglei.model.EIClass> rangeList,
                                                                               org.eaglei.model.EIEntity propertyEntity,
                                                                               java.util.Set<org.eaglei.model.EIURI> propertyValues)
This method deals with an Object type property. Data in the drop down list is populated based on whether or not the property class is an eagle-i resource

Parameters:
range -
propertyEntity -
propertyValue -
Returns:

displayFormFields

public static com.google.gwt.user.client.ui.VerticalPanel displayFormFields(org.eaglei.model.EIClass eClass,
                                                                            org.eaglei.model.EIInstance instance,
                                                                            boolean isTypeView)
Gets the class properties and displays appropriate UI field based on the property type

Parameters:
eClass -
VerticalPanel - - if this is the main formPanel pass null, if it is a 'create new' term widget panel, pass the panel
Returns:

displayNonOntologyProperties

public static com.google.gwt.user.client.ui.DisclosurePanel displayNonOntologyProperties(org.eaglei.model.EIInstance instance)
Displays the properties that are removed from the new Ontology but still have some values associated

Parameters:
instance -
Returns:

createTermWidget

public static com.google.gwt.user.client.ui.HorizontalPanel createTermWidget(org.eaglei.model.EIClass range,
                                                                             org.eaglei.model.EIClass selectedClass,
                                                                             org.eaglei.model.EIEntity propertyEntity,
                                                                             java.lang.String label)
Creates a Term widget that displays the subclasses in a hierarchical form in a drop down list

Parameters:
rangeURI -
propertyEntity -
Returns:

isFormValid

public static boolean isFormValid()


Copyright © 2009-2010 Eagle-I. All Rights Reserved.