Browse Source

Merge branch 'fbp/release' of ssh://code.fineres.com:7999/~vito/c-design into fbp/release

fbp/release
vito 3 months ago
parent
commit
075d7e2111
  1. 49
      designer-base/src/main/java/com/fine/theme/icon/IconManager.java
  2. 127
      designer-base/src/main/java/com/fine/theme/icon/plugin/PluginIconSet.java
  3. 3
      designer-base/src/main/java/com/fine/theme/light/ui/laf/FineDarkLaf.java
  4. 2
      designer-base/src/main/java/com/fine/theme/light/ui/laf/FineLaf.java
  5. 3
      designer-base/src/main/java/com/fine/theme/light/ui/laf/FineLightLaf.java
  6. 4
      designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
  7. 6
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTree.java
  8. 13
      designer-base/src/main/java/com/fr/design/data/datapane/connect/LocalConnectionSource.java
  9. 18
      designer-base/src/main/java/com/fr/design/data/datapane/preview/ConnectionInfoBeanHelper.java
  10. 4
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java
  11. 28
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java
  12. 39
      designer-base/src/main/java/com/fr/design/fun/LazyIconProvider.java
  13. 59
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractLazyIconProvider.java
  14. 3
      designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java
  15. 6
      designer-base/src/main/java/com/fr/design/gui/ilist/JNameEdList.java
  16. 4
      designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java
  17. 2
      designer-base/src/main/java/com/fr/design/gui/itree/filetree/EnvFileTree.java
  18. 17
      designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileTreeIcon.java
  19. 1
      designer-base/src/main/java/com/fr/design/i18n/DesignSizeI18nManager.java
  20. 8
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  21. 31
      designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java
  22. 3
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/LookAndFeelAction.java
  23. 8
      designer-base/src/main/java/com/fr/design/present/dict/DatabaseDictPane.java
  24. 44
      designer-base/src/main/java/com/fr/file/FILEChooserPane.java
  25. 16
      designer-base/src/main/java/com/fr/file/FILEFactory.java
  26. 11
      designer-base/src/main/java/com/fr/file/FileDataFILE.java
  27. 13
      designer-base/src/main/resources/com/fine/theme/icon/filetree/folder_half_authority.svg
  28. 9
      designer-base/src/main/resources/com/fine/theme/icon/filetree/folder_half_authority_open.svg
  29. 4
      designer-base/src/main/resources/com/fine/theme/icon/tip/waiting.svg
  30. 5
      designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
  31. 1
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  32. 2
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  33. 2
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java
  34. 17
      designer-chart/src/main/java/com/fr/van/chart/bubble/VanChartBubbleSeriesPane.java
  35. 11
      designer-chart/src/main/java/com/fr/van/chart/bubble/component/VanChartBubblePane.java
  36. 2
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnSeriesPane.java
  37. 41
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartCustomStackAndAxisConditionPane.java
  38. 14
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartAreaSeriesFillColorPane.java
  39. 21
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java
  40. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartAxisButtonPane.java
  41. 39
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java
  42. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAreaBackgroundPane.java
  43. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAxisAreaPane.java
  44. 29
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartCustomIntervalBackgroundPane.java
  45. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  46. 21
      designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapLayerPane.java
  47. 2
      designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/MapDataTree.java
  48. 21
      designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelSeriesPane.java
  49. 3
      designer-chart/src/main/java/com/fr/van/chart/map/VanChartMapSeriesPane.java
  50. 14
      designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java
  51. 17
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java
  52. 11
      designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieSeriesPane.java
  53. 7
      designer-chart/src/main/java/com/fr/van/chart/pie/VanChartPieSeriesPane.java
  54. 17
      designer-chart/src/main/java/com/fr/van/chart/radar/VanChartRadarSeriesPane.java
  55. 11
      designer-chart/src/main/java/com/fr/van/chart/range/component/GradualIntervalConfigPane.java
  56. 15
      designer-chart/src/main/java/com/fr/van/chart/range/component/LegendLabelFormatPane.java
  57. 9
      designer-chart/src/main/java/com/fr/van/chart/treemap/style/VanChartTreeMapSeriesPane.java
  58. 42
      designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java
  59. 30
      designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java
  60. 4
      designer-realize/src/main/java/com/fanruan/boot/env/DesignFunctionComponent.java
  61. 4
      designer-realize/src/main/java/com/fanruan/boot/pre/DesignPreStartComponent.java
  62. 5
      designer-realize/src/main/java/com/fanruan/data/ConnectionConfigWrapper.java
  63. 10
      designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java
  64. 4
      designer-realize/src/main/java/com/fr/design/mainframe/form/FormReportComponentComposite.java
  65. 1
      designer-realize/src/main/java/com/fr/design/report/freeze/FormECRepeatAndFreezeSettingPane.java
  66. 31
      designer-realize/src/main/java/com/fr/design/widget/ui/CheckBoxDefinePane.java
  67. 7
      designer-realize/src/main/java/com/fr/start/module/optimized/ConfigurationActivator4Designer.java

49
designer-base/src/main/java/com/fine/theme/icon/IconManager.java

