use of org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup in project rap by entirej.
the class EJRWTPieChartRecordBlockDefinition method getBlockPropertyDefinitionGroup.
/*
* (non-Javadoc)
*
* @seeorg.entirej.framework.renderers.IBlockRenderer#
* getBlockPropertyDefinitionGroup()
*/
public EJPropertyDefinitionGroup getBlockPropertyDefinitionGroup() {
EJDevPropertyDefinitionGroup mainGroup = new EJDevPropertyDefinitionGroup("PieChart-Record Block");
EJDevPropertyDefinition viewType = new EJDevPropertyDefinition(EJRWTChartBlockDefinitionProperties.VIEW_TYPE, EJPropertyDefinitionType.STRING);
viewType.setLabel("View Type");
viewType.setDefaultValue("pie");
viewType.addValidValue("pie", "Pie");
viewType.addValidValue("doughnut", "Doughnut");
EJDevPropertyDefinition multi = new EJDevPropertyDefinition(EJRWTChartBlockDefinitionProperties.MULTI, EJPropertyDefinitionType.BOOLEAN);
multi.setLabel("Multi Record");
multi.setDefaultValue("false");
EJDevPropertyDefinition relationItem = new EJDevPropertyDefinition(EJRWTChartBlockDefinitionProperties.LABLE_COLUMN, EJPropertyDefinitionType.BLOCK_ITEM);
relationItem.setLabel("Dataset Label Item");
EJDevPropertyDefinition animation = new EJDevPropertyDefinition(EJRWTChartBlockDefinitionProperties.ANIMATION, EJPropertyDefinitionType.BOOLEAN);
animation.setLabel("Animation");
animation.setDefaultValue("true");
EJDevPropertyDefinition legend = new EJDevPropertyDefinition(EJRWTChartBlockDefinitionProperties.SHOW_LEGEND, EJPropertyDefinitionType.BOOLEAN);
legend.setLabel("Show Legend");
legend.setDefaultValue("true");
EJDevPropertyDefinition showToolTips = new EJDevPropertyDefinition(EJRWTChartBlockDefinitionProperties.SHOW_TOOLTIPS, EJPropertyDefinitionType.BOOLEAN);
showToolTips.setLabel("Show ToolTips");
showToolTips.setDefaultValue("true");
EJDevPropertyDefinition legendPostions = new EJDevPropertyDefinition(EJRWTChartBlockDefinitionProperties.LEGEND_POSITION, EJPropertyDefinitionType.STRING);
legendPostions.setLabel("Legend Postion");
legendPostions.setDefaultValue("top");
legendPostions.addValidValue("top", "Top");
legendPostions.addValidValue("bottom", "Bottom");
legendPostions.addValidValue("left", "Left");
legendPostions.addValidValue("right", "Right");
mainGroup.addPropertyDefinition(viewType);
mainGroup.addPropertyDefinition(multi);
mainGroup.addPropertyDefinition(relationItem);
mainGroup.addPropertyDefinition(animation);
mainGroup.addPropertyDefinition(showToolTips);
mainGroup.addPropertyDefinition(legend);
mainGroup.addPropertyDefinition(legendPostions);
EJDevPropertyDefinitionGroup sectionGroup = new EJDevPropertyDefinitionGroup("TITLE_BAR");
sectionGroup.setLabel("Title Bar");
EJDevPropertyDefinition title = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_TITLE, EJPropertyDefinitionType.STRING);
title.setLabel("Title");
title.setDescription("Title Bar Caption.");
EJDevPropertyDefinition showTitleBarExpanded = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_EXPANDED, EJPropertyDefinitionType.BOOLEAN);
showTitleBarExpanded.setLabel("Title Bar Expanded");
showTitleBarExpanded.setDescription("If selected, the renderer will display section title bar expanded by default.");
showTitleBarExpanded.setDefaultValue("true");
EJDevPropertyDefinition titleBarmode = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE, EJPropertyDefinitionType.STRING);
titleBarmode.setLabel("Title Bar Mode");
titleBarmode.setDescription("The Title Bar dispaly mode");
titleBarmode.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE_GROUP, "Group");
titleBarmode.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE_TWISTIE, "Twistie");
titleBarmode.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE_TREE_NODE, "Tree Node");
titleBarmode.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE_NO_EXPAND, "Not Expandable");
// titleBarmode.setDefaultValue(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE_GROUP);
// titleBarmode.setMandatory(true);
EJDevPropertyDefinitionList list = new EJDevPropertyDefinitionList(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_ACTIONS, "Actions");
EJDevPropertyDefinition actionID = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_ACTION_ID, EJPropertyDefinitionType.ACTION_COMMAND);
actionID.setLabel("Action Command");
actionID.setDescription("Action command id for action processor.");
actionID.setMandatory(true);
EJDevPropertyDefinition actionImage = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_ACTION_IMAGE, EJPropertyDefinitionType.PROJECT_FILE);
actionImage.setLabel("Action Image");
actionImage.setDescription("Action image file from project path.");
actionImage.setMandatory(true);
EJDevPropertyDefinition actionName = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_ACTION_NAME, EJPropertyDefinitionType.STRING);
actionName.setLabel("Action Name");
actionName.setDescription("Action name");
EJDevPropertyDefinition actionTooltip = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_ACTION_TOOLTIP, EJPropertyDefinitionType.STRING);
actionTooltip.setLabel("Action Tooltip");
actionTooltip.setDescription("Action tooltip.");
list.addPropertyDefinition(actionID);
list.addPropertyDefinition(actionImage);
list.addPropertyDefinition(actionName);
list.addPropertyDefinition(actionTooltip);
sectionGroup.addPropertyDefinition(titleBarmode);
sectionGroup.addPropertyDefinition(title);
sectionGroup.addPropertyDefinitionList(list);
sectionGroup.addPropertyDefinition(showTitleBarExpanded);
mainGroup.addSubGroup(sectionGroup);
return mainGroup;
}
use of org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup in project rap by entirej.
the class EJRWTSingleRecordBlockDefinition method getItemPropertiesDefinitionGroup.
@Override
public EJPropertyDefinitionGroup getItemPropertiesDefinitionGroup() {
EJDevPropertyDefinition itemPosition = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_POSITION_PROPERTY, EJPropertyDefinitionType.STRING);
itemPosition.setLabel("Item Orientation");
itemPosition.setDescription("If the item is fixed in size and smaller than other items within its displayed column, then you can indicate how the item is displayed");
itemPosition.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.LABEL_ORIENTATION_LEFT_PROPERTY, "Left");
itemPosition.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.LABEL_ORIENTATION_RIGHT_PROPERTY, "Right");
itemPosition.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.LABEL_ORIENTATION_CENTER_PROPERTY, "Center");
itemPosition.setDefaultValue(EJRWTSingleRecordBlockDefinitionProperties.LABEL_POSITION_LEFT_PROPERTY);
itemPosition.setMandatory(true);
EJDevPropertyDefinition labelPosition = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.LABEL_POSITION_PROPERTY, EJPropertyDefinitionType.STRING);
labelPosition.setLabel("Label Position");
labelPosition.setDescription("The position the items label should be displayed i.e. Before or after the item");
labelPosition.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.LABEL_POSITION_LEFT_PROPERTY, "Left");
labelPosition.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.LABEL_POSITION_RIGHT_PROPERTY, "Right");
labelPosition.setDefaultValue(EJRWTSingleRecordBlockDefinitionProperties.LABEL_POSITION_LEFT_PROPERTY);
EJDevPropertyDefinition labelOrientation = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.LABEL_ORIENTATION_PROPERTY, EJPropertyDefinitionType.STRING);
labelOrientation.setLabel("Label Orientation");
labelOrientation.setDescription("The orientation of the labels text");
labelOrientation.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.LABEL_ORIENTATION_LEFT_PROPERTY, "Left");
labelOrientation.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.LABEL_ORIENTATION_RIGHT_PROPERTY, "Right");
labelOrientation.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.LABEL_ORIENTATION_CENTER_PROPERTY, "Center");
labelOrientation.setDefaultValue(EJRWTSingleRecordBlockDefinitionProperties.LABEL_ORIENTATION_RIGHT_PROPERTY);
labelOrientation.setMandatory(true);
EJDevPropertyDefinition initiallyDisplayed = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.INITIALLY_DISPLAYED_PROPERTY, EJPropertyDefinitionType.BOOLEAN);
initiallyDisplayed.setLabel("Initially Displayed");
initiallyDisplayed.setDescription("Indicates if this item should be displayed to the user when the form starts. This property is effective if the Displayed property has been set true");
initiallyDisplayed.setDefaultValue("true");
initiallyDisplayed.setMandatory(true);
EJDevPropertyDefinition horizontalSpan = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.MAIN_XSPAN_PROPERTY, EJPropertyDefinitionType.INTEGER);
horizontalSpan.setLabel("Horizontal Span");
horizontalSpan.setDescription("Indicates how many columns this item should span");
horizontalSpan.setDefaultValue("1");
EJDevPropertyDefinition verticalSpan = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.MAIN_YSPAN_PROPERTY, EJPropertyDefinitionType.INTEGER);
verticalSpan.setLabel("Vertical Span");
verticalSpan.setDescription("Indicates how many rows this item should span");
verticalSpan.setDefaultValue("1");
EJDevPropertyDefinition expandHorizontally = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.MAIN_EXPAND_X_PROPERTY, EJPropertyDefinitionType.BOOLEAN);
expandHorizontally.setLabel("Expand Horizontally");
expandHorizontally.setDescription("Indicates if this item should expand horizontally when the canvas is stretched.");
expandHorizontally.setDefaultValue("true");
EJDevPropertyDefinition expandVertically = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.MAIN_EXPAND_Y_PROPERTY, EJPropertyDefinitionType.BOOLEAN);
expandVertically.setLabel("Expand Vertically");
expandVertically.setDescription("Indicates if this item should expand vertically when the canvas is stretched.");
expandVertically.setDefaultValue("false");
EJDevPropertyDefinition visualAttribute = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.VISUAL_ATTRIBUTE_PROPERTY, EJPropertyDefinitionType.VISUAL_ATTRIBUTE);
visualAttribute.setLabel("Visual Attribute");
visualAttribute.setDescription("The visual attribute that should be applied to this item");
visualAttribute.setMandatory(false);
EJDevPropertyDefinition displayedWidth = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.DISPLAYED_WIDTH_PROPERTY, EJPropertyDefinitionType.INTEGER);
displayedWidth.setLabel("Displayed Width (chars)");
displayedWidth.setDescription("Indicates width <b>(in characters)</b> of this item. If no value or zero has been entered, the width of the item will depend upon its contents");
displayedWidth.setNotifyWhenChanged(true);
EJDevPropertyDefinition displayedHeight = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.DISPLAYED_HEIGHT_PROPERTY, EJPropertyDefinitionType.INTEGER);
displayedHeight.setLabel("Displayed Height (chars)");
displayedWidth.setDescription("Indicates the height <b>(in characters)</b> of this item. If no value or zero has been entered, the height of the item will be relevent to its contents");
displayedHeight.setNotifyWhenChanged(true);
EJDevPropertyDefinitionGroup mainScreenGroup = new EJDevPropertyDefinitionGroup(EJRWTSingleRecordBlockDefinitionProperties.MAIN_DISPLAY_COORDINATES_GROUP);
mainScreenGroup.addPropertyDefinition(itemPosition);
mainScreenGroup.addPropertyDefinition(labelPosition);
mainScreenGroup.addPropertyDefinition(labelOrientation);
mainScreenGroup.addPropertyDefinition(initiallyDisplayed);
mainScreenGroup.addPropertyDefinition(horizontalSpan);
mainScreenGroup.addPropertyDefinition(verticalSpan);
mainScreenGroup.addPropertyDefinition(expandHorizontally);
mainScreenGroup.addPropertyDefinition(expandVertically);
mainScreenGroup.addPropertyDefinition(displayedWidth);
mainScreenGroup.addPropertyDefinition(displayedHeight);
mainScreenGroup.addPropertyDefinition(visualAttribute);
return mainScreenGroup;
}
use of org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup in project rap by entirej.
the class EJRWTSingleRecordBlockDefinition method getItemGroupPropertiesDefinitionGroup.
@Override
public EJPropertyDefinitionGroup getItemGroupPropertiesDefinitionGroup() {
EJDevPropertyDefinitionGroup sectionGroup = new EJDevPropertyDefinitionGroup("Single-Record Block");
EJDevPropertyDefinition showTitleBarExpanded = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_EXPANDED, EJPropertyDefinitionType.BOOLEAN);
showTitleBarExpanded.setLabel("Title Bar Expanded");
showTitleBarExpanded.setDescription("If selected, the renderer will display section title bar expanded by default.");
showTitleBarExpanded.setDefaultValue("true");
EJDevPropertyDefinition titleBarmode = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE, EJPropertyDefinitionType.STRING);
titleBarmode.setLabel("Title Bar Mode");
titleBarmode.setDescription("If you are using the Title Bars for your blocks, then it is possible to expand or collapse the block to either show or hide the content. Setting this property to either Tree or Twistie will enable the expand functionality for this block");
titleBarmode.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE_GROUP, "Group");
titleBarmode.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE_TWISTIE, "Twistie");
titleBarmode.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE_TREE_NODE, "Tree Node");
titleBarmode.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE_NO_EXPAND, "Not Expandable");
titleBarmode.setDefaultValue(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE_GROUP);
EJDevPropertyDefinitionList list = new EJDevPropertyDefinitionList(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_ACTIONS, "Actions");
EJDevPropertyDefinition actionID = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_ACTION_ID, EJPropertyDefinitionType.ACTION_COMMAND);
actionID.setLabel("Action Command");
actionID.setDescription("The action command to be used when this action is selected");
actionID.setMandatory(true);
EJDevPropertyDefinition actionImage = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_ACTION_IMAGE, EJPropertyDefinitionType.PROJECT_FILE);
actionImage.setLabel("Action Image");
actionImage.setDescription("The image to display in the title bar for this action");
actionImage.setMandatory(true);
EJDevPropertyDefinition actionName = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_ACTION_NAME, EJPropertyDefinitionType.STRING);
actionName.setLabel("Action Name");
actionName.setDescription("The name of this action");
EJDevPropertyDefinition actionTooltip = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_ACTION_TOOLTIP, EJPropertyDefinitionType.STRING);
actionTooltip.setLabel("Action Tooltip");
actionTooltip.setDescription("The text entered here will be displayed when the user hovers the mouse pointer over this action");
list.addPropertyDefinition(actionID);
list.addPropertyDefinition(actionImage);
list.addPropertyDefinition(actionName);
list.addPropertyDefinition(actionTooltip);
sectionGroup.addPropertyDefinition(titleBarmode);
sectionGroup.addPropertyDefinitionList(list);
sectionGroup.addPropertyDefinition(showTitleBarExpanded);
EJDevPropertyDefinition customCSSKey = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_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.");
sectionGroup.addPropertyDefinition(customCSSKey);
return sectionGroup;
}
use of org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup in project rap by entirej.
the class EJRWTSingleRecordBlockDefinition method getSpacerItemPropertiesDefinitionGroup.
@Override
public EJPropertyDefinitionGroup getSpacerItemPropertiesDefinitionGroup() {
EJDevPropertyDefinition horizontalSpan = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.MAIN_XSPAN_PROPERTY, EJPropertyDefinitionType.INTEGER);
horizontalSpan.setLabel("Horizontal Span");
horizontalSpan.setDescription("Indicates how many columns this spacer should span");
EJDevPropertyDefinition verticalSpan = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.MAIN_YSPAN_PROPERTY, EJPropertyDefinitionType.INTEGER);
verticalSpan.setLabel("Vertical Span");
verticalSpan.setDescription("Indicates how many rows this spacer should span");
EJDevPropertyDefinition expandx = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.MAIN_EXPAND_X_PROPERTY, EJPropertyDefinitionType.BOOLEAN);
expandx.setLabel("Expand Horizontally");
expandx.setDescription("Indicates if this spacer should expand horizontally to fill the gap between items before and after this spacer");
EJDevPropertyDefinition expandy = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.MAIN_EXPAND_Y_PROPERTY, EJPropertyDefinitionType.BOOLEAN);
expandy.setLabel("Expand Vertically");
expandy.setDescription("Indicates if this spacer should expand vertically to fill the gap between items above and below this spacer");
EJDevPropertyDefinition displayedWidth = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.DISPLAYED_WIDTH_PROPERTY, EJPropertyDefinitionType.INTEGER);
displayedWidth.setLabel("Displayed Width");
displayedWidth.setDescription("Indicates the width (in characters) of this spacer. If no value or zero has been entered, the width of the item will be relevent to its contents");
displayedWidth.setNotifyWhenChanged(true);
EJDevPropertyDefinition displayedHeight = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.DISPLAYED_HEIGHT_PROPERTY, EJPropertyDefinitionType.INTEGER);
displayedHeight.setLabel("Displayed Height");
displayedWidth.setDescription("Indicates the height (in characters) of this spacer. If no value or zero has been entered, the height of the item will be relevent to its contents");
displayedHeight.setNotifyWhenChanged(true);
EJDevPropertyDefinitionGroup mainScreenGroup = new EJDevPropertyDefinitionGroup(EJRWTSingleRecordBlockDefinitionProperties.MAIN_DISPLAY_COORDINATES_GROUP);
mainScreenGroup.addPropertyDefinition(horizontalSpan);
mainScreenGroup.addPropertyDefinition(verticalSpan);
mainScreenGroup.addPropertyDefinition(expandx);
mainScreenGroup.addPropertyDefinition(expandy);
mainScreenGroup.addPropertyDefinition(displayedWidth);
mainScreenGroup.addPropertyDefinition(displayedHeight);
return mainScreenGroup;
}
use of org.entirej.framework.dev.properties.EJDevPropertyDefinitionGroup in project rap by entirej.
the class EJRWTTreeRecordBlockDefinition method getBlockPropertyDefinitionGroup.
/*
* (non-Javadoc)
*
* @seeorg.entirej.framework.renderers.IBlockRenderer#
* getBlockPropertyDefinitionGroup()
*/
public EJPropertyDefinitionGroup getBlockPropertyDefinitionGroup() {
EJDevPropertyDefinitionGroup mainGroup = new EJDevPropertyDefinitionGroup("Tree-Record Block");
EJDevPropertyDefinition doubleClickActionCommand = new EJDevPropertyDefinition(EJRWTTreeBlockDefinitionProperties.DOUBLE_CLICK_ACTION_COMMAND, EJPropertyDefinitionType.ACTION_COMMAND);
doubleClickActionCommand.setLabel("Double Click Action Command");
doubleClickActionCommand.setDescription("Add an action command that will be sent to the action processor when a user double clicks on this block");
EJDevPropertyDefinition clickActionCommand = new EJDevPropertyDefinition(EJRWTTreeBlockDefinitionProperties.CLICK_ACTION_COMMAND, EJPropertyDefinitionType.ACTION_COMMAND);
clickActionCommand.setLabel("Click Action Command");
clickActionCommand.setDescription("Add an action command that will be sent to the action processor when a user clicks on this block");
EJDevPropertyDefinition hideSelection = new EJDevPropertyDefinition(EJRWTTreeBlockDefinitionProperties.HIDE_SELECTION, EJPropertyDefinitionType.BOOLEAN);
hideSelection.setLabel("Hide Tree Selection");
hideSelection.setDescription("If selected, the renderer will hide the tree standard selection");
hideSelection.setDefaultValue("false");
EJDevPropertyDefinition showTableBorder = new EJDevPropertyDefinition(EJRWTTreeBlockDefinitionProperties.HIDE_TREE_BORDER, EJPropertyDefinitionType.BOOLEAN);
showTableBorder.setLabel("Hide Tree Border");
showTableBorder.setDescription("If selected, the renderer will hide the tree standard border");
showTableBorder.setDefaultValue("false");
EJDevPropertyDefinition filter = new EJDevPropertyDefinition(EJRWTTreeBlockDefinitionProperties.FILTER, EJPropertyDefinitionType.BOOLEAN);
filter.setLabel("Add Filter");
filter.setDescription("If selected, the renderer will display a filter field above the table. This filter can then be used by users to filter table data");
filter.setDefaultValue("false");
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.");
EJDevPropertyDefinition showcolorEffect = new EJDevPropertyDefinition(EJRWTMultiRecordBlockDefinitionProperties.COLORING_EFFECT, EJPropertyDefinitionType.BOOLEAN);
showcolorEffect.setLabel("Enable Zebra Colouring");
showcolorEffect.setDescription("If set, the renderer will display block rows in alternative coloring, e.g. Grey / White");
showcolorEffect.setDefaultValue("true");
EJDevPropertyDefinition parentItem = new EJDevPropertyDefinition(EJRWTTreeBlockDefinitionProperties.PARENT_ITEM, EJPropertyDefinitionType.BLOCK_ITEM);
parentItem.setLabel("Child");
parentItem.setMandatory(true);
parentItem.setDescription("A TreeRecord displays records in a tree hierarchy. The hierarchy is made by joining this item to a Parent Item. ");
EJDevPropertyDefinition relationItem = new EJDevPropertyDefinition(EJRWTTreeBlockDefinitionProperties.RELATION_ITEM, EJPropertyDefinitionType.BLOCK_ITEM);
relationItem.setLabel("Parent");
relationItem.setMandatory(true);
relationItem.setDescription("Use to join to the Child Item to create the hierarchy for the data displayed within this block");
EJDevPropertyDefinition imageItem = new EJDevPropertyDefinition(EJRWTTreeBlockDefinitionProperties.NODE_IMAGE_ITEM, EJPropertyDefinitionType.BLOCK_ITEM);
imageItem.setLabel("Image Item");
imageItem.setDescription("It is possible to dynamically add an image to the tree node by supplying the path of a picture within your project or by supplying a byteArray within the items value");
EJDevPropertyDefinition expandLevel = new EJDevPropertyDefinition(EJRWTTreeBlockDefinitionProperties.NODE_EXPAND_LEVEL, EJPropertyDefinitionType.INTEGER);
expandLevel.setLabel("Expand Level");
expandLevel.setDescription("Indicates the level to which the tree will be opened by default when the form is opened");
EJDevPropertyDefinition visualAttribute = new EJDevPropertyDefinition(EJRWTTreeBlockDefinitionProperties.VISUAL_ATTRIBUTE_PROPERTY, EJPropertyDefinitionType.VISUAL_ATTRIBUTE);
visualAttribute.setLabel("Visual Attribute");
visualAttribute.setDescription("The background, foreground and font attributes applied for screen item");
visualAttribute.setMandatory(false);
mainGroup.addPropertyDefinition(visualAttribute);
mainGroup.addPropertyDefinition(relationItem);
mainGroup.addPropertyDefinition(parentItem);
mainGroup.addPropertyDefinition(imageItem);
mainGroup.addPropertyDefinition(expandLevel);
mainGroup.addPropertyDefinition(doubleClickActionCommand);
mainGroup.addPropertyDefinition(clickActionCommand);
mainGroup.addPropertyDefinition(hideSelection);
mainGroup.addPropertyDefinition(showTableBorder);
mainGroup.addPropertyDefinition(filter);
mainGroup.addPropertyDefinition(message);
mainGroup.addPropertyDefinition(showcolorEffect);
EJDevPropertyDefinitionGroup sectionGroup = new EJDevPropertyDefinitionGroup("TITLE_BAR");
sectionGroup.setLabel("Title Bar");
EJDevPropertyDefinition title = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_TITLE, EJPropertyDefinitionType.STRING);
title.setLabel("Title");
title.setDescription("The title to be displayed on this title bar");
EJDevPropertyDefinition showTitleBarExpanded = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_EXPANDED, EJPropertyDefinitionType.BOOLEAN);
showTitleBarExpanded.setLabel("Title Bar Expanded");
showTitleBarExpanded.setDescription("If selected , this blocks title bar will be expanded by default");
showTitleBarExpanded.setDefaultValue("true");
EJDevPropertyDefinition titleBarmode = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE, EJPropertyDefinitionType.STRING);
titleBarmode.setLabel("Title Bar Mode");
titleBarmode.setDescription("If you are using the Title Bars for your blocks, then it is possible to expand or collapse the block to either show or hide the content. Setting this property to either Tree or Twistie will enable the expand functionality for this block");
titleBarmode.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE_GROUP, "Group");
titleBarmode.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE_TWISTIE, "Twistie");
titleBarmode.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE_TREE_NODE, "Tree Node");
titleBarmode.addValidValue(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_MODE_NO_EXPAND, "Not Expandable");
EJDevPropertyDefinitionList list = new EJDevPropertyDefinitionList(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_ACTIONS, "Actions");
EJDevPropertyDefinition actionID = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_ACTION_ID, EJPropertyDefinitionType.ACTION_COMMAND);
actionID.setLabel("Action Command");
actionID.setDescription("The action command to be used when this action is selected");
actionID.setMandatory(true);
EJDevPropertyDefinition actionImage = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_ACTION_IMAGE, EJPropertyDefinitionType.PROJECT_FILE);
actionImage.setLabel("Action Image");
actionImage.setDescription("The image to display in the title bar for this action");
actionImage.setMandatory(true);
EJDevPropertyDefinition actionName = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_ACTION_NAME, EJPropertyDefinitionType.STRING);
actionName.setLabel("Action Name");
actionName.setDescription("The name of this action");
EJDevPropertyDefinition actionTooltip = new EJDevPropertyDefinition(EJRWTSingleRecordBlockDefinitionProperties.ITEM_GROUP_TITLE_BAR_ACTION_TOOLTIP, EJPropertyDefinitionType.STRING);
actionTooltip.setLabel("Action Tooltip");
actionTooltip.setDescription("The text entered here will be displayed when the user hovers the mouse pointer over this action");
list.addPropertyDefinition(actionID);
list.addPropertyDefinition(actionImage);
list.addPropertyDefinition(actionName);
list.addPropertyDefinition(actionTooltip);
sectionGroup.addPropertyDefinition(titleBarmode);
sectionGroup.addPropertyDefinition(title);
sectionGroup.addPropertyDefinitionList(list);
sectionGroup.addPropertyDefinition(showTitleBarExpanded);
mainGroup.addSubGroup(sectionGroup);
return mainGroup;
}
Aggregations