Search in sources :

Example 46 with EJDevPropertyDefinitionGroup

use of org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup in project rap by entirej.

the class EJRWTRadioGroupItemRendererDefinition method getItemPropertyDefinitionGroup.

@Override
public EJPropertyDefinitionGroup getItemPropertyDefinitionGroup() {
    EJDevPropertyDefinitionGroup mainGroup = new EJDevPropertyDefinitionGroup("Radio Group Renderer");
    mainGroup.setDescription("Radio Groups offer the users a single choice from various options. The radio group can be displayed in wither horizontal format where the choices are alligned next to each other or vertically where they will appear in a list on beneath the other");
    EJDevPropertyDefinition showBorder = new EJDevPropertyDefinition(SHOW_BORDER, EJPropertyDefinitionType.BOOLEAN);
    showBorder.setLabel("Show Border");
    showBorder.setDescription("If chosen, a border will be displayed around the radio group");
    showBorder.setMandatory(true);
    EJDevPropertyDefinition orientation = new EJDevPropertyDefinition(ORIENTATION, EJPropertyDefinitionType.STRING);
    orientation.setLabel("Orientation");
    orientation.addValidValue(ORIENTATION_HORIZONTAL, "Horizontal");
    orientation.addValidValue(ORIENTATION_VERTICAL, "Vertical");
    orientation.setMandatory(true);
    orientation.setDescription("Indicates how the radio group will be displayed. Horizontal = in a row, Vertical = in a column");
    EJDevPropertyDefinition defaultValue = new EJDevPropertyDefinition(DEFAULT_BUTTON, EJPropertyDefinitionType.STRING);
    defaultValue.setLabel("Default Button");
    defaultValue.setDescription("The combo box group should normally have one of the items selected as default. Supply the name of the default button here");
    EJDevPropertyDefinitionList list = new EJDevPropertyDefinitionList(RADIO_BUTTONS, "Radio Buttons");
    EJDevPropertyDefinition radioButtonName = new EJDevPropertyDefinition(NAME, EJPropertyDefinitionType.STRING);
    radioButtonName.setLabel("Name");
    radioButtonName.setDescription("The name of the actual button. This is important as you can access these buttons within the action processor");
    radioButtonName.setMandatory(true);
    EJDevPropertyDefinition radioButtonLabel = new EJDevPropertyDefinition(LABEL, EJPropertyDefinitionType.STRING);
    radioButtonLabel.setLabel("Label");
    radioButtonLabel.setDescription("This value will be displayed to the user or translated and then displayed");
    radioButtonLabel.setMandatory(true);
    radioButtonLabel.setMultilingual(true);
    EJDevPropertyDefinition radioButtonValue = new EJDevPropertyDefinition(VALUE, EJPropertyDefinitionType.STRING);
    radioButtonValue.setLabel("Value");
    radioButtonValue.setDescription("This is the value of the radio button. The value must be convertable to the data type defined for the item. If the value is left empty, the value will bu null");
    EJDevPropertyDefinition customCSSKey = new EJDevPropertyDefinition(CSS_KEY, EJPropertyDefinitionType.STRING);
    customCSSKey.setLabel("Custom CSS Key");
    customCSSKey.setDescription("Indicates custom CSS key in project CSS file that can customize  item look and feel. Please refer to Entirej RWT CSS guide.");
    list.addPropertyDefinition(radioButtonName);
    list.addPropertyDefinition(radioButtonLabel);
    list.addPropertyDefinition(radioButtonValue);
    mainGroup.addPropertyDefinition(showBorder);
    mainGroup.addPropertyDefinition(orientation);
    mainGroup.addPropertyDefinition(defaultValue);
    mainGroup.addPropertyDefinition(customCSSKey);
    mainGroup.addPropertyDefinitionList(list);
    return mainGroup;
}
Also used : EJDevPropertyDefinition(org.entirej.framework.dev.properties.EJDevPropertyDefinition) EJDevPropertyDefinitionGroup(org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup) EJDevPropertyDefinitionList(org.entirej.framework.dev.properties.EJDevPropertyDefinitionList)

Example 47 with EJDevPropertyDefinitionGroup

use of org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup in project rap by entirej.

the class EJRWTDateItemRendererDefinition method getItemPropertyDefinitionGroup.