@ -1,5 +1,8 @@
package com.fine.theme.icon;
import com.fine.theme.icon.plugin.PluginIconSet;
import com.fine.theme.light.ui.FineLightIconSet;
import com.formdev.flatlaf.FlatLaf;
import com.fr.base.extension.FileExtension;
import com.fr.general.IOUtils;
import com.fr.log.FineLoggerFactory;
@ -8,10 +11,13 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.Icon;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;
import java.awt.Dimension;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
* 图标管理器
@ -26,12 +32,42 @@ import java.util.HashMap;
*/
@Immutable
public class IconManager {
public static final String ICON_DISABLE_SUFFIX = "_disable";
public static final Dimension DEFAULT_DIMENSION = new Dimension(16, 16);
private static final ArrayList<IconSet> ICON_SETS = new ArrayList<>(2);
private static final ArrayList<IconSet> ICON_SETS = new ArrayList<>();
private static final HashMap<String, WeakReference<Icon>> CACHE = new HashMap<>(64);
/**
* 初始化 IconFineIconPluginIcon
*/
public static void initializeIcon() {
addIconSet();
}
/**
* 切换 Icon
*/
public static void updateIcon() {
ICON_SETS.clear();
clearCache();
addIconSet();
}
private static void addIconSet() {
boolean dark = false;
LookAndFeel laf = UIManager.getLookAndFeel();
if (laf instanceof FlatLaf) {
dark = ((FlatLaf) laf).isDark();
}
if (dark) {
// dark 主题还没适配
addSet(new FineLightIconSet());
} else {
addSet(new FineLightIconSet());
}
addSet(new PluginIconSet());
}
/**
* 获取图标集
@ -40,10 +76,17 @@ public class IconManager {
* @return 图标集
*/
public static IconSet getSet(String id) {
IconSet iconSet = null;
for (IconSet set : ICON_SETS) {
if (set.getId().equals(id)) {
return set;
iconSet = set;
}
if (set instanceof PluginIconSet && iconSet == null) {
iconSet = PluginIconSet.getIconSet(id);
}
}
if (iconSet != null) {
return iconSet;
}
throw new IconException("[IconManager] Can not find icon set by id: " + id);
}

127
designer-base/src/main/java/com/fine/theme/icon/plugin/PluginIconSet.java

@ -0,0 +1,127 @@
package com.fine.theme.icon.plugin;
import com.fine.theme.icon.AbstractIconSet;
import com.fine.theme.icon.IconSet;
import com.fine.theme.icon.IconType;
import com.fine.theme.icon.JsonIconSet;
import com.fine.theme.icon.UrlIconResource;
import com.formdev.flatlaf.FlatLaf;
import com.fr.design.fun.LazyIconProvider;
import com.fr.general.GeneralContext;
import com.fr.plugin.manage.PluginFilter;
import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import com.fr.plugin.observer.PluginEventType;
import com.fr.stable.AssistUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.Icon;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;
import java.awt.Dimension;
import java.util.ArrayList;
import java.util.Set;
import java.util.function.Consumer;
/**
* 管理插件 iconSet
* @author lemon
* @since
* Created on
*/
public class PluginIconSet extends AbstractIconSet {
private static final String NAME = "Plugin Icon Set";
private static final ArrayList<IconSet> PLUGIN_ICON_SETS = new ArrayList<>();
public PluginIconSet() {
name = NAME;
listenPluginIcons();
}
/**
* 适配插件图标 Icon
*/
public static void listenPluginIcons() {
//注册插件监听
PluginFilter filter = context -> context.contain(LazyIconProvider.MARK_STRING);
PluginEventListener insert = new PluginEventListener() {
@Override
public void on(PluginEvent event) {
handlePluginEvent(event, (provider) -> PLUGIN_ICON_SETS.add(generateJsonIconSet(provider)));
}
};
PluginEventListener remove = new PluginEventListener() {
@Override
public void on(PluginEvent event) {
handlePluginEvent(event, (provider) -> PLUGIN_ICON_SETS.removeIf(iconSet -> iconSet.getId().equals(provider.pluginId())));
}
};
GeneralContext.listenPlugin(PluginEventType.AfterRun, insert, filter);
GeneralContext.listenPlugin(PluginEventType.AfterInstall, insert, filter);
GeneralContext.listenPlugin(PluginEventType.AfterForbid, remove, filter);
GeneralContext.listenPlugin(PluginEventType.AfterUninstall, remove, filter);
}
private static void handlePluginEvent(PluginEvent event, Consumer<LazyIconProvider> consumer) {
Set<LazyIconProvider> set = event.getContext().getRuntime().get(LazyIconProvider.MARK_STRING);
for (LazyIconProvider provider : set) {
consumer.accept(provider);
}
}
private static JsonIconSet generateJsonIconSet(LazyIconProvider provider) {
LookAndFeel laf = UIManager.getLookAndFeel();
boolean dark = ((FlatLaf) laf).isDark();
String jsonPath = dark ? provider.darkJsonPath() : provider.lightJsonPath();
return new JsonIconSet(new UrlIconResource(jsonPath)) {
@Override
public @NotNull String getId() {
return provider.pluginId();
}
};
}
@Override
public @Nullable Icon findIcon(@NotNull String id, @NotNull Dimension dimension, IconType type) {
Icon icon;
for (IconSet iconSet : PLUGIN_ICON_SETS) {
icon = iconSet.findIcon(id, dimension, type);
if (icon != null) {
return icon;
}
}
return null;
}
/**
* 根据 id 匹配 icon set
* @param id 对于 plugin icon set, id plugin_id
* @return icon set
*/
public static IconSet getIconSet(@NotNull final String id ) {
for (IconSet iconSet : PLUGIN_ICON_SETS) {
if (iconSet.getId().equals(id)) {
return iconSet;
}
}
return null;
}
@Override
public boolean equals(Object obj) {
return obj instanceof PluginIconSet
&& AssistUtils.equals(this.name, ((PluginIconSet) obj).name);
}
@Override
public int hashCode() {
return AssistUtils.hashCode(name);
}
}

3
designer-base/src/main/java/com/fine/theme/light/ui/laf/FineDarkLaf.java

@ -2,7 +2,6 @@ package com.fine.theme.light.ui.laf;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.icon.IconManager;
import com.fine.theme.light.ui.FineLightIconSet;
import com.formdev.flatlaf.util.UIScale;
import com.fr.stable.StringUtils;
@ -25,7 +24,7 @@ public class FineDarkLaf extends FineLaf {
* @return 是否安装成功
*/
public static boolean setup() {
IconManager.addSet(new FineLightIconSet());
IconManager.initializeIcon();
Layouts.setScaleFactor(UIScale.getUserScaleFactor());
UIScale.addPropertyChangeListener(evt -> {
if (StringUtils.equals(evt.getPropertyName(), USER_SCALE_FACTOR)) {

2
designer-base/src/main/java/com/fine/theme/light/ui/laf/FineLaf.java

@ -18,7 +18,6 @@ public abstract class FineLaf extends FlatLaf {
private static final String NAME = "FineLaf";
@Override
public String getName() {
return NAME;
@ -53,4 +52,5 @@ public abstract class FineLaf extends FlatLaf {
System.setProperty("flatlaf.menuBarEmbedded", "false");
}
}
}

3
designer-base/src/main/java/com/fine/theme/light/ui/laf/FineLightLaf.java

@ -2,7 +2,6 @@ package com.fine.theme.light.ui.laf;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.icon.IconManager;
import com.fine.theme.light.ui.FineLightIconSet;
import com.formdev.flatlaf.util.UIScale;
import com.fr.stable.StringUtils;
@ -25,7 +24,7 @@ public class FineLightLaf extends FineLaf {
* @return 是否安装成功
*/
public static boolean setup() {
IconManager.addSet(new FineLightIconSet());
IconManager.initializeIcon();
Layouts.setScaleFactor(UIScale.getUserScaleFactor());
UIScale.addPropertyChangeListener(evt -> {
if (StringUtils.equals(evt.getPropertyName(), USER_SCALE_FACTOR)) {

4
designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java

@ -332,7 +332,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
List<String> authConnections = getHasAuthConnections();
for (String name : authConnections) {
if (ComparatorUtils.equals(selectedDSName, name)) {
return ConnectionRepository.getInstance().getByName(name).getConnection();
return ConnectionInfoBeanHelper.createConnection(ConnectionRepository.getInstance().getByName(name));
}
}
return null;
@ -442,7 +442,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
boolean connect = false;
com.fr.data.impl.Connection database = null;
try {
database = ConnectionRepository.getInstance().getByName(paras.getDatabaseName()).getConnection();
database = ConnectionInfoBeanHelper.createConnection(ConnectionRepository.getInstance().getByName(paras.getDatabaseName()));
} catch (Exception e) {
FineLoggerFactory.getLogger().info(e.getMessage(), e);
}

6
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTree.java

@ -64,11 +64,11 @@ public class TableDataTree extends UserObjectRefreshJTree<TableDataSourceOP> {
} else if (nameObject.getObject() instanceof Integer) {
int num = (Integer) nameObject.getObject();
if (num == TableDataSourceOP.SERVER_TABLE_DATA) {
this.setIcon(IconUtils.readIcon(IconPathConstants.STD_SHOW_ICON_PATH));
this.setIcon(new LazyIcon("server_database"));
} else if (num == TableDataSourceOP.STORE_PRECEDURE_DATA) {
this.setIcon(IconUtils.readIcon(IconPathConstants.SP_SHOW_ICON_PATH));
this.setIcon(new LazyIcon("store_procedure"));
} else {
this.setIcon(IconUtils.readIcon(IconPathConstants.DS_QUERY_ICON_PATH));
this.setIcon(new LazyIcon("database"));
}
} else {
this.setIcon(new LazyIcon("store_procedure"));

13
designer-base/src/main/java/com/fr/design/data/datapane/connect/LocalConnectionSource.java

@ -41,11 +41,20 @@ public class LocalConnectionSource extends BaseConnectionSource {
}
@Override
public void testConnection(ConnectionInfoBean database) throws Exception {
public ConnectionInfoBean getByName(String name) {
try {
return ConnectionInfoBeanHelper.createConnectionInfoBean(name, ConnectionConfigProviderFactory.getConfigProvider().getConnection(name));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@Override
public String[] testConnection(ConnectionInfoBean database) throws Exception {
try {
// 暂时这么处理,后续最好拉到外层包装一下
TransmissionEncryptionManager.setTransEncryptionLevel(1);
ConnectionProcessorFactory.testConnectionWithSchemaReturn(database);
return ConnectionProcessorFactory.testConnectionWithSchemaReturn(database);
} catch (DriverNotFoundException e) {
throw new DriverUnExistException();
} finally {

18
designer-base/src/main/java/com/fr/design/data/datapane/preview/ConnectionInfoBeanHelper.java

@ -78,13 +78,29 @@ public class ConnectionInfoBeanHelper {
return ans;
}
/**
* 根据bean创建连接
*/
public static Connection createConnection(ConnectionInfoBean infoBean) {
try {
if (JDBCConnectionProcessor.KEY.acceptConnectionTypes().contains(infoBean.getConnectionType())) {
return createJDBCConnection(infoBean);
} else {
return ConnectionProcessorFactory.createConnection(infoBean, true);
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return null;
}
}
/**
* 创建数据连接Bean可自定义是否携带密码
*/
public static ConnectionInfoBean createConnectionInfoBean(String name, Connection connection, boolean withPassword) throws Exception {
if (connection instanceof NameDatabaseConnection) {
name = ((NameDatabaseConnection) connection).getName();
connection = ConnectionRepository.getInstance().getByName(name).getConnection();
connection = createConnection(ConnectionRepository.getInstance().getByName(name));
}
if (JDBCConnectionProcessor.KEY.acceptConnections().contains(connection.getClass())) {
ConnectionInfoBean bean = new ConnectionInfoBean();

4
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java

@ -20,6 +20,7 @@ import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.data.datapane.connect.ConnectionTableProcedurePane;
import com.fr.design.data.datapane.connect.ConnectionTableProcedurePane.DoubleClickSelectedNodeOnTreeListener;
import com.fr.design.data.datapane.preview.ConnectionInfoBeanHelper;
import com.fr.design.data.datapane.sqlpane.SQLEditPane;
import com.fr.design.data.tabledata.ResponseDataSourceChange;
import com.fr.design.data.tabledata.StoreProcedureWorkerListener;
@ -187,8 +188,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
}
private boolean isAutoParameterDatabase() {
ConnectionBean bean = ConnectionRepository.getInstance().getByName(connectionTableProcedurePane.getSelectedDatabaseConnnectonName());
Connection connection = bean == null ? null : bean.getConnection();
Connection connection = ConnectionInfoBeanHelper.createConnection(ConnectionRepository.getInstance().getByName(connectionTableProcedurePane.getSelectedDatabaseConnnectonName()));
return connection != null && ArrayUtils.contains(DRIVERS, connection.getDriver());
}

28
designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java

@ -6,6 +6,8 @@ import com.fr.base.svg.SVGLoader;
import com.fr.data.impl.ClassTableData;
import com.fr.data.impl.DBTableData;
import com.fr.data.impl.EmbeddedTableData;
import com.fr.data.impl.FileTableData;
import com.fr.data.impl.MultiTDTableData;
import com.fr.data.impl.RecursionTableData;
import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.design.icon.WarningIcon;
@ -25,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");
@ -39,10 +38,23 @@ public final class ServerTableDataWrapper extends AbstractTableDataWrapper {
return new LazyIcon("tree");
} else if (tabledata instanceof StoreProcedure) {
return new LazyIcon("store_procedure");
}
} else if (tabledata instanceof FileTableData) {
return new LazyIcon("file");
} else if (tabledata instanceof MultiTDTableData) {
return new LazyIcon("multi");
}
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

39
designer-base/src/main/java/com/fr/design/fun/LazyIconProvider.java

@ -0,0 +1,39 @@
package com.fr.design.fun;
import com.fr.stable.fun.mark.Mutable;
/**
* 插件图标适配接口
*
* @author lemon
* @since
* Created on
*/
public interface LazyIconProvider extends Mutable {
String MARK_STRING = "LazyIconProvider";
int CURRENT_LEVEL = 1;
/**
* 插件 idicon 来源标识
*
* @return 来源标识
*/
String pluginId();
/**
* light 主题
*
* @return 图标注册 json 路径
*/
String lightJsonPath();
/**
* dark 主题
*
* @return 图标注册 json 路径
*/
String darkJsonPath();
}

59
designer-base/src/main/java/com/fr/design/fun/impl/AbstractLazyIconProvider.java

@ -0,0 +1,59 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.LazyIconProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
import java.util.List;
/**
* 插件图标 LazyIcon 加载适配抽象类
*
* @author lemon
* @since
* Created on
*/
@API(level = LazyIconProvider.CURRENT_LEVEL)
public abstract class AbstractLazyIconProvider extends AbstractProvider implements LazyIconProvider {
/**
* 当前接口的API等级,用于判断是否需要升级插件
* @return API等级
*/
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
/**
* 区分插件
*
* @return 插件 id
*/
@Override
public String pluginId() {
throw new RuntimeException("plugin id is blank");
}
/**
* light 主题
*
* @return 图标注册 json 路径
*/
@Override
public String lightJsonPath() {
return "";
}
/**
* dark 主题
*
* @return 图标注册 json 路径
*/
@Override
public String darkJsonPath() {
return "";
}
}

3
designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java

@ -30,6 +30,7 @@ import javax.swing.JPopupMenu;
import javax.swing.ListCellRenderer;
import javax.swing.ListSelectionModel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.BorderLayout;
@ -381,7 +382,7 @@ public abstract class JListControlPane extends JControlPane implements ListContr
@Override
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus) {
setPreferredSize(new Dimension(list.getWidth(), FineUIScale.scale(24)));
setPreferredSize(new Dimension(list.getWidth(), FineUIScale.scale(UIManager.getInt("List.cellRender.height"))));
if (value instanceof ListModelElement) {
ListModelElement element = ((ListModelElement) value);
Nameable nameable = element.wrapper;

6
designer-base/src/main/java/com/fr/design/gui/ilist/JNameEdList.java

@ -22,10 +22,10 @@ import java.util.Vector;
public class JNameEdList extends UIList implements CellEditorListener {
/**
* 原值为20,设计器图标由png替换为svg之后JNameEdList的icon大小为16x16
* 原值为20,设计器图标由png替换为svg之后JNameEdList的icon大小为24x24
* 重命名是会出现左侧一部分带有背景色的渲染
*/
private static final int ICON_WIDTH = 16;
private static final int ICON_WIDTH = 24;
private boolean editable = true;
// kunsnat: 是否强制ListName是数字 (int型)
@ -240,7 +240,7 @@ public class JNameEdList extends UIList implements CellEditorListener {
return false;
}
Rectangle rect = this.getCellBounds(index, index);
// alex:所有的JNameEdList都有Icon,空出前面20 * 20的位置就是放的Icon
// alex:所有的JNameEdList都有Icon,空出前面24 * 24的位置就是放的Icon
rect.setRect(createRect(rect, getIconWidth()));
editorComp.setBounds(rect);

4
designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java

@ -104,7 +104,7 @@ public class TableViewList extends UIList {
@Override
protected DefaultListModel doInBackground() throws Exception {
Connection datasource = ConnectionRepository.getInstance().getByName(databaseName).getConnection();
Connection datasource = ConnectionInfoBeanHelper.createConnection(ConnectionRepository.getInstance().getByName(databaseName));
boolean status = false;
int count = 3;
//总共给3次连接的机会
@ -168,7 +168,7 @@ public class TableViewList extends UIList {
*/
private DefaultListModel processDataInAnotherThread(String databaseName, String searchFilter, String... typesFilter) throws Exception {
DefaultListModel defaultListModel = new DefaultListModel();
Connection datasource = ConnectionRepository.getInstance().getByName(databaseName).getConnection();
Connection datasource = ConnectionInfoBeanHelper.createConnection(ConnectionRepository.getInstance().getByName(databaseName));
if (datasource == null) {
return defaultListModel;
}

2
designer-base/src/main/java/com/fr/design/gui/itree/filetree/EnvFileTree.java

@ -77,7 +77,7 @@ public class EnvFileTree extends RefreshableJTree {
}
this.setIcon(FileTreeIcon.getIconWithExpandAttr(node, expanded));
} else {
this.setIcon(FileTreeIcon.getFolderHalfImageIcon());
this.setIcon(FileTreeIcon.getFolderHalfImageIcon(expanded));
}
this.setText(name);
} else if (userObj == PENDING) {

17
designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileTreeIcon.java

@ -49,9 +49,10 @@ public class FileTreeIcon {
public static final Icon FRM_FILE_LOCK_ICON = new LazyIcon("frm_locked");
public static final Icon FVS_FILE_LOCK_ICON = new LazyIcon("fvs_locked");
// TODO: 以下Icon视觉暂未提供,需提供后替换
public static final Icon FOLDER_HALF_IMAGE_ICON = new LazyIcon("folder_half_authority");
public static final Icon FOLDER_HALF_IMAGE_ICON_OPEN = new LazyIcon("folder_half_authority_open");
public static final Icon BLANK_IMAGE_ICON = BaseUtils.readIcon("/com/fr/design/images/gui/blank.gif");
public static final Icon FOLDER_HALF_IMAGE_ICON = IconUtils.readIcon("/com/fr/design/standard/fileicon/folder_half_authority.svg");
public static final Icon CPTX_LOCKED_ICON = IconUtils.readIcon("/com/fr/design/standard/fileicon/cptx_icon_locked.svg");
public static final LockIcon FOLDER_LOCK_ICON =
@ -130,7 +131,17 @@ public class FileTreeIcon {
}
public static Icon getFolderHalfImageIcon() {
return FOLDER_HALF_IMAGE_ICON;
return getFolderHalfImageIcon(false);
}
/**
* 获取文件夹有部分权限时的图标
*
* @param isExpand 文件夹是否已打开
* @return 图标
*/
public static Icon getFolderHalfImageIcon(boolean isExpand) {
return isExpand ? FOLDER_HALF_IMAGE_ICON_OPEN : FOLDER_HALF_IMAGE_ICON;
}
/**

1
designer-base/src/main/java/com/fr/design/i18n/DesignSizeI18nManager.java

@ -1,5 +1,6 @@
package com.fr.design.i18n;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.dialog.BasicDialog;
import com.fr.general.GeneralContext;
import com.fr.locale.LocaleManager;

8
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -107,6 +107,8 @@ import java.util.Set;
import java.util.UUID;
import java.util.concurrent.CopyOnWriteArrayList;
import static com.fine.theme.utils.FineUIScale.scale;
public class DesignerFrame extends JFrame implements JTemplateActionListener, TargetModifiedListener {
private static final String DESIGNER_FRAME_NAME = "designer_frame";
@ -115,7 +117,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
private static final long serialVersionUID = -8732559571067484460L;
private static final int MENU_HEIGHT = 26;
private static final int MENU_HEIGHT = scale(26);
private static final Integer SECOND_LAYER = 100;
@ -578,8 +580,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
closeButton.setBorder(null);
int x = contentWidth - EastRegionContainerPane.getInstance().getContainerWidth() - closeMode.getIconWidth() / 2;
int y = MENU_HEIGHT - closeMode.getIconHeight() / 2;
closeButton.setBounds(x, y, UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH,
UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH);
closeButton.setBounds(x, y, scale(UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH),
scale(UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH));
}
/**

31
designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.check;
import com.fine.theme.icon.LazyIcon;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.BaseUtils;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIButton;
@ -24,7 +25,7 @@ import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
import java.awt.FlowLayout;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
@ -32,6 +33,10 @@ import java.awt.event.WindowEvent;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fr.design.dialog.FineJOptionPane.showConfirmDialog;
import static javax.swing.JOptionPane.OK_CANCEL_OPTION;
import static javax.swing.JOptionPane.OK_OPTION;
@ -73,7 +78,7 @@ public class CheckButton extends UIButton {
}
if (set.isEmpty()) {
okButton.setEnabled(true);
imageLabel.setIcon(BaseUtils.readIcon("com/fr/design/images/correct.png"));
imageLabel.setIcon(new LazyIcon("success", 20));
message.setText("<html>" + Toolkit.i18nText("Fine_Designer_Check_Font_Success") + "</html>");
} else {
if (dialog != null) {
@ -172,7 +177,7 @@ public class CheckButton extends UIButton {
@Override
public Void callHandler(RPCInvokerExceptionInfo rpcInvokerExceptionInfo) {
imageLabel.setIcon(BaseUtils.readIcon("com/fr/design/images/error.png"));
imageLabel.setIcon(new LazyIcon("error", 20));
message.setText("<html>" + Toolkit.i18nText("Fine_Designer_Check_Font_Upgrade") + "</html>");
okButton.setEnabled(true);
return null;
@ -198,16 +203,16 @@ public class CheckButton extends UIButton {
dialog.setSize(DesignSizeI18nManager.getInstance().i18nDimension(this.getClass().getName()));
JPanel jp = new JPanel();
JPanel upPane = new JPanel();
JPanel downPane = new JPanel();
imageLabel = new UILabel(IOUtils.readIcon("com/fr/design/images/waiting.png"));
upPane.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10));
upPane.add(imageLabel);
upPane.add(message);
downPane.setLayout(new FlowLayout(FlowLayout.CENTER, 6, 0));
downPane.add(okButton);
jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS));
jp.add(upPane);
jp.add(downPane);
JPanel downPane = new JPanel(new BorderLayout());
imageLabel = new UILabel(new LazyIcon("waiting", 20));
upPane.add(row(10,
column(cell(imageLabel),flex()), cell(message)
).getComponent());
downPane.add(okButton, BorderLayout.EAST);
jp.setLayout(new BorderLayout());
jp.add(column(flex(), cell(upPane), flex()).getComponent());
jp.add(downPane, BorderLayout.SOUTH);
jp.setBorder(new ScaledEmptyBorder(10, 10, 10,10));
dialog.add(jp);
dialog.setResizable(false);
dialog.setLocationRelativeTo(SwingUtilities.getWindowAncestor(this));

3
designer-base/src/main/java/com/fr/design/mainframe/toolbar/LookAndFeelAction.java

@ -5,6 +5,7 @@
package com.fr.design.mainframe.toolbar;
import com.fine.theme.icon.IconManager;
import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.extras.FlatAnimatedLafChange;
import com.fr.design.actions.UpdateAction;
@ -32,6 +33,8 @@ public class LookAndFeelAction extends UpdateAction {
FlatAnimatedLafChange.showSnapshot();
try {
UIManager.setLookAndFeel( lookAndFeel );
// 多主题场景下,需要判断是否需要切换图标
IconManager.updateIcon();
} catch (UnsupportedLookAndFeelException e) {
throw new RuntimeException(e);
}

8
designer-base/src/main/java/com/fr/design/present/dict/DatabaseDictPane.java

@ -6,6 +6,7 @@ import com.fr.base.TableData;
import com.fr.data.core.DataCoreUtils;
import com.fr.data.core.db.DBUtils;
import com.fr.data.core.db.dialect.Dialect;
import com.fr.data.impl.Connection;
import com.fr.data.impl.DatabaseDictionary;
import com.fr.data.impl.NameDatabaseConnection;
import com.fr.design.beans.FurtherBasicBeanPane;
@ -14,6 +15,7 @@ import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.ChoosePane;
import com.fr.design.data.datapane.DataBaseItems;
import com.fr.design.data.datapane.VerticalChoosePane;
import com.fr.design.data.datapane.preview.ConnectionInfoBeanHelper;
import com.fr.design.data.datapane.preview.PreviewLabel.Previewable;
import com.fr.design.editor.DoubleDeckValueEditorPane;
import com.fr.design.editor.editor.ColumnIndexEditor;
@ -25,6 +27,7 @@ import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.stable.StringUtils;
import com.fr.workspace.server.repository.connection.ConnectionRepository;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
@ -176,8 +179,9 @@ public class DatabaseDictPane extends FurtherBasicBeanPane<DatabaseDictionary> i
if (StringUtils.isBlank(para.getDatabaseName())) {
dbDict.setDatabaseConnection(null);
} else {
database = DBUtils.checkDBConnection(para.getDatabaseName());
if (database != null) {
Connection connection = ConnectionInfoBeanHelper.createConnection(ConnectionRepository.getInstance().getByName(para.getDatabaseName()));
if (connection != null) {
database = new NameDatabaseConnection(para.getDatabaseName());
dbDict.setDatabaseConnection(database);
}
}

44
designer-base/src/main/java/com/fr/file/FILEChooserPane.java

@ -1092,7 +1092,29 @@ public class FILEChooserPane extends BasicPane {
String lastDirectoryPath = DesignerEnvManager.getEnvManager().getDialogCurrentDirectory();
String prefix = DesignerEnvManager.getEnvManager().getCurrentDirectoryPrefix();
FILE lastDirectory = FILEFactory.createFolder(prefix + lastDirectoryPath);
dealCurrentDirectory(model, lastDirectory) ;
}
private void setPlaceListModel4DataFile(AbstractPlaceListModel model) {
if (placesList == null) {
return;
}
placesList.setModel(model);
String lastDirectoryPath = FILEFactory.ENV_PREFIX;
String prefix = ProjectConstants.REPORTLETS_NAME;
FILE lastDirectory;
if (model instanceof FileDataPlaceListModel) {
FileDataFILE file = new FileDataFILE(new FileNode(), false, StringUtils.EMPTY, ((FileDataPlaceListModel) model).getType());
lastDirectory = FILEFactory.createFolder(file, prefix + lastDirectoryPath);
} else {
lastDirectory = FILEFactory.createFolder(prefix + lastDirectoryPath);
}
dealCurrentDirectory(model, lastDirectory);
}
private void dealCurrentDirectory(AbstractPlaceListModel model, FILE lastDirectory) {
model.setCD(lastDirectory);
if (currentDirectory != null) {
@ -1109,6 +1131,7 @@ public class FILEChooserPane extends BasicPane {
}
}
private void setPlaceListModel() {
if (placesList == null) {
return;
@ -1140,7 +1163,7 @@ public class FILEChooserPane extends BasicPane {
if (placesList == null) {
return;
}
setPlaceListModel(new FileDataPlaceListModel(type));
setPlaceListModel4DataFile(new FileDataPlaceListModel(type));
}
protected void setFileCAPlaceListModel() {
@ -1384,6 +1407,7 @@ public class FILEChooserPane extends BasicPane {
private class FileDataPlaceListModel extends AbstractPlaceListModel {
private FileDataFILE envFILE;
private String type;
FileDataPlaceListModel(String type) {
envFILE = new FileDataFILE(new FileNode(StableUtils.pathJoin(ProjectConstants.ASSETS_NAME, FileDataFILE.FILE_DATASET_NAME), true), false, StableUtils.pathJoin(ProjectConstants.ASSETS_NAME, FileDataFILE.FILE_DATASET_NAME)) {
@ -1393,6 +1417,7 @@ public class FILEChooserPane extends BasicPane {
}
};
envFILE.setType(type);
FileDataPlaceListModel.this.setType(type);
}
@Override
@ -1405,6 +1430,21 @@ public class FILEChooserPane extends BasicPane {
return 1 + filesOfSystem.size();
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Override
protected void setCD(FILE lastDirectory) {
super.setCD(lastDirectory);
if (lastDirectory instanceof FileDataFILE) {
((FileDataFILE)lastDirectory).setType(type);
}
}
}
private class FileCAPlaceListModel extends AbstractPlaceListModel {
@ -1642,7 +1682,7 @@ public class FILEChooserPane extends BasicPane {
this.buttonList.add(createBlankButton((new SetDirectoryAction(btn_text + '/',
// alex:dir.prefix不和btn_path一起参与pathJoin,因为btn_path是否以/打头在unix,linux
// OS中意义很不一样
FILEFactory.createFolder(dir.prefix() + StableUtils.pathJoin(btn_path, "/")), !needTopPath))));
FILEFactory.createFolder(dir, dir.prefix() + StableUtils.pathJoin(btn_path, "/")), !needTopPath))));
}
maxPathIndex = calculateMaxPathIndex();

16
designer-base/src/main/java/com/fr/file/FILEFactory.java

@ -39,12 +39,22 @@ public class FILEFactory {
return new FileFILE(new java.io.File(path.substring(FILE_PREFIX.length())));
} else if (path.startsWith(FILE_DATA_PREFIX)) {
return new FileDataFILE(new FileNode(path.substring(FILE_DATA_PREFIX.length()), false), false, path.substring(FILE_DATA_PREFIX.length()));
} else if (path.startsWith(FILE_CA_PREFIX)) {
return new FileCAFILE(new FileNode(path.substring(FILE_CA_PREFIX.length()), false), false, path.substring(FILE_CA_PREFIX.length()));
} else {
return new FileNodeFILE(new FileNode(path, WorkContext.getWorkResource().isDirectory(path)));
}
}
public static FILE createFolder(String path) {
return createFolder(null, path);
}
/**
* 传递依据的基础文件并创建文件夹
*/
public static FILE createFolder(FILE origin, String path) {
if (path == null) {
return null;
} else if (path.startsWith(MEM_PREFIX)) {
@ -58,7 +68,11 @@ public class FILEFactory {
} else if (path.startsWith(FILE_PREFIX)) {
return new FileFILE(new java.io.File(path.substring(FILE_PREFIX.length())));
} else if (path.startsWith(FILE_DATA_PREFIX)) {
return new FileDataFILE(new FileNode(path.substring(FILE_DATA_PREFIX.length()), true), false, path.substring(FILE_DATA_PREFIX.length()));
FileDataFILE file = new FileDataFILE(new FileNode(path.substring(FILE_DATA_PREFIX.length()), true), false, path.substring(FILE_DATA_PREFIX.length()));
if (origin instanceof FileDataFILE) {
file.setType(((FileDataFILE) origin).getType());
}
return file;
} else if (path.startsWith(FILE_CA_PREFIX)) {
return new FileCAFILE(new FileNode(path.substring(FILE_CA_PREFIX.length()), true), false, path.substring(FILE_CA_PREFIX.length()));
}

11
designer-base/src/main/java/com/fr/file/FileDataFILE.java

@ -42,6 +42,13 @@ public class FileDataFILE extends FileNodeFILE{
this.id = id;
}
public FileDataFILE(FileNode node, boolean builded, String id, String type) {
super(node);
this.builded = builded;
this.id = id;
this.type = type;
}
private void addChild(FileDataFILE file) {
children.add(file);
}
@ -127,7 +134,7 @@ public class FileDataFILE extends FileNodeFILE{
FileNode fileNode = new FileNode();
fileNode.setEnvPath(bean.getPath());
fileNode.setDirectory(bean.getIsParent());
tree.putIfAbsent(bean.getId(), new FileDataFILE(fileNode, true, bean.getId()));
tree.putIfAbsent(bean.getId(), new FileDataFILE(fileNode, true, bean.getId(), type));
if (StringUtils.isEmpty(bean.getpId())) {
root = tree.get(bean.getId());
} else {
@ -147,7 +154,7 @@ public class FileDataFILE extends FileNodeFILE{
FileNode fileNode = new FileNode();
fileNode.setEnvPath(bean.getPath());
fileNode.setDirectory(bean.getIsParent());
return new FileDataFILE(fileNode, true, bean.getId());
return new FileDataFILE(fileNode, true, bean.getId(), type);
}
}
return null;

13
designer-base/src/main/resources/com/fine/theme/icon/filetree/folder_half_authority.svg

@ -0,0 +1,13 @@
<svg width="28" height="24" viewBox="0 0 28 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 7828">
<path id="Rectangle 34624470" d="M1 2C1 0.89543 1.89543 0 3 0L11.0925 0.499999C11.6692 0.499999 12.2178 0.74896 12.5976 1.18299L14.9024 3.81701C15.2822 4.25104 15.8308 4.5 16.4075 4.5L24.5 3.81701C25.6046 3.81701 26.5 4.71244 26.5 5.81701L25.5 20.5C25.5 21.6046 24.6046 22.5 23.5 22.5H3.5C2.39543 22.5 1.5 21.6046 1.5 20.5L1 2Z" fill="#FFD46C"/>
<path id="Union (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M26.5 21.2502V21.625L27 22C27.0027 22 27.004 21.9982 27.0039 21.9947C27.0039 21.9914 27.0025 21.9866 27 21.9802C26.982 21.935 26.9027 21.8132 26.77 21.625C26.7307 21.5693 26.6868 21.5077 26.6383 21.4406C26.5956 21.3814 26.5495 21.3179 26.5 21.2502ZM26 18.0264L25 16.6595V22.375L25.1667 22.5H2.5C2.22386 22.5 2 22.2761 2 22V2C2 1.72386 2.22386 1.5 2.5 1.5H11.0925C11.2366 1.5 11.3738 1.56224 11.4688 1.67075L13.7735 4.30477C14.4381 5.06432 15.3983 5.5 16.4075 5.5H25.5C25.7761 5.5 26 5.72386 26 6V18.0264ZM26 20.8834V21.616L25.5043 21.9787C25.5052 21.8943 25.5132 21.8012 25.5329 21.7027C25.5378 21.6781 25.5437 21.6521 25.5507 21.625C25.5794 21.5137 25.6266 21.3835 25.703 21.2502C25.774 21.1264 25.8702 20.9998 26 20.8834ZM27.5 22C27.5 22.5072 27.3112 22.9703 27 23.3229C26.9447 23.3856 26.8856 23.4447 26.8229 23.5C26.4703 23.8112 26.0072 24 25.5 24H2.5C1.39543 24 0.5 23.1046 0.5 22V2C0.5 0.89543 1.39543 0 2.5 0H11.0925C11.6692 0 12.2178 0.248961 12.5976 0.682991L14.9024 3.31701C15.2822 3.75104 15.8308 4 16.4075 4H25.5C26.6046 4 27.5 4.89543 27.5 6V22Z" fill="#E2900B"/>
<path id="Rectangle 34624473" d="M0.5 10H26.5V22.1429C26.5 23.1685 25.5688 24 24.42 24H2.58C1.43125 24 0.5 23.1685 0.5 22.1429V10Z" fill="#F9AE31"/>
<path id="Rectangle 34624473 (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M26 10.5H2V22.1429C2 22.1826 2.01471 22.2536 2.10824 22.3371C2.20445 22.4231 2.36696 22.5 2.58 22.5H25.42C25.633 22.5 25.7955 22.4231 25.8918 22.3371C25.9853 22.2536 26 22.1826 26 22.1429V10.5ZM0.5 9V22.1429C0.5 23.1685 1.43125 24 2.58 24H25.42C26.5688 24 27.5 23.1685 27.5 22.1429V9H0.5Z" fill="#E2900B"/>
<g id="Group 1210707205">
<circle id="Ellipse 321" cx="13.75" cy="14.125" r="2.125" stroke="white" stroke-width="1.5"/>
<path id="Rectangle 34627591" d="M13 16.75H14.5V20.75C14.5 21.1642 14.1642 21.5 13.75 21.5C13.3358 21.5 13 21.1642 13 20.75V16.75Z" fill="white"/>
<path id="Rectangle 34627592" d="M15.75 17.75C16.1642 17.75 16.5 18.0858 16.5 18.5C16.5 18.9142 16.1642 19.25 15.75 19.25L13 19.25L13 17.75L15.75 17.75Z" fill="white"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

9
designer-base/src/main/resources/com/fine/theme/icon/filetree/folder_half_authority_open.svg

@ -0,0 +1,9 @@
<svg width="28" height="24" viewBox="0 0 28 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 7828">
<path id="Rectangle 34624470" d="M1.00007 3C1.00007 1.89543 0.395507 0.5 1.50008 0.5L10.5925 1C11.1693 1 11.7179 1.24896 12.0977 1.68299L14.4025 4.31701C14.7822 4.75104 15.3309 5 15.9076 5L22.5001 4.5C23.6046 4.5 24.0001 5.89543 24.0001 7L23.0001 22C23.0001 23.1046 23.1046 24 22.0001 24H3.00007C1.8955 24 1.00007 23.1046 1.00007 22V3Z" fill="#FFD46C"/>
<path id="Union (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M23.5 18.0264L22.5 16.6595V22.375L22.6667 22.5H2C1.72386 22.5 1.5 22.2761 1.5 22V2C1.5 1.72386 1.72386 1.5 2 1.5H9.59246C9.73664 1.5 9.87381 1.56224 9.96875 1.67075L12.2735 4.30477C12.9381 5.06432 13.8983 5.5 14.9075 5.5H23C23.2761 5.5 23.5 5.72386 23.5 6V18.0264ZM23.5 20.8834V21.616L23.0043 21.9787C23.0052 21.8943 23.0132 21.8012 23.0329 21.7027C23.0378 21.6781 23.0437 21.6521 23.0507 21.625C23.0794 21.5137 23.1266 21.3835 23.203 21.2502C23.274 21.1264 23.3702 20.9998 23.5 20.8834ZM25 22C25 22.5072 24.8112 22.9703 24.5 23.3229C24.4447 23.3856 24.3856 23.4447 24.3229 23.5C23.9703 23.8112 23.5072 24 23 24H2C0.895431 24 0 23.1046 0 22V2C0 0.89543 0.895431 0 2 0H9.59246C10.1692 0 10.7178 0.248961 11.0976 0.682991L13.4024 3.31701C13.7822 3.75104 14.3308 4 14.9075 4H23C24.1046 4 25 4.89543 25 6V22Z" fill="#E2900B"/>
<path id="Rectangle 34624994" d="M3.85904 12.4118C4.11725 11.5726 4.89258 11 5.77059 11H24.5855C25.9311 11 26.8928 12.3021 26.4971 13.5882L23.7279 22.5882C23.4696 23.4274 22.6943 24 21.8163 24H3.00136C1.65575 24 0.69408 22.6979 1.0898 21.4118L3.85904 12.4118Z" fill="#F9AE31"/>
<path id="Rectangle 34624994 (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M25.9957 12.5H5.18075C4.96125 12.5 4.76741 12.6432 4.70286 12.853L1.93363 21.853C1.8347 22.1745 2.07512 22.5 2.41152 22.5H23.2264C23.446 22.5 23.6398 22.3568 23.7043 22.147L26.4736 13.147C26.5725 12.8255 26.3321 12.5 25.9957 12.5ZM5.18075 11C4.30274 11 3.5274 11.5726 3.26919 12.4118L0.499961 21.4118C0.104236 22.6979 1.06591 24 2.41152 24H23.2264C24.1045 24 24.8798 23.4274 25.138 22.5882L27.9072 13.5882C28.303 12.3021 27.3413 11 25.9957 11H5.18075Z" fill="#E2900B"/>
<path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M14.125 17.5C14.125 16.7406 13.5094 16.125 12.75 16.125C11.9906 16.125 11.375 16.7406 11.375 17.5C11.375 18.2594 11.9906 18.875 12.75 18.875C13.5094 18.875 14.125 18.2594 14.125 17.5ZM12.75 14.625C14.0784 14.625 15.1963 15.5259 15.5262 16.75L16.375 16.75L16.375 15.5C16.375 15.0858 16.7108 14.75 17.125 14.75C17.5392 14.75 17.875 15.0858 17.875 15.5L17.875 16.75L19.375 16.75C19.7892 16.75 20.125 17.0858 20.125 17.5C20.125 17.9142 19.7892 18.25 19.375 18.25L17.875 18.25L16.375 18.25L15.5262 18.25C15.1963 19.4741 14.0784 20.375 12.75 20.375C11.1622 20.375 9.875 19.0878 9.875 17.5C9.875 15.9122 11.1622 14.625 12.75 14.625Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

4
designer-base/src/main/resources/com/fine/theme/icon/tip/waiting.svg

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M30 16C30 23.7313 23.7313 30 16 30C8.26871 30 2 23.7313 2 16C2 8.26871 8.26871 2 16 2C23.7313 2 30 8.26871 30 16Z" fill="#2576EF"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.96855 8.00001L9.97222 8H22.0278L22.0314 8.00001H22.2222L22.2201 8.01902C22.6649 8.10828 23 8.50112 23 8.97222C23 9.50917 22.5647 9.94444 22.0278 9.94444H22.0062L21.8879 11.0091C21.7678 12.0894 21.2815 13.1137 20.4912 13.9505L18.4461 16.1159L20.3508 17.9646C21.2301 18.8181 21.7783 19.8932 21.9168 21.0359L22.0337 22C22.5679 22.0032 23 22.4373 23 22.9722C23 23.5092 22.5647 23.9445 22.0278 23.9445H9.97222C9.43528 23.9445 9 23.5092 9 22.9722C9 22.4373 9.4321 22.0032 9.96633 22L10.0832 21.0359C10.2217 19.8932 10.7699 18.8181 11.6492 17.9646L13.5539 16.1159L11.5088 13.9505C10.7185 13.1137 10.2322 12.0894 10.1121 11.0091L9.99383 9.94444H9.97222C9.43528 9.94444 9 9.50917 9 8.97222C9 8.50112 9.33507 8.10828 9.77989 8.01902L9.77778 8.00001H9.96855ZM11.6014 9.94444L11.7046 10.8736C11.7938 11.6762 12.1551 12.4371 12.7421 13.0586L15.4038 15.8768C15.5498 16.0315 15.5445 16.2748 15.3919 16.4229L12.8376 18.902C12.1844 19.5361 11.7772 20.3347 11.6743 21.1836L11.5753 22H20.4247L20.3257 21.1836C20.2228 20.3347 19.8156 19.5361 19.1624 18.902L16.6081 16.4229C16.4555 16.2748 16.4502 16.0315 16.5962 15.8768L19.2579 13.0586C19.8449 12.4371 20.2062 11.6762 20.2954 10.8736L20.3986 9.94444H11.6014ZM16.7778 18.1111C16.7778 18.5407 16.4296 18.8889 16 18.8889C15.5704 18.8889 15.2222 18.5407 15.2222 18.1111C15.2222 17.6816 15.5704 17.3333 16 17.3333C16.4296 17.3333 16.7778 17.6816 16.7778 18.1111ZM18.3333 12.5528C18.3333 12.4009 18.2102 12.2778 18.0583 12.2778H13.9417C13.7898 12.2778 13.6667 12.4009 13.6667 12.5528C13.6667 12.6257 13.6956 12.6956 13.7472 12.7472L15.725 14.725C15.8769 14.8769 16.1231 14.8769 16.275 14.725L18.2528 12.7472C18.3044 12.6956 18.3333 12.6257 18.3333 12.5528Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

5
designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json

@ -439,6 +439,7 @@
"top": "border/top.svg",
"all":"border/all.svg",
"error":"tip/error.svg",
"waiting":"tip/waiting.svg",
"information":"tip/information.svg",
"new_information":"tip/new_information.svg",
"success":"tip/success.svg",
@ -448,7 +449,9 @@
"layout_left": "layout/layout_left.svg",
"layout_right": "layout/layout_right.svg",
"layout_top_right": "layout/layout_top_right.svg",
"theme_edit": "theme_edit.svg"
"theme_edit": "theme_edit.svg",
"folder_half_authority" : "filetree/folder_half_authority.svg",
"folder_half_authority_open" : "filetree/folder_half_authority_open.svg"
}
}

1
designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties

@ -450,6 +450,7 @@ List.showCellFocusIndicator = false
List.cellRender.background = #FFF
List.cellRender.button.width = 28
List.cellRender.button.height = 24
List.cellRender.height = 24
List.wrapper.text.fontColor = #0a1c3877
#---- Menu ----

2
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties

@ -1,5 +1,5 @@
# \u9ED8\u8BA4\u4E3A\u7C7B\u7684\u5168\u9650\u5B9A\u540D\uFF08\u53EF\u81EA\u5B9A\u4E49key\uFF09= width * height
com.fr.design.mainframe.check.CheckButton=250*118
com.fr.design.mainframe.check.CheckButton=360*160
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=360*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=325*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=360*280

2
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java

@ -74,7 +74,7 @@ public class ChartHyperRelateFloatLinkPane extends AbstractHyperLinkPane<ChartHy
this.add(column(20,
cell(FineUIUtils.wrapComponentWithTitle(centerPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyper_Related_Float"))),
cell(FineUIUtils.wrapComponentWithTitle(parameterViewPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyper_Related_Float"))).weight(1)
cell(FineUIUtils.wrapComponentWithTitle(parameterViewPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter"))).weight(1)
).getComponent());
}

17
designer-chart/src/main/java/com/fr/van/chart/bubble/VanChartBubbleSeriesPane.java

@ -1,17 +1,16 @@
package com.fr.van.chart.bubble;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.plugin.chart.bubble.VanChartBubblePlot;
import com.fr.plugin.chart.bubble.attr.VanChartAttrBubble;
import com.fr.van.chart.bubble.component.VanChartBubblePane;
import com.fr.van.chart.custom.component.VanChartCustomAxisConditionPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.series.VanChartColorValueSeriesPane;
import com.fr.van.chart.designer.style.series.VanChartStackedAndAxisListControlPane;
@ -31,12 +30,6 @@ public class VanChartBubbleSeriesPane extends VanChartColorValueSeriesPane {
}
protected JPanel getContentInPlotType() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p, p, p, p, p, p};
double[] col = {f};
Component[][] components = new Component[][]{
new Component[]{createBubblePane()},
new Component[]{createStackedAndAxisPane()},
@ -47,7 +40,7 @@ public class VanChartBubbleSeriesPane extends VanChartColorValueSeriesPane {
components[2] = new Component[]{createLargeDataModelPane()};
}
contentPane = TableLayoutHelper.createTableLayoutPane(components, row, col);
contentPane = FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1});
return contentPane;
}
@ -71,13 +64,13 @@ public class VanChartBubbleSeriesPane extends VanChartColorValueSeriesPane {
return Toolkit.i18nText("Fine-Design_Chart_Custom_Axis");
}
};
stackAndAxisEditExpandablePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(stackAndAxisEditPane.getPaneTitle(), stackAndAxisEditPane);
stackAndAxisEditExpandablePane = new UIExpandablePane(stackAndAxisEditPane.getPaneTitle(), stackAndAxisEditPane);
return stackAndAxisEditExpandablePane;
}
private JPanel createBubblePane() {
bubblePane = new VanChartBubblePane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Bubble"), bubblePane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Bubble"), bubblePane, true);
}
protected void populateCondition(ConditionAttr defaultAttr) {

11
designer-chart/src/main/java/com/fr/van/chart/bubble/component/VanChartBubblePane.java

@ -1,12 +1,11 @@
package com.fr.van.chart.bubble.component;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.ispinner.chart.UISpinnerWithPx;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.plugin.chart.bubble.attr.VanChartAttrBubble;
@ -39,17 +38,11 @@ public class VanChartBubblePane extends BasicBeanPane<VanChartAttrBubble> {
}
protected JPanel getContentPane () {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p, p, p, p, p};
double[] col = {p, f};
return TableLayoutHelper.createTableLayoutPane(getComponent(), row, col);
return FineLayoutBuilder.compatibleTableLayout(10, getComponent(), new double[]{1.2, 3});
}
protected Component[][] getComponent () {
return new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Min_Diameter")), minDiameter},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Max_Diameter")), maxDiameter},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Shadow")), shadow},

2
designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnSeriesPane.java

@ -79,7 +79,7 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane {
isFixedWidth.addActionListener(e -> checkColumnWidth());
isFillWithImage.addActionListener(e -> checkImagePane());
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Filled_With_Image"), borderPane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Filled_With_Image"), borderPane, true);
}
private void checkAll() {

41
designer-chart/src/main/java/com/fr/van/chart/column/VanChartCustomStackAndAxisConditionPane.java

@ -1,29 +1,26 @@
package com.fr.van.chart.column;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.data.condition.AbstractCondition;
import com.fr.data.condition.ListCondition;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.condition.LiteConditionPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.plugin.chart.base.AttrSeriesStackAndAxis;
import com.fr.van.chart.designer.style.series.VanChartSeriesConditionPane;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JPanel;
import javax.swing.ScrollPaneConstants;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* 堆积和坐标轴设置
*/
@ -42,36 +39,26 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
}
private void doLayoutPane() {
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
this.removeAll();
//配置界面
JPanel deployPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
deployPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Deploy") + ":", null));
deployPane.add(createDeployPane());
UIScrollPane scrollPane = new UIScrollPane(deployPane);
scrollPane.setBorder(BorderFactory.createEmptyBorder());
scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
this.add(scrollPane);
Component deployPane = FineUIUtils.wrapComponentWithTitle(createDeployPane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Deploy"));
this.add(deployPane, BorderLayout.NORTH);
//条件界面
JPanel conditionPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.add(conditionPane);
conditionPane.setBorder(BorderFactory.createEmptyBorder());
JPanel conditionPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
conditionPane.add(liteConditionPane = new VanChartSeriesConditionPane());
liteConditionPane.setPreferredSize(new Dimension(300, 300));
this.add(conditionPane, BorderLayout.CENTER);
this.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
}
private JPanel createDeployPane() {
isStacked = new UIButtonGroup<Integer>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_YES"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_NO")});
isPercentStacked = new UIButtonGroup<Integer>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_YES"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_NO")});
double p = TableLayout.PREFERRED;
double[] columnSize = {p, p};
double[] rowSize = {p, p, p, p};
return TableLayoutHelper.createTableLayoutPane(getDeployComponents(), rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, getDeployComponents(), new double[]{1.2, 3});
}
protected Component[][] getDeployComponents() {

14
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartAreaSeriesFillColorPane.java

@ -1,14 +1,14 @@
package com.fr.van.chart.designer.component;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.frpane.UINumberDragPaneWithPercent;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.base.AttrAreaSeriesFillColorBackground;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.background.VanChartMarkerBackgroundPane;
import javax.swing.JPanel;
@ -24,14 +24,9 @@ public class VanChartAreaSeriesFillColorPane extends BasicPane {
private UINumberDragPane transparent;
public VanChartAreaSeriesFillColorPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p,p};
double[] col = {f};
fillColorPane = new VanChartMarkerBackgroundPane(){
protected Component[][] getPaneComponents() {
return new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Fill_Color")), typeComboBox},
new Component[]{null, centerPane},
};
@ -39,9 +34,10 @@ public class VanChartAreaSeriesFillColorPane extends BasicPane {
};
transparent = new UINumberDragPaneWithPercent(0, 100);
JPanel transparentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Alpha"), transparent);
JPanel transparentPane = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Alpha")), transparent);
this.setLayout(new BorderLayout());
this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
this.add(fillColorPane, BorderLayout.NORTH);
this.add(transparentPane, BorderLayout.CENTER);
}

21
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java

@ -38,7 +38,6 @@ import com.fr.stable.Constants;
import com.fr.stable.CoreConstants;
import com.fr.stable.StableUtils;
import com.fr.van.chart.config.DefaultStyleHelper4Van;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartHtmlLabelPane;
import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.designer.style.axis.component.VanChartCategoryStylePaneWithCheckBox;
@ -372,19 +371,15 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
maxProportion = new UINumberDragPaneWithPercent(0, 100, 1);
axisLimitSize = new UIButtonGroup<Integer>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Limit"), Toolkit.i18nText("Fine-Design_Chart_Not_Limit")});
JPanel limitSizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Area_Size"), axisLimitSize);
maxProportionPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Max_Proportion"), maxProportion, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
maxProportionPane.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0));
JPanel panel = new JPanel(new BorderLayout());
panel.add(limitSizePane, BorderLayout.NORTH);
panel.add(maxProportionPane, BorderLayout.CENTER);
JPanel limitSizePane = FineLayoutBuilder.createHorizontalLayout(10, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Area_Size")), axisLimitSize);
maxProportionPane = FineLayoutBuilder.createHorizontalLayout(10, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Max_Proportion")), maxProportion);
JPanel panel = column(10,
cell(limitSizePane), cell(maxProportionPane)
).getComponent();
axisLimitSize.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
checkMaxProPortionUse();
}
});
axisLimitSize.addActionListener(e -> checkMaxProPortionUse());
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Display_Strategy"), panel, true);

3
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartAxisButtonPane.java

@ -10,6 +10,7 @@ import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.imenu.UIMenuItem;
import com.fr.design.gui.imenu.UIPopupMenu;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.VanChartAttrHelper;
@ -56,7 +57,7 @@ public class VanChartAxisButtonPane extends BasicBeanPane<VanChartAxisPlot> {
public VanChartAxisButtonPane(VanChartAxisPane vanChartAxisPane) {
this.parent = vanChartAxisPane;
this.setLayout(new BorderLayout());
this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(10, 0));
addButton = new AddButton(new LazyIcon("add_popup"));
JPanel eastPane = new JPanel(new BorderLayout());

39
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java

@ -1,5 +1,8 @@
package com.fr.van.chart.designer.style.background;
import com.fine.swing.ui.layout.Column;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.BaseFormula;
import com.fr.base.Utils;
import com.fr.chart.base.AttrColor;
@ -14,12 +17,8 @@ import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.ispinner.chart.UISpinnerWithPx;
import com.fr.design.gui.style.FRFontPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
import com.fr.general.GeneralUtils;
import com.fr.plugin.chart.VanChartAttrHelper;
@ -29,10 +28,10 @@ import com.fr.stable.Constants;
import com.fr.stable.StableUtils;
import com.fr.van.chart.designer.component.LineTypeComboBox;
import javax.swing.BoxLayout;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
@ -108,26 +107,24 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
private void doLayoutPane() {
this.removeAll();
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
this.setLayout(new BorderLayout());
Column column = new Column();
column.setSpacing(10);
this.add(column, BorderLayout.CENTER);
//警戒线设置
JPanel top = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.add(top);
top.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Chart_Alert_Set") + ":", null));
top.add(createTopPane());
Component top = FineUIUtils.wrapComponentWithTitle(createTopPane(), Toolkit.i18nText("Fine-Design_Chart_Alert_Set"));
column.add(top);
//提示文字
JPanel bottom = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.add(bottom);
bottom.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Chart_Alert_Text") + ":", null));
bottom.add(createBottomPane());
Component bottom = FineUIUtils.wrapComponentWithTitle(createBottomPane(), Toolkit.i18nText("Fine-Design_Chart_Alert_Text"));
column.add(bottom);
}
protected JPanel createTopPane() {
double p = TableLayout.PREFERRED;
double[] columnSize = {p, p};
double[] rowSize = {p, p, p, p, p};
Component[][] components = getTopPaneComponents();
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
protected Component[][] getTopPaneComponents() {
@ -141,10 +138,6 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
}
private JPanel createBottomPane() {
alertTextPosition.setSelectedIndex(0);
double p = TableLayout.PREFERRED;
double[] columnSize = {p, p};
double[] rowSize = {p, p, p, p, p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Layout_Position")), alertTextPosition},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Content")), alertText},
@ -153,7 +146,7 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), fontColor},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
private void checkPositionPane() {

9
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAreaBackgroundPane.java

@ -1,12 +1,14 @@
package com.fr.van.chart.designer.style.background;
import com.fine.theme.utils.FineLayoutBuilder;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.van.chart.designer.AbstractVanChartScrollPane;
@ -15,7 +17,6 @@ import com.fr.van.chart.designer.component.background.VanChartBackgroundPaneWith
import com.fr.van.chart.designer.component.border.VanChartBorderWithRadiusPane;
import com.fr.van.chart.designer.style.background.radar.VanChartRadarAxisAreaPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Color;
@ -44,7 +45,7 @@ public class VanChartAreaBackgroundPane extends AbstractVanChartScrollPane<Chart
@Override
protected JPanel createContentPane() {
contentPane = new JPanel(new BorderLayout());
contentPane = new JPanel(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
chartBorderPane = new VanChartBorderWithRadiusPane();
if(isPlot) {
chartBackgroundPane = new VanChartBackgroundPane();
@ -61,7 +62,6 @@ public class VanChartAreaBackgroundPane extends AbstractVanChartScrollPane<Chart
if (!isPlot) {
tooltipLabel = new UILabel("<html>" + Toolkit.i18nText("Fine-Design_Chart_Background_Tooltip") + "</html>");
tooltipLabel.setForeground(Color.gray);
tooltipLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 5, 10));
contentPane.add(tooltipLabel, BorderLayout.NORTH);
tooltipLabel.setVisible(false);
}
@ -87,7 +87,8 @@ public class VanChartAreaBackgroundPane extends AbstractVanChartScrollPane<Chart
};
}
JPanel panel = FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1});
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1});
panel.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
contentPane.add(panel, BorderLayout.CENTER);
parent.initAllListeners();

3
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAxisAreaPane.java

@ -8,6 +8,7 @@ import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.chart.gui.style.ColorSelectBoxWithThemeStyle;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.general.ComparatorUtils;
@ -154,7 +155,7 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
checkCardPane();
}
});
JPanel intervalPane = new JPanel(new BorderLayout(0, 6));
JPanel intervalPane = new JPanel(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
JPanel panel1 = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Interval_Background")), isDefaultIntervalBackground);
intervalPane.add(panel1, BorderLayout.NORTH);

29
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartCustomIntervalBackgroundPane.java

@ -1,5 +1,7 @@
package com.fr.van.chart.designer.style.background;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.BaseFormula;
import com.fr.base.Utils;
import com.fr.design.beans.BasicBeanPane;
@ -9,19 +11,14 @@ import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.frpane.UINumberDragPaneWithPercent;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.attr.axis.VanChartCustomIntervalBackground;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BoxLayout;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
/**
* 自定义间隔背景设置
@ -38,25 +35,17 @@ public class VanChartCustomIntervalBackgroundPane extends BasicBeanPane<VanChart
private VanChartCustomIntervalBackground customIntervalBackground;
private void doLayoutPane(){
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
//
JPanel top = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.setLayout(new BorderLayout());
this.removeAll();
this.add(top);
top.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Interval_Background") + ":", null));
top.add(createContentPane());
this.add(FineUIUtils.wrapComponentWithTitle(createContentPane(),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Interval_Background")), BorderLayout.CENTER);
}
private JPanel createContentPane() {
bottomValue = new DefaultTinyFormulaPane();
topValue = new DefaultTinyFormulaPane();
bottomValue.setPreferredSize(new Dimension(124,20));
topValue.setPreferredSize(new Dimension(124,20));
color = new ColorSelectBox(100);
transparent = new UINumberDragPaneWithPercent(0,100);
double p = TableLayout.PREFERRED;
double[] columnSize = {p,p};
double[] rowSize = {p,p,p};
JPanel axisPane = TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis"), backgroundAxis);
@ -64,19 +53,19 @@ public class VanChartCustomIntervalBackgroundPane extends BasicBeanPane<VanChart
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Bottom_Value")),bottomValue},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Top_Value")),topValue},
};
JPanel temp = TableLayoutHelper.createTableLayoutPane(rangeComponents, rowSize, columnSize);
JPanel temp = FineLayoutBuilder.compatibleTableLayout(10, rangeComponents, new double[]{1.2, 3});
JPanel rangePane = TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Range"), temp);
Component[][] styleComponents = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")),color},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Alpha")),transparent},
};
temp = TableLayoutHelper.createTableLayoutPane(styleComponents, rowSize, columnSize);
temp = FineLayoutBuilder.compatibleTableLayout(10, styleComponents, new double[]{1.2, 3});
JPanel stylePane = TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style_Name"), temp);
Component[][] components = getPaneComponents(axisPane, rangePane, stylePane);
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
protected Component[][] getPaneComponents(JPanel axisPane, JPanel rangePane, JPanel stylePane) {

4
designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java

@ -152,7 +152,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//趋势线
protected JPanel createTrendLinePane() {
trendLinePane = new VanChartTrendLinePane();
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_TrendLine"), trendLinePane, true);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_TrendLine"), trendLinePane);
}
//线
@ -181,7 +181,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
protected JPanel createBorderPane() {
borderPane = createDiffBorderPane();
borderPane.setBorder(new ScaledEmptyBorder(0, 0, 10, 0));
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Border"), borderPane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Border"), borderPane, true);
}

21
designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapLayerPane.java

@ -2,12 +2,12 @@ package com.fr.van.chart.drillmap.designer.data.comp;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.drillmap.DrillMapHelper;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
@ -15,10 +15,8 @@ import com.fr.plugin.chart.map.data.MapMatchResult;
import com.fr.plugin.chart.map.server.CompatibleGeoJSONTreeHelper;
import com.fr.plugin.chart.type.MapType;
import com.fr.plugin.chart.type.ZoomLevel;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.map.designer.type.MapStatusPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.tree.DefaultMutableTreeNode;
import java.util.ArrayList;
@ -66,7 +64,9 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
}
JPanel mapDataTreePanel = new JPanel(new BorderLayout());
mapDataTreePanel.add(mapDataTree);
UIScrollPane treeScrollPane = new UIScrollPane(mapDataTree);
treeScrollPane.setBorder(FineBorderFactory.createWrappedRoundBorder());
mapDataTreePanel.add(treeScrollPane, BorderLayout.CENTER);
Component[][] components = new Component[][]{
new Component[]{new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layer_Tree"), mapDataTreePanel, true)},
@ -78,28 +78,23 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
}
private JPanel createLayerDetailPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, p, p};
double[] rowSize = new double[depth + 1];
detailComps = new Component[depth + 1][3];
rowSize[0] = p;
detailComps[0] = new Component[]{
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Descriptor")),
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Zoom_Layer")),
null,
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layer_Map_Type"))
};
for (int i = 0; i < depth; i++) {
rowSize[i + 1] = p;
int d = i + 1;
UILabel label = new UILabel(String.format("%s%d%s", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Index_Article"), d, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Index_Layer")));
UIComboBox level = new UIComboBox(MapStatusPane.ZOOM_LEVELS);
level.setEnabled(i != 0);
UIComboBox type = new UIComboBox(TEMP.get(oldMapType));
detailComps[i + 1] = new Component[]{label, level, type};
detailComps[i + 1] = new Component[]{label, level, null, type};
}
return TableLayoutHelper.createGapTableLayoutPane(detailComps, rowSize, columnSize, 5, 6);
return FineLayoutBuilder.compatibleTableLayout(10, detailComps, new double[]{1.2, 1.4, 0.2, 1.4});
}
/**

2
designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/MapDataTree.java

@ -1,7 +1,6 @@
package com.fr.van.chart.drillmap.designer.data.comp;
import com.fine.theme.icon.LazyIcon;
import com.fr.design.border.FineBorderFactory;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.map.designer.type.GEOJSONTreeHelper;
import com.fr.plugin.chart.map.server.ChartGEOJSONHelper;
@ -35,7 +34,6 @@ public class MapDataTree extends JTree {
this.setShowsRootHandles(true);
this.setInvokesStopCellEditing(true);
this.setCellRenderer(treeCellRenderer);
setBorder(FineBorderFactory.createWrappedRoundBorder());
setStyle(this, PURE_TREE);
}

21
designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelSeriesPane.java

@ -1,15 +1,14 @@
package com.fr.van.chart.funnel.designer.style;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.Plot;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.plugin.chart.funnel.FunnelSortType;
import com.fr.plugin.chart.funnel.VanChartFunnelPlot;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.series.VanChartAbstractPlotSeriesPane;
import javax.swing.JPanel;
@ -27,16 +26,12 @@ public class VanChartFunnelSeriesPane extends VanChartAbstractPlotSeriesPane {
}
protected JPanel getContentInPlotType() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f};
double[] rowSize = {p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{createFunnelStylePane()},
new Component[]{createBorderPane()},
};
contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
contentPane = FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1});
return contentPane;
}
@ -57,20 +52,14 @@ public class VanChartFunnelSeriesPane extends VanChartAbstractPlotSeriesPane {
Toolkit.i18nText("Fine-Design_Chart_Origin_Sort")
});
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p,p,p};
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Continuity")), useSameSlantAngle},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Sort")), sort},
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Style_Name"), panel);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Style_Name"), panel, true);
}
public void populateBean(Plot plot) {

3
designer-chart/src/main/java/com/fr/van/chart/map/VanChartMapSeriesPane.java

@ -11,6 +11,7 @@ import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
@ -273,7 +274,7 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
//获取颜色面板
private JPanel getColorPane(MapType paneType) {
JPanel panel = new JPanel(new BorderLayout());
JPanel panel = new JPanel(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
stylePane = createStylePane();
mapType = ((VanChartMapPlot) plot).getAllLayersMapType();
if (mapType != MapType.CUSTOM && mapType != MapType.DRILL_CUSTOM) {

14
designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java

@ -1,10 +1,11 @@
package com.fr.van.chart.map.designer.style.label;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.jxbrowser.JxUIPane;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.base.format.AttrTooltipAreaNameFormat;
import com.fr.plugin.chart.base.format.AttrTooltipFormat;
@ -13,7 +14,6 @@ import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat;
import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat;
import com.fr.plugin.chart.base.format.AttrTooltipValueFormat;
import com.fr.plugin.chart.type.TextAlign;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartLabelContentPane;
import com.fr.van.chart.designer.component.format.MapAreaNameFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.PercentFormatPaneWithCheckBox;
@ -67,18 +67,12 @@ public class VanChartMapLabelContentPane extends VanChartLabelContentPane {
protected JPanel getLabelContentPane(JPanel contentPane) {
showAllSeries = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Show_All_Series"));
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double p = TableLayout.PREFERRED;
double[] row = {p, p};
Component[][] components = {
new Component[]{null, null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Display_Strategy")), showAllSeries}
};
checkPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, columnSize);
checkPane = FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1.2, 3});
JPanel panel = new JPanel(new BorderLayout());
JPanel panel = new JPanel(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
panel.add(contentPane, BorderLayout.CENTER);
panel.add(checkPane, BorderLayout.SOUTH);
return createTableLayoutPaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Content"), panel);

17
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.map.designer.type;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
@ -9,11 +10,10 @@ import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.plugin.chart.base.GisLayer;
import com.fr.plugin.chart.map.layer.WMSLayer;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
@ -55,24 +55,19 @@ public class WMSLayerPane extends JPanel implements UIObserver {
public WMSLayerPane() {
final double p = TableLayout.PREFERRED;
double[] rowSize = {p};
double[] COLUMN_SIZE = {TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH, 84, 44};
wmsUrl = new UITextArea();
connectButton = new UIButton(Toolkit.i18nText("Fine-Design_Chart_Connect_WMP"));
Component[][] comps = new Component[][]{
new Component[]{new UILabel("url"), wmsUrl, connectButton}
new Component[]{new UILabel("url"), wmsUrl, null, connectButton}
};
JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps, rowSize, COLUMN_SIZE);
northPane.setBorder(TableLayout4VanChartHelper.SECOND_EDIT_AREA_BORDER);
JPanel northPane = FineLayoutBuilder.compatibleTableLayout(10, comps, new double[]{1.2, 1.4, 0.2, 1.4});
wmsLayerPane = new JPanel(new BorderLayout());
resetWMSLayerPane(new ArrayList<>());
this.setLayout(new BorderLayout(0, 6));
this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
this.add(northPane, BorderLayout.NORTH);
this.add(wmsLayerPane, BorderLayout.CENTER);
addListener();
@ -136,7 +131,7 @@ public class WMSLayerPane extends JPanel implements UIObserver {
wmsLayerCheckBoxs.add(checkBox);
}
wmsLayerPane.add(TableLayoutHelper.createCommonTableLayoutPane(comps, rowSize, COLUMN_SIZE, 0), BorderLayout.CENTER);
wmsLayerPane.add(FineLayoutBuilder.compatibleTableLayout(10, comps, new double[]{1.2, 3}), BorderLayout.CENTER);
updateUI();
}

11
designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieSeriesPane.java

@ -1,15 +1,15 @@
package com.fr.van.chart.multilayer.style;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.Plot;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.UINumberDragPaneWithPercent;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.plugin.chart.multilayer.VanChartMultiPiePlot;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartBeautyPane;
import com.fr.van.chart.pie.VanChartPieSeriesPane;
@ -39,7 +39,7 @@ public class VanChartMultiPieSeriesPane extends VanChartPieSeriesPane {
new Component[]{createBorderPane()},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1});
}
protected JPanel createSeriesStylePane(double[] row, double[] col) {
@ -54,7 +54,6 @@ public class VanChartMultiPieSeriesPane extends VanChartPieSeriesPane {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Close")});
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Gradual_Level") ),gradualLevel},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Angle") ),startAngle},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Angle")),endAngle},
@ -63,8 +62,8 @@ public class VanChartMultiPieSeriesPane extends VanChartPieSeriesPane {
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Rotation")),supportRotation}
};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Widget_Style"), panel);
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Widget_Style"), panel, true);
}
protected void populatePieAttr() {

7
designer-chart/src/main/java/com/fr/van/chart/pie/VanChartPieSeriesPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.pie;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.Plot;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.UINumberDragPane;
@ -9,7 +10,6 @@ import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.i18n.Toolkit;
@ -48,7 +48,7 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
new Component[]{createBorderPane()},
};
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1});
}
@ -60,7 +60,6 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Start_Angle")),startAngle},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_End_Angle")),endAngle},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Inner_Radius")),innerRadius},
@ -69,7 +68,7 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Widget_Style"), panel, true);
}

17
designer-chart/src/main/java/com/fr/van/chart/radar/VanChartRadarSeriesPane.java

@ -1,15 +1,15 @@
package com.fr.van.chart.radar;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.Plot;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.plugin.chart.radar.VanChartRadarPlot;
import com.fr.plugin.chart.type.RadarType;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartLineTypePane;
import com.fr.van.chart.designer.component.VanChartLineWidthPane;
import com.fr.van.chart.designer.style.series.VanChartAbstractPlotSeriesPane;
@ -32,12 +32,8 @@ public class VanChartRadarSeriesPane extends VanChartAbstractPlotSeriesPane {
}
protected JPanel getContentInPlotType(){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p,p,p,p,p,p,p};
double[] col = {f};
contentPane = TableLayoutHelper.createTableLayoutPane(getPaneComponents(), row, col);
contentPane = FineLayoutBuilder.compatibleTableLayout(10, getPaneComponents(), new double[]{1});
return contentPane;
}
@ -67,8 +63,9 @@ public class VanChartRadarSeriesPane extends VanChartAbstractPlotSeriesPane {
private JPanel createRadarTypePane() {
radarType = new UIButtonGroup<String>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Circle"), Toolkit.i18nText("Fine-Design_Chart_Polygonal")},
new String[]{RadarType.CIRCLE.getType(), RadarType.POLYGON.getType()});
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Shape"), radarType);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Style_Present"), panel);
JPanel panel = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Shape")), radarType);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Style_Present"), panel, true);
}
protected VanChartLineTypePane getLineTypePane() {

11
designer-chart/src/main/java/com/fr/van/chart/range/component/GradualIntervalConfigPane.java

@ -1,11 +1,10 @@
package com.fr.van.chart.range.component;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.gui.ColorSelectBoxWithOutTransparent;
import com.fr.plugin.chart.range.GradualIntervalConfig;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.axis.component.MinMaxValuePaneWithOutTick;
import javax.swing.JPanel;
@ -51,16 +50,10 @@ public class GradualIntervalConfigPane extends JPanel {
legendGradientBar = createLegendGradientBar();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] col = new double[]{f, e};
double[] row = new double[]{p, p, p, p};
Component[][] components = getPaneComponents(minMaxValuePane, colorSelectBox, numberDragPane, legendGradientBar);
//控件承载面板
JPanel contentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
JPanel contentPane = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
this.setLayout(new BorderLayout());
this.add(contentPane, BorderLayout.CENTER);
}

15
designer-chart/src/main/java/com/fr/van/chart/range/component/LegendLabelFormatPane.java

@ -1,12 +1,12 @@
package com.fr.van.chart.range.component;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.base.LegendLabelFormat;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.style.FormatPane;
import com.fr.design.layout.TableLayout;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartHtmlLabelPaneWithOutWidthAndHeight;
import com.fr.van.chart.designer.component.format.FormatPaneWithOutFont;
import com.fr.van.chart.designer.style.VanChartStylePane;
@ -47,7 +47,6 @@ public class LegendLabelFormatPane extends JPanel {
}
};
htmlLabelPane = new VanChartHtmlLabelPaneWithOutWidthAndHeight();
htmlLabelPane.setBorder(BorderFactory.createEmptyBorder(0, (int) TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH + TableLayout4VanChartHelper.COMPONENT_INTERVAL, 0, 0));
centerPane = new JPanel(new CardLayout()) {
@Override
@ -63,17 +62,11 @@ public class LegendLabelFormatPane extends JPanel {
centerPane.add(htmlLabelPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom"));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Label_Format"), SwingConstants.LEFT), labelFormatStyle},
new Component[]{centerPane, null},
};
JPanel contentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
JPanel contentPane = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
labelFormatStyle.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -82,7 +75,7 @@ public class LegendLabelFormatPane extends JPanel {
});
labelFormatStyle.setSelectedIndex(0);
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Format"), contentPane);
JPanel panel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Format"), contentPane, true);
this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER);
}

9
designer-chart/src/main/java/com/fr/van/chart/treemap/style/VanChartTreeMapSeriesPane.java

@ -1,11 +1,13 @@
package com.fr.van.chart.treemap.style;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.Plot;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.plugin.chart.treemap.VanChartTreeMapPlot;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.multilayer.style.VanChartMultiPieSeriesPane;
import javax.swing.JPanel;
@ -22,8 +24,9 @@ public class VanChartTreeMapSeriesPane extends VanChartMultiPieSeriesPane {
protected JPanel createSeriesStylePane(double[] row, double[] col) {
supportDrill = new UIButtonGroup<Integer>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Open"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Close")});
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Drill"), supportDrill);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Widget_Style"), panel);
JPanel panel = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Drill")), supportDrill);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Widget_Style"), panel, true);
}
protected void populatePieAttr() {

42
designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java

@ -1,10 +1,11 @@
package com.fr.design.widgettheme;
import com.fine.swing.ui.layout.Column;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.background.ColorBackground;
import com.fr.base.theme.TemplateTheme;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.frpane.FontSizeComboPane;
import com.fr.design.gui.frpane.UIPercentDragPane;
@ -18,15 +19,12 @@ import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.style.FRFontPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.design.utils.DesignUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.form.ui.Widget;
import com.fr.general.FRFont;
import com.fr.general.IOUtils;
import com.fr.util.ColorUtils;
import com.fr.widgettheme.theme.bean.ButtonBackground;
import com.fr.widgettheme.theme.panel.ButtonStyleDefinedPane;
@ -38,7 +36,6 @@ import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants;
import com.fr.widgettheme.util.WidgetStyleComponentCombiner;
import com.fr.widgettheme.util.WidgetThemeDesignerUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Color;
@ -130,8 +127,9 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
protected void initPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.add(createHeadPane(), BorderLayout.NORTH);
this.add(createCustomPane(), BorderLayout.CENTER);
this.add(column(10,
cell(createHeadPane()), cell(createCustomPane())
).getComponent(), BorderLayout.CENTER);
}
@ -145,8 +143,8 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
fontNameSelectBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
fontSizePane = new FontSizeComboPane();
fontColorButton = new UIColorButton();
bold = new UIToggleButton(IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"));
italic = new UIToggleButton(IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"));
bold = new UIToggleButton(new LazyIcon("bold"));
italic = new UIToggleButton(new LazyIcon("italic"));
widgetBgColorSelectBox = new NewColorSelectBox(WidgetThemeDisplayConstants.THEME_WIDGET_COMPONENT_WIDTH, true);
widgetBgAlphaDragPane = new UIPercentDragPane();
paneMap.put(StyleSetting.THEME_COLOR, colorSelectBox);
@ -180,34 +178,14 @@ public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPa
switchCard();
}
};
JPanel headPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{
new Component[]{headLabel, styleSettingHead}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
headPane.setBorder(BorderFactory.createEmptyBorder(0, 0, IntervalConstants.INTERVAL_L1, 0));
return headPane;
return FineLayoutBuilder.createHorizontalLayout(0, new double[] {1.2, 3}, headLabel, styleSettingHead);
}
protected JPanel createCustomPane() {
int size = styleSettingList.size();
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
int columnCount = 2;
double[] rowSize = new double[size];
for (int i = 0; i < size; i++) {
rowSize[i] = p;
}
double[] columnSize = {p, f};
int[][] rowCount = new int[size][columnCount];
for (int i = 0; i < size; i++) {
for (int j = 0; j < columnCount; j++) {
rowCount[i][j] = 1;
}
}
customPane = TableLayoutHelper.createGapTableLayoutPane(createComponents(size), rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
customPane.setBorder(BorderFactory.createEmptyBorder(0, 0, IntervalConstants.INTERVAL_L1, 0));
customPane = FineLayoutBuilder.compatibleTableLayout(10, createComponents(size), new double[]{1.2, 3});
return customPane;
}

30
designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java vendored

@ -244,27 +244,27 @@ public class DesignEnvComponent {
* ----------- logger --------
*/
private void startLogger() {
String realPath = Carina.properties(LoggerProperties.class).getXml();
URI uri = Log4jUtils.buildUserConfigURI(realPath);
URI uri = Log4jUtils.buildUserConfigURI(StringUtils.EMPTY);
FRLogger.getLogger().config(uri);
// 日志配置更新的监听在FRLogger里面,fbp去掉了但是设计器本地还是需要这个监听的,初始化的时候监听一下
listenConfig();
}
private void listenConfig() {
ValidateConfigManger.getInstance().registerListener(new ConfigChangeListener() {
@Override
public boolean accept(Class<? extends Configuration> configClass) {
return configClass.equals(Log4jConfig.class);
}
@Override
public void change() {
// The root logger is the topmost logger with a name of "" (the empty string).
Configurator.setAllLevels("", Log4jConfig.getInstance().getRootLevel());
}
});
/// 等fbp改完,现在先配合打包注释掉
// ValidateConfigManger.getInstance().registerListener(new ConfigChangeListener() {
//
// @Override
// public boolean accept(Class<? extends Configuration> configClass) {
// return configClass.equals(Log4jConfig.class);
// }
//
// @Override
// public void change() {
// // The root logger is the topmost logger with a name of "" (the empty string).
// Configurator.setAllLevels("", Log4jConfig.getInstance().getRootLevel());
// }
// });
}

4
designer-realize/src/main/java/com/fanruan/boot/env/DesignFunctionComponent.java vendored

@ -7,7 +7,7 @@ import com.fanruan.carina.annotions.Start;
import com.fanruan.messenger.ums.config.email.FineEmailSecurityProviderImpl;
import com.fr.base.email.EmailCenter;
import com.fr.base.email.impl.EmailAccountManagerImpl;
import com.fr.base.email.impl.FREmailDispatcherImpl;
import com.fr.base.email.impl.EmailDispatcherImpl;
import com.fr.base.email.impl.FineEmailExtensionProviderImpl;
import com.fr.base.email.impl.FineEmailResourceProviderImpl;
import com.fr.base.email.provider.FineEmailExtensionProvider;
@ -78,7 +78,7 @@ public class DesignFunctionComponent {
fineEmailExtensionProvider, fineEmailResourceProvider,
new FineEmailSecurityProviderImpl());
EmailCenter.setDispatcher(new FREmailDispatcherImpl());
EmailCenter.setDispatcher(new EmailDispatcherImpl());
EmailCenter.setAccountManager(new EmailAccountManagerImpl());
EmailTaskManagement.getInstance().start();
}

4
designer-realize/src/main/java/com/fanruan/boot/pre/DesignPreStartComponent.java

@ -61,7 +61,7 @@ import com.fr.tenant.config.TenantConfigProvider;
import com.fr.tenant.context.CurrentTenantProviderStater;
import com.fr.tenant.context.TenantContext;
import com.fr.tenant.context.provider.CurrentTenantKey;
import com.fr.tenant.store.impl.DefaultTenantStorage;
import com.fr.tenant.store.impl.MemoryTenantStorage;
import com.fr.workspace.WorkContext;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@ -208,7 +208,7 @@ public class DesignPreStartComponent {
private void startTenant() {
TenantContext.registerStorage(new DefaultTenantStorage());
TenantContext.registerStorage(new MemoryTenantStorage());
TenantContext.registerConfigProvider(new TenantConfigProvider() {
@Override
public boolean isMultiTenantOpen() {

5
designer-realize/src/main/java/com/fanruan/data/ConnectionConfigWrapper.java

@ -3,10 +3,13 @@ package com.fanruan.data;
import com.fanruan.config.impl.data.ConnectionConfigProvider;
import com.fanruan.config.impl.data.ConnectionConfigWriter;
import com.fr.data.impl.Connection;
import com.fr.design.data.datapane.preview.ConnectionInfoBeanHelper;
import com.fr.file.ConnectionConfig;
import com.fr.log.FineLoggerFactory;
import com.fr.transaction.Configurations;
import com.fr.transaction.WorkerAdaptor;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.repository.connection.ConnectionRepository;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@ -106,7 +109,7 @@ public class ConnectionConfigWrapper implements ConnectionConfigProvider, Connec
@Override
public @Nullable Connection getConnection(@NotNull String connectionName) {
Connection connection = ConnectionConfig.getInstance().getConnection(connectionName);
Connection connection = WorkContext.getCurrent().isLocal() ? ConnectionConfig.getInstance().getConnection(connectionName) : ConnectionInfoBeanHelper.createConnection(ConnectionRepository.getInstance().getByName(connectionName));;
if (connection != null) {
connection.setConnectionName(connectionName);
}

10
designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java

@ -4,8 +4,8 @@
package com.fr.design.cell.editor;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.ibutton.UIRadioButton;
@ -84,7 +84,7 @@ public class BiasTextPainterCellEditor extends AbstractCellEditor {
Window parentWindow = SwingUtilities.getWindowAncestor(grid);
this.biasTextPainterPane = new BiasTextPainterPane();
Dimension wrapDimension = FineUIScale.scale(new Dimension(360, 172));
Dimension wrapDimension = FineUIScale.scale(new Dimension(360, 212));
this.biasTextPainterPane.populate(biasTextPainter);
return this.biasTextPainterPane.showWindowWithCustomSize(parentWindow, new DialogActionAdapter() {
@ -113,7 +113,7 @@ public class BiasTextPainterCellEditor extends AbstractCellEditor {
formulaTextArea = new UITextArea();
JScrollPane scrollPane = new JScrollPane(formulaTextArea);
scrollPane.setBorder(new FineRoundBorder());
scrollPane.setBorder(FineBorderFactory.createWrappedRoundBorder());
formulaTextArea.setBorder(null);
String leftToLowerText = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Slope_Line_Upper_Left_To_Lower_Right");
@ -130,8 +130,8 @@ public class BiasTextPainterCellEditor extends AbstractCellEditor {
group.add(choice2);
add(Layouts.column(10,
Layouts.cell(formulaLabel).weight(0.1), Layouts.cell(scrollPane).weight(0.12),
Layouts.row(5, Layouts.cell(choice1).weight(1), Layouts.cell(choice2).weight(1)).weight(0.12)).getComponent());
Layouts.cell(formulaLabel), Layouts.cell(scrollPane).weight(1),
Layouts.row(5, Layouts.cell(choice1).weight(1), Layouts.cell(choice2).weight(1))).getComponent());
}
@Override

4
designer-realize/src/main/java/com/fr/design/mainframe/form/FormReportComponentComposite.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.form;
import com.formdev.flatlaf.ui.FlatRoundBorder;
import com.fr.base.DynamicUnitList;
import com.fr.base.ScreenResolution;
import com.fr.design.cell.bar.DynamicScrollBar;
@ -11,9 +12,7 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerUIModeConfig;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.mainframe.JDashboard;
import com.fr.design.mainframe.JForm;
import com.fr.design.mainframe.JFormSliderPane;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.JTemplateProvider;
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
import com.fr.form.FormElementCaseContainerProvider;
@ -59,6 +58,7 @@ public class FormReportComponentComposite extends JComponent implements TargetMo
this.elementCaseDesigner.elementCasePane.getGrid().addMouseWheelListener(new FormReportComponentCompositeMouseWheelHandler(this));
elementCaseDesigner.addTargetModifiedListener(this);
this.jSliderContainer.setShowValue((ScreenResolution.getScreenResolution() * HUND) / Constants.DEFAULT_WEBWRITE_AND_SCREEN_RESOLUTION);
setBorder(new FlatRoundBorder());
}
public FormReportComponentComposite(BaseJForm jform, FormElementCaseDesigner elementCaseDesign, FormElementCaseContainerProvider ecContainer) {

1
designer-realize/src/main/java/com/fr/design/report/freeze/FormECRepeatAndFreezeSettingPane.java

@ -30,6 +30,7 @@ public class FormECRepeatAndFreezeSettingPane extends RepeatAndFreezeSettingPane
protected void addWriteFrozen(JPanel freezePanel, JPanel pagePanel) {
super.initWriteFrozenPane();
this.add(pagePanel);
}
}

31
designer-realize/src/main/java/com/fr/design/widget/ui/CheckBoxDefinePane.java

@ -7,7 +7,6 @@ import com.fr.design.fun.WidgetAdvancedPaneProvider;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.widgettheme.processor.WidgetThemeCreatorPaneAdder;
import com.fr.form.ui.CheckBox;
import com.fr.general.GeneralContext;
@ -37,8 +36,6 @@ public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
protected final List<BasicBeanPane<CheckBox>> extraPaneList = new ArrayList<>();
protected JPanel extraPane;
protected static double F = TableLayout.FILL;
protected static double P = TableLayout.PREFERRED;
public CheckBoxDefinePane() {
this.iniComponents();
@ -51,24 +48,16 @@ public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
JPanel content = new JPanel(new BorderLayout());
if (extraPane == null) {
content.add(
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"))).weight(LEFT_WEIGHT),
cell(text).weight(RIGHT_WEIGHT)
).getComponent()
);
} else {
content.add(
column(
10,
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"))).weight(LEFT_WEIGHT),
cell(text)).weight(RIGHT_WEIGHT),
row(cell(extraPane))
).getComponent()
);
}
content.add(
column(
10,
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"))).weight(LEFT_WEIGHT),
cell(text).weight(RIGHT_WEIGHT)
),
cell(extraPane)
).getComponent()
);
UIExpandablePane uiExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 24, content);
this.add(uiExpandablePane);
}

7
designer-realize/src/main/java/com/fr/start/module/optimized/ConfigurationActivator4Designer.java

@ -1,11 +1,7 @@
package com.fr.start.module.optimized;
import com.fr.config.activator.ConfigurationActivator;
import com.fr.config.dao.DaoContext;
import com.fr.config.dao.DaoSelectorFactory;
import com.fr.config.dao.impl.remote.PropertiesClassHelperDao;
import com.fr.config.dao.impl.remote.PropertiesEntityDao;
import com.fr.config.dao.impl.remote.PropertiesXmlEntityDao;
import com.fr.transaction.PropertiesTransactor;
import com.fr.transaction.TransactorFactory;
@ -20,9 +16,6 @@ public class ConfigurationActivator4Designer extends ConfigurationActivator {
protected void initLocalDao() {
if (DaoSelectorFactory.getDaoSelector().useCacheDao()) {
TransactorFactory.setTransactor(new PropertiesTransactor());
DaoContext.setClassHelperDao(new PropertiesClassHelperDao());
DaoContext.setEntityDao(new PropertiesEntityDao());
DaoContext.setXmlEntityDao(new PropertiesXmlEntityDao());
} else {
super.initLocalDao();
}

Loading…
Cancel
Save