diff --git a/.gitignore b/.gitignore index c1af3970..bfbe547a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ /pom.xml.releaseBackup /pom.xml.tag /release.properties +.idea/ +*.iml diff --git a/README.md b/README.md index b103bcbf..43133249 100644 --- a/README.md +++ b/README.md @@ -9,4 +9,33 @@ is independent of any particular GUI implementation. Project Page ======= -Please visit Pivot4J home page at http://www.pivot4j.org +Please visit original Pivot4J home page at http://www.pivot4j.org +Original Pivot4J is not maintained. This is Argus fork of original Pivot4J. + +Build +======= + +* use java 8 +* mvn clean install + +Debug pivot4j-analytics +======= +pivot4j-analytics - оригинальное демо приложение для используемого Аргус pivot4j-core. + +* IDEA. Открой как проект: pivot4j/pom.xml +* File/Project structure. + * В Project SDK задай JDK 11. +* Edit configuration "JBoss/WildFly pivot4j-analytics" + * Application server: укажи чистую инсталляцию Wilfdly 15.0.1. Чистую, значит не сконфигурированную под Аргус, не применялся configure_server.bat. +* Собери артефакт + * Меню Build\Build artifacts\pivot4j-analytics:war exploded + * Появится каталог pivot4j\pivot4j-analytics\target\pivot4j-analytics-<версия> + * В него надо руками положить демо-БД в "WEB-INF/foodmart" + * Из "A:\Разработка.java\lib and docs\pivot4j\pivot4j-analytics-0.9.war" взять каталог "WEB-INF/foodmart" +* Запуcкай конфигурацию "JBoss/WildFly pivot4j-analytics" + + + + + + diff --git a/pivot4j-analytics/.run/JBoss_WildFly pivot4j exploded.run.xml b/pivot4j-analytics/.run/JBoss_WildFly pivot4j exploded.run.xml new file mode 100644 index 00000000..c5f019b5 --- /dev/null +++ b/pivot4j-analytics/.run/JBoss_WildFly pivot4j exploded.run.xml @@ -0,0 +1,74 @@ + + + + \ No newline at end of file diff --git a/pivot4j-analytics/pom.xml b/pivot4j-analytics/pom.xml index 4ee75728..bc11eb9c 100644 --- a/pivot4j-analytics/pom.xml +++ b/pivot4j-analytics/pom.xml @@ -3,7 +3,7 @@ org.pivot4j pivot4j - 1.0-SNAPSHOT + 1.0-TASK-123529 ../pom.xml diff --git a/pivot4j-core/pom.xml b/pivot4j-core/pom.xml index 283c0c58..5838a3a7 100644 --- a/pivot4j-core/pom.xml +++ b/pivot4j-core/pom.xml @@ -297,5 +297,11 @@ emuStudio Repository http://emustudio.sf.net/repository/ + + + central + argus-internal + http://git:8081/artifactory/repo + diff --git a/pivot4j-core/src/main/java/org/pivot4j/ui/poi/ExcelExporter.java b/pivot4j-core/src/main/java/org/pivot4j/ui/poi/ExcelExporter.java index 63cab44d..90aaf585 100644 --- a/pivot4j-core/src/main/java/org/pivot4j/ui/poi/ExcelExporter.java +++ b/pivot4j-core/src/main/java/org/pivot4j/ui/poi/ExcelExporter.java @@ -8,8 +8,8 @@ */ package org.pivot4j.ui.poi; -import static org.pivot4j.ui.CellTypes.VALUE; import static org.pivot4j.ui.CellTypes.LABEL; +import static org.pivot4j.ui.CellTypes.VALUE; import java.awt.Color; import java.io.IOException; @@ -20,11 +20,15 @@ import org.apache.commons.lang.StringUtils; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.util.HSSFColor; +import org.apache.poi.ss.usermodel.BorderStyle; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellStyle; +import org.apache.poi.ss.usermodel.FillPatternType; import org.apache.poi.ss.usermodel.Font; +import org.apache.poi.ss.usermodel.HorizontalAlignment; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.VerticalAlignment; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.RegionUtil; @@ -396,11 +400,11 @@ protected CellStyle createHeaderCellStyle() { font.setFontName(fontFamily); font.setFontHeightInPoints((short) fontSize); - font.setBoldweight(Font.BOLDWEIGHT_BOLD); + font.setBold(true); style.setFont(font); - style.setAlignment(CellStyle.ALIGN_LEFT); - style.setVerticalAlignment(CellStyle.VERTICAL_CENTER); + style.setAlignment(HorizontalAlignment.LEFT); + style.setVerticalAlignment(VerticalAlignment.CENTER); switch (format) { case XSSF: @@ -415,11 +419,11 @@ protected CellStyle createHeaderCellStyle() { assert false; } - style.setFillPattern(CellStyle.SOLID_FOREGROUND); - style.setBorderTop(CellStyle.BORDER_THIN); - style.setBorderLeft(CellStyle.BORDER_THIN); - style.setBorderRight(CellStyle.BORDER_THIN); - style.setBorderBottom(CellStyle.BORDER_THIN); + style.setFillPattern(FillPatternType.SOLID_FOREGROUND); + style.setBorderTop(BorderStyle.THIN); + style.setBorderLeft(BorderStyle.THIN); + style.setBorderRight(BorderStyle.THIN); + style.setBorderBottom(BorderStyle.THIN); return style; } @@ -441,15 +445,15 @@ protected CellStyle createValueCellStyle() { font.setFontName(fontFamily); font.setFontHeightInPoints((short) fontSize); - font.setBoldweight(Font.BOLDWEIGHT_NORMAL); + font.setBold(true); style.setFont(font); - style.setAlignment(CellStyle.ALIGN_RIGHT); - style.setVerticalAlignment(CellStyle.VERTICAL_CENTER); - style.setBorderTop(CellStyle.BORDER_THIN); - style.setBorderLeft(CellStyle.BORDER_THIN); - style.setBorderRight(CellStyle.BORDER_THIN); - style.setBorderBottom(CellStyle.BORDER_THIN); + style.setAlignment(HorizontalAlignment.RIGHT); + style.setVerticalAlignment(VerticalAlignment.CENTER); + style.setBorderTop(BorderStyle.THIN); + style.setBorderLeft(BorderStyle.THIN); + style.setBorderRight(BorderStyle.THIN); + style.setBorderBottom(BorderStyle.THIN); style.setDataFormat((short) 4); return style; @@ -472,11 +476,11 @@ protected CellStyle createAggregationCellStyle() { font.setFontName(fontFamily); font.setFontHeightInPoints((short) fontSize); - font.setBoldweight(Font.BOLDWEIGHT_NORMAL); + font.setBold(true); style.setFont(font); - style.setAlignment(CellStyle.ALIGN_RIGHT); - style.setVerticalAlignment(CellStyle.VERTICAL_CENTER); + style.setAlignment(HorizontalAlignment.RIGHT); + style.setVerticalAlignment(VerticalAlignment.CENTER); switch (format) { case XSSF: @@ -491,11 +495,11 @@ protected CellStyle createAggregationCellStyle() { assert false; } - style.setFillPattern(CellStyle.SOLID_FOREGROUND); - style.setBorderTop(CellStyle.BORDER_THIN); - style.setBorderLeft(CellStyle.BORDER_THIN); - style.setBorderRight(CellStyle.BORDER_THIN); - style.setBorderBottom(CellStyle.BORDER_THIN); + style.setFillPattern(FillPatternType.SOLID_FOREGROUND); + style.setBorderTop(BorderStyle.THIN); + style.setBorderLeft(BorderStyle.THIN); + style.setBorderRight(BorderStyle.THIN); + style.setBorderBottom(BorderStyle.THIN); style.setDataFormat((short) 4); return style; @@ -558,14 +562,10 @@ protected void mergeCells(TableRenderContext context, Sheet sheet, for (CellRangeAddress region : regions) { sheet.addMergedRegion(region); - RegionUtil.setBorderTop(CellStyle.BORDER_THIN, region, sheet, - workbook); - RegionUtil.setBorderLeft(CellStyle.BORDER_THIN, region, sheet, - workbook); - RegionUtil.setBorderBottom(CellStyle.BORDER_THIN, region, sheet, - workbook); - RegionUtil.setBorderRight(CellStyle.BORDER_THIN, region, sheet, - workbook); + RegionUtil.setBorderTop(BorderStyle.THIN, region, sheet); + RegionUtil.setBorderLeft(BorderStyle.THIN, region, sheet); + RegionUtil.setBorderBottom(BorderStyle.THIN, region, sheet); + RegionUtil.setBorderRight(BorderStyle.THIN, region, sheet); } } diff --git a/pivot4j-core/src/main/java/org/pivot4j/ui/table/TableHeaderNode.java b/pivot4j-core/src/main/java/org/pivot4j/ui/table/TableHeaderNode.java index 867fdb10..dac42ce0 100644 --- a/pivot4j-core/src/main/java/org/pivot4j/ui/table/TableHeaderNode.java +++ b/pivot4j-core/src/main/java/org/pivot4j/ui/table/TableHeaderNode.java @@ -252,7 +252,9 @@ void addMemberProperties() { List> children = null; - if (getMember() != null) { + // Should render level properties only once behind the latest + if (getMember() != null && isLastInLevel()) { + List levels = getReference().getLevels(getHierarchy()); boolean showParent = getReference().getRenderer().getShowParentMembers(); @@ -319,6 +321,18 @@ void addMemberProperties() { } } + private boolean isLastInLevel() { + if (getChildCount() == 0) { + return true; + } + + TableHeaderNode childNode = (TableHeaderNode) getChildren().get(0); + if (getMember().getLevel().getDepth() == childNode.getMember().getLevel().getDepth()) { + return !OlapUtils.equals(getHierarchy(), childNode.getHierarchy()); + } + return true; + } + void mergeChildren() { List> children = new ArrayList>(getChildren()); diff --git a/pom.xml b/pom.xml index f7bc0b7a..0ce950a1 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.pivot4j pivot4j - 1.0-SNAPSHOT + 1.0-TASK-123529 Pivot4J Pivot4J provides a common API for OLAP servers which can be used to build an analytical service frontend with pivot style GUI. @@ -108,7 +108,7 @@ It aims to leverage mature but now discontinued JPivot project's codebase to mak 4.3 2.3.20 1.4.3 - 3.10-FINAL + 3.17 2.0.0 6.0.41 2.11.0 @@ -125,7 +125,8 @@ It aims to leverage mature but now discontinued JPivot project's codebase to mak pivot4j-core pivot4j-analytics - pivot4j-pentaho + @@ -531,30 +532,32 @@ It aims to leverage mature but now discontinued JPivot project's codebase to mak + - pentaho - Pentaho Repository - http://repository.pentaho.org/artifactory/repo/ + central + argus-internal + http://git:8081/artifactory/repo + + true + + + + central + argus-internal + http://git:8081/artifactory/repo + + + + - sonatype-nexus-staging - Sonatype Staging - https://oss.sonatype.org/service/local/staging/deploy/maven2/ + artifactory + artifactory-releases + http://git:8081/artifactory/ext-release-local - - sonatype-nexus-snapshots - Sonatype Snapshots - https://oss.sonatype.org/content/repositories/snapshots/ - - - pivot4j - Pivot4J Home Page - ${deploy.site.url} - - http://www.pivot4j.org/download.html