org.eaglei.datatools.client.ui
Class WidgetUtils

java.lang.Object
  extended by org.eaglei.datatools.client.ui.WidgetUtils

public class WidgetUtils
extends java.lang.Object

Collection of static utility methods required for form generation


Nested Class Summary
static interface WidgetUtils.InstanceSaveCallback
           
 
Constructor Summary
WidgetUtils()
           
 
Method Summary
static void addTermWidgetToPanel(org.eaglei.model.EIInstance eiInstance, org.eaglei.model.EIEntity propertyEntity, org.eaglei.model.EIClass range, org.eaglei.model.EIEntity selectedClassEntity, com.google.gwt.user.client.ui.HorizontalPanel tempPanel, boolean showLabel)
           
static void addTermWidgetToPanel(org.eaglei.model.EIInstance eiInstance, org.eaglei.model.EIEntity propertyEntity, org.eaglei.model.EIClass range, java.lang.String selectedClassUri, EditWidgetCollection fields, boolean showLabel)
           
static java.lang.String capitalizeFirst(java.lang.String s)
           
static com.google.gwt.user.client.ui.PopupPanel createDialog(org.eaglei.model.EIInstance parentInstance, org.eaglei.model.EIClass range, org.eaglei.model.EIEntity propertyEntity, org.eaglei.model.EIURI oldValue, int position, WidgetUtils.InstanceSaveCallback innerCallback)
           
static com.google.gwt.user.client.ui.Label createLabel(org.eaglei.model.EIEntity propertyEntity)
           
static com.google.gwt.user.client.ui.Label createLabel(java.lang.String label)
           
static com.google.gwt.user.client.ui.HorizontalPanel createRadioButon(org.eaglei.model.EIInstance instance, org.eaglei.model.EIEntity propertyEntity, java.lang.String originalValue)
           
static com.google.gwt.user.client.ui.TextBox createTextField()
           
static com.google.gwt.user.client.ui.TextBox createTextFieldForResourceWidget()
           
static java.lang.String formatDate(java.lang.String dt)
           
static java.lang.String formatText(java.lang.String value)
          Some field values that are retrieved from the repo have extra bit of data attached.
static java.util.List<org.eaglei.model.EIURI> getEditableReadableStates()
           
static java.lang.String getExtendedPropertyLabel(java.lang.String typeLabel, java.lang.String propertyName)
           
static org.eaglei.model.EIEntity getSelectedEntity(com.google.gwt.user.client.ui.ListBox listBox)
           
static org.eaglei.model.EIURI getSelectedUri(com.google.gwt.user.client.ui.ListBox listBox)
          Deprecated. 
static java.lang.String getWFStateString(org.eaglei.model.EIInstance instance)
           
static boolean isInstanceUri(java.lang.String selectedUri)
           
static boolean isLabProperty(org.eaglei.model.EIClass range)
           
static boolean isLabProperty(org.eaglei.model.EIEntity range)
           
static boolean isLabType(org.eaglei.model.EIURI range)
           
static java.lang.String lowerCaseFirst(java.lang.String S)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WidgetUtils

public WidgetUtils()
Method Detail

createLabel

public static com.google.gwt.user.client.ui.Label createLabel(org.eaglei.model.EIEntity propertyEntity)
Parameters:
propertyEntity -
Returns:

createLabel

public static com.google.gwt.user.client.ui.Label createLabel(java.lang.String label)

formatText

public static java.lang.String formatText(java.lang.String value)
Some field values that are retrieved from the repo have extra bit of data attached. This method eliminates the unwanted data in the value.

Returns:
formatted value String

createTextField

public static com.google.gwt.user.client.ui.TextBox createTextField()

createTextFieldForResourceWidget

public static com.google.gwt.user.client.ui.TextBox createTextFieldForResourceWidget()

addTermWidgetToPanel

public static void addTermWidgetToPanel(org.eaglei.model.EIInstance eiInstance,
                                        org.eaglei.model.EIEntity propertyEntity,
                                        org.eaglei.model.EIClass range,
                                        java.lang.String selectedClassUri,
                                        EditWidgetCollection fields,
                                        boolean showLabel)

addTermWidgetToPanel

public static void addTermWidgetToPanel(org.eaglei.model.EIInstance eiInstance,
                                        org.eaglei.model.EIEntity propertyEntity,
                                        org.eaglei.model.EIClass range,
                                        org.eaglei.model.EIEntity selectedClassEntity,
                                        com.google.gwt.user.client.ui.HorizontalPanel tempPanel,
                                        boolean showLabel)

createRadioButon

public static com.google.gwt.user.client.ui.HorizontalPanel createRadioButon(org.eaglei.model.EIInstance instance,
                                                                             org.eaglei.model.EIEntity propertyEntity,
                                                                             java.lang.String originalValue)

isInstanceUri

public static boolean isInstanceUri(java.lang.String selectedUri)

getWFStateString

public static java.lang.String getWFStateString(org.eaglei.model.EIInstance instance)

getSelectedEntity

public static org.eaglei.model.EIEntity getSelectedEntity(com.google.gwt.user.client.ui.ListBox listBox)

getSelectedUri

@Deprecated
public static org.eaglei.model.EIURI getSelectedUri(com.google.gwt.user.client.ui.ListBox listBox)
Deprecated. 


isLabType

public static boolean isLabType(org.eaglei.model.EIURI range)

isLabProperty

public static boolean isLabProperty(org.eaglei.model.EIEntity range)

isLabProperty

public static boolean isLabProperty(org.eaglei.model.EIClass range)

createDialog

public static com.google.gwt.user.client.ui.PopupPanel createDialog(org.eaglei.model.EIInstance parentInstance,
                                                                    org.eaglei.model.EIClass range,
                                                                    org.eaglei.model.EIEntity propertyEntity,
                                                                    org.eaglei.model.EIURI oldValue,
                                                                    int position,
                                                                    WidgetUtils.InstanceSaveCallback innerCallback)

formatDate

public static java.lang.String formatDate(java.lang.String dt)

getEditableReadableStates

public static java.util.List<org.eaglei.model.EIURI> getEditableReadableStates()

getExtendedPropertyLabel

public static java.lang.String getExtendedPropertyLabel(java.lang.String typeLabel,
                                                        java.lang.String propertyName)

capitalizeFirst

public static java.lang.String capitalizeFirst(java.lang.String s)

lowerCaseFirst

public static java.lang.String lowerCaseFirst(java.lang.String S)


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