diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java index 0d7b1297ea..4a07d9ab91 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java @@ -27,13 +27,10 @@ public final class ServerTableDataWrapper extends AbstractTableDataWrapper { @Override public Icon getIcon() { if (tabledata instanceof DBTableData) { - if (StringUtils.isBlank(((DBTableData) tabledata).getQuery())) { - return new LazyIcon("server_database_warning"); - } - else { - return new LazyIcon("server_database"); - } - } else if (tabledata instanceof ClassTableData) { + return getDBTableDataIcon(); + } + + if (tabledata instanceof ClassTableData) { return new LazyIcon("class_table_data"); } else if (tabledata instanceof EmbeddedTableData) { return new LazyIcon("data_table"); @@ -49,6 +46,15 @@ public final class ServerTableDataWrapper extends AbstractTableDataWrapper { return new LazyIcon("server_database"); } + private Icon getDBTableDataIcon() { + if (StringUtils.isBlank(((DBTableData) tabledata).getQuery())) { + return new LazyIcon("server_database_warning"); + } + else { + return new LazyIcon("server_database"); + } + } + /** * 是否异常 * @return