IDEMPIERE-4059 Print format editor (#799)

* IDEMPIERE-4059 Print format editor

- add maven for eclipse configs
- remove maximize/restore button

* IDEMPIERE-4059 Print format editor

- Fix changes to Name and Print Name not working
- Added more property editor
This commit is contained in:
hengsin 2021-07-28 16:16:22 +08:00 committed by GitHub
parent de795e4e15
commit fffbbb0353
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 216 additions and 8 deletions

View File

@ -26,14 +26,14 @@
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.babel.editor.rbeBuilder</name>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.jaspersoft.studio.babel.editor.rbeNature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@ -278,7 +278,21 @@ public class WPrintFormatEditor implements ValueChangeListener {
editorMap.put(MPrintFormatItem.COLUMNNAME_PrintAreaType, printFormatForm.printAreaType);
editorMap.put(MPrintFormatItem.COLUMNNAME_PrintName, printFormatForm.editorPrintName);
editorMap.put(MPrintFormatItem.COLUMNNAME_BelowColumn, printFormatForm.belowColumn);
editorMap.put(MPrintFormatItem.COLUMNNAME_BelowColumn, printFormatForm.editorBelowColumn);
editorMap.put(MPrintFormatItem.COLUMNNAME_FormatPattern, printFormatForm.editorFormatPattern);
editorMap.put(MPrintFormatItem.COLUMNNAME_Script, printFormatForm.editorScript);
editorMap.put(MPrintFormatItem.COLUMNNAME_IsOrderBy, printFormatForm.editorIsOrderBy);
editorMap.put(MPrintFormatItem.COLUMNNAME_SortNo, printFormatForm.editorSortNo);
editorMap.put(MPrintFormatItem.COLUMNNAME_IsGroupBy, printFormatForm.editorIsGroupBy);
editorMap.put(MPrintFormatItem.COLUMNNAME_IsAveraged, printFormatForm.editorIsAveraged);
editorMap.put(MPrintFormatItem.COLUMNNAME_IsCounted, printFormatForm.editorIsCounted);
editorMap.put(MPrintFormatItem.COLUMNNAME_IsDeviationCalc, printFormatForm.editorIsDeviationCalc);
editorMap.put(MPrintFormatItem.COLUMNNAME_IsMaxCalc, printFormatForm.editorIsMaxCalc);
editorMap.put(MPrintFormatItem.COLUMNNAME_IsMinCalc, printFormatForm.editorIsMinCalc);
editorMap.put(MPrintFormatItem.COLUMNNAME_IsSummarized, printFormatForm.editorIsSummarized);
editorMap.put(MPrintFormatItem.COLUMNNAME_IsVarianceCalc, printFormatForm.editorIsVarianceCalc);
editorMap.put(MPrintFormatItem.COLUMNNAME_IsRunningTotal, printFormatForm.editorIsRunningTotal);
editorMap.put(MPrintFormatItem.COLUMNNAME_RunningTotalLines, printFormatForm.editorRunningTotalLines);
}
private void validateProperties(final MPrintFormatItem pfItem) {

View File

@ -119,7 +119,21 @@ public class WPrintFormatEditorForm extends Window
protected WEditor arcDiameter = null;
protected WEditor printAreaType = null;
protected WEditor editorTestValue = null;
protected WEditor belowColumn = null;
protected WEditor editorBelowColumn = null;
protected WEditor editorFormatPattern = null;
protected WEditor editorScript = null;
protected WEditor editorIsOrderBy = null;
protected WEditor editorSortNo = null;
protected WEditor editorIsGroupBy = null;
protected WEditor editorIsAveraged = null;
protected WEditor editorIsCounted = null;
protected WEditor editorIsDeviationCalc = null;
protected WEditor editorIsMaxCalc = null;
protected WEditor editorIsMinCalc = null;
protected WEditor editorIsSummarized = null;
protected WEditor editorIsVarianceCalc = null;
protected WEditor editorIsRunningTotal = null;
protected WEditor editorRunningTotalLines = null;
/**
*
@ -135,13 +149,15 @@ public class WPrintFormatEditorForm extends Window
* @throws Exception
*/
public void init() throws Exception {
setSizable(false);
setSizable(true);
setClosable(true);
setMaximizable(true);
setMaximized(true);
appendChild(mainLayout);
LayoutUtils.addSclass("tab-editor-form-content", mainLayout);
setBorder("normal");
setHeight("80%");
setWidth("80%");
confirmPanel.addActionListener(Events.ON_CLICK, e -> pfe.onConfirmPanelClick(e));
addEventListener(Events.ON_CANCEL, e -> pfe.onCancel());
@ -270,6 +286,7 @@ public class WPrintFormatEditorForm extends Window
editorName = new WStringEditor(MPrintFormatItem.COLUMNNAME_Name, false,
false, false, 0, 0, null, null);
editorName.fillHorizontal();
editorName.addValueChangeListener(pfe);
row.appendChild(labelName.rightAlign());
row.appendChild(editorName.getComponent());
row.setGroup(group);
@ -281,6 +298,7 @@ public class WPrintFormatEditorForm extends Window
editorPrintName = new WStringEditor(MPrintFormatItem.COLUMNNAME_PrintName, false,
false, false, 0, 0, null, null);
editorPrintName.fillHorizontal();
editorPrintName.addValueChangeListener(pfe);
row.appendChild(labelPrintName.rightAlign());
row.appendChild(editorPrintName.getComponent());
row.setGroup(group);
@ -302,6 +320,7 @@ public class WPrintFormatEditorForm extends Window
MPrintFormatItem.COLUMNNAME_SeqNo));
editorSeqNo = new WNumberEditor(MPrintFormatItem.COLUMNNAME_SeqNo,
false, false, false, DisplayType.Integer, labelSeqNo.getValue());
editorSeqNo.addValueChangeListener(pfe);
editorSeqNo.fillHorizontal();
row.appendChild(labelSeqNo.rightAlign());
row.appendChild(editorSeqNo.getComponent());
@ -313,6 +332,7 @@ public class WPrintFormatEditorForm extends Window
MPrintFormatItem.COLUMNNAME_ImageURL));
imageUrl = new WStringEditor(MPrintFormatItem.COLUMNNAME_ImageURL, false,
false, false, 0, 0, null, null);
imageUrl.addValueChangeListener(pfe);
ZKUpdateUtil.setHflex((HtmlBasedComponent) imageUrl.getComponent(), "1");
row.appendChild(imgURL.rightAlign());
row.appendChild(imageUrl.getComponent());
@ -489,10 +509,10 @@ public class WPrintFormatEditorForm extends Window
row = new Row();
row.appendChild(new Label(Msg.getElement(Env.getCtx(),
MPrintFormatItem.COLUMNNAME_BelowColumn)));
belowColumn = new WNumberEditor(MPrintFormatItem.COLUMNNAME_BelowColumn,
editorBelowColumn = new WNumberEditor(MPrintFormatItem.COLUMNNAME_BelowColumn,
false, false, true, DisplayType.Integer, "");
row.appendChild(belowColumn.getComponent());
belowColumn.addValueChangeListener(pfe);
row.appendChild(editorBelowColumn.getComponent());
editorBelowColumn.addValueChangeListener(pfe);
row.setGroup(group);
rows.appendChild(row);
@ -658,6 +678,174 @@ public class WPrintFormatEditorForm extends Window
row.setGroup(group);
rows.appendChild(row);
row = new Row();
label = new Label(Msg.getElement(Env.getCtx(),
MPrintFormatItem.COLUMNNAME_FormatPattern));
editorFormatPattern = new WStringEditor(MPrintFormatItem.COLUMNNAME_FormatPattern, false,
false, false, 0, 0, null, null);
editorFormatPattern.fillHorizontal();
editorFormatPattern.addValueChangeListener(pfe);
row.appendChild(label.rightAlign());
row.appendChild(editorFormatPattern.getComponent());
row.setGroup(group);
rows.appendChild(row);
row = new Row();
label = new Label(Msg.getElement(Env.getCtx(),
MPrintFormatItem.COLUMNNAME_Script));
editorScript = new WStringEditor(MPrintFormatItem.COLUMNNAME_Script, false,
false, false, 0, 0, null, null);
editorScript.fillHorizontal();
editorScript.addValueChangeListener(pfe);
row.appendChild(label.rightAlign());
row.appendChild(editorScript.getComponent());
row.setGroup(group);
rows.appendChild(row);
row = new Row();
row.appendChild(new Label(Msg.getElement(
Env.getCtx(),
MPrintFormatItem.COLUMNNAME_IsOrderBy)));
editorIsOrderBy = new WYesNoEditor(
MPrintFormatItem.COLUMNNAME_IsOrderBy, "", null,
false, false, true);
row.appendChild(editorIsOrderBy.getComponent());
editorIsOrderBy.addValueChangeListener(pfe);
row.setGroup(group);
rows.appendChild(row);
row = new Row();
label = new Label(Msg.getElement(Env.getCtx(),
MPrintFormatItem.COLUMNNAME_SortNo));
editorSortNo = new WNumberEditor(MPrintFormatItem.COLUMNNAME_SortNo,
false, false, false, DisplayType.Integer, labelSeqNo.getValue());
editorSortNo.fillHorizontal();
editorSortNo.addValueChangeListener(pfe);
row.appendChild(label.rightAlign());
row.appendChild(editorSortNo.getComponent());
row.setGroup(group);
rows.appendChild(row);
row = new Row();
row.appendChild(new Label(Msg.getElement(
Env.getCtx(),
MPrintFormatItem.COLUMNNAME_IsGroupBy)));
editorIsGroupBy = new WYesNoEditor(
MPrintFormatItem.COLUMNNAME_IsGroupBy, "", null,
false, false, true);
row.appendChild(editorIsGroupBy.getComponent());
editorIsGroupBy.addValueChangeListener(pfe);
row.setGroup(group);
rows.appendChild(row);
row = new Row();
row.appendChild(new Label(Msg.getElement(
Env.getCtx(),
MPrintFormatItem.COLUMNNAME_IsAveraged)));
editorIsAveraged = new WYesNoEditor(
MPrintFormatItem.COLUMNNAME_IsAveraged, "", null,
false, false, true);
row.appendChild(editorIsAveraged.getComponent());
editorIsAveraged.addValueChangeListener(pfe);
row.setGroup(group);
rows.appendChild(row);
row = new Row();
row.appendChild(new Label(Msg.getElement(
Env.getCtx(),
MPrintFormatItem.COLUMNNAME_IsCounted)));
editorIsCounted = new WYesNoEditor(
MPrintFormatItem.COLUMNNAME_IsCounted, "", null,
false, false, true);
row.appendChild(editorIsCounted.getComponent());
editorIsCounted.addValueChangeListener(pfe);
row.setGroup(group);
rows.appendChild(row);
row = new Row();
row.appendChild(new Label(Msg.getElement(
Env.getCtx(),
MPrintFormatItem.COLUMNNAME_IsDeviationCalc)));
editorIsDeviationCalc = new WYesNoEditor(
MPrintFormatItem.COLUMNNAME_IsDeviationCalc, "", null,
false, false, true);
row.appendChild(editorIsDeviationCalc.getComponent());
editorIsDeviationCalc.addValueChangeListener(pfe);
row.setGroup(group);
rows.appendChild(row);
row = new Row();
row.appendChild(new Label(Msg.getElement(
Env.getCtx(),
MPrintFormatItem.COLUMNNAME_IsMaxCalc)));
editorIsMaxCalc = new WYesNoEditor(
MPrintFormatItem.COLUMNNAME_IsMaxCalc, "", null,
false, false, true);
row.appendChild(editorIsMaxCalc.getComponent());
editorIsMaxCalc.addValueChangeListener(pfe);
row.setGroup(group);
rows.appendChild(row);
row = new Row();
row.appendChild(new Label(Msg.getElement(
Env.getCtx(),
MPrintFormatItem.COLUMNNAME_IsMinCalc)));
editorIsMinCalc = new WYesNoEditor(
MPrintFormatItem.COLUMNNAME_IsMinCalc, "", null,
false, false, true);
row.appendChild(editorIsMinCalc.getComponent());
editorIsMinCalc.addValueChangeListener(pfe);
row.setGroup(group);
rows.appendChild(row);
row = new Row();
row.appendChild(new Label(Msg.getElement(
Env.getCtx(),
MPrintFormatItem.COLUMNNAME_IsSummarized)));
editorIsSummarized = new WYesNoEditor(
MPrintFormatItem.COLUMNNAME_IsSummarized, "", null,
false, false, true);
row.appendChild(editorIsSummarized.getComponent());
editorIsSummarized.addValueChangeListener(pfe);
row.setGroup(group);
rows.appendChild(row);
row = new Row();
row.appendChild(new Label(Msg.getElement(
Env.getCtx(),
MPrintFormatItem.COLUMNNAME_IsVarianceCalc)));
editorIsVarianceCalc = new WYesNoEditor(
MPrintFormatItem.COLUMNNAME_IsVarianceCalc, "", null,
false, false, true);
row.appendChild(editorIsVarianceCalc.getComponent());
editorIsVarianceCalc.addValueChangeListener(pfe);
row.setGroup(group);
rows.appendChild(row);
row = new Row();
row.appendChild(new Label(Msg.getElement(
Env.getCtx(),
MPrintFormatItem.COLUMNNAME_IsRunningTotal)));
editorIsRunningTotal = new WYesNoEditor(
MPrintFormatItem.COLUMNNAME_IsRunningTotal, "", null,
false, false, true);
row.appendChild(editorIsRunningTotal.getComponent());
editorIsRunningTotal.addValueChangeListener(pfe);
row.setGroup(group);
rows.appendChild(row);
row = new Row();
label = new Label(Msg.getElement(Env.getCtx(),
MPrintFormatItem.COLUMNNAME_RunningTotalLines));
editorRunningTotalLines = new WNumberEditor(MPrintFormatItem.COLUMNNAME_RunningTotalLines,
false, false, false, DisplayType.Integer, labelSeqNo.getValue());
editorRunningTotalLines.fillHorizontal();
editorRunningTotalLines.addValueChangeListener(pfe);
row.appendChild(label.rightAlign());
row.appendChild(editorRunningTotalLines.getComponent());
row.setGroup(group);
rows.appendChild(row);
row = new Row();
Separator esep = new Separator("horizontal");
esep.setSpacing("10px");