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 aButton
from its label.Create a "column creator" for the application when anObject
is viewed in aGrid
.Create the "field creator" for the application when anObject
is 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, wait
Methods inherited from interface com.storedobject.vaadin.ApplicationEnvironment
createMenuItem, createMenuItem, createMenuItemGroup, getActiveMenuIconName
-
Constructor Details
-
SOEnvironment
public SOEnvironment()
-
-
Method Details
-
getObjectFieldCreator
Description copied from interface:ApplicationEnvironment
Create the "field creator" for the application when anObject
is edited or viewed in a "data entry form".- Specified by:
getObjectFieldCreator
in interfaceApplicationEnvironment
- Returns:
- Field creator.
-
getObjectColumnCreator
Description copied from interface:ApplicationEnvironment
Create a "column creator" for the application when anObject
is viewed in aGrid
.- Specified by:
getObjectColumnCreator
in interfaceApplicationEnvironment
- Returns:
- Column creator.
-
toString
Description copied from interface:ApplicationEnvironment
Converts an object into a displayable form (String). The default implementation converts it by invokingObject.toString()
.- Specified by:
toString
in interfaceApplicationEnvironment
- Parameters:
any
- Object to convert- Returns:
- Converted string.
-
toDisplay
Description copied from interface:ApplicationEnvironment
Converts an object into a displayable form (String). The default implementation convertsException
to its message and rest of the types toApplicationEnvironment.toString(Object)
.- Specified by:
toDisplay
in interfaceApplicationEnvironment
- Parameters:
message
- Object to convert- Returns:
- Converted string.
-
createLabel
Description copied from interface:ApplicationEnvironment
Create 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:
createLabel
in interfaceApplicationEnvironment
- Parameters:
attributeName
- Attribute name- Returns:
- Label.
-
createLabel
Description copied from interface:ApplicationEnvironment
Create 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:
createLabel
in interfaceApplicationEnvironment
- Parameters:
aClass
- Class to be displayed- Returns:
- Label.
-
getIconName
Description copied from interface:ApplicationEnvironment
This method is used to determine the name of the icon to be displayed on aButton
from its label. The default implementation returns certain basic names. For example, for labels like "save", "ok", "yes" etc., it returns "check".- Specified by:
getIconName
in interfaceApplicationEnvironment
- Parameters:
label
- Label on the button- Returns:
- Name of the icon (Icons are created using
Icon
class).
-