Package com.storedobject.ui.util
Class SOEnvironment
java.lang.Object
com.storedobject.ui.util.SOEnvironment
- All Implemented Interfaces:
ApplicationEnvironment
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateLabel(Class<?> aClass) Create a label for displaying a particular class name.createLabel(String attributeName) Create a label for the attribute name passed.getIconName(String label) This method is used to determine the name of the icon to be displayed on aButtonfrom its label.Create a "column creator" for the application when anObjectis viewed in aGrid.Create the "field creator" for the application when anObjectis edited or viewed in a "data entry form".Converts an object into a displayable form (String).Converts an object into a displayable form (String).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.vaadin.ApplicationEnvironment
createMenuItem, createMenuItem, createMenuItemGroup, getActiveMenuIconName
-
Constructor Details
-
SOEnvironment
public SOEnvironment()
-
-
Method Details
-
getObjectFieldCreator
Description copied from interface:ApplicationEnvironmentCreate the "field creator" for the application when anObjectis edited or viewed in a "data entry form".- Specified by:
getObjectFieldCreatorin interfaceApplicationEnvironment- Returns:
- Field creator.
-
getObjectColumnCreator
Description copied from interface:ApplicationEnvironmentCreate a "column creator" for the application when anObjectis viewed in aGrid.- Specified by:
getObjectColumnCreatorin interfaceApplicationEnvironment- Returns:
- Column creator.
-
toString
Description copied from interface:ApplicationEnvironmentConverts an object into a displayable form (String). The default implementation converts it by invokingObject.toString().- Specified by:
toStringin interfaceApplicationEnvironment- Parameters:
any- Object to convert- Returns:
- Converted string.
-
toDisplay
Description copied from interface:ApplicationEnvironmentConverts an object into a displayable form (String). The default implementation convertsExceptionto its message and rest of the types toApplicationEnvironment.toString(Object).- Specified by:
toDisplayin interfaceApplicationEnvironment- Parameters:
message- Object to convert- Returns:
- Converted string.
-
createLabel
Description copied from interface:ApplicationEnvironmentCreate a label for the attribute name passed. This is typically used for creating labels for field names. The default implementation converts the name to camel case words. For example, "firstName" will be converted to "First Name".- Specified by:
createLabelin interfaceApplicationEnvironment- Parameters:
attributeName- Attribute name- Returns:
- Label.
-
createLabel
Description copied from interface:ApplicationEnvironmentCreate a label for displaying a particular class name. (A class's name may have to be displayed in some part of the application and this method is invoked for that). The default implementation strips of the "package" portion and invokesApplicationEnvironment.createLabel(String)with the rest of the class name.- Specified by:
createLabelin interfaceApplicationEnvironment- Parameters:
aClass- Class to be displayed- Returns:
- Label.
-
getIconName
Description copied from interface:ApplicationEnvironmentThis method is used to determine the name of the icon to be displayed on aButtonfrom its label. The default implementation returns certain basic names. For example, for labels like "save", "ok", "yes" etc., it returns "check".- Specified by:
getIconNamein interfaceApplicationEnvironment- Parameters:
label- Label on the button- Returns:
- Name of the icon (Icons are created using
Iconclass).
-