Browse Source

Merge branch 'release/11.0' of ssh://code.fineres.com:7999/~zheng/C-design into release/11.0

bugfix/11.0
shine 3 years ago
parent
commit
d047af9ba9
  1. 45
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
  2. 4
      designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TableDataSearchRemindPane.java
  3. 13
      designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java
  4. 2
      designer-base/src/main/java/com/fr/design/data/datapane/management/search/view/TreeSearchRendererHelper.java
  5. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java
  6. 2
      designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java
  7. 3
      designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java
  8. 170
      designer-base/src/main/java/com/fr/design/gui/ilist/CheckBoxListWithPartialSelect.java
  9. 2
      designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java
  10. 5603
      designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/modes/FormulaTokenMaker.java
  11. 20
      designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java
  12. 19
      designer-base/src/main/java/com/fr/design/upm/UpmShowPane.java
  13. 20
      designer-base/src/main/resources/com/fr/design/gui/syntax/ui/rsyntaxtextarea/modes/FormulaTokenMaker.flex
  14. 6
      designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
  15. 6
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
  16. 6
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
  17. 6
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  18. 6
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties
  19. 5
      designer-base/src/main/resources/com/fr/design/images/control/batch_esd_off_disabled.svg
  20. 3
      designer-base/src/main/resources/com/fr/design/images/control/batch_esd_off_normal.svg
  21. 5
      designer-base/src/main/resources/com/fr/design/images/control/batch_esd_on_disabled.svg
  22. 3
      designer-base/src/main/resources/com/fr/design/images/control/batch_esd_on_normal.svg
  23. 7
      designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortPane.java
  24. 3
      designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortPane.java
  25. 10
      designer-realize/src/main/java/com/fr/design/sort/common/AbstractSortPane.java
  26. 3
      designer-realize/src/main/java/com/fr/design/sort/common/SortUIExpandablePane.java
  27. 9
      designer-realize/src/main/java/com/fr/design/sort/header/HeaderSettingPane.java
  28. 15
      designer-realize/src/main/java/com/fr/design/sort/header/HeaderSortRulePane.java

45
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

