diff --git a/designer/src/com/fr/design/mainframe/alphafine/CellType.java b/designer/src/com/fr/design/mainframe/alphafine/CellType.java index d102491245..016490e44c 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/CellType.java +++ b/designer/src/com/fr/design/mainframe/alphafine/CellType.java @@ -6,13 +6,36 @@ package com.fr.design.mainframe.alphafine; public enum CellType { PLUGIN(0), DOCUMENT(1), FILE(2), ACTION(3), REUSE(4); - private int cellType; + CellType(int type) { this.cellType = type; } + public static CellType parse(int cellType) { + CellType type; + switch (cellType) { + case 0: + type = PLUGIN; + break; + case 1: + type = DOCUMENT; + break; + case 2: + type = FILE; + break; + case 3: + type = ACTION; + break; + case 4: + type = REUSE; + break; + default: + type = FILE; + } + return type; + } public int getCellType() { return cellType; }