public EJDevPropertyDefinitionGroup getItemPropertyDefinitionGroup() {
    EJDevPropertyDefinitionGroup mainGroup = new EJDevPropertyDefinitionGroup("Date Item Renderer");
    mainGroup.setDescription("The Date Item Renderer is used to select data values from a calendar popup or by entering the date manually. Use the Date Time Item Renderer for further date options");
    EJDevPropertyDefinition textAllignment = new EJDevPropertyDefinition(PROPERTY_ALIGNMENT, EJPropertyDefinitionType.STRING);
    textAllignment.setLabel("Alignment");
    textAllignment.setDescription("The alignment of the text displayed within this item");
    textAllignment.setLoadValidValuesDynamically(true);
    textAllignment.setNotifyWhenChanged(true);
    EJDevPropertyDefinition localeFormat = new EJDevPropertyDefinition(PROPERTY_LOCALE_FORMAT, EJPropertyDefinitionType.STRING);
    localeFormat.setLabel("Locale Format");
    localeFormat.setDescription("The Locale format  will be used when no custom format is provided. The date format as defined by <code>java.text.DataFormat</code>\n\nThe Locale format can be overridden by the manual format if required");
    for (DateFormats format : DateFormats.values()) {
        localeFormat.addValidValue(format.name(), format.name());
    }
    EJDevPropertyDefinition format = new EJDevPropertyDefinition(PROPERTY_FORMAT, EJPropertyDefinitionType.STRING);
    format.setLabel("Manual Format");
    format.setDescription("Overrides the Locale format\nThe format specified must be a valid format for the Java SimpleDateFormat class. \nFormat strings can contain multiple formats to allow partial input of dates: \nThe multipleformats are separated by the '|' character. eg: 'dd.MM.yy|dd.MM|dd' would allow \nthe user to enter either the full dd.mm.yy format or the dd.MM format or just dd. \nMonth and year of incomplete date entries are complemented with the current month and year.");
    EJDevPropertyDefinition displayValueAsLabel = new EJDevPropertyDefinition(PROPERTY_DISPLAY_VAUE_AS_LABEL, EJPropertyDefinitionType.BOOLEAN);
    displayValueAsLabel.setLabel("Display value as label");
    displayValueAsLabel.setDefaultValue("false");
    displayValueAsLabel.setDescription("Indicates if this item should be displayed as a label. Items displayed as labels cannot be modified by the user.");
    EJDevPropertyDefinition selectOnFocus = new EJDevPropertyDefinition(EJRWTTextItemRendererDefinition.PROPERTY_SELECT_ON_FOCUS, EJPropertyDefinitionType.BOOLEAN);
    selectOnFocus.setLabel("Select on focus");
    selectOnFocus.setDescription("Indicates if this item should select text on focus");
    selectOnFocus.setDefaultValue("false");
    EJDevPropertyDefinition customCSSKey = new EJDevPropertyDefinition(PROPERTY_CSS_KEY, EJPropertyDefinitionType.STRING);
    customCSSKey.setLabel("Custom CSS Key");
    customCSSKey.setDescription("Indicates custom CSS key in project CSS file that can customize  item look and feel. Please refer to Entirej RWT CSS guide.");
    mainGroup.addPropertyDefinition(textAllignment);
    mainGroup.addPropertyDefinition(localeFormat);
    mainGroup.addPropertyDefinition(format);
    mainGroup.addPropertyDefinition(selectOnFocus);
    mainGroup.addPropertyDefinition(displayValueAsLabel);
    mainGroup.addPropertyDefinition(customCSSKey);
    return mainGroup;
}
Also used : EJDevPropertyDefinition(org.entirej.framework.dev.properties.EJDevPropertyDefinition) EJDevPropertyDefinitionGroup(org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup)

Example 48 with EJDevPropertyDefinitionGroup

use of org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup in project rap by entirej.

the class EJRWTLookupFormLovRendererDefinition method getLovPropertyDefinitionGroup.