@ -31,7 +31,8 @@ import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.fun.TableDataPaneProcessor;
import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilist.CheckBoxList;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ilist.CheckBoxListWithPartialSelect;
import com.fr.design.gui.imenu.UIPopupMenu;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itoolbar.UIToolbar;
@ -53,7 +54,6 @@ import com.fr.esd.event.StrategyEventsNotifier;
import com.fr.esd.query.StrategicTableData;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.general.NameObject;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.context.PluginContext;
@ -115,6 +115,20 @@ public class TableDataTreePane extends BasicTableDataTreePane {
return singleton;
}
/**
* 获取不必每次都refreshDockingView的数据集树面板
* 不会主动替换DesignModelAdapter需要保证使用时没有跨模板动作谨慎使用
* @param tc
* @return
*/
public synchronized static BasicTableDataTreePane getInstanceWithoutRefreshEverytime(DesignModelAdapter<?, ?> tc) {
TableDataPaneProcessor treePaneProcessor = ExtraDesignClassManager.getInstance().getSingle(TableDataPaneProcessor.XML_TAG);
if (treePaneProcessor != null) {
return treePaneProcessor.createTableDataTreePane(tc);
}
return singleton.tc == null ? getInstance(tc) : singleton;
}
private TableDataSourceOP op;
private TableDataTree tableDataTree;
private UIPopupMenu popupMenu;
@ -210,7 +224,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
private TreeSearchToolbarPane initToolBarPane() {
// toolbar
addMenuDef = new MenuDef(Toolkit.i18nText("Fine-Design_Basic_Action_Add"));
addMenuDef.setIconPath(IconPathConstants.ADD_POPMENU_ICON_PATH);
addMenuDef.setIconPath("/com/fr/design/images/control/addPopup");
createAddMenuDef();
// 创建插件监听
createPluginListener();
@ -842,8 +856,8 @@ public class TableDataTreePane extends BasicTableDataTreePane {
}
@Override
public Icon getIcon() {
return IOUtils.readIcon("/com/fr/design/images/control/batch_esd_on.png");
public String getIconResource() {
return "/com/fr/design/images/control/batch_esd_on";
}
@Override
@ -889,8 +903,8 @@ public class TableDataTreePane extends BasicTableDataTreePane {
}
@Override
public Icon getIcon() {
return IOUtils.readIcon("/com/fr/design/images/control/batch_esd_off.png");
public String getIconResource() {
return "/com/fr/design/images/control/batch_esd_off";
}
@Override
@ -911,14 +925,14 @@ public class TableDataTreePane extends BasicTableDataTreePane {
public abstract String getName();
public abstract Icon getIcon();
public abstract String getIconResource();
public abstract void doWithTableDataWrapper(TableDataWrapper tableDataWrapper);
public AbstractESDAction() {
this.setName(getName());
this.setMnemonic('R');
this.setSmallIcon(getIcon());
this.setSmallIcon(getIconResource());
}
@Override
@ -984,7 +998,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
public EditAction() {
this.setName(Toolkit.i18nText("Fine-Design_Basic_Edit"));
this.setMnemonic('E');
this.setSmallIcon(IOUtils.readIcon(IconPathConstants.TD_EDIT_ICON_PATH));
this.setSmallIcon("/com/fr/design/images/control/edit");
}
@Override
@ -1011,7 +1025,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
public RemoveAction() {
this.setName(Toolkit.i18nText("Fine-Design_Basic_Remove"));
this.setMnemonic('R');
this.setSmallIcon(IOUtils.readIcon(IconPathConstants.TD_REMOVE_ICON_PATH));
this.setSmallIcon("/com/fr/design/images/control/remove");
}
@Override
@ -1021,8 +1035,10 @@ public class TableDataTreePane extends BasicTableDataTreePane {
FineLoggerFactory.getLogger().error("Table Data to remove is null or not selected");
return;
}
CheckBoxList checkBoxList = new CheckBoxList(selectedNameObjects, CheckBoxList.SelectedState.ALL, Toolkit.i18nText("Fine-Design_Basic_Remove_All_Selected"));
UIScrollPane scrollPane = new UIScrollPane(checkBoxList);
// 可以半选的CheckBoxList
CheckBoxListWithPartialSelect tableDataCheckBoxPane = new CheckBoxListWithPartialSelect(selectedNameObjects);
UIScrollPane scrollPane = new UIScrollPane(tableDataCheckBoxPane);
UILabel tips = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Select_Source_To_Remove"));
BasicPane basicPane = new BasicPane() {
@Override
protected String title4PopupWindow() {
@ -1030,11 +1046,12 @@ public class TableDataTreePane extends BasicTableDataTreePane {
}
};
basicPane.setLayout(new BorderLayout());
basicPane.add(tips, BorderLayout.NORTH);
basicPane.add(scrollPane, BorderLayout.CENTER);
BasicDialog basicDialog = basicPane.showSmallWindow(SwingUtilities.getWindowAncestor(TableDataTreePane.this), new DialogActionAdapter() {
@Override
public void doOk() {
Object[] selectedValues = checkBoxList.getSelectedValues();
List selectedValues = tableDataCheckBoxPane.getSelectedObjects();
// 删除时如果正在搜索,跳回原树
if (TableDataTreeSearchManager.getInstance().isInSearchMode()) {
TableDataTreeSearchManager.getInstance().outOfSearchMode();

4
designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TableDataSearchRemindPane.java

@ -190,7 +190,7 @@ public class TableDataSearchRemindPane extends JPanel implements TreeSearchStatu
@Override
public void onInSearching() {
this.textLabel.setText(IN_SEARCHING);
this.textLabel.setVisible(false);
this.stopLabel.setText(STOP_SEARCHING);
this.stopLabel.setVisible(true);
this.setVisible(true);
@ -199,6 +199,7 @@ public class TableDataSearchRemindPane extends JPanel implements TreeSearchStatu
@Override
public void onStoppedSearching() {
this.textLabel.setText(SEARCHING_STOPPED);
this.textLabel.setVisible(true);
this.stopLabel.setVisible(false);
this.setVisible(true);
}
@ -206,6 +207,7 @@ public class TableDataSearchRemindPane extends JPanel implements TreeSearchStatu
@Override
public void onDoneSearching(boolean matchSetsEmpty) {
this.textLabel.setText(DONE_SEARCHING);
this.textLabel.setVisible(true);
this.stopLabel.setVisible(false);
this.setVisible(true);
}

13
designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java

@ -16,6 +16,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
@ -23,6 +24,7 @@ import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.KeyAdapter;
@ -103,7 +105,7 @@ public class TreeSearchToolbarPane extends JPanel implements TreeSearchStatusCha
searchPane.setBackground(Color.WHITE);
// 左侧搜索图标
UILabel searchLabel = new UILabel(IconUtils.readIcon("/com/fr/design/images/data/search"));
searchLabel.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 0));
searchLabel.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0));
searchLabel.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
@ -111,7 +113,12 @@ public class TreeSearchToolbarPane extends JPanel implements TreeSearchStatusCha
}
});
// 中间输入框
searchTextField = new UITextField();
searchTextField = new UITextField(){
@Override
public Insets getInsets() {
return new Insets(2, 4, 0, 4);
}
};
searchTextField.setBorderPainted(false);
searchTextField.setPlaceholder(Toolkit.i18nText("Fine-Design_Tree_Search_Press_Enter_For_Search"));
searchTextField.addFocusListener(new FocusListener() {
@ -145,7 +152,7 @@ public class TreeSearchToolbarPane extends JPanel implements TreeSearchStatusCha
// 右侧返回图标
UILabel returnLabel = new UILabel(IconUtils.readIcon("/com/fr/design/images/data/clear"));
returnLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Tree_Search_Return"));
returnLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
returnLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 11));
returnLabel.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {

2
designer-base/src/main/java/com/fr/design/data/datapane/management/search/view/TreeSearchRendererHelper.java

@ -67,7 +67,7 @@ public class TreeSearchRendererHelper {
}
private String getHighlightText(String text, String textToHighlight) {
String highLightTemplate = "<font color=\"blue\">$1</font>";
String highLightTemplate = "<font color=\"#419BF9\">$1</font>";
if (textToHighlight.length() == 0) {
return text;
}

2
designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java

@ -54,7 +54,7 @@ public class TableDataFollowingPasteUtils {
}
// 获取当前的TableDataTreePane
DesignModelAdapter<?, ?> currentModelAdapter = DesignModelAdapter.getCurrentModelAdapter();
TableDataTreePane tableDataTreePane = (TableDataTreePane) TableDataTreePane.getInstance(currentModelAdapter);
TableDataTreePane tableDataTreePane = (TableDataTreePane) TableDataTreePane.getInstanceWithoutRefreshEverytime(currentModelAdapter);
// 粘贴(添加)数据集
for (Map.Entry<String, TableData> dataWrapperEntry : tableDataWrapperMap.entrySet()) {
String dsName = dataWrapperEntry.getKey();

2
designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java

@ -1,6 +1,5 @@
package com.fr.design.extra;
import com.fr.decision.webservice.v10.plugin.helper.category.impl.PluginResourceLoader;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.dialog.UIDialog;
@ -52,7 +51,6 @@ public class WebViewDlgHelper {
@Override
public void envChanged() {
installHome = PluginStoreConstants.getLocalInstallHome();
PluginResourceLoader.INSTANCE.checkOldShopFile();
}
});
}

3
designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java

@ -288,8 +288,7 @@ public final class FunctionConstants {
private static NameAndFunctionList getNewFunctionList() {
return new NameAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_New"), new Function[]{
new ENDOFMONTH(), new NUMTOZH(), new MIDCHAR(), new ISWORKDAY(), new ENBYSTRNUM(), new TEXTGETNUM(),
new GETCHARNUM(), new GCD(), new LCM()
new ENDOFMONTH(), new NUMTOZH(), new MIDCHAR(), new ISWORKDAY()
});
}

170
designer-base/src/main/java/com/fr/design/gui/ilist/CheckBoxListWithPartialSelect.java

@ -0,0 +1,170 @@
package com.fr.design.gui.ilist;
import com.fr.design.event.StateChangeListener;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.itree.checkboxtree.TristateCheckBox;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import javax.swing.AbstractListModel;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.ListCellRenderer;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.List;
/**
* 支持全选全不选半选的CheckBoxList面板
* @author Yvan
*/
public class CheckBoxListWithPartialSelect extends JPanel {
private UICheckBox[] dataCheckBoxes;
private TristateCheckBox chooseAllCheckBox;
private UIList dataList;
public CheckBoxListWithPartialSelect (Object[] data) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
init(data);
this.add(chooseAllCheckBox, BorderLayout.NORTH);
this.add(dataList, BorderLayout.CENTER);
}
private void init(Object[] data) {
// 复选框组
dataCheckBoxes = new UICheckBox[data.length];
for (int i = 0; i < dataCheckBoxes.length; i++) {
dataCheckBoxes[i] = new UICheckBox(transferDataValue2Show(data[i]));
dataCheckBoxes[i].setSelected(true);
}
// UIList
dataList = new UIList(dataCheckBoxes);
dataList.setModel(getListModel());
dataList.setCellRenderer(getListCellRenderer());
// 全选框
chooseAllCheckBox = new TristateCheckBox(Toolkit.i18nText("Fine-Design_Basic_Remove_All_Selected")) {
@Override
protected State getNextState(State current) {
if (current == TristateCheckBox.SELECTED || current == TristateCheckBox.DO_NOT_CARE) {
return TristateCheckBox.NOT_SELECTED;
}
return TristateCheckBox.SELECTED;
}
};
chooseAllCheckBox.setState(TristateCheckBox.SELECTED);
chooseAllCheckBox.setFocusable(false);
chooseAllCheckBox.addStateChangeListener(getChooseAllCheckBoxStateChangeListener());
dataList.addMouseListener(getDataListMouseListener());
}
public List<Object> getSelectedObjects() {
return dataList.getSelectedValuesList();
}
protected MouseListener getDataListMouseListener() {
return new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
super.mousePressed(e);
int index = dataList.getSelectedIndex();
if (index < 0) {
return;
}
UICheckBox checkBox = (UICheckBox) dataList.getModel().getElementAt(index);
checkBox.setSelected(!checkBox.isSelected());
//根据CheckBoxes中的选择情况来更新全选框的状态
int selectedCount = calculateSelectedNum();
if (selectedCount == 0) {
chooseAllCheckBox.setState(TristateCheckBox.NOT_SELECTED);
} else if (selectedCount == dataCheckBoxes.length) {
chooseAllCheckBox.setState(TristateCheckBox.SELECTED);
} else {
chooseAllCheckBox.setState(TristateCheckBox.DO_NOT_CARE);
}
dataList.repaint();
}
};
}
/**
* 获取全选框状态改变监听
* @return
*/
protected StateChangeListener getChooseAllCheckBoxStateChangeListener() {
return () -> {
if (chooseAllCheckBox.getState() == TristateCheckBox.DO_NOT_CARE) {
return;
}
boolean isSelected = chooseAllCheckBox.isSelected();
for (int i = 0; i < dataList.getModel().getSize(); i++) {
UICheckBox checkBox = (UICheckBox) dataList.getModel().getElementAt(i);
checkBox.setSelected(isSelected);
}
dataList.repaint();
};
}
/**
* 计算CheckBox的选中情况用来更新全选框的状态
* @return
*/
protected int calculateSelectedNum() {
int count = 0;
for (UICheckBox dataCheckBox : dataCheckBoxes) {
if (dataCheckBox.isSelected()) {
count++;
}
}
return count;
}
/**
* 将传入的Object转化为字符串展示默认调用toString方法
* @param object
* @return
*/
protected String transferDataValue2Show(Object object) {
return object.toString();
}
protected AbstractListModel getListModel() {
return new SelectedListDataModel();
}
protected ListCellRenderer getListCellRenderer() {
return new SelectedListCellRender();
}
private class SelectedListCellRender extends DefaultListCellRenderer {
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, final boolean isSelected, boolean cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
dataCheckBoxes[index] = (UICheckBox) value;
dataCheckBoxes[index].setBackground(list.getBackground());
return dataCheckBoxes[index];
}
}
private class SelectedListDataModel extends AbstractListModel {
@Override
public int getSize() {
return dataCheckBoxes.length;
}
@Override
public Object getElementAt(int index) {
return (index > getSize() - 1 || index < 0) ? null : dataCheckBoxes[index];
}
}
}

