diff --git a/designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java b/designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java index 925c0a438d..673e55b352 100644 --- a/designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java +++ b/designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java @@ -51,6 +51,7 @@ public interface FineUIStyle { String WHITE_BUTTON = "whiteButton"; String ORIGINAL_BUTTON = "originalButton"; String DETAIL_LABEL = "detailLabel"; + String WIDGET_EVENT_LABEL = "widgetEventLabel"; /** diff --git a/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java b/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java index f62243a8c4..7dc25799f3 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java @@ -15,8 +15,8 @@ import com.fr.file.filter.ChooseFileFilter; import com.fr.io.exporter.DesignExportType; import com.fr.io.exporter.ExporterKey; import com.fr.log.FineLoggerFactory; -import com.fanruan.product.ProductConstants; import com.fr.stable.StringUtils; +import com.fr.stable.project.ProjectConstants; import com.fr.third.jodd.io.FileNameUtil; import com.fr.workspace.WorkContext; import com.fr.workspace.server.exporter.TemplateExportOperator; @@ -211,19 +211,15 @@ public abstract class AbstractExportAction> extends JT } private void dealExporter(OutputStream outputStream, String path, final Map para) throws Exception { + if (path.startsWith(ProjectConstants.REPORTLETS_NAME)) { + path = path.substring(ProjectConstants.REPORTLETS_NAME.length()); + } - // 没有办法处理这个 isLocal 判断,因为一个是修改参数传递结果,一个是返回值做结果 - // todo 后续想想办法 - if (WorkContext.getCurrent().isLocal()) { - WorkContext.getCurrent().get(TemplateExportOperator.class) - .export(exportKey(), exportType(), outputStream, path, para); - } else { - byte[] contents = - WorkContext.getCurrent().get(TemplateExportOperator.class) - .export(exportKey(), exportType(), null, path, para); + byte[] contents = + WorkContext.getCurrent().get(TemplateExportOperator.class) + .export(exportKey(), exportType(), null, path, para); - outputStream.write(contents); - } + outputStream.write(contents); } @Override diff --git a/designer-base/src/main/java/com/fr/design/backup/DesignContext.java b/designer-base/src/main/java/com/fr/design/backup/DesignContext.java index e2aebc14db..ef5f99e396 100644 --- a/designer-base/src/main/java/com/fr/design/backup/DesignContext.java +++ b/designer-base/src/main/java/com/fr/design/backup/DesignContext.java @@ -7,6 +7,7 @@ import com.fr.stable.StringUtils; import javax.servlet.ServletContext; +import java.io.File; import java.util.Properties; /** @@ -17,7 +18,7 @@ import java.util.Properties; * Created on 2024/5/14 */ public class DesignContext extends CarinaApplicationContext { - public static final String WEB_INF = "\\WEB-INF"; + public static final String WEB_INF = "WEB-INF"; private String designWebInfPath; private String designDataPath; @@ -39,7 +40,7 @@ public class DesignContext extends CarinaApplicationContext { public void setDesignWebInfPath(String designWebInfPath) { this.designWebInfPath = designWebInfPath; if (StringUtils.isNotEmpty(this.designWebInfPath)) { - this.designDataPath = this.designWebInfPath.replace(WEB_INF, StringUtils.EMPTY); + this.designDataPath = this.designWebInfPath.replace(File.separatorChar + WEB_INF, StringUtils.EMPTY); } FineLoggerFactory.getLogger().info("[DesignContext] designWebInfPath:{}, designDataPath:{}", this.designWebInfPath, this.designDataPath); } diff --git a/designer-base/src/main/java/com/fr/design/condition/DSColumnLiteConditionPane.java b/designer-base/src/main/java/com/fr/design/condition/DSColumnLiteConditionPane.java index cee0410a95..825be9e635 100644 --- a/designer-base/src/main/java/com/fr/design/condition/DSColumnLiteConditionPane.java +++ b/designer-base/src/main/java/com/fr/design/condition/DSColumnLiteConditionPane.java @@ -123,8 +123,8 @@ public class DSColumnLiteConditionPane extends LiteConditionPane getFileList(String fileType) { return FileProcessor.KEY.getFileList(fileType, StringUtils.EMPTY); } + + @Override + public boolean testFilePath(FileDataSetBean fileDataSetBean) { + try { + return FileProcessor.KEY.testFilePath(fileDataSetBean); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + return false; + } + } } diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DatacentersJSBridge.java b/designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DCTableDataJSBridge.java similarity index 91% rename from designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DatacentersJSBridge.java rename to designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DCTableDataJSBridge.java index f8e164dccf..c5f25d68aa 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DatacentersJSBridge.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DCTableDataJSBridge.java @@ -4,6 +4,7 @@ import com.fr.base.BaseFormula; import com.fr.datacenters.tabledata.bean.DCFilterQueryBean; import com.fr.datacenters.tabledata.bean.DCTableDataBean; import com.fr.datacenters.tabledata.filter.DCFilter; +import com.fr.datacenters.tabledata.parameter.DCParameter; import com.fr.design.bridge.exec.JSBridge; import com.fr.design.dialog.DialogActionListener; import com.fr.design.dialog.UIDialog; @@ -37,7 +38,7 @@ import java.util.stream.Collectors; * Created on 2024/6/17 */ @JsAccessible -public class DatacentersJSBridge { +public class DCTableDataJSBridge { private static final String EVENT_FORMULA_UPDATE = "OK"; private static final String EVENT_FORMULA_CANCEL = "CANCEL"; @@ -47,25 +48,25 @@ public class DatacentersJSBridge { * @param window js环境的window对象 * @return 桥接实例 */ - public static DatacentersJSBridge getBridge(JsObject window) { - return new DatacentersJSBridge(window); + public static DCTableDataJSBridge getBridge(JsObject window) { + return new DCTableDataJSBridge(window); } private final JsObject window; - private DatacentersJSBridge(JsObject window) { + private DCTableDataJSBridge(JsObject window) { this.window = window; } - private static DatacentersPane relationPanel; + private static DCTableDataPane relationPanel; /** * 设置窗口,用于打开对话框的层级 * * @param panel 面板 */ - public static void relationPanel(DatacentersPane panel) { + public static void relationPanel(DCTableDataPane panel) { relationPanel = panel; } @@ -161,7 +162,9 @@ public class DatacentersJSBridge { JxUIPane.DEFAULT_EXECUTOR.submit(() -> { try { DCTableDataBean decoded = EmbedJson.decodeValue(tableData, DCTableDataBean.class); - DCFilter dcFilter = decoded.getFilter().evalValue(decoded.getParameters(), Calculator.createCalculator()); + DCParameter[] dcParameters = Arrays.stream(decoded.getParameters()) + .map(DCParameter::fromBean).toArray(DCParameter[]::new); + DCFilter dcFilter = decoded.getFilter().evalValue(dcParameters, Calculator.createCalculator()); DCFilterQueryBean queryBean = dcFilter.toQueryBean(); String encode = EmbedJson.encode(queryBean); callback.invoke(window, encode); diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DatacentersPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DCTableDataPane.java similarity index 79% rename from designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DatacentersPane.java rename to designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DCTableDataPane.java index 62679018d4..766e57ec20 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DatacentersPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DCTableDataPane.java @@ -4,6 +4,7 @@ import com.fanruan.workplace.http.ServiceType; import com.fr.datacenters.tabledata.DCTableData; import com.fr.datacenters.tabledata.bean.DCNameBean; import com.fr.datacenters.tabledata.bean.DCTableDataBean; +import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane; import com.fr.design.dialog.DialogActionListener; import com.fr.design.dialog.UIDialog; @@ -14,10 +15,15 @@ import com.fr.json.revise.EmbedJson; import com.fr.stable.StringUtils; import com.fr.third.guava.collect.ImmutableMap; import com.fr.workspace.WorkContext; +import com.teamdev.jxbrowser.browser.callback.InjectJsCallback; import javax.swing.SwingUtilities; import java.awt.BorderLayout; import java.awt.Window; +import java.util.Arrays; + +import static com.fr.design.ui.ModernUIConstants.DOT; +import static com.fr.design.ui.ModernUIConstants.WINDOW; /** * 数据中心数据集面板 @@ -26,7 +32,7 @@ import java.awt.Window; * @since 11.0 * Created on 2024/6/17 */ -public class DatacentersPane extends AbstractTableDataPane { +public class DCTableDataPane extends AbstractTableDataPane { private static final JxEngine JX_ENGINE = JxEngine.newInstance(false); @@ -37,31 +43,7 @@ public class DatacentersPane extends AbstractTableDataPane { // 用于复制粘贴场景 private DCTableData dcTableData; - /** - * 借用,只运行一次 - */ - private void addDialogActionListener() { - - // 保证在窗口加载完成后执行 - SwingUtilities.invokeLater(() -> { - Window ancestor = SwingUtilities.getWindowAncestor(DatacentersPane.this); - if (ancestor instanceof UIDialog) { - ((UIDialog) ancestor).addDialogActionListener(new DialogActionListener() { - @Override - public void doOk() { - dataCenterJxUIPane.disposeBrowser(); - } - - @Override - public void doCancel() { - dataCenterJxUIPane.disposeBrowser(); - } - }); - } - }); - } - - public DatacentersPane() { + public DCTableDataPane() { setLayout(new BorderLayout()); dataCenterJxUIPane = getJxUIPane(); add(dataCenterJxUIPane, BorderLayout.CENTER); @@ -73,7 +55,7 @@ public class DatacentersPane extends AbstractTableDataPane { return new JxUIPane.Builder() .engine(JX_ENGINE) .namespace(DATA_CENTER) - .bindWindow(DATA_CENTER_HELPER, DatacentersJSBridge::getBridge) + .bindWindow(DATA_CENTER_HELPER, DCTableDataJSBridge::getBridge) .withEMB("com/fr/design/data/tabledata/datacenter/web/data-choose.prod.html", ImmutableMap.of("fineServletURL", getDatacentersUrl())) .build(); @@ -96,9 +78,11 @@ public class DatacentersPane extends AbstractTableDataPane { @Override public void populateBean(DCTableData ob) { - DatacentersJSBridge.relationPanel(this); + DCTableDataJSBridge.relationPanel(this); dcTableData = ob; dataCenterJxUIPane.populate(EmbedJson.encode(ob.toBean())); + String[] allDSNames = DesignTableDataManager.getAllDSNames(DesignTableDataManager.getEditingTableDataSource()); + dataCenterJxUIPane.executeJS(DATA_CENTER + DOT + "datasetNames=" + EmbedJson.encode(allDSNames)); } diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java index 3ad4c40678..69bd6819cf 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java @@ -14,6 +14,7 @@ import com.fr.data.impl.ExcelTableData; import com.fr.data.impl.FileTableData; import com.fr.data.impl.TextTableData; import com.fr.data.impl.XMLTableData; +import com.fr.decision.webservice.bean.dataset.FileDataSetBean; import com.fr.design.actions.UpdateAction; import com.fr.design.constants.LayoutConstants; import com.fr.design.data.datapane.preview.PreviewTablePane; @@ -47,6 +48,7 @@ import com.fr.stable.ParameterProvider; import com.fr.stable.StringUtils; import com.fr.stable.xml.XMLReadable; import com.fr.stable.xml.XMLableReader; +import com.fr.workspace.server.repository.tabledata.TableDataRepository; import javax.swing.ButtonGroup; import javax.swing.JOptionPane; @@ -233,22 +235,20 @@ public class FileTableDataPane extends AbstractTableDataPane { } params = getEditorPaneParameter(); URLDataSource url = new URLDataSource(urlText.getText().trim(), params); - InputStream in = null; + boolean result = false; try { - in = url.getSourceStream(params); + String urlText = ParameterHelper.analyze4Templatee(url.getUrl(), params); + FileDataSetBean bean = new FileDataSetBean(); + bean.setFilePath(urlText); + result = TableDataRepository.getInstance().testFilePath(bean); } catch (Throwable e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); } - if (in == null) { + if (!result) { FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon")); } else { FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Connection_Successfully")); - try { - in.close(); - } catch (IOException e) { - in = null; - } } } }; diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java index 096fcc420d..6d87a2c1bc 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java @@ -15,7 +15,7 @@ import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.datacenters.tabledata.DCTableData; import com.fr.decision.webservice.bean.dataset.ServerDataSetBean; import com.fr.design.data.datapane.TableDataNameObjectCreator; -import com.fr.design.data.tabledata.datacenter.DatacentersPane; +import com.fr.design.data.tabledata.datacenter.DCTableDataPane; import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane; import com.fr.design.data.tabledata.tabledatapane.ClassTableDataPane; import com.fr.design.data.tabledata.tabledatapane.DBTableDataPane; @@ -79,7 +79,7 @@ public abstract class TableDataFactory { i18nText("Fine-Design_Basic_DS_Datacenters"), new LazyIcon("datacenter"), DCTableData.class, - DatacentersPane.class)); + DCTableDataPane.class)); map.putAll(defaultMap); } diff --git a/designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java b/designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java index 5c80e2b167..5434e71ce9 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java +++ b/designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java @@ -5,6 +5,7 @@ import com.fr.design.gui.iscrollbar.UIScrollBar; import javax.swing.JPanel; import javax.swing.JScrollBar; +import javax.swing.SwingUtilities; import java.awt.AWTEvent; import java.awt.Color; import java.awt.Component; @@ -111,6 +112,15 @@ public abstract class BasicScrollPane extends BasicBeanPane{ doLayout(); } + /** + * 插入图表后单元格元素使用cardLayout布局,需要滚动效果获取高度在子类中重新计算 + * + * @return height + */ + protected int getMaxHeight(){ + return getHeight(); + } + protected class BarLayout implements LayoutManager { @Override @@ -135,7 +145,7 @@ public abstract class BasicScrollPane extends BasicBeanPane{ @Override public void layoutContainer(Container parent) { - if(getHeight() >= leftcontentPane.getPreferredSize().height) { + if(getMaxHeight() >= leftcontentPane.getPreferredSize().height) { scrollBar.setEnabled(false); scrollBar.setVisible(false); } else { @@ -143,7 +153,7 @@ public abstract class BasicScrollPane extends BasicBeanPane{ scrollBar.setEnabled(show); scrollBar.setVisible(show); } - maxheight = getHeight() - DET_HEIGHT; + maxheight = getMaxHeight() - DET_HEIGHT; if ((MAXVALUE - scrollBar.getVisibleAmount()) == 0) { beginY = 0; } else { diff --git a/designer-base/src/main/java/com/fr/design/env/HttpWorkspaceConnector.java b/designer-base/src/main/java/com/fr/design/env/HttpWorkspaceConnector.java index 3687735601..ce2cdab889 100644 --- a/designer-base/src/main/java/com/fr/design/env/HttpWorkspaceConnector.java +++ b/designer-base/src/main/java/com/fr/design/env/HttpWorkspaceConnector.java @@ -6,6 +6,8 @@ import com.fanruan.workplace.http.RepositoryManager; import com.fanruan.workplace.http.info.Stub; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; +import com.fr.workspace.engine.exception.RemoteDesignConnectionException; +import com.fr.workspace.engine.exception.RemoteDesignNoAuthException; import com.fr.workspace.server.repository.authority.RemoteAuthorityRepository; import com.fr.workspace.server.repository.compatible.register.CompatibleRegister; import com.fr.workspace.server.repository.connect.FineWorkspaceHttpClient; @@ -43,7 +45,8 @@ public class HttpWorkspaceConnector implements WorkspaceConnector { FineWorkspaceHttpClient client = FineWorkspaceHttpClient.create("Http-Client", connectionInfo); LoginResponseInfoBean bean; try { - bean = RemoteAuthorityRepository.getInstance().login(createLoginBean(connectionInfo)); + bean = RemoteAuthorityRepository.getInstance().login(createLoginBean(connectionInfo)); + checkValidAndUpdateInfo(client, connectionInfo, bean); } finally { client.closePool(); } @@ -65,12 +68,7 @@ public class HttpWorkspaceConnector implements WorkspaceConnector { throw new RuntimeException("Empty token, try connect again and check server"); } FineLoggerFactory.getLogger().info("[connector] infos:{}", bean.getAccessToken()); - WorkspaceConnection connection = new WorkspaceConnection( - UUID.randomUUID().toString(), - connectionInfo.getUserName(), - HttpConstants.AUTHORIZATION_PREFIX + bean.getAccessToken(), - InetAddress.getLocalHost().getHostAddress()); - client.updateConnection(connection); + checkValidAndUpdateInfo(client, connectionInfo, bean); client.startHeartBeat(); } catch (Exception e) { client.closePool(); @@ -81,6 +79,30 @@ public class HttpWorkspaceConnector implements WorkspaceConnector { return client; } + private void checkValidAndUpdateInfo(FineWorkspaceHttpClient client, WorkspaceConnectionInfo connectionInfo, LoginResponseInfoBean bean) throws Exception { + WorkspaceConnection connection = new WorkspaceConnection( + UUID.randomUUID().toString(), + connectionInfo.getUserName(), + HttpConstants.AUTHORIZATION_PREFIX + bean.getAccessToken(), + InetAddress.getLocalHost().getHostAddress()); + client.updateConnection(connection); + // 检查远程权限 + if (!checkRemoteAuthority(connection)) { + // 无权限则抛出无权限的错 + throw new RemoteDesignNoAuthException(); + } + } + + private boolean checkRemoteAuthority(WorkspaceConnection connection) { + try { + return RemoteAuthorityRepository.getInstance().isRoot(connection.getUserName()) || RemoteAuthorityRepository.getInstance().hasAuthority(connection.getUserName()); + } catch (Exception e) { + // 如果这里出现异常,就认为fr服务没启动 + throw new RemoteDesignConnectionException(e, StringUtils.EMPTY); + } + + } + private LoginRequestInfoBean createLoginBean(WorkspaceConnectionInfo connectionInfo) { LoginRequestInfoBean bean = new LoginRequestInfoBean(); bean.setUsername(connectionInfo.getUserName()); diff --git a/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java b/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java index c063bdd26b..1ac3f12ead 100644 --- a/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java +++ b/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java @@ -847,7 +847,7 @@ public class MultiTemplateTabPane extends Row { setIsCloseCurrent(true); } closeFormat(template); - closeSpecifiedTemplate(template); + DesignCacheManager.processByCacheTableData(() -> closeSpecifiedTemplate(template)); DesignerContext.getDesignerFrame().getContentFrame().repaint(); isShowList = false; } else { diff --git a/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java b/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java index a34762a1fd..c5902c3cdc 100644 --- a/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java @@ -32,6 +32,9 @@ import java.io.InputStream; import java.util.ArrayList; import java.util.concurrent.ExecutionException; +import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.row; + public class JavaEditorPane extends BasicPane { private RSyntaxTextArea javaText; @@ -83,13 +86,12 @@ public class JavaEditorPane extends BasicPane { } UIScrollPane jt = new UIScrollPane(javaText); - JPanel toolbarPane = new JPanel(new FlowLayout(FlowLayout.LEFT)); + JPanel toolbarPane = new JPanel(new BorderLayout()); UIButton saveButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save")); saveButton.setAction(new SaveAction()); UIButton compileButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Compile")); compileButton.setAction(new CompilerAction()); - toolbarPane.add(saveButton); - toolbarPane.add(compileButton); + toolbarPane.add(row(8, cell(saveButton), cell(compileButton)).getComponent()); this.add(toolbarPane, BorderLayout.NORTH); this.add(jt, BorderLayout.CENTER); @@ -155,7 +157,7 @@ public class JavaEditorPane extends BasicPane { private void saveTextToFile(String text) { if (StringUtils.isEmpty(text)) { - return; + return; } if (StringUtils.isEmpty(className)) { return; @@ -180,7 +182,7 @@ public class JavaEditorPane extends BasicPane { @Override protected JavaCompileInfo doInBackground() throws Exception { - + return FRContext.getCommonOperator().compile(javaText.getText()); } diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java index 0e06bcd344..1c05823b24 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java @@ -2,6 +2,7 @@ package com.fr.design.gui.controlpane; import com.fine.theme.light.ui.FineRoundBorder; import com.fine.theme.utils.FineUIScale; +import com.fine.theme.utils.FineUIStyle; import com.fine.theme.utils.FineUIUtils; import com.fr.design.beans.BasicBeanPane; import com.fr.design.constants.UIConstants; @@ -567,7 +568,7 @@ public abstract class UIListGroupControlPane extends UIControlPane implements Li }; label.setBorder(BorderFactory.createMatteBorder(scale(1), 0, scale(1), 0, FineUIUtils.getUIColor("fill.hover", "fill.hover"))); - label.setForeground(UIManager.getColor("List.wrapper.text.fontColor")); + FineUIStyle.setStyle(label, FineUIStyle.WIDGET_EVENT_LABEL); label.setFont(label.getFont().deriveFont(scale(11F))); label.setPreferredSize(new Dimension(this.getPreferredSize().width, scale(24))); this.nameEdList = nameEdList; diff --git a/designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java b/designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java index 43b4704a55..f4b8a5b123 100644 --- a/designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java +++ b/designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java @@ -159,7 +159,7 @@ public class UICalendarPanel extends JPanel { private JPanel createNorthPane() { JPanel pNorth = FRGUIPaneFactory.createX_AXISBoxInnerContainer_S_Pane(); pNorth.setBackground(new Color(0xFFFFFF)); - pNorth.setPreferredSize(new Dimension(1, 22)); + pNorth.setPreferredSize(scale(new Dimension(1, 22))); pNorth.add(Box.createHorizontalStrut(5)); pNorth.add(createSkipButton(Calendar.YEAR, -1, new Icon[]{ diff --git a/designer-base/src/main/java/com/fr/design/gui/date/UIDayLabel.java b/designer-base/src/main/java/com/fr/design/gui/date/UIDayLabel.java index 06f30e1aef..c4c8afc1d1 100644 --- a/designer-base/src/main/java/com/fr/design/gui/date/UIDayLabel.java +++ b/designer-base/src/main/java/com/fr/design/gui/date/UIDayLabel.java @@ -7,6 +7,8 @@ import java.awt.Dimension; import java.text.SimpleDateFormat; import java.util.Date; +import static com.fine.theme.utils.FineUIScale.scale; + public class UIDayLabel extends UILabel { @@ -29,7 +31,7 @@ public class UIDayLabel extends UILabel { setHorizontalAlignment(UILabel.CENTER); setFont(DesignUtils.getDefaultGUIFont()); this.date = date; - setPreferredSize(new Dimension(30, 18)); + setPreferredSize(scale(new Dimension(30, 18))); if (isSmallLabel) { setText(dayFormat.format(date)); } else { diff --git a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java index f32fbe9d23..b72a451fa4 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java @@ -48,7 +48,6 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { contentDBManiPane = new ArrayList(); contentDBManiPane.add(createDBManipulationPane()); paneList.add(new Commit2DBJavaScriptPane(this, contentDBManiPane)); - paneList.add(initEmaiPane()); if (isWorkBookValid()) { paneList.add(new ExportJavaScriptPane()); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index fc6be544d2..a4239bc64c 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -755,6 +755,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta refresh(); DesignerFrameFileDealerPane.getInstance().refreshDockingView(); TemplateTreePane.getInstance().refreshDockingView(); + TableDataTreePane.getInstanceWithoutRefreshEverytime(DesignModelAdapter.getCurrentModelAdapter()).resetAddMenuDef(); } /** diff --git a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java index 09ea0d2052..0ee74940d6 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java @@ -836,7 +836,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { if (StringUtils.equals(KEY_WIDGET_SETTINGS, name)) { title = currentMode.getTitle(); button.setToolTipText(title); - UILabel uiLabel = (UILabel) ((BorderLayout) popupToolPane.contentPane.getLayout()).getLayoutComponent(BorderLayout.WEST); + UILabel uiLabel = (UILabel) ((BorderLayout) popupToolPane.contentPane.getLayout()).getLayoutComponent(BorderLayout.CENTER); uiLabel.setText(title); } } catch (Exception e) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java index 3aa21c2908..27f09d9e0b 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.theme; +import com.fine.theme.icon.LazyIcon; import com.fine.theme.utils.FineUIScale; import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.GraphHelper; @@ -50,7 +51,7 @@ public class TemplateThemeBlock extends JPanel { private final TemplateThemeProfilePane profilePane; private final Icon theme4currentTemplateMarkIcon = IOUtils.readIcon("/com/fr/design/form/images/theme4currentTemplate.png"); private final Icon theme4NewTemplateMarkIcon= IOUtils.readIcon("/com/fr/design/form/images/theme4newTemplate.png"); - private final Icon profileIcon = IOUtils.readIcon("/com/fr/design/icon/icon_edit.png"); + private final Icon profileIcon = new LazyIcon("theme_edit"); private final boolean displayTheme4NewTemplateMarker; private final ThumbnailPane thumbnailPane; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeDialog.java index 1864a91b1f..def9c7d626 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeDialog.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.theme.dialog; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; @@ -14,17 +15,19 @@ import java.awt.Window; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; +import static com.fine.theme.utils.FineUIScale.scale; + /** * @author Starryi * @version 1.0 * Created by Starryi on 2021/8/16 */ public abstract class TemplateThemeDialog extends JDialog { - public static final int DIALOG_TITLE_HEIGHT = 28; + public static final int DIALOG_TITLE_HEIGHT = scale(28); - public static final int DIALOG_BOTTOM_ACTION_BAR_HEIGHT = 30; - public static final int DIALOG_BOTTOM_ACTION_BUTTON_GAP = 10; - public static final int DIALOG_BOTTOM_ACTION_BUTTON_HEIGHT = 20; + public static final int DIALOG_BOTTOM_ACTION_BAR_HEIGHT = scale(30); + public static final int DIALOG_BOTTOM_ACTION_BUTTON_GAP = scale(10); + public static final int DIALOG_BOTTOM_ACTION_BUTTON_HEIGHT = scale(20); private final JPanel contentContainer; private final JPanel actionContainer; @@ -97,7 +100,7 @@ public abstract class TemplateThemeDialog extends JDialog { private JPanel createActionsContainer(int align, UIButton... buttons) { JPanel container = new JPanel(new FlowLayout(align, DIALOG_BOTTOM_ACTION_BUTTON_GAP, 0)); int paddingVertical = getPaddingVertical(); - container.setBorder(BorderFactory.createEmptyBorder(paddingVertical, 0, paddingVertical, 0)); + container.setBorder(new ScaledEmptyBorder(paddingVertical, 0, paddingVertical, 0)); if (buttons == null || buttons.length == 0) { return container; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeGridPagesDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeGridPagesDialog.java index bf65b9be28..d7e986c346 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeGridPagesDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeGridPagesDialog.java @@ -9,14 +9,16 @@ import com.fr.design.mainframe.theme.TemplateThemeGridPane; import javax.swing.JPanel; import java.awt.Window; +import static com.fine.theme.utils.FineUIScale.scale; + /** * @author Starryi * @version 1.0 * Created by Starryi on 2021/8/13 */ public class TemplateThemeGridPagesDialog extends TemplateThemeDialog implements TemplateThemeGridPagesPane.PageChangeListener { - public static final int CONTENT_WIDTH = TemplateThemeGridPane.CONTENT_WIDTH + 48; - public static final int CONTENT_HEIGHT = TemplateThemeGridPane.CONTENT_HEIGHT + 37; + public static final int CONTENT_WIDTH = TemplateThemeGridPane.CONTENT_WIDTH + scale(48); + public static final int CONTENT_HEIGHT = TemplateThemeGridPane.CONTENT_HEIGHT + scale(37); protected TemplateThemeGridPagesPane overallPane; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java index 1d1967ad3c..c87174c451 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java @@ -89,7 +89,7 @@ public class ChartFontPane extends BasicPane { new Component[]{null, buttonPane} }; - return TableLayoutHelper.createGapTableLayoutPane(components, rows, columnSize, 5, 0); + return TableLayoutHelper.createGapTableLayoutPane(components, rows, columnSize, 5, 10); } public String getUILabelText() { diff --git a/designer-base/src/main/java/com/fr/design/style/color/ColorChooserPreview.java b/designer-base/src/main/java/com/fr/design/style/color/ColorChooserPreview.java index 100feb2d35..349aa041a3 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/ColorChooserPreview.java +++ b/designer-base/src/main/java/com/fr/design/style/color/ColorChooserPreview.java @@ -30,7 +30,7 @@ public class ColorChooserPreview extends JPanel { private String sampleText; - private static final int SWATH_WIDTH = 50; + private static final int SWATH_WIDTH = FineUIScale.scale(50); private Color oldColor = null; diff --git a/designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java b/designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java index 149ce1a17e..e9ee892bf0 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java +++ b/designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java @@ -16,6 +16,8 @@ import java.awt.Frame; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import static com.fine.theme.utils.FineUIScale.scale; + /** * 颜色选择器更多颜色对话框 @@ -85,7 +87,7 @@ public class ColorSelectDialog extends MiddleChartDialog{ private void initComponent() { this.setLayout(new BorderLayout()); this.add(pane,BorderLayout.NORTH); - this.setBasicDialogSize(545,500); + this.setBasicDialogSize(scale(545),scale(500)); this.setResizable(false); this.applyClosingAction(); diff --git a/designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java b/designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java index 48f5e5f2bf..d6b2df3023 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java +++ b/designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java @@ -38,6 +38,7 @@ import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.fix; import static com.fine.swing.ui.layout.Layouts.flex; import static com.fine.swing.ui.layout.Layouts.row; +import static com.fine.theme.utils.FineUIScale.scale; /** @@ -124,17 +125,17 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec /** * The default width of the gradient image. */ - private static final int IMG_WIDTH = 180; + private static final int IMG_WIDTH = scale(180); /** * The default height of the gradient image. */ - private static final int IMG_HEIGHT = 180; + private static final int IMG_HEIGHT = scale(180); /** * The default width of the track gradient. */ - private static final int TRACK_WIDTH = 12; + private static final int TRACK_WIDTH = scale(12); /** * The UILabel for Red. @@ -597,7 +598,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec */ protected void buildChooser() { setLayout(new BorderLayout(10, 0)); - setPreferredSize(new Dimension((int) this.getPreferredSize().getWidth(), FineUIScale.scale(180))); + setPreferredSize(new Dimension((int) this.getPreferredSize().getWidth(), scale(180))); add(buildRightPanel(), BorderLayout.CENTER); JPanel container = new JPanel(); container.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 0)); @@ -623,9 +624,9 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec container.add(gradientPanel); container.add(layeredPane); - layeredPane.setPreferredSize(FineUIScale.scale(new Dimension(12, 180))); - slider.setSize(FineUIScale.scale(new Dimension(12, 180))); - trackPanel.setSize(FineUIScale.scale(new Dimension(12, 180))); + layeredPane.setPreferredSize(scale(new Dimension(12, 180))); + slider.setSize(scale(new Dimension(12, 180))); + trackPanel.setSize(scale(new Dimension(12, 180))); add(container, BorderLayout.WEST); slider.addChangeListener(new SliderChangeListener()); @@ -638,7 +639,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec private JPanel createGradientPanel() { return new JPanel() { public Dimension getPreferredSize() { - return FineUIScale.scale(new Dimension(IMG_WIDTH, IMG_HEIGHT)); + return scale(new Dimension(IMG_WIDTH, IMG_HEIGHT)); } public void paint(Graphics g) { @@ -657,7 +658,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec private JPanel createTrackPanel() { return new JPanel() { public Dimension getPreferredSize() { - return FineUIScale.scale(new Dimension(TRACK_WIDTH, IMG_HEIGHT)); + return scale(new Dimension(TRACK_WIDTH, IMG_HEIGHT)); } public void paint(Graphics g) { diff --git a/designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java b/designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java index 74f4b409a6..5fb4143da8 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java +++ b/designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java @@ -19,6 +19,7 @@ import javax.swing.JColorChooser; import javax.swing.JPanel; import javax.swing.colorchooser.AbstractColorChooserPanel; +import static com.fine.theme.utils.FineUIScale.scale; public class SwatchChooserPanel extends AbstractColorChooserPanel{ @@ -35,13 +36,13 @@ public class SwatchChooserPanel extends AbstractColorChooserPanel{ abstract static class SwatchPanel extends JPanel { /** The width of each block. */ - protected int cellWidth = 16; + protected int cellWidth = scale(16); /** The height of each block. */ - protected int cellHeight = 16; + protected int cellHeight = scale(16); /** The gap between blocks. */ - protected int gap = 1; + protected int gap = scale(1); /** The number of rows in the swatch panel. */ protected int numRows; @@ -70,8 +71,8 @@ public class SwatchChooserPanel extends AbstractColorChooserPanel{ int width = numCols * cellWidth + (numCols - 1) * gap; Insets insets = getInsets(); - return FineUIScale.scale(new Dimension(width + insets.left + insets.right, - height + insets.top + insets.bottom)); + return new Dimension(width + insets.left + insets.right, + height + insets.top + insets.bottom); } /** @@ -511,8 +512,8 @@ public class SwatchChooserPanel extends AbstractColorChooserPanel{ Insets insets = parent.getInsets(); - return FineUIScale.scale(new Dimension(insets.left + insets.right + xmax, - insets.top + insets.bottom + ymax)); + return new Dimension(insets.left + insets.right + xmax, + insets.top + insets.bottom + ymax); } diff --git a/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java b/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java index 1aa1422f15..bf24b435a3 100644 --- a/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java +++ b/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java @@ -309,7 +309,7 @@ public class DBManipulationPane extends BasicBeanPane { conditionsTree = new JTree(new DefaultTreeModel(new ExpandMutableTreeNode())); conditionsTree.setRootVisible(false); conditionsTree.setShowsRootHandles(true); - conditionsTree.setBackground(UIConstants.NORMAL_BACKGROUND); + conditionsTree.setBackground(FineUIUtils.getUIColor("background.normal", "background.normal")); conditionsTree.setForeground(UIConstants.NORMAL_BACKGROUND); DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer(); cr.setForeground(UIConstants.NORMAL_BACKGROUND); @@ -740,7 +740,7 @@ public class DBManipulationPane extends BasicBeanPane { return super.stopCellEditing(); } }); - ((DefaultCellEditor) column1.getCellEditor()).setClickCountToStart(2); + ((DefaultCellEditor) column1.getCellEditor()).setClickCountToStart(1); //设置Column 2的Editor column2.setCellEditor(new ColumnValueEditor()); @@ -949,12 +949,12 @@ public class DBManipulationPane extends BasicBeanPane { } /* - * 双击以编辑 + * 单击以编辑 */ @Override public boolean isCellEditable(EventObject anEvent) { if (anEvent instanceof MouseEvent) { - return ((MouseEvent) anEvent).getClickCount() >= 2; + return ((MouseEvent) anEvent).getClickCount() >= 1; } return true; } diff --git a/designer-base/src/main/resources/com/fine/theme/icon/theme_edit.svg b/designer-base/src/main/resources/com/fine/theme/icon/theme_edit.svg new file mode 100644 index 0000000000..e0d5ef158d --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/theme_edit.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json b/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json index d73d090802..019af2e7f8 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json +++ b/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json @@ -21,6 +21,7 @@ "add": "add.svg", "add_hover": "add_hover.svg", "detail": "detail.svg", + "debug": "debug.svg", "dataLink": "dataLink.svg", "jumpHelp": "jumpHelp.svg", "switch": "switch.svg", @@ -442,7 +443,8 @@ "layout_bottom": "layout/layout_bottom.svg", "layout_left": "layout/layout_left.svg", "layout_right": "layout/layout_right.svg", - "layout_top_right": "layout/layout_top_right.svg" + "layout_top_right": "layout/layout_top_right.svg", + "theme_edit": "theme_edit.svg" } } diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties index 9c0ee9c9f8..759b368089 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties +++ b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties @@ -305,7 +305,7 @@ ComboBox.maximumRowCount = 15 ComboBox.buttonStyle = auto ComboBox.background = #FFF ComboBox.buttonBackground = $ComboBox.background -ComboBox.buttonEditableBackground = darken($ComboBox.background,2%) +ComboBox.buttonEditableBackground = $ComboBox.background ComboBox.buttonSeparatorColor = $ComboBox.background ComboBox.buttonDisabledSeparatorColor = $Component.disabledBorderColor ComboBox.buttonArrowColor = @buttonArrowColor @@ -1397,4 +1397,8 @@ chart.selectedBorderColor = #2576EF [style]Label.detailLabel = \ foreground: fade(@foreground, 90%); \ - background: $fill.normal; \ No newline at end of file + background: $fill.normal; + +[style]Label.widgetEventLabel = \ + foreground: $List.wrapper.text.fontColor; \ + background: $fill.normal; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java index 48ba6f2d5e..52c2a0f59e 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java @@ -3,15 +3,12 @@ */ package com.fr.design.mainframe; - -import com.fine.theme.utils.FineUIScale; import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.BaseUtils; import com.fr.base.chart.BaseChartCollection; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chartx.attr.ChartProvider; -import com.fr.decision.webservice.v10.map.geojson.helper.GEOJSONHelper; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.designer.TargetComponent; import com.fr.design.gui.chart.BaseChartPropertyPane; @@ -20,10 +17,9 @@ import com.fr.design.gui.frpane.UITitlePanel; import com.fr.design.mainframe.chart.ChartEditPane; import com.fr.design.utils.gui.GUICoreUtils; -import javax.swing.BorderFactory; import javax.swing.Icon; -import javax.swing.SwingWorker; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Component; public class ChartPropertyPane extends BaseChartPropertyPane { @@ -45,8 +41,6 @@ public class ChartPropertyPane extends BaseChartPropertyPane { protected void initComponent() { this.setLayout(new BorderLayout()); this.setBorder(new ScaledEmptyBorder(10, 0, 0, 0)); - // 外部轮廓大小固定,适配滚动面板 - this.setPreferredSize(new Dimension(getWidth(), FineUIScale.scale(900))); } @Override diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java index 7a8dc38e65..862bcc9e7c 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java @@ -55,8 +55,8 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { private static final int COLOR_REC_WIDTH = scale(30); protected static final int TEXTFIELD_HEIGHT = scale(20); protected static final int TEXTFIELD_WIDTH = scale(130); - protected static final int UPCONTROLPANE_WIDTH = scale(230); - private static final int LAYOUR_DET = 6; + protected static final int UPCONTROLPANE_WIDTH = scale(218); + private static final int LAYOUR_DET = scale(6); public static final double VALUE = 100; @@ -611,7 +611,7 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { @Override public void layoutContainer(Container parent) { upControlPane.setBounds(getBoundX(), getBoundY(), UPCONTROLPANE_WIDTH, upControlPane.getPreferredSize().height + MARGIN_TOP); - stagePanel.setBounds(getBoundX(), upControlPane.getPreferredSize().height + LAYOUR_DET + getBoundY(), UPCONTROLPANE_WIDTH, stagePanel.getPreferredSize().height); + stagePanel.setBounds(getBoundX(), upControlPane.getPreferredSize().height + scale(8) + getBoundY(), UPCONTROLPANE_WIDTH, stagePanel.getPreferredSize().height); colorGroup.setBounds( getColorgroupMarginLeft (), 2 * getBoundY() + upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height); textGroup.setBounds(colorGroup.getPreferredSize().width + getColorgroupMarginLeft (), upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET + getBoundY(), textGroup.getPreferredSize().width, textGroup.getPreferredSize().height); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/AbstractVanChartScrollPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/AbstractVanChartScrollPane.java index 9949862884..c0d3de1d3f 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/AbstractVanChartScrollPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/AbstractVanChartScrollPane.java @@ -1,11 +1,12 @@ package com.fr.van.chart.designer; +import com.fine.theme.utils.FineUIScale; import com.fr.design.dialog.BasicScrollPane; -import com.fr.design.gui.iscrollbar.UIScrollBar; import javax.swing.BorderFactory; import javax.swing.JPanel; -import java.awt.Container; +import javax.swing.SwingUtilities; +import java.awt.Window; /** * Created by mengao on 2017/8/11. @@ -21,4 +22,15 @@ public abstract class AbstractVanChartScrollPane extends BasicScrollPane { super.reloaPane(pane); leftcontentPane.setBorder(BorderFactory.createEmptyBorder()); } + + /** + * getHeight与最外层ChartPropertyPane获取的高度一致,都是计算的面板高度而不是到设计器底部的高度 + * 这里直接获取设计器高度减去单元格元素北区最大高度(格式TextFormatPaneContainer高度不固定),先让滚动效果显示起来 + * @return height + */ + @Override + protected int getMaxHeight() { + Window window = SwingUtilities.getWindowAncestor(this); + return window.getHeight() - FineUIScale.scale(400); + } } diff --git a/designer-realize/src/main/java/com/fanruan/boot/env/DesignPluginComponent.java b/designer-realize/src/main/java/com/fanruan/boot/env/DesignPluginComponent.java index 74f44dee74..be92acac20 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/env/DesignPluginComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/env/DesignPluginComponent.java @@ -5,6 +5,7 @@ import com.fanruan.carina.Carina; import com.fanruan.carina.annotions.DependsOn; import com.fanruan.carina.annotions.FineComponent; import com.fanruan.carina.annotions.Start; +import com.fanruan.carina.annotions.Stop; import com.fanruan.carina.annotions.Supplemental; import com.fanruan.plugin.autonomy.AutonomyClassManagerGroup; import com.fanruan.plugin.autonomy.AutonomyClassManagerProvider; @@ -44,4 +45,12 @@ public class DesignPluginComponent extends PluginComponent { protected void addPluginStoreFilter(ServletContext servletContext) { // do nothing } + + /** + * stop + */ + @Stop + public void stop() { + super.stop(); + } } 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 8a31974196..bf51d9c395 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 @@ -335,7 +335,6 @@ public class DesignComponent { private static NameableCreator[] hyperlinkTypes() { return new NameableCreator[]{ new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet"), ReportletHyperlink.class, ReportletHyperlinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email"), EmailJavaScript.class, EmailPane.class), new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Web_Link"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class), new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_JavaScript_Dynamic_Parameters"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class), new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"), JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class), diff --git a/designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java b/designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java index ee93d96369..51adb2fd57 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java @@ -11,6 +11,11 @@ import com.fanruan.workplace.conetxt.CompatiblePool; import com.fanruan.workplace.http.HttpConstants; import com.fanruan.workplace.http.RepositoryManager; import com.fanruan.workplace.http.WorkspaceHeartBeatShell; +import com.fr.workspace.engine.exception.RemoteDesignLoginLockHandler; +import com.fr.workspace.engine.exception.RemoteDesignNoAuthHandler; +import com.fr.workspace.engine.exception.RemoteDesignPasswordNeedUpdateHandler; +import com.fr.workspace.engine.exception.RemoteDesignPasswordStrengthHandler; +import com.fr.workspace.engine.exception.RemoteDesignUserPwdErrorHandler; import com.fanruan.workplace.http.exception.RemoteExceptionConvert; import com.fanruan.workplace.standard.ServerInfo; import com.fanruan.workplace.standard.ServerInfoOperator; @@ -43,10 +48,6 @@ import com.fr.workspace.engine.FineWorkspaceFactory; import com.fr.workspace.engine.base.FineObjectPool; import com.fr.workspace.engine.client.heartbeart.FineWorkspaceHeartbeat; import com.fr.workspace.engine.client.heartbeart.WorkspaceHeartbeat; -import com.fr.workspace.engine.exception.RemoteDesignNoAuthException; -import com.fr.workspace.engine.exception.RemoteDesignPasswordNeedUpdateException; -import com.fr.workspace.engine.exception.RemoteDesignPasswordStrengthException; -import com.fr.workspace.engine.exception.RemoteDesignUserPwdErrorException; import com.fr.workspace.engine.resource.FineWorkResource; import com.fr.workspace.engine.resource.FineWorkResourceAdaptor; import com.fr.workspace.pool.WorkRPCRegister; @@ -144,11 +145,12 @@ public class DesignWorkContextComponent { private void startErrorConvert() { - RemoteExceptionConvert.registerException(HttpConstants.USER_PWD_ERROR_CODE, new RemoteDesignUserPwdErrorException()); - RemoteExceptionConvert.registerException(HttpConstants.USER_PWD_NEED_UPDATE, new RemoteDesignPasswordNeedUpdateException()); - RemoteExceptionConvert.registerException(HttpConstants.PASSWORD_STRENGTH_ERROR_CODE, new RemoteDesignPasswordStrengthException()); - RemoteExceptionConvert.registerException(HttpConstants.REMOTE_AUTHORITY_ERROR_CODE, new RemoteDesignNoAuthException()); - RemoteExceptionConvert.registerException(HttpConstants.PASSWORD_EMPTY_ERROR_CODE, new RemoteDesignUserPwdErrorException()); + RemoteExceptionConvert.registerException(HttpConstants.USER_PWD_ERROR_CODE, new RemoteDesignUserPwdErrorHandler()); + RemoteExceptionConvert.registerException(HttpConstants.USER_PWD_NEED_UPDATE, new RemoteDesignPasswordNeedUpdateHandler()); + RemoteExceptionConvert.registerException(HttpConstants.PASSWORD_STRENGTH_ERROR_CODE, new RemoteDesignPasswordStrengthHandler()); + RemoteExceptionConvert.registerException(HttpConstants.REMOTE_AUTHORITY_ERROR_CODE, new RemoteDesignNoAuthHandler()); + RemoteExceptionConvert.registerException(HttpConstants.PASSWORD_EMPTY_ERROR_CODE, new RemoteDesignUserPwdErrorHandler()); + RemoteExceptionConvert.registerException(HttpConstants.LOGIN_LOCK, new RemoteDesignLoginLockHandler()); } private void supplementalCommon() { diff --git a/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java b/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java index dfbab0e02e..56e2398b35 100644 --- a/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java +++ b/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java @@ -93,12 +93,11 @@ public class ReportEnginePane extends BasicBeanPane { outReportEnginePane.add(createReportEnginePane()); JPanel outAdvicePane = new JPanel(); outAdvicePane.setLayout(FRGUIPaneFactory.createBorderLayout()); - outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160))); outAdvicePane.add(createAdvicePane()); this.add(column(20, cell(wrapComponentWithTitle(outReportEnginePane, Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"))), - cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"))).weight(1.0), + cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"))), cell(wrapComponentWithTitle(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice")))) .getComponent()); } @@ -123,8 +122,6 @@ public class ReportEnginePane extends BasicBeanPane { createEngineXSettingPane(); createLineEngineSettingPane(); outLineEngineSettingPane.setVisible(false); - outEngineXSettingPane.setPreferredSize(new Dimension(scale(625), scale(220))); - outLineEngineSettingPane.setPreferredSize(new Dimension(scale(625), scale(220))); engineSettingPane.add(box(cell(outEngineXSettingPane), cell(outLineEngineSettingPane)).getComponent() , BorderLayout.WEST); @@ -157,18 +154,18 @@ public class ReportEnginePane extends BasicBeanPane { rowCountPanel.add(rowCountBox); JPanel tip = createTipPane(Toolkit.i18nText("Fine-Design_Report_Engine_X_tip")); engineXSettingPane.add(row(20, - column(10, - column(fix(6), cell(title)), - cell(new UILabel()), - cell(new UILabel()), - cell(new UILabel()) + column( + column(fix(6), cell(title)), + cell(new UILabel()), + cell(new UILabel()), + cell(new UILabel()) ), - column(10, - cell(pageQueryBoxPanel), - cell(engineXPageQueryPane), - cell(rowCountPanel), - cell(tip))) + column( + cell(pageQueryBoxPanel), + cell(engineXPageQueryPane), + cell(rowCountPanel), + cell(tip))) .getComponent()); outEngineXSettingPane.add(engineXSettingPane); } @@ -189,14 +186,14 @@ public class ReportEnginePane extends BasicBeanPane { lineEnginePageQueryBox.addActionListener(new SelectActionListener(lineEnginePageQueryBox, lineEnginePageQueryPane)); JPanel tipPane = createTipPane(Toolkit.i18nText("Fine-Design_Report_Line_Engine_tip")); lineEngineSettingPane.add(row(20, - column(10, - column(fix(6), cell(title)), - cell(new UILabel()), - cell(new UILabel())), - column(10, - cell(pageQueryBoxPanel), - cell(lineEnginePageQueryPane), - cell(tipPane))) + column( + column(fix(6), cell(title)), + cell(new UILabel()), + cell(new UILabel())), + column( + cell(pageQueryBoxPanel), + cell(lineEnginePageQueryPane), + cell(tipPane))) .getComponent()); outLineEngineSettingPane.add(lineEngineSettingPane); } diff --git a/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java b/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java index 232ebc2e1d..84348b9309 100644 --- a/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java @@ -37,11 +37,11 @@ public class WriteShortCutsPane extends JPanel{ private UILabel nextRowHK; private UILabel preCol; private UILabel preRow; - + public WriteShortCutsPane(){ this.setLayout(new BorderLayout()); this.add(createContentPane(), BorderLayout.NORTH); - + if(!ServerPreferenceConfig.getInstance().isWriteShortCuts()){ nextColString = "Enter"; nextRowString = "Tab"; @@ -60,10 +60,10 @@ public class WriteShortCutsPane extends JPanel{ return contentPane; } - + private JPanel getFeatureNamePane(){ JPanel featureNamePane = new JPanel(new BorderLayout()); - featureNamePane.setBorder(BorderFactory.createEmptyBorder(16, 0, 0, 0)); + featureNamePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); UILabel name = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Feature_Name"), SwingConstants.RIGHT); UILabel nextCol = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Column"), SwingConstants.CENTER); UILabel nextRow = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Row"), SwingConstants.CENTER); @@ -75,13 +75,13 @@ public class WriteShortCutsPane extends JPanel{ JPanel centerPane = new JPanel(new BorderLayout()); centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); - centerPane.add(column(24, + centerPane.add(column(10, row(10, cell(name).weight(0.13), cell(nextCol).weight(0.15), cell(new JPanel()).weight(0.12), cell(nextRow).weight(0.15), flex(0.45)), row(10, cell(shortName).weight(0.13), cell(nextColHK).weight(0.15), cell(switchBtnPane).weight(0.12), cell(nextRowHK).weight(0.15), flex(0.45)) ).getComponent()); featureNamePane.add(centerPane, BorderLayout.CENTER); - + return featureNamePane; } @@ -96,7 +96,7 @@ public class WriteShortCutsPane extends JPanel{ private JPanel getHintsPane(){ JPanel hintsPane = new JPanel(new BorderLayout()); - hintsPane.setBorder(BorderFactory.createEmptyBorder(16, 0, 0, 0)); + hintsPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); UILabel systemDefault = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_System_Default"), SwingConstants.RIGHT); UILabel preColText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Column"), SwingConstants.CENTER); @@ -107,19 +107,19 @@ public class WriteShortCutsPane extends JPanel{ JPanel centerPane = new JPanel(new BorderLayout()); centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); - centerPane.add(column(24, + centerPane.add(column(10, row(10, cell(systemDefault).weight(0.13), cell(preColText).weight(0.24), cell(preCol).weight(0.14), flex(0.64)), row(10, cell(new JPanel()).weight(0.13), cell(preRowText).weight(0.24), cell(preRow).weight(0.14), flex(0.64)) ).getComponent()); hintsPane.add(centerPane, BorderLayout.CENTER); - + return hintsPane; } - + public ActionListener getListener(){ ActionListener actionListener = new ActionListener() { - + @Override public void actionPerformed(ActionEvent e) { String temp= nextColString; @@ -136,10 +136,10 @@ public class WriteShortCutsPane extends JPanel{ }); } }; - + return actionListener; } - + private void switchColRow(){ nextColHK.setText(nextColString); nextRowHK.setText(nextRowString); diff --git a/designer-realize/src/main/java/com/fr/design/sort/expressionpane/CustomSequencePane.java b/designer-realize/src/main/java/com/fr/design/sort/expressionpane/CustomSequencePane.java index c68fd09ca0..f4fcb222aa 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/expressionpane/CustomSequencePane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/expressionpane/CustomSequencePane.java @@ -4,6 +4,7 @@ import com.fine.swing.ui.layout.Layouts; import com.fine.theme.icon.LazyIcon; import com.fine.theme.utils.FineUIScale; import com.fr.design.constants.LayoutConstants; +import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.itextfield.UITextField; @@ -42,14 +43,17 @@ public class CustomSequencePane extends JPanel { @Override public void mouseClicked(MouseEvent e) { CustomSequenceEditPane customSequenceEditPane = new CustomSequenceEditPane(customSequence); - customSequenceEditPane.showWindowWithCustomSize(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { + BasicDialog dialog = customSequenceEditPane.showWindowWithCustomSize(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { @Override public void doOk() { customSequence = customSequenceEditPane.updateBean(); triggerOk(CustomSequenceSortExpression.customSequenceToString(customSequence, ","), CustomSequenceSortExpression.isReferenceCustomSequence(customSequence)); } - }, new Dimension(700, 420)).setVisible(true); + }, FineUIScale.scale(new Dimension(700, 420))); + dialog.setAlwaysOnTop(true); + dialog.requestFocusInWindow(); + dialog.setVisible(true); } }; button.addMouseListener(mouseAdapter); diff --git a/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java b/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java index 336f1e8d9f..4c6af7698e 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java @@ -458,7 +458,6 @@ public class EditToolBar extends BasicPane { centerPane.setLayout(card); centerPane.add(CUSTOM, wrapComponentWithTitle(getCustomPane(), com.fr.design.i18n.Toolkit.i18nText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit") + "JS"))); centerPane.add(EXPORT, wrapComponentWithTitle(getExport(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Form_Button_Property"))); - centerPane.add(EMAIL, wrapComponentWithTitle(getEmail(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Form_Button_Property"))); centerPane.add(NONE, FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane()); centerPane.add(APPEND_COUNT, column(LayoutConstants.VERTICAL_GAP,cell(getAppendCountPane())).getComponent()); centerPane.add(SUBMIT, wrapComponentWithTitle(getSubmitPane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Form_Button_Property"))); diff --git a/designer-realize/src/main/java/com/fr/design/webattr/ReportWebWidgetConstants.java b/designer-realize/src/main/java/com/fr/design/webattr/ReportWebWidgetConstants.java index f8fe2ed6f1..564b06669e 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/ReportWebWidgetConstants.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/ReportWebWidgetConstants.java @@ -46,16 +46,16 @@ public class ReportWebWidgetConstants { } public static WidgetOption[] getPageToolBarInstance() { - return new WidgetOption[]{FIRST, PREVIOUS, PAGENAVI, NEXT, LAST, SCALE, EMAIL, EXPORT, PDF, EXCELP, EXCELO, EXCELS, WORD, NEW_PRINT, PRINT, FLASHPRINT, APPLETPRINT, PDFPRINT, + return new WidgetOption[]{FIRST, PREVIOUS, PAGENAVI, NEXT, LAST, SCALE, EXPORT, PDF, EXCELP, EXCELO, EXCELS, WORD, NEW_PRINT, PRINT, FLASHPRINT, APPLETPRINT, PDFPRINT, SETPRINTEROFFSET, CUSTOM_BUTTON}; } public static WidgetOption[] getViewToolBarInstance() { - return new WidgetOption[]{PAGESETUP, EMAIL, EXPORT, PDF, EXCELP, EXCELO, EXCELS, WORD, NEW_PRINT, PRINT, FLASHPRINT, APPLETPRINT, PDFPRINT, SETPRINTEROFFSET, PRINTPREVIEW, CUSTOM_BUTTON}; + return new WidgetOption[]{PAGESETUP, EXPORT, PDF, EXCELP, EXCELO, EXCELS, WORD, NEW_PRINT, PRINT, FLASHPRINT, APPLETPRINT, PDFPRINT, SETPRINTEROFFSET, PRINTPREVIEW, CUSTOM_BUTTON}; } public static WidgetOption[] getWriteToolBarInstance() { - return new WidgetOption[]{SUBMIT, VERIFY, EMAIL, EXPORT, PDF, EXCELP, EXCELO, EXCELS, WORD, NEW_PRINT, PRINT, FLASHPRINT, APPLETPRINT, PDFPRINT, IMPORTEXCELDATA, SHOWCELLVALUE, + return new WidgetOption[]{SUBMIT, VERIFY, EXPORT, PDF, EXCELP, EXCELO, EXCELS, WORD, NEW_PRINT, PRINT, FLASHPRINT, APPLETPRINT, PDFPRINT, IMPORTEXCELDATA, SHOWCELLVALUE, APPENDCOLUMNROW, DELETECOLUMNROW, SETPRINTEROFFSET, CUSTOM_BUTTON, WRITESTASH, WRITESTASHCLEAR, IMPORTEXCELDATA_CUSTOMIZED, IMPORTEXCEL, IMPORTEXCEL_COVER, IMPORTEXCEL_CLEAN, IMPORTEXCEL_APPEND}; }