public EJPropertyDefinitionGroup getLovPropertyDefinitionGroup() {
    EJDevPropertyDefinitionGroup mainGroup = new EJDevPropertyDefinitionGroup("Lov Renderer Properties");
    EJDevPropertyDefinition showTableBorder = new EJDevPropertyDefinition(EJRWTMultiRecordBlockDefinitionProperties.HIDE_TABLE_BORDER, EJPropertyDefinitionType.BOOLEAN);
    showTableBorder.setLabel("Hide Border");
    showTableBorder.setDescription("If selected, the renderer will hide the lov's standard border");
    showTableBorder.setDefaultValue("false");
    EJDevPropertyDefinition showTableHeader = new EJDevPropertyDefinition(EJRWTMultiRecordBlockDefinitionProperties.SHOW_HEADING_PROPERTY, EJPropertyDefinitionType.BOOLEAN);
    showTableHeader.setLabel("Show Headings");
    showTableHeader.setDescription("If selected, column headings will be displayed");
    showTableHeader.setDefaultValue("true");
    EJDevPropertyDefinition showVerticalLines = new EJDevPropertyDefinition(EJRWTMultiRecordBlockDefinitionProperties.SHOW_VERTICAL_LINES, EJPropertyDefinitionType.BOOLEAN);
    showVerticalLines.setLabel("Show Vertical Lines");
    showVerticalLines.setDescription("Indicates if vertical lines should be displayed within the lov");
    showVerticalLines.setDefaultValue("true");
    EJDevPropertyDefinition quearyScreen = new EJDevPropertyDefinition(EJRWTMultiRecordBlockDefinitionProperties.SHOW_QUERY_SCREEN, EJPropertyDefinitionType.BOOLEAN);
    quearyScreen.setLabel("Auto show query screen");
    quearyScreen.setDescription("Indicates that the LOV needs to show the query screen automatically when the LOV is displayed.");
    quearyScreen.setDefaultValue("true");
    EJDevPropertyDefinition message = new EJDevPropertyDefinition("MESSAGE", EJPropertyDefinitionType.STRING);
    message.setLabel("Filter Message");
    message.setDescription("The message text is displayed as a hint for the user, indicating the purpose of the filter..");
    mainGroup.addPropertyDefinition(message);
    mainGroup.addPropertyDefinition(showTableBorder);
    mainGroup.addPropertyDefinition(showTableHeader);
    mainGroup.addPropertyDefinition(showVerticalLines);
    mainGroup.addPropertyDefinition(quearyScreen);
    return mainGroup;
}
Also used : EJDevPropertyDefinition(org.entirej.framework.dev.properties.EJDevPropertyDefinition) EJDevPropertyDefinitionGroup(org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup)

Example 49 with EJDevPropertyDefinitionGroup

use of org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup in project rap by entirej.

the class EJRWTLookupFormLovRendererDefinition method getItemPropertiesDefinitionGroup.

public EJPropertyDefinitionGroup getItemPropertiesDefinitionGroup() {
    EJDevPropertyDefinitionGroup mainGroup = new EJDevPropertyDefinitionGroup("Lov Renderer: Required Item Properties");
    EJDevPropertyDefinition displayWidth = new EJDevPropertyDefinition(EJRWTMultiRecordBlockDefinitionProperties.DISPLAY_WIDTH_PROPERTY, EJPropertyDefinitionType.INTEGER);
    displayWidth.setLabel("Display Width");
    displayWidth.setDescription("The width (in characters) of this item within the lov");
    EJDevPropertyDefinition headerAlignment = new EJDevPropertyDefinition(EJRWTMultiRecordBlockDefinitionProperties.COLUMN_ALIGNMENT, EJPropertyDefinitionType.STRING);
    headerAlignment.setLabel("Column Alignment");
    headerAlignment.setDescription("Indicates the alignment of data within the column");
    headerAlignment.setDefaultValue(EJRWTMultiRecordBlockDefinitionProperties.COLUMN_ALLIGN_LEFT);
    headerAlignment.addValidValue(EJRWTMultiRecordBlockDefinitionProperties.COLUMN_ALLIGN_LEFT, "Left");
    headerAlignment.addValidValue(EJRWTMultiRecordBlockDefinitionProperties.COLUMN_ALLIGN_RIGHT, "Right");
    headerAlignment.addValidValue(EJRWTMultiRecordBlockDefinitionProperties.COLUMN_ALLIGN_CENTER, "Center");
    EJDevPropertyDefinition allowColumnSorting = new EJDevPropertyDefinition(EJRWTMultiRecordBlockDefinitionProperties.ALLOW_ROW_SORTING, EJPropertyDefinitionType.BOOLEAN);
    allowColumnSorting.setLabel("Allow Column Sorting");
    allowColumnSorting.setDescription("If selected, the user will be able to re-order the data within the lov by clicking on the column header. Only lov contents will be sorted, no new data will be retreived from the datasource");
    allowColumnSorting.setDefaultValue("true");
    EJDevPropertyDefinition allowColunmResize = new EJDevPropertyDefinition(EJRWTMultiRecordBlockDefinitionProperties.ALLOW_COLUMN_RESIZE, EJPropertyDefinitionType.BOOLEAN);
    allowColunmResize.setLabel("Allow Resize of Column");
    allowColunmResize.setDescription("If selected, the user will be able to resize the width of the columns wtihin this lov");
    allowColunmResize.setDefaultValue("true");
    EJDevPropertyDefinition allowColunmReorder = new EJDevPropertyDefinition(EJRWTMultiRecordBlockDefinitionProperties.ALLOW_COLUMN_REORDER, EJPropertyDefinitionType.BOOLEAN);
    allowColunmReorder.setLabel("Allow Re-Order of Column");
    allowColunmReorder.setDescription("If selected, the user will be able to move columns of this lov to change their displayed position. The re-positioning will not be saved and the next time the lov is displayed, columns will be displayed in their original positions");
    allowColunmReorder.setDefaultValue("true");
    mainGroup.addPropertyDefinition(displayWidth);
    mainGroup.addPropertyDefinition(headerAlignment);
    mainGroup.addPropertyDefinition(allowColumnSorting);
    mainGroup.addPropertyDefinition(allowColunmResize);
    mainGroup.addPropertyDefinition(allowColunmReorder);
    return mainGroup;
}
Also used : EJDevPropertyDefinition(org.entirej.framework.dev.properties.EJDevPropertyDefinition) EJDevPropertyDefinitionGroup(org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup)

