Search in sources :

Example 51 with EJDevPropertyDefinition

use of org.entirej.framework.dev.properties.EJDevPropertyDefinition 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 52 with EJDevPropertyDefinition

use of org.entirej.framework.dev.properties.EJDevPropertyDefinition 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 53 with EJDevPropertyDefinition

use of org.entirej.framework.dev.properties.EJDevPropertyDefinition 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)53 EJDevPropertyDefinitionGroup (org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup)50 EJDevPropertyDefinitionList (org.entirej.framework.dev.properties.EJDevPropertyDefinitionList)15 EJPropertyDefinitionGroup (org.entirej.framework.core.properties.definitions.interfaces.EJPropertyDefinitionGroup)3