diff --git a/src/main/java/org/gcube/portlets/user/tdwx/client/model/util/ColumnConfigGenerator.java b/src/main/java/org/gcube/portlets/user/tdwx/client/model/util/ColumnConfigGenerator.java index a526183..7bd27eb 100644 --- a/src/main/java/org/gcube/portlets/user/tdwx/client/model/util/ColumnConfigGenerator.java +++ b/src/main/java/org/gcube/portlets/user/tdwx/client/model/util/ColumnConfigGenerator.java @@ -130,14 +130,40 @@ public class ColumnConfigGenerator { } - if (columnDefinition.getType() == ColumnType.MEASURE) { - ssb.trustedBackgroundColor("#90CB8B"); - } - - if (columnDefinition.getType() == ColumnType.VIEWCOLUMN) { - ssb.trustedBackgroundColor("#c3e1fc"); + if(columnDefinition.getType()==null){ + + } else { + switch(columnDefinition.getType()){ + case COLUMNID: + break; + case DIMENSION: + break; + case CODE: + break; + case MEASURE: + ssb.trustedBackgroundColor("#90CB8B"); + break; + case SYSTEM: + break; + case TIMEDIMENSION: + break; + case USER: + break; + case VALIDATION: + break; + case VIEWCOLUMN_OF_DIMENSION: + ssb.trustedBackgroundColor("#c3e1fc"); + break; + case VIEWCOLUMN_OF_TIMEDIMENSION: + ssb.trustedBackgroundColor("#f6e681"); + break; + default: + break; + + } } + columnConfig.setColumnStyle(ssb.toSafeStyles()); columnConfig.setHidden(!columnDefinition.isVisible()); diff --git a/src/main/java/org/gcube/portlets/user/tdwx/shared/model/ColumnType.java b/src/main/java/org/gcube/portlets/user/tdwx/shared/model/ColumnType.java index 264602f..c6a319a 100644 --- a/src/main/java/org/gcube/portlets/user/tdwx/shared/model/ColumnType.java +++ b/src/main/java/org/gcube/portlets/user/tdwx/shared/model/ColumnType.java @@ -16,7 +16,9 @@ public enum ColumnType { COLUMNID, DIMENSION, TIMEDIMENSION, - VIEWCOLUMN, + VIEWCOLUMN_OF_DIMENSION, + VIEWCOLUMN_OF_TIMEDIMENSION, + CODE, MEASURE, SYSTEM; }