Example 50 with EJDevPropertyDefinitionGroup

use of org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup in project rap by entirej.

the class EJRWTApplicationDefinition method getApplicationPropertyDefinitionGroup.

@Override
public EJPropertyDefinitionGroup getApplicationPropertyDefinitionGroup() {
    EJDevPropertyDefinitionGroup mainGroup = new EJDevPropertyDefinitionGroup("RWTAPP");
    mainGroup.setLabel("Eclipse RAP Application Framework");
    {
        try {
            Class<?> support = Class.forName("org.entirej.applicationframework.rwt.spring.EJSpringSupport");
            if (support != null) {
                mainGroup.setLabel("Eclipse RAP Application Framework with Spring Security");
                EJDevPropertyDefinitionGroup springGroup = new EJDevPropertyDefinitionGroup(SPRING_SECURITY, "Spring Security Support");
                mainGroup.addSubGroup(springGroup);
                {
                    // Config
                    EJDevPropertyDefinition type = new EJDevPropertyDefinition(SPRING_SECURITY_CONFIG, EJPropertyDefinitionType.PROJECT_CLASS_FILE);
                    type.setLabel("Security Config Provider");
                    type.setClassParent("org.entirej.applicationframework.rwt.spring.ext.EJSpringSecurityConfigProvider");
                    springGroup.addPropertyDefinition(type);
                }
                {
                    // Auth
                    EJDevPropertyDefinition type = new EJDevPropertyDefinition(SPRING_SECURITY_AUTH, EJPropertyDefinitionType.PROJECT_CLASS_FILE);
                    type.setLabel("Authentication Provider");
                    type.setClassParent("org.entirej.applicationframework.rwt.spring.ext.EJSpringSecurityAuthenticationProvider");
                    springGroup.addPropertyDefinition(type);
                }
            }
        } catch (ClassNotFoundException e) {
        // ignore
        }
    }
    {
        // services
        EJDevPropertyDefinitionGroup serviceGroup = new EJDevPropertyDefinitionGroup(SERVICE, "Services");
        mainGroup.addSubGroup(serviceGroup);
        EJDevPropertyDefinitionList list = new EJDevPropertyDefinitionList(SERVICE_LIST, "Paths");
        serviceGroup.addPropertyDefinitionList(list);
        EJDevPropertyDefinition serviceName = new EJDevPropertyDefinition(SERVICE_NAME, EJPropertyDefinitionType.STRING);
        serviceName.setLabel("Service Name");
        EJDevPropertyDefinition servicePath = new EJDevPropertyDefinition(SERVICE_PATH, EJPropertyDefinitionType.STRING);
        servicePath.setLabel("Service Path");
        EJDevPropertyDefinition serviceForm = new EJDevPropertyDefinition(SERVICE_FORM, EJPropertyDefinitionType.FORM_ID);
        serviceForm.setLabel("Service Form");
        list.addPropertyDefinition(servicePath);
        list.addPropertyDefinition(serviceName);
        list.addPropertyDefinition(serviceForm);
    }
    EJDevPropertyDefinition applicationMenu = new EJDevPropertyDefinition(APPLICATION_MENU, EJPropertyDefinitionType.MENU_GROUP);
    applicationMenu.setLabel("Application Menu");
    applicationMenu.setDescription("The Application Menu is the standard drop down menu displayed at the top of the screen. The menu is created using the <a href=\"http://docs.entirej.com/display/EJ1/Application+Menu\">EntireJ Menu Editor</a>");
    mainGroup.addPropertyDefinition(applicationMenu);
    EJDevPropertyDefinition liveConnection = new EJDevPropertyDefinition(LIVE_CONNECTION, EJPropertyDefinitionType.BOOLEAN);
    liveConnection.setLabel("Keep live connection to server.");
    liveConnection.setDescription("Keep a live connection to the server so in the event of a session timeout, the timeout page will automatically be shown without any user interaction.");
    mainGroup.addPropertyDefinition(liveConnection);
    EJDevPropertyDefinition displayTabBorder = new EJDevPropertyDefinition(DISPLAY_TAB_BORDER, EJPropertyDefinitionType.BOOLEAN);
    displayTabBorder.setLabel("Display border on tabs");
    displayTabBorder.setDescription("Indicates if borders should be used to surround tab canvases. Displaying borders on tabs can lead to many unwanted frames displayed on your application.");
    mainGroup.addPropertyDefinition(displayTabBorder);
    EJDevPropertyDefinitionGroup actionGroup = new EJDevPropertyDefinitionGroup(EJRWTSingleRecordBlockDefinitionProperties.ACTION_GROUP, "Shortcuts");
    mainGroup.addSubGroup(actionGroup);
    EJDevPropertyDefinition queryAction = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ACTION_QUERY_KEY, EJPropertyDefinitionType.STRING);
    queryAction.setLabel("Query");
    queryAction.setDefaultValue("SHIFT+Q");
    queryAction.setDescription("Use this shortcut to open the Query Screen");
    EJDevPropertyDefinition insertAction = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ACTION_INSERT_KEY, EJPropertyDefinitionType.STRING);
    insertAction.setLabel("Insert");
    insertAction.setDefaultValue("SHIFT+I");
    queryAction.setDescription("Use this shortcut to open the Insert Screen");
    EJDevPropertyDefinition updateAction = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ACTION_UPDATE_KEY, EJPropertyDefinitionType.STRING);
    updateAction.setLabel("Update");
    updateAction.setDefaultValue("SHIFT+U");
    queryAction.setDescription("Use this shortcut to open the Update Screen");
    EJDevPropertyDefinition deleteAction = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ACTION_DELETE_KEY, EJPropertyDefinitionType.STRING);
    deleteAction.setLabel("Delete");
    deleteAction.setDefaultValue("SHIFT+D");
    queryAction.setDescription("Use this shortcut to delete the current record");
    EJDevPropertyDefinition refreshAction = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ACTION_REFRESH_KEY, EJPropertyDefinitionType.STRING);
    refreshAction.setLabel("Refresh");
    refreshAction.setDefaultValue("SHIFT+R");
    queryAction.setDescription("Use this shortcut to refresh the current block by calling the blocks execute last query method");
    EJDevPropertyDefinition lovAction = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ACTION_LOV_KEY, EJPropertyDefinitionType.STRING);
    lovAction.setLabel("Lov");
    queryAction.setDescription("Use this shortcut to open the lov assigned with the current item");
    lovAction.setDefaultValue("SHIFT+ARROW_DOWN");
    actionGroup.addPropertyDefinition(queryAction);
    actionGroup.addPropertyDefinition(insertAction);
    actionGroup.addPropertyDefinition(updateAction);
    actionGroup.addPropertyDefinition(deleteAction);
    actionGroup.addPropertyDefinition(refreshAction);
    actionGroup.addPropertyDefinition(lovAction);
    // Application message settings
    EJDevPropertyDefinitionGroup messageGroup = new EJDevPropertyDefinitionGroup(APP_MESSAGING, "Application Messaging");
    messageGroup.setDescription("EntireJ gives you the possibility to have application messages displayed either in standard popup message boxes or in notifications that rise up from the bottom of the application. You can decide which option you would prefer or have a  combination of both");
    // add error message settings
    {
        EJDevPropertyDefinitionGroup errorMsgGroup = new EJDevPropertyDefinitionGroup(APP_MSG_ERROR, "Error Message");
        EJDevPropertyDefinition type = new EJDevPropertyDefinition(APP_MSG_TYPE, EJPropertyDefinitionType.STRING);
        type.setLabel("Display Type");
        type.setDescription("Indicates how messages are handeld within you application. Setting a value of Dialog will display messages as a popup dialog, setting to Notification will make messages display as notifications within the bottom right of your screen");
        type.addValidValue(APP_MSG_TYPE_DIALOG, "Dialog");
        type.addValidValue(APP_MSG_TYPE_NOTIFICATION, "Notifiaction");
        type.addValidValue(APP_MSG_TYPE_BOTH, "Both");
        type.setDefaultValue(APP_MSG_TYPE_DIALOG);
        EJDevPropertyDefinition notificationAutoHide = new EJDevPropertyDefinition(APP_MSG_NOTIFICATION_AUTOHIDE, EJPropertyDefinitionType.BOOLEAN);
        notificationAutoHide.setLabel("Auto Hide Notification");
        notificationAutoHide.setDescription("Indicates if the notifications should automatically hide after being displayed. If this is not set, the user must close the notifications manually");
        EJDevPropertyDefinition width = new EJDevPropertyDefinition(APP_MSG_WIDTH, EJPropertyDefinitionType.INTEGER);
        width.setLabel("Width");
        width.setDescription("The width of the notification");
        EJDevPropertyDefinition height = new EJDevPropertyDefinition(APP_MSG_HEIGHT, EJPropertyDefinitionType.INTEGER);
        height.setLabel("Height");
        height.setDescription("The height of the notification");
        errorMsgGroup.addPropertyDefinition(type);
        errorMsgGroup.addPropertyDefinition(notificationAutoHide);
        errorMsgGroup.addPropertyDefinition(width);
        errorMsgGroup.addPropertyDefinition(height);
        messageGroup.addSubGroup(errorMsgGroup);
    }
    // add warning message settings
    {
        EJDevPropertyDefinitionGroup warningMsgGroup = new EJDevPropertyDefinitionGroup(APP_MSG_WARNING, "Warning Message");
        EJDevPropertyDefinition type = new EJDevPropertyDefinition(APP_MSG_TYPE, EJPropertyDefinitionType.STRING);
        type.setLabel("Display Type");
        type.setDescription("Indicates how messages are handeld within you application. Setting a value of Dialog will display messages as a popup dialog, setting to Notification will make messages display as notifications within the bottom right of your screen");
        type.addValidValue(APP_MSG_TYPE_DIALOG, "Dialog");
        type.addValidValue(APP_MSG_TYPE_NOTIFICATION, "Notifiaction");
        type.addValidValue(APP_MSG_TYPE_BOTH, "Both");
        type.setDefaultValue(APP_MSG_TYPE_DIALOG);
        EJDevPropertyDefinition notificationAutoHide = new EJDevPropertyDefinition(APP_MSG_NOTIFICATION_AUTOHIDE, EJPropertyDefinitionType.BOOLEAN);
        notificationAutoHide.setLabel("Auto Hide Notification");
        notificationAutoHide.setDescription("Indicates if the notifications should automatically hide after being displayed. If this is not set, the user must close the notifications manually");
        EJDevPropertyDefinition width = new EJDevPropertyDefinition(APP_MSG_WIDTH, EJPropertyDefinitionType.INTEGER);
        width.setLabel("Width");
        width.setDescription("The width of the notification");
        EJDevPropertyDefinition height = new EJDevPropertyDefinition(APP_MSG_HEIGHT, EJPropertyDefinitionType.INTEGER);
        height.setLabel("Height");
        height.setDescription("The height of the notification");
        warningMsgGroup.addPropertyDefinition(type);
        warningMsgGroup.addPropertyDefinition(notificationAutoHide);
        warningMsgGroup.addPropertyDefinition(width);
        warningMsgGroup.addPropertyDefinition(height);
        messageGroup.addSubGroup(warningMsgGroup);
    }
    // add information message settings
    {
        EJDevPropertyDefinitionGroup infoMsgGroup = new EJDevPropertyDefinitionGroup(APP_MSG_INFO, "Information Message");
        EJDevPropertyDefinition type = new EJDevPropertyDefinition(APP_MSG_TYPE, EJPropertyDefinitionType.STRING);
        type.setLabel("Display Type");
        type.setDescription("Indicates how messages are handeld within you application. Setting a value of Dialog will display messages as a popup dialog, setting to Notification will make messages display as notifications within the bottom right of your screen");
        type.addValidValue(APP_MSG_TYPE_DIALOG, "Dialog");
        type.addValidValue(APP_MSG_TYPE_NOTIFICATION, "Notifiaction");
        type.addValidValue(APP_MSG_TYPE_BOTH, "Both");
        type.setDefaultValue(APP_MSG_TYPE_NOTIFICATION);
        EJDevPropertyDefinition notificationAutoHide = new EJDevPropertyDefinition(APP_MSG_NOTIFICATION_AUTOHIDE, EJPropertyDefinitionType.BOOLEAN);
        notificationAutoHide.setLabel("Notification Auto Hide");
        notificationAutoHide.setDescription("Indicates if the notifications should automatically hide after being displayed. If this is not set, the user must close the notifications manually");
        notificationAutoHide.setDefaultValue("true");
        EJDevPropertyDefinition width = new EJDevPropertyDefinition(APP_MSG_WIDTH, EJPropertyDefinitionType.INTEGER);
        width.setLabel("Width");
        width.setDescription("The width of the notification");
        EJDevPropertyDefinition height = new EJDevPropertyDefinition(APP_MSG_HEIGHT, EJPropertyDefinitionType.INTEGER);
        height.setLabel("Height");
        height.setDescription("The height of the notification");
        infoMsgGroup.addPropertyDefinition(type);
        infoMsgGroup.addPropertyDefinition(notificationAutoHide);
        infoMsgGroup.addPropertyDefinition(width);
        infoMsgGroup.addPropertyDefinition(height);
        messageGroup.addSubGroup(infoMsgGroup);
    }
    // add hint message settings
    {
        EJDevPropertyDefinitionGroup hintMsgGroup = new EJDevPropertyDefinitionGroup(APP_MSG_HINT, "Hint Message");
        EJDevPropertyDefinition notificationAutoHide = new EJDevPropertyDefinition(APP_MSG_NOTIFICATION_AUTOHIDE, EJPropertyDefinitionType.BOOLEAN);
        notificationAutoHide.setLabel("Auto Hide Notification");
        notificationAutoHide.setDescription("Indicates if the notifications should automatically hide after being displayed. If this is not set, the user must close the notifications manually");
        notificationAutoHide.setDefaultValue("true");
        EJDevPropertyDefinition width = new EJDevPropertyDefinition(APP_MSG_WIDTH, EJPropertyDefinitionType.INTEGER);
        width.setLabel("Width");
        width.setDescription("The width of the notification");
        EJDevPropertyDefinition height = new EJDevPropertyDefinition(APP_MSG_HEIGHT, EJPropertyDefinitionType.INTEGER);
        height.setLabel("Height");
        height.setDescription("The height of the notification");
        hintMsgGroup.addPropertyDefinition(notificationAutoHide);
        hintMsgGroup.addPropertyDefinition(width);
        hintMsgGroup.addPropertyDefinition(height);
        messageGroup.addSubGroup(hintMsgGroup);
    }
    mainGroup.addSubGroup(messageGroup);
    return mainGroup;
}
Also used : EJDevPropertyDefinition(org.entirej.framework.dev.properties.EJDevPropertyDefinition) EJDevPropertyDefinitionGroup(org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup) EJDevPropertyDefinitionList(org.entirej.framework.dev.properties.EJDevPropertyDefinitionList)

Aggregations

EJDevPropertyDefinition (org.entirej.framework.dev.properties.EJDevPropertyDefinition)50 EJDevPropertyDefinitionGroup (org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup)50 EJDevPropertyDefinitionList (org.entirej.framework.dev.properties.EJDevPropertyDefinitionList)15