diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index 7c22614cd1..649258b58c 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java @@ -994,7 +994,7 @@ public class PreferencePane extends BasicPane { this.autoPushUpdateCheckBox.setSelected(designerEnvManager.isAutoPushUpdateEnabled()); } - this.embedServerLazyStartupCheckBox.setSelected(designerEnvManager.isEmbedServerLazyStartup()); +// this.embedServerLazyStartupCheckBox.setSelected(designerEnvManager.isEmbedServerLazyStartup()); this.startWithEmptyFile.setSelected(designerEnvManager.isStartWithEmptyFile()); this.imageCompressPanelCheckBox.setSelected(designerEnvManager.isImageCompress()); diff --git a/designer-base/src/main/java/com/fr/design/carton/CartonConstants.java b/designer-base/src/main/java/com/fr/design/carton/CartonConstants.java index c51f1193c5..f674327a22 100644 --- a/designer-base/src/main/java/com/fr/design/carton/CartonConstants.java +++ b/designer-base/src/main/java/com/fr/design/carton/CartonConstants.java @@ -1,6 +1,6 @@ package com.fr.design.carton; -import com.fr.stable.ProductConstantsBase; +import com.fanruan.product.ProductConstantsBase; import com.fr.stable.StableUtils; import java.text.SimpleDateFormat; diff --git a/designer-base/src/main/java/com/fr/design/carton/FeedbackToolboxDialog.java b/designer-base/src/main/java/com/fr/design/carton/FeedbackToolboxDialog.java index 308627a843..cf6f50c7f2 100644 --- a/designer-base/src/main/java/com/fr/design/carton/FeedbackToolboxDialog.java +++ b/designer-base/src/main/java/com/fr/design/carton/FeedbackToolboxDialog.java @@ -3,7 +3,6 @@ package com.fr.design.carton; import com.fine.swing.ui.layout.Layouts; import com.fine.theme.utils.FineUIScale; import com.formdev.flatlaf.util.ScaledEmptyBorder; -import com.fr.decision.webservice.v10.log.download.utils.LogZipUtils; import com.fr.design.DesignerEnvManager; import com.fr.design.constants.UIConstants; import com.fr.design.dialog.FineJOptionPane; diff --git a/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java b/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java index 75fa28ef1e..c8a1d4605c 100644 --- a/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java +++ b/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java @@ -1,5 +1,7 @@ package com.fr.design.carton.latency; +import com.fanruan.carina.Carina; +import com.fanruan.config.bbs.FineBBSConfigProvider; import com.fr.concurrent.NamedThreadFactory; import com.fr.config.MarketConfig; import com.fr.design.DesignerEnvManager; @@ -160,7 +162,7 @@ public class DesignerLatencyMetric { JSONObject info = new JSONObject(); info.put(TIME, System.currentTimeMillis()); info.put(APPID, MarketConfig.getInstance().getCloudOperationMaintenanceId()); - info.put(USERID, MarketConfig.getInstance().getBbsUid()); + info.put(USERID, Carina.config(FineBBSConfigProvider.class).getBbsUid()); info.put(DESIGNER_ID, DesignerEnvManager.getEnvManager().getUUID()); info.put(DESIGNER_VERSION, GeneralUtils.getVersion()); info.put(DESIGN_METHOD, WorkContext.getCurrent().isLocal() ? LOCAL : REMOTE); diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java index 08a7fbabf1..2a6a43cd0d 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java @@ -3,28 +3,11 @@ package com.fr.design.data.datapane.connect; import com.fanruan.config.impl.data.ConnectionConfigProviderFactory; import com.fanruan.config.impl.data.ConnectionConfigWriterFactory; import com.fr.config.remote.RemoteConfigEvent; -import com.fr.data.auth.AuthenticationType; -import com.fr.data.auth.kerberos.KerberosAuthentication; -import com.fr.data.auth.kerberos.KerberosUtils; import com.fine.theme.icon.LazyIcon; -import com.fr.config.RemoteConfigEvent; -import com.fr.data.driver.DriverClassNotFoundException; import com.fr.data.impl.Connection; import com.fr.data.impl.JDBCDatabaseConnection; import com.fr.data.impl.JNDIDatabaseConnection; -import com.fr.data.pool.DBCPConnectionPoolAttr; -import com.fr.data.security.ssh.BaseSsh; -import com.fr.data.security.ssh.SshType; -import com.fr.data.security.ssh.impl.KeyVerifySsh; -import com.fr.data.security.ssl.BaseSsl; -import com.fr.data.security.ssl.SslType; -import com.fr.data.security.ssl.impl.NormalSsl; -import com.fr.decision.privilege.TransmissionTool; import com.fr.decision.webservice.bean.datasource.ConnectionInfoBean; -import com.fr.decision.webservice.bean.datasource.JDBCConnectionBean; -import com.fr.decision.webservice.utils.DecisionServiceConstants; -import com.fr.decision.webservice.v10.datasource.connection.processor.impl.ConnectionProcessorFactory; -import com.fr.decision.webservice.v10.datasource.connection.processor.impl.JDBCConnectionProcessor; import com.fr.design.ExtraDesignClassManager; import com.fr.design.data.MapCompareUtils; import com.fr.design.data.datapane.preview.ConnectionInfoBeanHelper; @@ -36,28 +19,23 @@ import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.ilist.ListModelElement; import com.fr.design.i18n.Toolkit; import com.fr.event.EventDispatcher; -import com.fr.file.ConnectionOperator; import com.fr.general.NameObject; import com.fr.license.database.DBTypes; import com.fr.license.database.DataBaseTypePointManager; import com.fr.license.exception.DataBaseNotSupportedException; import com.fr.log.FineLoggerFactory; -import com.fr.security.encryption.transmission.TransmissionEncryptors; import com.fr.stable.ArrayUtils; import com.fr.stable.Nameable; import com.fr.stable.StringUtils; import com.fr.stable.core.PropertyChangeAdapter; -import com.fr.third.fasterxml.jackson.databind.ObjectMapper; import com.fr.workspace.WorkContext; import com.fr.workspace.server.database.DataBaseTypeOperator; -import com.fr.workspace.server.entity.connection.BatchConnectionModifyBean; import com.fr.workspace.server.entity.connection.ConnectionBean; import com.fr.workspace.server.repository.connection.ConnectionRepository; import org.jetbrains.annotations.NotNull; import javax.swing.SwingWorker; import java.awt.Window; -import java.sql.SQLException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java index 0a802a5d7f..e59628cd15 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java @@ -112,7 +112,7 @@ public class CenterRegionContainerPane extends JPanel { private void combineUpTooBar() { combineUp = new UIToolbar(FlowLayout.LEFT); setStyle(combineUp, TOP_TOOLS); - combineUp.setBorder(new ScaledEmptyBorder(10, 5, 10, 10)); + combineUp.setBorder(new ScaledEmptyBorder(10, 8, 10, 10)); combineUp.setLayout(new FlowLayout(FlowLayout.LEFT, scale(5), 0)); setUpUpToolBar(null); } @@ -243,7 +243,7 @@ public class CenterRegionContainerPane extends JPanel { toolbarPane.add(toolbarComponent = ad.resetToolBar(toolbarComponent, plus), BorderLayout.CENTER); setStyle(toolbarComponent, TOP_TOOLS); toolbarComponent.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE)); - toolbarComponent.setBorder(new ScaledEmptyBorder(0, 5, 0, 10)); + toolbarComponent.setBorder(new ScaledEmptyBorder(0, 10, 0, 10)); JPanel customNorthPane = strategy.customNorthPane(toolbarPane, plus); if (!isExist(customNorthPane)) { this.removeNorth(); diff --git a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java index 1574a9a627..45c955b12b 100644 --- a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java +++ b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java @@ -1,5 +1,6 @@ package com.fr.startup.ui; +import com.fine.swing.ui.layout.Column; import com.fine.theme.utils.FineUIStyle; import com.fine.theme.utils.FineUIUtils; import com.formdev.flatlaf.ui.FlatUIUtils; @@ -41,7 +42,6 @@ import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Graphics; import java.awt.Graphics2D; -import java.awt.GridLayout; import java.awt.LayoutManager; import java.awt.RenderingHints; import java.awt.event.MouseAdapter; @@ -354,7 +354,8 @@ public class StartupPageWindow extends JFrame { @NotNull private JComponent generateRecentOpenGroupPanel(StartupPageModel pageModel, StartupWorkspaceBean workspaceInfo) { - JPanel recentOpenGroupPanel = new JPanel(); + Column recentOpenGroupPanel = new Column(); + recentOpenGroupPanel.setSpacing(5); Map> recentFilesMap = pageModel.getRecentFilesMap(); boolean needScroll = false; @@ -363,7 +364,6 @@ public class StartupPageWindow extends JFrame { String name = workspaceInfo.getName(); List recentFiles = recentFilesMap.get(name); if (!CollectionUtils.isEmpty(recentFiles)) { - recentOpenGroupPanel.setLayout(new GridLayout(recentFiles.size(), 1, 50, 5)); needScroll = recentFiles.size() > RECENT_FILE_LIMIT; for (String recentFile : recentFiles) { JPanel recentItemPanel = new JPanel(); diff --git a/designer-realize/src/main/java/com/fanruan/boot/env/function/DesignComponent.java b/designer-realize/src/main/java/com/fanruan/boot/env/function/DesignComponent.java index 31983dfe88..8a31974196 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/env/function/DesignComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/env/function/DesignComponent.java @@ -18,6 +18,7 @@ import com.fr.base.theme.migrator.FormThemeConfigMigrator; import com.fr.base.theme.migrator.ReportThemeConfigMigrator; import com.fr.chart.chartattr.ChartCollection; import com.fr.config.ServerPreferenceConfig; +import com.fr.data.core.db.dml.Update; import com.fr.decision.update.backup.RecoverManager; import com.fr.decision.webservice.v10.plugin.helper.category.impl.PluginResourceLoader; import com.fr.decision.webservice.v10.plugin.helper.category.impl.UpmResourceLoader; @@ -25,6 +26,7 @@ import com.fr.design.DesignerEnvManager; import com.fr.design.ExtraDesignClassManager; import com.fr.design.RPCConnectHandlerCenter; import com.fr.design.actions.NewFormAction; +import com.fr.design.actions.UpdateAction; import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.insert.cell.BiasCellAction; import com.fr.design.actions.insert.cell.ChartCellAction; @@ -285,14 +287,14 @@ public class DesignComponent { }); } - private static Class[] actionsForInsertCellElement() { - List> classes = new ArrayList<>(); + private static Class[] actionsForInsertCellElement() { + List> classes = new ArrayList<>(); Set providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING); for (ElementUIProvider provider : providers) { classes.add(provider.actionForInsertCellElement()); } - return ArrayUtils.addAll(new Class[]{ + Class[] fixedActions = new Class[]{ DSColumnCellAction.class, GeneralCellAction.class, RichTextCellAction.class, @@ -301,22 +303,33 @@ public class DesignComponent { ImageCellAction.class, BiasCellAction.class, SubReportCellAction.class - }, classes.toArray(new Class[classes.size()])); + }; + + Class[] resultArray = ArrayUtils.addAll(fixedActions, classes.toArray(new Class[0])); + @SuppressWarnings("unchecked") + Class[] castedResultArray = (Class[]) resultArray; + return castedResultArray; } - private static Class[] actionsForInsertFloatElement() { - List> classes = new ArrayList<>(); + private static Class[] actionsForInsertFloatElement() { + List> classes = new ArrayList<>(); Set providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING); for (ElementUIProvider provider : providers) { classes.add(provider.actionForInsertFloatElement()); } - return ArrayUtils.addAll(new Class[]{ + Class[] fixedActions = new Class[]{ TextBoxFloatAction.class, FormulaFloatAction.class, ChartFloatAction.class, ImageFloatAction.class - }, classes.toArray(new Class[classes.size()])); + }; + + Class[] resultArray = ArrayUtils.addAll(fixedActions, classes.toArray(new Class[0])); + @SuppressWarnings("unchecked") + Class[] castedResultArray = (Class[]) resultArray; + + return castedResultArray; } private static NameableCreator[] hyperlinkTypes() { diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java b/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java index 9a30b3266d..4788379b50 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java @@ -6,7 +6,6 @@ import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.form.FormECBackgroundAction; import com.fr.design.actions.form.FormECColumnsAction; import com.fr.design.actions.form.FormECFrozenAction; -import com.fr.design.base.mode.DesignModeContext; import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedListener; import com.fr.design.file.HistoryTemplateListCache; @@ -14,13 +13,11 @@ import com.fr.design.fit.NewUIModeCellElementPainter; import com.fr.design.gui.frpane.HyperlinkGroupPane; import com.fr.design.mainframe.*; import com.fr.design.mainframe.cell.QuickEditorRegion; -import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.MenuDef; import com.fr.design.menu.ShortCut; import com.fr.design.menu.ToolBarDef; import com.fr.design.present.ConditionAttributesGroupPane; -import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils; import com.fr.form.fit.common.LightTool; import com.fr.form.main.Form; import com.fr.grid.Grid; @@ -28,7 +25,6 @@ import com.fr.grid.GridColumn; import com.fr.grid.GridCorner; import com.fr.grid.GridRow; import com.fr.page.ReportSettingsProvider; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.worksheet.FormElementCase; import com.fr.design.selection.SelectionEvent; @@ -70,16 +66,6 @@ public class FormElementCasePaneDelegate extends ElementCasePane { - DefaultTemplateCellElement defaultTemplateCellElement = DefaultThemedTemplateCellElementCase.createInstance(); - // fvs调整单元格默认样式 - AdjustWorkBookDefaultStyleUtils.adjustCellElement(defaultTemplateCellElement); - return defaultTemplateCellElement; - }); - } } private Rectangle getBoundsLineRect(TemplateElementCase elementCase) { diff --git a/designer-realize/src/main/java/com/fr/design/present/CurrencyLinePane.java b/designer-realize/src/main/java/com/fr/design/present/CurrencyLinePane.java index 07cc340ecf..21b7bd2365 100644 --- a/designer-realize/src/main/java/com/fr/design/present/CurrencyLinePane.java +++ b/designer-realize/src/main/java/com/fr/design/present/CurrencyLinePane.java @@ -4,7 +4,6 @@ import com.fr.barcode.core.BarcodeException; import com.fine.swing.ui.layout.Layouts; import com.fine.theme.light.ui.FineRoundBorder; import com.fine.theme.utils.FineUIScale; -import com.fr.code.bar.BarcodeException; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.UIConstants; diff --git a/designer-realize/src/main/java/com/fr/start/CarinaDesigner.java b/designer-realize/src/main/java/com/fr/start/CarinaDesigner.java index b5077eb1cd..5c78d28631 100644 --- a/designer-realize/src/main/java/com/fr/start/CarinaDesigner.java +++ b/designer-realize/src/main/java/com/fr/start/CarinaDesigner.java @@ -6,10 +6,13 @@ import com.fanruan.carina.Carina; import com.fanruan.carina.context.CarinaApplicationContext; import com.fanruan.carina.standard.PartitionManager; import com.fanruan.carina.standard.PartitionManagerImpl; +import com.fanruan.gui.UiInspector; import com.fr.base.StateHubContext; import com.fr.design.backup.DesignContext; import com.fr.design.carton.SwitchForSwingChecker; +import com.fr.design.carton.latency.DesignerLatencyMetric; +import com.fr.design.mainframe.DesignerUIModeConfig; import com.fr.log.FineLoggerFactory; import com.fr.runtime.FineRuntime; @@ -60,7 +63,20 @@ public class CarinaDesigner extends MainDesigner{ FineLoggerFactory.getLogger().info("Designer started.Time used {} ms", DesignerStartupContext.getRecorder().getTime(TimeUnit.MILLISECONDS)); + DesignerStartupContext.getRecorder().stop(); SwitchForSwingChecker.initThreadMonitoring(); + DesignerLatencyMetric.getInstance().start(); + + installUIDevModeTools(); + } + + /** + * 进入UI开发者模式 + */ + private static void installUIDevModeTools() { + if (DesignerUIModeConfig.getInstance().isUIDevMode()) { + new UiInspector(); + } } }