2
designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java

@ -58,7 +58,7 @@ public class TextFormatPane extends AbstractBasicStylePane implements GlobalName
private static final Integer[] TYPES = new Integer[]{
FormatContents.NULL, FormatContents.NUMBER,
FormatContents.CURRENCY, FormatContents.PERCENT,
FormatContents.THOUSANDTHS, FormatContents.SCIENTIFIC,
FormatContents.SCIENTIFIC,
FormatContents.DATE, FormatContents.TIME,
FormatContents.TEXT};

5603
designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/modes/FormulaTokenMaker.java

File diff suppressed because it is too large Load Diff

20
designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java

@ -4,11 +4,11 @@ import com.fr.design.record.analyzer.DesignerAnalyzerAdvice;
import com.fr.general.GeneralUtils;
import com.fr.intelli.measure.Estimator;
import com.fr.intelli.metrics.Compute;
import com.fr.intelli.metrics.MessageRecorderFactory;
import com.fr.intelli.metrics.SupervisoryConfig;
import com.fr.intelli.record.Measurable;
import com.fr.intelli.record.MeasureObject;
import com.fr.intelli.record.MeasureUnit;
import com.fr.intelli.record.MetricRegistry;
import com.fr.log.FineLoggerFactory;
import com.fr.measure.DBMeterFactory;
import com.fr.stable.ArrayUtils;
@ -80,18 +80,16 @@ public class MonitorAdvice implements DesignerAnalyzerAdvice {
List<Object> newArgs = new ArrayList<>(Arrays.asList(args));
newArgs.add(id);
recordSQLDetail(id);
Object message = null;
try {
message = measurable.durableEntity(measureObject, newArgs.toArray());
} catch (Throwable throwable) {
FineLoggerFactory.getLogger().error(throwable.getMessage(), throwable);
}
if (measurable instanceof Estimator) {
measurable.asyncDurable(measureObject, newArgs.toArray());
MessageRecorderFactory.getInstance().asyncSubmit(message);
} else {
Object message = null;
try {
message = measurable.durableEntity(measureObject, newArgs.toArray());
} catch (Throwable throwable) {
FineLoggerFactory.getLogger().error(throwable.getMessage(), throwable);
}
if (message != null) {
MetricRegistry.getMetric().submit(message);
}
MessageRecorderFactory.getInstance().syncSubmit(message);
}
}
} catch (Exception ignore) {

19
designer-base/src/main/java/com/fr/design/upm/UpmShowPane.java

@ -32,23 +32,14 @@ public class UpmShowPane extends BasicPane {
UpmShowPane() {
setLayout(new BorderLayout());
modernUIPane = ModernUIPaneFactory.modernUIPaneBuilder()
.prepareForV6(new ScriptContextAdapter() {
modernUIPane = new ModernUIPane.Builder<>()
.prepare(new ScriptContextAdapter() {
@Override
public void onScriptContextCreated(ScriptContextEvent event) {
// 6.x
JSValue window = event.getBrowser().executeJavaScriptAndReturnValue("window");
window.asObject().setProperty("PluginHelper", UpmBridge.getBridge(event.getBrowser()));
}
})
.prepareForV7(params -> {
// 7.x
JsObject window = params.frame().executeJavaScript("window");
if (window != null) {
window.putProperty("PluginHelper", NewUpmBridge.getBridge(window));
}
return InjectJsCallback.Response.proceed();
})
.withURL(UpmFinder.getMainResourcePath(), UpmUtils.renderMap())
.build();
EventDispatcher.listen(DownloadEvent.UPDATE, new Listener<String>() {
@ -57,6 +48,12 @@ public class UpmShowPane extends BasicPane {
modernUIPane.redirect(UpmFinder.getMainResourcePath(), UpmUtils.renderMap());
}
});
EventDispatcher.listen(DownloadEvent.UPDATE, new Listener<String>() {
@Override
public void on(Event event, String param) {
modernUIPane.redirect(UpmFinder.getMainResourcePath(), UpmUtils.renderMap());
}
});
add(modernUIPane, BorderLayout.CENTER);
}
}

20
designer-base/src/main/resources/com/fr/design/gui/syntax/ui/rsyntaxtextarea/modes/FormulaTokenMaker.flex

@ -590,7 +590,25 @@ FunctionNames = "ABS"|
"COUNTIFS"|
"countifs"|
"SUMIFS"|
"sumifs"
"sumifs"|
"ENDOFMONTH"|
"endofmonth"|
"NUMTOZH"|
"numtozh"|
"MIDCHAR"|
"midchar"|
"ISWORKDAY"|
"isworkday"|
"ENBYSTRNUM"|
"enbystrnum"|
"TEXTGETNUM"|
"textgetnum"|
"GETCHARNUM"|
"getcharnum"|
"GCD"|
"gcd"|
"LCM"|
"lcm"
%state MLC

6
designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties

@ -14,4 +14,8 @@ com.fr.design.report.fit.templatePane.dialog=800*400
com.fr.design.report.fit.firstColumn=120*20
com.fr.design.report.fit.column=160*20
com.fr.design.lock.LockInfoDialog=500*180
com.fr.design.mainframe.ForbiddenPane.refreshButton=75*24
com.fr.design.mainframe.ForbiddenPane.refreshButton=75*24
com.fr.design.cell.expand.sort.pane=257*185
com.fr.design.sort.rule.item=125*20
com.fr.design.ds.column.sort.pane=250*180
com.fr.design.sort.expand.header.pane=95*10

6
designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties

@ -13,4 +13,8 @@ com.fr.design.report.fit.templatePane.dialog=600*400
com.fr.design.report.fit.firstColumn=170*20
com.fr.design.report.fit.column=100*20
com.fr.design.lock.LockInfoDialog=500*180
com.fr.design.mainframe.ForbiddenPane.refreshButton=68*24
com.fr.design.mainframe.ForbiddenPane.refreshButton=68*24
com.fr.design.cell.expand.sort.pane=257*170
com.fr.design.sort.rule.item=125*20
com.fr.design.ds.column.sort.pane=250*165
com.fr.design.sort.expand.header.pane=95*10

6
designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties

@ -13,4 +13,8 @@ com.fr.design.report.fit.templatePane.dialog=600*400
com.fr.design.report.fit.firstColumn=130*20
com.fr.design.report.fit.column=100*20
com.fr.design.lock.LockInfoDialog=500*180
com.fr.design.mainframe.ForbiddenPane.refreshButton=80*24
com.fr.design.mainframe.ForbiddenPane.refreshButton=80*24
com.fr.design.cell.expand.sort.pane=267*165
com.fr.design.sort.rule.item=125*20
com.fr.design.ds.column.sort.pane=250*180
com.fr.design.sort.expand.header.pane=95*10

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

@ -14,4 +14,8 @@ com.fr.design.report.fit.templatePane.dialog=600*400
com.fr.design.report.fit.firstColumn=80*20
com.fr.design.report.fit.column=100*20
com.fr.design.lock.LockInfoDialog=400*160
com.fr.design.mainframe.ForbiddenPane.refreshButton=68*24
com.fr.design.mainframe.ForbiddenPane.refreshButton=68*24
com.fr.design.cell.expand.sort.pane=227*155
com.fr.design.sort.rule.item=80*20
com.fr.design.ds.column.sort.pane=220*150
com.fr.design.sort.expand.header.pane=108*10

6
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties

@ -13,4 +13,8 @@ com.fr.design.report.fit.templatePane.dialog=600*400
com.fr.design.report.fit.firstColumn=80*20
com.fr.design.report.fit.column=100*20
com.fr.design.lock.LockInfoDialog=400*160
com.fr.design.mainframe.ForbiddenPane.refreshButton=68*24
com.fr.design.mainframe.ForbiddenPane.refreshButton=68*24
com.fr.design.cell.expand.sort.pane=227*155
com.fr.design.sort.rule.item=80*20
com.fr.design.ds.column.sort.pane=220*150
com.fr.design.sort.expand.header.pane=108*10

5
designer-base/src/main/resources/com/fr/design/images/control/batch_esd_off_disabled.svg

@ -0,0 +1,5 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g opacity="0.3">
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 3.33333C14 4.622 11.3137 5.66667 8 5.66667C4.68629 5.66667 2 4.622 2 3.33333C2 2.04467 4.68629 1 8 1C11.3137 1 14 2.04467 14 3.33333ZM8 6.83333C11.3137 6.83333 14 5.78866 14 4.5V7.75777C15.206 8.56504 16 9.93979 16 11.5C16 13.9853 13.9853 16 11.5 16C10.4205 16 9.42985 15.6199 8.65446 14.9863C8.43951 14.9953 8.22115 15 8 15C4.68629 15 2 13.9553 2 12.6667V9.16667C2 10.3228 4.16235 11.2826 7.00012 11.4677C7.00293 11.0674 7.058 10.6796 7.15887 10.3106C4.24338 10.1515 2 9.17765 2 8V4.5C2 5.78866 4.68629 6.83333 8 6.83333ZM11.5 8C12.3224 8 13.0785 8.28364 13.6759 8.75842C14.4827 9.3996 15 10.3894 15 11.5C15 13.433 13.433 15 11.5 15C11.1026 15 10.7208 14.9338 10.3648 14.8118C8.98898 14.3403 8 13.0356 8 11.5C8 11.0905 8.07035 10.6973 8.19961 10.3321C8.68044 8.97334 9.97655 8 11.5 8ZM12.9142 9.37868L13.6213 10.0858L12.2071 11.5L13.6213 12.9142L12.9142 13.6213L11.5 12.2071L10.0858 13.6213L9.37868 12.9142L10.7929 11.5L9.37868 10.0858L10.0858 9.37868L11.5 10.7929L12.9142 9.37868Z" fill="#333334"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

3
designer-base/src/main/resources/com/fr/design/images/control/batch_esd_off_normal.svg

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 3.33333C14 4.622 11.3137 5.66667 8 5.66667C4.68629 5.66667 2 4.622 2 3.33333C2 2.04467 4.68629 1 8 1C11.3137 1 14 2.04467 14 3.33333ZM8 6.83333C11.3137 6.83333 14 5.78866 14 4.5V7.75777C15.206 8.56504 16 9.93979 16 11.5C16 13.9853 13.9853 16 11.5 16C10.4205 16 9.42985 15.6199 8.65446 14.9863C8.43951 14.9953 8.22115 15 8 15C4.68629 15 2 13.9553 2 12.6667V9.16667C2 10.3228 4.16235 11.2826 7.00012 11.4677C7.00293 11.0674 7.058 10.6796 7.15887 10.3106C4.24338 10.1515 2 9.17765 2 8V4.5C2 5.78866 4.68629 6.83333 8 6.83333ZM11.5 8C12.3224 8 13.0785 8.28364 13.6759 8.75842C14.4827 9.3996 15 10.3894 15 11.5C15 13.433 13.433 15 11.5 15C11.1026 15 10.7208 14.9338 10.3648 14.8118C8.98898 14.3403 8 13.0356 8 11.5C8 11.0905 8.07035 10.6973 8.19961 10.3321C8.68044 8.97334 9.97655 8 11.5 8ZM12.9142 9.37868L13.6213 10.0858L12.2071 11.5L13.6213 12.9142L12.9142 13.6213L11.5 12.2071L10.0858 13.6213L9.37868 12.9142L10.7929 11.5L9.37868 10.0858L10.0858 9.37868L11.5 10.7929L12.9142 9.37868Z" fill="#333334"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

5
designer-base/src/main/resources/com/fr/design/images/control/batch_esd_on_disabled.svg

@ -0,0 +1,5 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g opacity="0.3">
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 3.33333C14 4.622 11.3137 5.66667 8 5.66667C4.68629 5.66667 2 4.622 2 3.33333C2 2.04467 4.68629 1 8 1C11.3137 1 14 2.04467 14 3.33333ZM8 6.83333C11.3137 6.83333 14 5.78866 14 4.5V7.75777C15.206 8.56504 16 9.93979 16 11.5C16 13.9853 13.9853 16 11.5 16C10.4205 16 9.42985 15.6199 8.65446 14.9863C8.43951 14.9953 8.22115 15 8 15C4.68629 15 2 13.9553 2 12.6667V9.16667C2 10.3228 4.16235 11.2826 7.00012 11.4677C7.00293 11.0674 7.058 10.6796 7.15887 10.3106C4.24338 10.1515 2 9.17765 2 8V4.5C2 5.78866 4.68629 6.83333 8 6.83333ZM11.5 8C12.3224 8 13.0785 8.28364 13.6759 8.75842C14.4827 9.3996 15 10.3894 15 11.5C15 13.433 13.433 15 11.5 15C11.1026 15 10.7208 14.9338 10.3648 14.8118C8.98898 14.3403 8 13.0356 8 11.5C8 11.0905 8.07035 10.6973 8.19961 10.3321C8.68044 8.97334 9.97655 8 11.5 8ZM10.6482 13.5372L13.4434 11.5L10.6482 9.53723V13.5372Z" fill="#333334"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

3
designer-base/src/main/resources/com/fr/design/images/control/batch_esd_on_normal.svg

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 3.33333C14 4.622 11.3137 5.66667 8 5.66667C4.68629 5.66667 2 4.622 2 3.33333C2 2.04467 4.68629 1 8 1C11.3137 1 14 2.04467 14 3.33333ZM8 6.83333C11.3137 6.83333 14 5.78866 14 4.5V7.75777C15.206 8.56504 16 9.93979 16 11.5C16 13.9853 13.9853 16 11.5 16C10.4205 16 9.42985 15.6199 8.65446 14.9863C8.43951 14.9953 8.22115 15 8 15C4.68629 15 2 13.9553 2 12.6667V9.16667C2 10.3228 4.16235 11.2826 7.00012 11.4677C7.00293 11.0674 7.058 10.6796 7.15887 10.3106C4.24338 10.1515 2 9.17765 2 8V4.5C2 5.78866 4.68629 6.83333 8 6.83333ZM11.5 8C12.3224 8 13.0785 8.28364 13.6759 8.75842C14.4827 9.3996 15 10.3894 15 11.5C15 13.433 13.433 15 11.5 15C11.1026 15 10.7208 14.9338 10.3648 14.8118C8.98898 14.3403 8 13.0356 8 11.5C8 11.0905 8.07035 10.6973 8.19961 10.3321C8.68044 8.97334 9.97655 8 11.5 8ZM10.6482 13.5372L13.4434 11.5L10.6482 9.53723V13.5372Z" fill="#333334"/>
</svg>

After

Width:  |  Height:  |  Size: 1014 B

7
designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortPane.java

@ -1,20 +1,17 @@
package com.fr.design.sort.celldscolumn;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.sort.common.AbstractSortPane;
import com.fr.general.data.TableDataColumn;
import com.fr.report.cell.TemplateCellElement;
import com.fr.report.cell.cellattr.core.group.DSColumn;
import com.fr.report.core.sort.common.CellSortAttr;
import javax.swing.*;
public class CellDSColumnSortPane extends AbstractSortPane {
public CellDSColumnSortPane() {
super(220, 150);
//this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
super(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.ds.column.sort.pane"));
}
@Override

3
designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortPane.java

@ -1,6 +1,7 @@
package com.fr.design.sort.cellexpand;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.mainframe.cell.settingpane.CellExpandAttrPane;
import com.fr.design.sort.common.AbstractSortPane;
import com.fr.report.cell.TemplateCellElement;
@ -14,7 +15,7 @@ public class CellExpandSortPane extends AbstractSortPane {
CellExpandAttrPane cellExpandAttrPane;
public CellExpandSortPane(CellExpandAttrPane cellExpandAttrPane) {
super(227, 155);
super(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.cell.expand.sort.pane"));
this.cellExpandAttrPane = cellExpandAttrPane;
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
}

10
designer-realize/src/main/java/com/fr/design/sort/common/AbstractSortPane.java

@ -26,6 +26,10 @@ public abstract class AbstractSortPane extends JPanel {
protected String selfSortArea;
protected String defaultHeaderArea;
public AbstractSortPane(Dimension dimension) {
this(dimension.width, dimension.height);
}
public AbstractSortPane(int sortPaneWidth, int sortPaneRightWidth) {
this.sortPaneWidth = sortPaneWidth;
this.sortPaneRightWidth = sortPaneRightWidth;
@ -101,12 +105,12 @@ public abstract class AbstractSortPane extends JPanel {
}
public static UILabel createIntervalUILabel() {
return createIntervalUILabel(PANE_COMPONENT_H_GAP);
return createIntervalUILabel(new Dimension(PANE_COMPONENT_H_GAP, 10));
}
public static UILabel createIntervalUILabel(int vGap) {
public static UILabel createIntervalUILabel(Dimension dimension) {
UILabel uiLabel = new UILabel();
uiLabel.setPreferredSize(new Dimension(vGap, 10));
uiLabel.setPreferredSize(dimension);
return uiLabel;
}
}

3
designer-realize/src/main/java/com/fr/design/sort/common/SortUIExpandablePane.java

@ -6,6 +6,7 @@ import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit;
import javax.swing.*;
@ -85,7 +86,7 @@ public class SortUIExpandablePane extends JPanel {
this.add(iconUiLabel);
tipUILabel = new UILabel(Toolkit.i18nText("Fine-Design_Sort_Second_Sort"));
this.add(tipUILabel);
this.add(AbstractSortPane.createIntervalUILabel(108));
this.add(AbstractSortPane.createIntervalUILabel( DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.sort.expand.header.pane")));
closeButton = new UILabel(IconUtils.readIcon("/com/fr/design/images/control/close.png"));
closeButton.setPreferredSize(new Dimension(16, 20));

9
designer-realize/src/main/java/com/fr/design/sort/header/HeaderSettingPane.java

@ -4,12 +4,14 @@ import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.sort.common.AbstractSortPane;
import com.fr.general.GeneralContext;
import com.fr.report.core.sort.header.SortHeader;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.util.Locale;
public class HeaderSettingPane extends JPanel {
protected int headerSettingPaneWidth;
@ -36,6 +38,7 @@ public class HeaderSettingPane extends JPanel {
emptyUILabel.setPreferredSize(new Dimension(10, 10));
uiCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Sort_Allow_User_Click_Sort_Order"));
addToolTipText();
uiCheckBox.setPreferredSize(new Dimension(headerSettingPaneRightWidth - 10, AbstractSortPane.PANE_COMPONENT_HEIGHT));
uiCheckBox.addChangeListener(new ChangeListener() {
@Override
@ -49,6 +52,12 @@ public class HeaderSettingPane extends JPanel {
this.add(jPanel);
}
private void addToolTipText() {
if (!Locale.CHINA.equals(GeneralContext.getLocale())) {
uiCheckBox.setToolTipText(Toolkit.i18nText("Fine-Design_Sort_Allow_User_Click_Sort_Order"));
}
}
void initHeaderSortRulePane() {
headerSortRulePane = new HeaderSortRulePane();
this.add(headerSortRulePane);

15
designer-realize/src/main/java/com/fr/design/sort/header/HeaderSortRulePane.java

@ -7,6 +7,7 @@ import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ipoppane.PopupHider;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.ColorControlWindow;
@ -32,6 +33,7 @@ public class HeaderSortRulePane extends JPanel {
UICheckBox desUICheckBox;
UICheckBox nosortUICheckBox;
Color defaultColor = new Color(33, 33, 34);
public static final int ICON_LENGTH = 20;
HeaderSortRulePane() {
initComponents();
@ -57,8 +59,9 @@ public class HeaderSortRulePane extends JPanel {
new Component[]{desUICheckBox = new UICheckBox(SortRule.DES.getDescription()), desIconButton = new IconButton(SortRule.DES)},
new Component[]{nosortUICheckBox = new UICheckBox(SortRule.NO_SORT.getDescription()), nosortIconButton = new IconButton(SortRule.NO_SORT)},
};
double[] rowSize = {HeaderIconBuilder.ICON_LENGTH + 10, HeaderIconBuilder.ICON_LENGTH + 10, HeaderIconBuilder.ICON_LENGTH + 10};
double[] columnSize = {80, HeaderIconBuilder.ICON_LENGTH + 10};
double[] rowSize = {ICON_LENGTH + 10, ICON_LENGTH + 10, ICON_LENGTH + 10};
double[] columnSize =
{DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.sort.rule.item").getWidth(), ICON_LENGTH + 10};
JPanel sortRuleItem = TableLayoutHelper.createCommonTableLayoutPane(components, rowSize, columnSize, 0);
this.add(sortRuleItem, BorderLayout.CENTER);
initUICheckBoxChange(ascUICheckBox, ascIconButton);
@ -116,10 +119,10 @@ public class HeaderSortRulePane extends JPanel {
jLayeredPane = new JLayeredPane();
iconLabel = getIconLabel();
borderUiLabel = new UILabel();
borderUiLabel.setSize(HeaderIconBuilder.ICON_LENGTH, HeaderIconBuilder.ICON_LENGTH);
borderUiLabel.setSize(ICON_LENGTH, ICON_LENGTH);
borderUiLabel.setOpaque(true);
borderUiLabel.setBackground(Color.WHITE);
iconLabel.setSize(HeaderIconBuilder.ICON_LENGTH, HeaderIconBuilder.ICON_LENGTH);
iconLabel.setSize(ICON_LENGTH, ICON_LENGTH);
iconLabel.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
@ -128,7 +131,7 @@ public class HeaderSortRulePane extends JPanel {
}
}
});
jLayeredPane.setPreferredSize(new Dimension(HeaderIconBuilder.ICON_LENGTH, HeaderIconBuilder.ICON_LENGTH));
jLayeredPane.setPreferredSize(new Dimension(ICON_LENGTH, ICON_LENGTH));
jLayeredPane.add(iconLabel, JLayeredPane.POPUP_LAYER);
jLayeredPane.add(borderUiLabel, JLayeredPane.MODAL_LAYER);
this.add(jLayeredPane);
@ -142,7 +145,7 @@ public class HeaderSortRulePane extends JPanel {
Icon getIcon(FineColor fineColor) {
BufferedImage bufferedImage = HeaderIconBuilder.getIcon(sortRule, fineColor);
Icon icon = new ImageIcon(bufferedImage);
Icon icon = new SVGIcon(bufferedImage);
return icon;
}

Loading…
Cancel
Save