Browse Source

Merge branch 'feature/10.0' of ssh://cloud.finedevelop.com:7999/~zheng/C-design into feature/10.0

research/11.0
shine 5 years ago
parent
commit
bb72abe56c
  1. 2
      designer-base/src/main/java/com/fr/design/actions/help/FineUIAction.java
  2. 2
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindDialog.java
  3. 2
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindPane.java
  4. 2
      designer-base/src/main/java/com/fr/design/condition/ContinuousTreeSelectionModel.java
  5. 2
      designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java
  6. 6
      designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
  7. 1
      designer-base/src/main/java/com/fr/design/data/datapane/ChoosePaneSupportFormula.java
  8. 1
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java
  9. 6
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java
  10. 3
      designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java
  11. 10
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/AutoStoreProcedureTableModel.java
  12. 3
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java
  13. 25
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/CustomDictModel.java
  14. 6
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java
  15. 21
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java
  16. 5
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java
  17. 11
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java
  18. 2
      designer-base/src/main/java/com/fr/design/dcm/UniversalDatabaseDialog.java
  19. 1
      designer-base/src/main/java/com/fr/design/designer/EditingState.java
  20. 4
      designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java
  21. 1
      designer-base/src/main/java/com/fr/design/dialog/JWizardDialog.java
  22. 19
      designer-base/src/main/java/com/fr/design/editor/editor/WidgetNameEditor.java
  23. 2
      designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java
  24. 1
      designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java
  25. 4
      designer-base/src/main/java/com/fr/design/extra/AppStoreBuilder.java
  26. 9
      designer-base/src/main/java/com/fr/design/extra/LoginDialog.java
  27. 7
      designer-base/src/main/java/com/fr/design/extra/LoginWebBridge.java
  28. 3
      designer-base/src/main/java/com/fr/design/extra/PluginAbstractLoadingViewPane.java
  29. 5
      designer-base/src/main/java/com/fr/design/extra/PluginControlPane.java
  30. 10
      designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java
  31. 3
      designer-base/src/main/java/com/fr/design/extra/PluginUpdatePane.java
  32. 10
      designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java
  33. 2
      designer-base/src/main/java/com/fr/design/extra/QQLoginDialog.java
  34. 1
      designer-base/src/main/java/com/fr/design/extra/ShopDialog.java
  35. 26
      designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java
  36. 2
      designer-base/src/main/java/com/fr/design/file/NodeAuthProcessor.java
  37. 22
      designer-base/src/main/java/com/fr/design/formula/FormulaPane.java
  38. 23
      designer-base/src/main/java/com/fr/design/fun/MultiStyleUIConfigProvider.java
  39. 39
      designer-base/src/main/java/com/fr/design/fun/StyleUIConfigProvider.java
  40. 26
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractMultiStyleUIConfigProvider.java
  41. 41
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractStyleUIConfigProvider.java
  42. 8
      designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java
  43. 8
      designer-base/src/main/java/com/fr/design/gui/frpane/UnitInputPane.java
  44. 4
      designer-base/src/main/java/com/fr/design/gui/ibutton/UICombinationButton.java
  45. 12
      designer-base/src/main/java/com/fr/design/gui/ilable/ActionLabel.java
  46. 6
      designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/RSyntaxUtilities.java
  47. 2
      designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/folding/HtmlFoldParser.java
  48. 1
      designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/modes/FormulaTokenMaker.java
  49. 8
      designer-base/src/main/java/com/fr/file/FileNodeFILE.java
  50. 10
      designer-chart/src/main/java/com/fr/design/chart/ChartIcon.java
  51. 30
      designer-chart/src/main/java/com/fr/design/chart/gui/ChartComponent.java
  52. 5
      designer-chart/src/main/java/com/fr/design/chartx/CustomChartDataPane.java
  53. 4
      designer-chart/src/main/java/com/fr/design/chartx/component/CellDataSeriesXYValueCorrelationPane.java
  54. 82
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/GaugeCellDataFieldsPane.java
  55. 84
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/GaugeDataSetFieldsPane.java
  56. 22
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieCellDataFieldsPane.java
  57. 25
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieDataSetFieldsPane.java
  58. 12
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/ScatterDataSetFieldsPane.java
  59. 9
      designer-chart/src/main/java/com/fr/design/chartx/single/CellDataPane.java
  60. 8
      designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java
  61. 29
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/GisMapPlotPane.java
  62. 23
      designer-chart/src/main/java/com/fr/van/chart/bubble/BubbleIndependentVanChartInterface.java
  63. 3
      designer-chart/src/main/java/com/fr/van/chart/custom/CustomIndependentVanChartInterface.java
  64. 19
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePane.java
  65. 79
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTrendLinePane.java
  66. 1
      designer-chart/src/main/java/com/fr/van/chart/designer/other/zoom/ZoomPaneWithOutMode.java
  67. 1
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java
  68. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java
  69. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartValueAxisPane.java
  70. 1
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java
  71. 21
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java
  72. 114
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAxisAreaPane.java
  73. 20
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/radar/VanChartRadarAxisAreaPane.java
  74. 38
      designer-chart/src/main/java/com/fr/van/chart/gauge/GaugeIndependentVanChartInterface.java
  75. 1
      designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java
  76. 33
      designer-realize/src/main/java/com/fr/design/style/StylePane.java
  77. 2
      designer-realize/src/main/java/com/fr/grid/GridUI.java
  78. 12
      designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java

2
designer-base/src/main/java/com/fr/design/actions/help/FineUIAction.java

@ -51,7 +51,7 @@ public class FineUIAction extends UpdateAction {
BasicDialog dialog = pane.showLargeWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override
public void doOk() {
// Do nothing
}
});
dialog.setVisible(true);

2
designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindDialog.java

@ -31,7 +31,7 @@ public class RemindDialog extends UIDialog {
@Override
public void checkValid() throws Exception {
// Do nothing
}
public RemindPane getRemindPane() {

2
designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindPane.java

@ -114,6 +114,7 @@ public class RemindPane extends JPanel {
@Override
public void removeLayoutComponent(Component comp) {
// Do nothing
}
@Override
@ -139,6 +140,7 @@ public class RemindPane extends JPanel {
@Override
public void addLayoutComponent(String name, Component comp) {
// Do nothing
}
};
}

2
designer-base/src/main/java/com/fr/design/condition/ContinuousTreeSelectionModel.java

@ -16,8 +16,6 @@ import com.fr.design.utils.gui.GUICoreUtils;
* 一个层次连续节点.
*/
public class ContinuousTreeSelectionModel extends DefaultTreeSelectionModel {
public ContinuousTreeSelectionModel() {
}
public void addSelectionPaths(TreePath[] paths) {
if (paths == null || paths.length == 0) {

2
designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java

@ -272,10 +272,12 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
*/
@Override
public void editingCanceled(ChangeEvent e) {
// Do nothing
}
@Override
public void editingStopped(ChangeEvent e) {
// Do nothing
}
}

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

@ -103,10 +103,12 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
@Override
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
// Do nothing
}
@Override
public void popupMenuCanceled(PopupMenuEvent e) {
// Do nothing
}
};
@ -114,10 +116,12 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
private PopupMenuListener listener = new PopupMenuListener() {
@Override
public void popupMenuCanceled(PopupMenuEvent e) {
// Do nothing
}
@Override
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
// Do nothing
}
@Override
@ -199,6 +203,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
}
protected void addFocusListener() {
// Do nothing
}
@SuppressWarnings("unchecked")
@ -492,6 +497,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
}
protected void failedToFindTable() {
// Do nothing
}
protected String getTableName() {

1
designer-base/src/main/java/com/fr/design/data/datapane/ChoosePaneSupportFormula.java

@ -75,6 +75,7 @@ public class ChoosePaneSupportFormula extends ChoosePane {
}
protected void addFocusListener() {
// Do nothing
}
/**

1
designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java

@ -255,6 +255,7 @@ public class TableDataPaneListPane extends JListControlPane implements TableData
}
protected void checkRepeatedDSName(List<String> exsitTableDataNameList) {
// Do nothing
}
/**

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

@ -98,7 +98,7 @@ public class ConnectionTableProcedurePane extends BasicPane {
}
protected void addKeyMonitor() {
//do nothing
}
protected JPanel createCheckBoxgroupPane() {
@ -137,7 +137,7 @@ public class ConnectionTableProcedurePane extends BasicPane {
/**
* itemComboBox 加上 itemListener
*
*
* @param itemListener
*/
public void addItemListener(ItemListener itemListener) {
@ -214,7 +214,7 @@ public class ConnectionTableProcedurePane extends BasicPane {
public static interface DoubleClickSelectedNodeOnTreeListener {
/**
* 处理双击事件
*
*
* @param target
*/
public void actionPerformed(TableProcedure target);

3
designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java

@ -140,8 +140,6 @@ public class PreviewTableModel extends AbstractTableModel {
* 就是由于预览的JTable在不停的getRowCount来显示数据.
*/
private static class ErrorResultSet extends AbstractDataModel {
public ErrorResultSet() {
}
public int getRowCount() {
return 0;
@ -160,6 +158,7 @@ public class PreviewTableModel extends AbstractTableModel {
}
public void release() throws Exception {
// Do nothing
}
}

10
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/AutoStoreProcedureTableModel.java

@ -38,6 +38,7 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel {
this.setDefaultEditor(ParameterTableModel.ParameterEditor.class, new ParameterTableModel().new ParameterEditor());
this.setDefaultRenderer(StoreProcedureParameterValueEditor.class, new ProcedureParameterValueRenderer());
}
@Override
public boolean isCellEditable(int row, int col) {
if (ComparatorUtils.equals(getValueAt(row, col -1), "OUT")) {
return false;
@ -48,6 +49,7 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel {
return false;
}
@Override
public boolean shouldResponseDoubleClickAction () {
return false;
}
@ -60,7 +62,7 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel {
editor = ValueEditorPaneFactory.createStoreProcedValueEditorPane();
editor.getMenu().addPopupMenuListener(new PopupMenuListener() {
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
// Do nothing
}
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
@ -77,15 +79,16 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel {
}, 100);
}
@Override
public void popupMenuCanceled(PopupMenuEvent e) {
//do nothing
}
});
this.addCellEditorListener(new CellEditorListener() {
@Override
public void editingCanceled(ChangeEvent e) {
//do nothing
}
@Override
@ -147,6 +150,7 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel {
editor = ValueEditorPaneFactory.createStoreProcedValueEditorPane();
}
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
editor.setCurrentEditor(0);
editor.populate(value);

3
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java

@ -124,6 +124,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
}
@Override
public void actionPerformed(ActionEvent e) {
java.util.List<ParameterProvider> oldParas = editorPane.update();
oldParas.add(new Parameter());
@ -132,6 +133,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
@Override
public void checkEnabled() {
//do nothing
}
}
private class RemoveParaAction extends UITableEditAction {
@ -149,6 +151,7 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
@Override
public void checkEnabled() {
//do nothing
}
}

25
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/CustomDictModel.java

@ -1,22 +1,21 @@
package com.fr.design.data.tabledata.tabledatapane;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import com.fr.design.gui.itableeditorpane.ActionStyle;
import com.fr.design.gui.itableeditorpane.UIArrayTableModel;
import com.fr.design.gui.itableeditorpane.UITableEditAction;
import com.fr.design.gui.itableeditorpane.UITableModelAdapter;
import com.fr.design.gui.itextfield.UITextField;
import javax.swing.AbstractCellEditor;
import javax.swing.JTable;
import javax.swing.event.CellEditorListener;
import javax.swing.event.ChangeEvent;
import javax.swing.table.TableCellEditor;
import com.fr.design.gui.itableeditorpane.ActionStyle;
import com.fr.design.gui.itableeditorpane.UIArrayTableModel;
import com.fr.design.gui.itableeditorpane.UITableEditAction;
import com.fr.design.gui.itableeditorpane.UITableModelAdapter;
import com.fr.design.gui.itextfield.UITextField;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
public class CustomDictModel extends UITableModelAdapter<Object[]> implements ActionStyle {
/**
@ -34,11 +33,13 @@ public class CustomDictModel extends UITableModelAdapter<Object[]> implements Ac
this.setDefaultEditor(ParameterEditor.class, new ParameterEditor());
}
@Override
public Object getValueAt(int row, int column) {
Object[] os = this.getList().get(row);
return os[column];
}
@Override
public void setValueAt(Object value, int row, int column) {
Object[] os = this.getList().get(row);
os[column] = value;
@ -104,7 +105,7 @@ public class CustomDictModel extends UITableModelAdapter<Object[]> implements Ac
@Override
public void editingCanceled(ChangeEvent e) {
//do nothing
}
@Override

6
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java

@ -101,10 +101,10 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
@Override
protected void addKeyMonitor() {
searchField.addKeyListener(new KeyListener() {
@Override
public void keyTyped(KeyEvent e) {
//do nothing
}
@Override
@ -117,7 +117,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
@Override
public void keyReleased(KeyEvent e) {
//do nothing
}
});
}

21
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java

@ -521,6 +521,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
@Override
public void checkEnabled() {
//do nothing
}
}
@ -832,7 +833,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
}
private class XMLNodeTree extends JTree {
private DefaultTreeModel treeModel;
private DefaultTreeModel xmlTreeModel;
private DefaultTreeModel waitTreeModel = null;
@ -854,7 +855,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
private MouseListener treeMouseListener = new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
if (XMLNodeTree.this.getModel() != treeModel) {
if (XMLNodeTree.this.getModel() != xmlTreeModel) {
return;
}
int selRow = XMLNodeTree.this.getRowForLocation(e.getX(), e.getY());
@ -891,7 +892,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
}
public DefaultTreeModel getTreeModel() {
return treeModel;
return xmlTreeModel;
}
//防止界面卡死。
@ -908,7 +909,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
//wikky:为满足706设计时对不合法的xml文件(有多个根节点)的处理,把拿到的InputStream强制在最外层添加<XML></XML>作为唯一根节点而将文件转换为合法的xml。
private void initData() {
params = getEditorPaneParameter(); // 生成tree结构放哪儿呢?放这里感觉不对撒
treeModel = null;
xmlTreeModel = null;
selectedNode = null;
xmlColumnsList.clear();
DataSource dataSource = null;
@ -949,17 +950,17 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
loadedTreeModel();
}
if (treeModel == null) {
if (xmlTreeModel == null) {
FineLoggerFactory.getLogger().info("The file is wrong or bad, can not create the XMLReader.");
return;
}
if (treeModel.getChildCount(treeModel.getRoot()) == 1) {
treeModel = new DefaultTreeModel((ExpandMutableTreeNode) treeModel.getChild(treeModel.getRoot(), 0));
if (xmlTreeModel.getChildCount(xmlTreeModel.getRoot()) == 1) {
xmlTreeModel = new DefaultTreeModel((ExpandMutableTreeNode) xmlTreeModel.getChild(xmlTreeModel.getRoot(), 0));
} else {
ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot();
ExpandMutableTreeNode root = (ExpandMutableTreeNode) xmlTreeModel.getRoot();
root.setUserObject(StringUtils.EMPTY);
}
this.setModel(treeModel);
this.setModel(xmlTreeModel);
}
private void loadedTreeModel() {
@ -1011,7 +1012,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
}
currentNode = new ExpandMutableTreeNode(nodeName);
if (layer == 0) {
treeModel = new DefaultTreeModel(currentNode);
xmlTreeModel = new DefaultTreeModel(currentNode);
} else {
boolean conflict = false;
for (int i = 0; i < parentNode.getChildCount(); i++) {

5
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java

@ -144,12 +144,14 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"));
}
@Override
public void actionPerformed(ActionEvent e) {
refresh();
}
@Override
public void checkEnabled() {
//do nothing
}
}
@ -259,14 +261,17 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
private UIButton formulaButton;
private DocumentListener documentListener = new DocumentListener() {
@Override
public void changedUpdate(DocumentEvent e) {
updateFormula(formulaContentTextField.getText());
}
@Override
public void insertUpdate(DocumentEvent e) {
updateFormula(formulaContentTextField.getText());
}
@Override
public void removeUpdate(DocumentEvent e) {
updateFormula(formulaContentTextField.getText());
}

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

@ -187,6 +187,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
}
populateWorker = new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() throws Exception {
try {
storeProcedureContext.setText(StringUtils.EMPTY);
@ -204,6 +205,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
return null;
}
@Override
public void done() {
editorPane.populate(storeprocedure.getParameters());
}
@ -218,6 +220,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
*
* @param listener 监听器
*/
@Override
public void addStoreProcedureWorkerListener(StoreProcedureWorkerListener listener) {
this.storeProcedureWorkerListener = listener;
@ -227,6 +230,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
/**
* 去除存储过程监听器
*/
@Override
public void removeStoreProcedureWorkerListener() {
this.storeProcedureWorkerListener = null;
@ -264,6 +268,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
}
updateWorker = new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() throws Exception {
DesignTableDataManager.setThreadLocal(DesignTableDataManager.NO_PARAMETER);
sp.setCalculating(true);
@ -271,6 +276,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
return null;
}
@Override
public void done() {
DesignTableDataManager.setThreadLocal(DesignTableDataManager.NO_PARAMETER);
sp.setCalculating(false);
@ -328,6 +334,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
/**
* 响应数据集改变
*/
@Override
public void fireDSChanged() {
fireDSChanged(new HashMap<String, String>());
}
@ -337,6 +344,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
*
* @param map 改变的map
*/
@Override
public void fireDSChanged(Map<String, String> map) {
DesignTableDataManager.fireDSChanged(map);
}
@ -348,6 +356,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/preview.png"));
}
@Override
public void actionPerformed(ActionEvent evt) {
StoreProcedure sp = updateBeanWithOutExecute();
StoreProcedureDataWrapper storeProcedureDataWrappe = new StoreProcedureDataWrapper(sp, StringUtils.EMPTY, queryText.getText());
@ -361,12 +370,14 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"));
}
@Override
public void actionPerformed(ActionEvent e) {
refresh();
}
@Override
public void checkEnabled() {
//do nothing
}
}
}

2
designer-base/src/main/java/com/fr/design/dcm/UniversalDatabaseDialog.java

@ -27,6 +27,6 @@ public class UniversalDatabaseDialog extends UIDialog {
@Override
public void checkValid() throws Exception {
//do nothing
}
}

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

@ -7,6 +7,7 @@ public interface EditingState {
@Override
public void revert() {
//do nothing
}
};

4
designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java

@ -121,12 +121,12 @@ public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
@Override
public void addLayoutComponent(String name, Component comp) {
//do nothing
}
@Override
public void removeLayoutComponent(Component comp) {
//do nothing
}
@Override

1
designer-base/src/main/java/com/fr/design/dialog/JWizardDialog.java

@ -363,5 +363,6 @@ public class JWizardDialog extends BasicDialog {
@Override
public void checkValid() throws Exception {
//do nothing
}
}

19
designer-base/src/main/java/com/fr/design/editor/editor/WidgetNameEditor.java

@ -1,18 +1,17 @@
package com.fr.design.editor.editor;
import java.awt.BorderLayout;
import java.awt.Component;
import javax.swing.JList;
import javax.swing.event.PopupMenuEvent;
import javax.swing.event.PopupMenuListener;
import com.fr.design.DesignModelAdapter;
import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.icombobox.FilterComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.stable.js.WidgetName;
import javax.swing.JList;
import javax.swing.event.PopupMenuEvent;
import javax.swing.event.PopupMenuListener;
import java.awt.BorderLayout;
import java.awt.Component;
/**
* the editor to edit WidgetName
*
@ -43,12 +42,12 @@ public class WidgetNameEditor extends Editor<WidgetName> {
@Override
public void popupMenuCanceled(PopupMenuEvent e) {
//do nothing
}
@Override
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
//do nothing
}
@Override

2
designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java vendored

@ -64,7 +64,9 @@ public class LocalDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
writer.attr("path", path);
}
@Override
@SuppressWarnings("squid:S2975")
public Object clone() throws CloneNotSupportedException {
LocalDesignerWorkspaceInfo object = (LocalDesignerWorkspaceInfo)super.clone();

1
designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java vendored

@ -79,6 +79,7 @@ public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
}
@Override
@SuppressWarnings("squid:S2975")
public Object clone() throws CloneNotSupportedException {
RemoteDesignerWorkspaceInfo object = (RemoteDesignerWorkspaceInfo) super.clone();

4
designer-base/src/main/java/com/fr/design/extra/AppStoreBuilder.java

@ -10,10 +10,10 @@ package com.fr.design.extra;
public class AppStoreBuilder {
public void checkStoreJavaSciptVersion() {
//do nothing
}
public void updateStoreJavaScript() {
//do nothing
}
}

9
designer-base/src/main/java/com/fr/design/extra/LoginDialog.java

@ -4,12 +4,8 @@ import com.fr.design.dialog.UIDialog;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.StableUtils;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.Frame;
import javax.swing.*;
import java.awt.*;
/**
* Created by vito on 2017/5/5.
@ -41,5 +37,6 @@ public class LoginDialog extends UIDialog {
@Override
public void checkValid() throws Exception {
// do nothing
}
}

7
designer-base/src/main/java/com/fr/design/extra/LoginWebBridge.java

@ -14,10 +14,8 @@ import javafx.concurrent.Task;
import javafx.scene.web.WebEngine;
import netscape.javascript.JSObject;
import javax.swing.JDialog;
import javax.swing.SwingUtilities;
import java.awt.Color;
import java.awt.Desktop;
import javax.swing.*;
import java.awt.*;
import java.net.URI;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@ -221,5 +219,6 @@ public class LoginWebBridge {
}
public void openUrlAtLocalWebBrowser(WebEngine eng, String url) {
// do nothing
}
}

3
designer-base/src/main/java/com/fr/design/extra/PluginAbstractLoadingViewPane.java

@ -4,7 +4,6 @@ import com.fr.base.BaseUtils;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
@ -88,7 +87,7 @@ public abstract class PluginAbstractLoadingViewPane<V, T> extends PluginAbstract
@Override
public void pressInstallButton() {
// do nothing
}
@Override

5
designer-base/src/main/java/com/fr/design/extra/PluginControlPane.java

@ -7,7 +7,6 @@ import com.fr.design.gui.ilist.UIList;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.IOUtils;
import com.fr.plugin.context.PluginMarker;
import com.fr.plugin.license.Licensed;
import com.fr.plugin.manage.PluginManager;
@ -23,7 +22,7 @@ import javax.swing.event.DocumentListener;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.*;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
/**
@ -155,7 +154,7 @@ public class PluginControlPane extends BasicPane {
PluginManager.getController().uninstall(PluginMarker.create(id, version), true, new PluginTaskCallback() {
@Override
public void done(PluginTaskResult result) {
// do nothing
}
});
}

10
designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java

@ -13,11 +13,7 @@ import com.fr.plugin.manage.control.ProgressCallback;
import com.fr.plugin.view.PluginView;
import com.fr.stable.StringUtils;
import javax.swing.JComponent;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;
import java.io.File;
import java.util.List;
@ -98,7 +94,7 @@ public class PluginFromStorePane extends PluginAbstractLoadingViewPane<List<Plug
@Override
public void pressInstallButton() {
// do nothing
}
@Override
@ -174,7 +170,7 @@ public class PluginFromStorePane extends PluginAbstractLoadingViewPane<List<Plug
PluginManager.getController().install(chosenFile, new ProgressCallback() {
@Override
public void updateProgress(String description, double progress) {
// do nothing
}
@Override

3
designer-base/src/main/java/com/fr/design/extra/PluginUpdatePane.java

@ -4,7 +4,6 @@ import com.fr.config.MarketConfig;
import com.fr.design.extra.tradition.callback.UpdateOnlineCallback;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.context.PluginMarker;
@ -192,7 +191,7 @@ public class PluginUpdatePane extends PluginAbstractLoadingViewPane<List<PluginV
PluginManager.getController().update(chosenFile, new ProgressCallback() {
@Override
public void updateProgress(String description, double progress) {
// do nothing
}
@Override

10
designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java

@ -55,7 +55,7 @@ public class PluginWebBridge {
private static PluginWebBridge helper;
private UIDialog uiDialog;
private ACTIONS action;
private ACTIONS actions;
private Map<String, Object> config;
private WebEngine webEngine;
@ -94,10 +94,10 @@ public class PluginWebBridge {
* @return 配置信息
*/
public String getRunConfig() {
if (action != null) {
if (actions != null) {
JSONObject jsonObject = new JSONObject();
try {
jsonObject.put(ACTION, action.getContext());
jsonObject.put(ACTION, actions.getContext());
Set<String> keySet = config.keySet();
for (String key : keySet) {
jsonObject.put(key, config.get(key).toString());
@ -117,7 +117,7 @@ public class PluginWebBridge {
* @param config 参数
*/
public void setRunConfig(ACTIONS action, Map<String, Object> config) {
this.action = action;
this.actions = action;
this.config = config;
}
@ -125,7 +125,7 @@ public class PluginWebBridge {
* 清楚打开动作
*/
public void clearRunConfig() {
this.action = null;
this.actions = null;
this.config = null;
}

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

@ -3,7 +3,6 @@ package com.fr.design.extra;
import com.fr.design.dialog.UIDialog;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*;
import java.awt.*;
@ -27,6 +26,7 @@ public class QQLoginDialog extends UIDialog {
@Override
public void checkValid() throws Exception {
// do nothing
}
}

1
designer-base/src/main/java/com/fr/design/extra/ShopDialog.java

@ -29,5 +29,6 @@ public class ShopDialog extends UIDialog {
@Override
public void checkValid() throws Exception {
// do nothing
}
}

26
designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java

@ -21,26 +21,9 @@ import com.fr.third.javax.annotation.Nonnull;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.lock.TplOperator;
import javax.swing.BorderFactory;
import javax.swing.ButtonModel;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.*;
import javax.swing.plaf.basic.BasicMenuItemUI;
import java.awt.AWTEvent;
import java.awt.AlphaComposite;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.*;
import java.awt.event.AWTEventListener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -854,7 +837,7 @@ public class MutilTempalteTabPane extends JComponent {
*/
@Override
public void mouseEntered(MouseEvent e) {
// do nothing
}
/**
@ -877,6 +860,7 @@ public class MutilTempalteTabPane extends JComponent {
*/
@Override
public void mouseReleased(MouseEvent e) {
// do nothing
}
/**
@ -886,6 +870,7 @@ public class MutilTempalteTabPane extends JComponent {
*/
@Override
public void mouseClicked(MouseEvent e) {
// do nothing
}
/**
@ -957,6 +942,7 @@ public class MutilTempalteTabPane extends JComponent {
*/
@Override
public void mouseDragged(MouseEvent e) {
// do nothing
}
/**

2
designer-base/src/main/java/com/fr/design/file/NodeAuthProcessor.java

@ -135,7 +135,7 @@ public class NodeAuthProcessor {
* @param fileNode file nodes
* @return 带权限信息的文件节点
*/
public boolean fixFileNodeAuth(FileNode fileNode) {
public boolean checkFileNodeAuth(FileNode fileNode) {
boolean isLocal = WorkContext.getCurrent().isLocal();
boolean isRoot = WorkContext.getCurrent().isRoot();

22
designer-base/src/main/java/com/fr/design/formula/FormulaPane.java

@ -27,17 +27,7 @@ import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils;
import com.fr.stable.script.Expression;
import javax.swing.BorderFactory;
import javax.swing.DefaultListCellRenderer;
import javax.swing.DefaultListModel;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JTree;
import javax.swing.SwingUtilities;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.event.TreeSelectionEvent;
@ -47,10 +37,7 @@ import javax.swing.tree.DefaultTreeCellRenderer;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.MutableTreeNode;
import javax.swing.tree.TreePath;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
@ -148,10 +135,12 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
keyWordTextField.addKeyListener(new KeyListener() {
@Override
public void keyTyped(KeyEvent e) {
//do nothing
}
@Override
public void keyReleased(KeyEvent e) {
//do nothing
}
@Override
@ -236,7 +225,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
protected void extendCheckBoxPane(JPanel checkBoxPane) {
// do nothing
}
private void configFormulaArea() {
@ -412,6 +401,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
@Override
public void keyTyped(KeyEvent e) {
// do nothing
}
protected void search(String keyWord, boolean findDescription) {

23
designer-base/src/main/java/com/fr/design/fun/MultiStyleUIConfigProvider.java

@ -0,0 +1,23 @@
package com.fr.design.fun;
import com.fr.common.annotations.Open;
import com.fr.stable.fun.mark.Mutable;
import java.util.List;
/**
* Created by kerry on 2019-11-11
*/
@Open
public interface MultiStyleUIConfigProvider extends Mutable {
String XML_TAG = "MultiStyleUIConfigProvider";
int CURRENT_LEVEL = 1;
/**
* 获取配置项list
*
* @return 配置项list
*/
List<StyleUIConfigProvider> getConfigList();
}

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

@ -0,0 +1,39 @@
package com.fr.design.fun;
import com.fr.base.Style;
import com.fr.common.annotations.Open;
import com.fr.stable.fun.mark.Mutable;
import javax.swing.JComponent;
import javax.swing.event.ChangeListener;
/**
* Created by kerry on 2019-11-11
*/
@Open
public interface StyleUIConfigProvider extends Mutable {
String XML_TAG = "CustomStyleUIConfigProvider";
int CURRENT_LEVEL = 1;
/**
* @return 配置名
*/
String configName();
/**
* @param changeListener 需要添加的listener
* @return 对应的component
*/
JComponent uiComponent(ChangeListener changeListener);
/**
* @return 更新后的样式
*/
Style updateConfig();
/**
* @param style 待渲染的样式
*/
void populateConfig(Style style);
}

26
designer-base/src/main/java/com/fr/design/fun/impl/AbstractMultiStyleUIConfigProvider.java

@ -0,0 +1,26 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.StyleUIConfigProvider;
import com.fr.design.fun.MultiStyleUIConfigProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
import java.util.ArrayList;
import java.util.List;
/**
* Created by kerry on 2019-11-11
*/
@API(level = MultiStyleUIConfigProvider.CURRENT_LEVEL)
public abstract class AbstractMultiStyleUIConfigProvider extends AbstractProvider implements MultiStyleUIConfigProvider {
@Override
public List<StyleUIConfigProvider> getConfigList() {
return new ArrayList<StyleUIConfigProvider>();
}
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
}

41
designer-base/src/main/java/com/fr/design/fun/impl/AbstractStyleUIConfigProvider.java

@ -0,0 +1,41 @@
package com.fr.design.fun.impl;
import com.fr.base.Style;
import com.fr.design.fun.StyleUIConfigProvider;
import com.fr.stable.StringUtils;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
import javax.swing.JComponent;
import javax.swing.event.ChangeListener;
/**
* Created by kerry on 2019-11-11
*/
@API(level = StyleUIConfigProvider.CURRENT_LEVEL)
public class AbstractStyleUIConfigProvider extends AbstractProvider implements StyleUIConfigProvider {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String configName() {
return StringUtils.EMPTY;
}
@Override
public JComponent uiComponent(ChangeListener changeListener) {
return null;
}
@Override
public Style updateConfig() {
return null;
}
@Override
public void populateConfig(Style style) {
}
}

8
designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java

@ -437,18 +437,18 @@ public class UICalendarPanel extends JPanel {
};
}
protected EventListenerList listenerList = new EventListenerList();
protected EventListenerList eventlistenerList = new EventListenerList();
public void addDateChangeListener(ChangeListener l) {
listenerList.add(ChangeListener.class, l);
eventlistenerList.add(ChangeListener.class, l);
}
public void removeDateChangeListener(ChangeListener l) {
listenerList.remove(ChangeListener.class, l);
eventlistenerList.remove(ChangeListener.class, l);
}
protected void fireDateChanged(ChangeEvent e) {
Object[] listeners = listenerList.getListenerList();
Object[] listeners = eventlistenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == ChangeListener.class) {
((ChangeListener) listeners[i + 1]).stateChanged(e);

8
designer-base/src/main/java/com/fr/design/gui/frpane/UnitInputPane.java

@ -133,14 +133,17 @@ public abstract class UnitInputPane extends BasicPane {
@Override
public void keyTyped(KeyEvent arg0) {
// 敲击键盘,发生在按键按下后,按键放开前
}
@Override
public void keyReleased(KeyEvent arg0) {
// 松开按键时
}
@Override
public void keyPressed(KeyEvent arg0) {
// 按下按键时
changed = true;
}
};
@ -149,23 +152,28 @@ public abstract class UnitInputPane extends BasicPane {
@Override
public void mouseReleased(MouseEvent arg0) {
// 鼠标按键在组件上释放时
}
@Override
public void mousePressed(MouseEvent arg0) {
// 鼠标按键在组件上按下时
changed = true;
}
@Override
public void mouseExited(MouseEvent arg0) {
// 鼠标离开组件时
}
@Override
public void mouseEntered(MouseEvent arg0) {
// 鼠标进入到组件时
}
@Override
public void mouseClicked(MouseEvent arg0) {
// 鼠标按键在组件上单击时
}
};
}

4
designer-base/src/main/java/com/fr/design/gui/ibutton/UICombinationButton.java

@ -18,11 +18,11 @@ public class UICombinationButton extends JPanel{
protected UIButton rightButton;
protected void leftButtonClickEvent() {
// 左边按钮点击事件
}
protected void rightButtonClickEvent() {
// 右边按钮点击事件
}
public UICombinationButton() {

12
designer-base/src/main/java/com/fr/design/gui/ilable/ActionLabel.java

@ -1,5 +1,6 @@
package com.fr.design.gui.ilable;
import javax.swing.event.MouseInputAdapter;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Graphics;
@ -7,9 +8,6 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.event.MouseInputAdapter;
/**
* Action label
*/
@ -31,6 +29,7 @@ public class ActionLabel extends UILabel {
/**
* Repaints the text.
*/
@Override
public void paintComponent(Graphics _gfx) {
super.paintComponent(_gfx);
@ -39,12 +38,17 @@ public class ActionLabel extends UILabel {
}
private MouseInputAdapter mouseInputAdapter = new MouseInputAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
//do nothing
}
@Override
public void mousePressed(MouseEvent e) {
//do nothing
}
@Override
public void mouseReleased(MouseEvent evt) {
Object source = evt.getSource();
@ -65,6 +69,7 @@ public class ActionLabel extends UILabel {
}
}
@Override
public void mouseExited(MouseEvent evt) {
Object source = evt.getSource();
@ -73,6 +78,7 @@ public class ActionLabel extends UILabel {
}
}
@Override
public void mouseDragged(MouseEvent e) {
}

6
designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/RSyntaxUtilities.java

@ -518,6 +518,8 @@ public class RSyntaxUtilities implements SwingConstants {
}
numEmbedded--;
}
} else {
//do nothing
}
} // End of for (int i=segOffset; i<segOffset+charSegment.count; i++).
@ -584,6 +586,8 @@ public class RSyntaxUtilities implements SwingConstants {
}
numEmbedded--;
}
} else {
//do nothing
}
}
@ -961,6 +965,8 @@ public class RSyntaxUtilities implements SwingConstants {
i--;
}
offs = lineStart + i;
} else {
//do nothing
}
}

2
designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/folding/HtmlFoldParser.java

@ -172,7 +172,7 @@ public class HtmlFoldParser implements FoldParser {
// Continuing an MLC from a previous line
if (inMLC) {
// Found the end of the MLC starting on a previous line...
if (t.endsWith(MLC_END)) {
if (currentFold != null && t.endsWith(MLC_END)) {
int mlcEnd = t.getEndOffset() - 1;
currentFold.setEndOffset(mlcEnd);
Fold parentFold = currentFold.getParent();

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

@ -18,6 +18,7 @@ import java.io.IOException;
* on 9/18/19 6:12 PM from the specification file
* <tt>/Users/3dot141/Downloads/FolxDownload/App/jflex-1.4.1/bin/FormulaTokenMaker.flex</tt>
*/
@SuppressWarnings("squid:S1192")
public class FormulaTokenMaker extends AbstractJFlexCTokenMaker {
/** This character denotes the end of file */

8
designer-base/src/main/java/com/fr/file/FileNodeFILE.java

@ -23,7 +23,7 @@ import com.fr.workspace.WorkspaceEvent;
import com.fr.workspace.resource.WorkResourceTempRenameStream;
import com.fr.workspace.server.lock.TplOperator;
import javax.swing.Icon;
import javax.swing.*;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.OutputStream;
@ -68,14 +68,14 @@ public class FileNodeFILE implements FILE {
this.node = new FileNode(StableUtils.pathJoin(parentDir, name), isDir);
this.envPath = WorkContext.getCurrent().getPath();
this.hasFullAuth = NodeAuthProcessor.getInstance().fixFileNodeAuth(node);
this.hasFullAuth = NodeAuthProcessor.getInstance().checkFileNodeAuth(node);
}
public FileNodeFILE(FileNode node) {
this.node = node;
this.envPath = WorkContext.getCurrent().getPath();
this.hasFullAuth = NodeAuthProcessor.getInstance().fixFileNodeAuth(node);
this.hasFullAuth = NodeAuthProcessor.getInstance().checkFileNodeAuth(node);
}
public FileNodeFILE(FileNode node, boolean hasFullAuth) {
@ -91,7 +91,7 @@ public class FileNodeFILE implements FILE {
public FileNodeFILE(FileNode node, String envPath) {
this.node = node;
this.envPath = envPath;
this.hasFullAuth = NodeAuthProcessor.getInstance().fixFileNodeAuth(node);
this.hasFullAuth = NodeAuthProcessor.getInstance().checkFileNodeAuth(node);
}
public FileNodeFILE(FileNode node, String envPath, boolean hasFullAuth) {

10
designer-chart/src/main/java/com/fr/design/chart/ChartIcon.java

@ -44,6 +44,7 @@ public class ChartIcon implements Icon, XMLable {
* @param x 缩略图的起始坐标x
* @param y 缩略图的起始坐标y
*/
@Override
public void paintIcon(Component c, Graphics g, int x, int y) {
Graphics2D g2d = (Graphics2D) g;
@ -66,6 +67,7 @@ public class ChartIcon implements Icon, XMLable {
*
* @return int 缩略图宽度
*/
@Override
public int getIconWidth() {
return WIDTH;
}
@ -75,6 +77,7 @@ public class ChartIcon implements Icon, XMLable {
*
* @return int 缩略图高度
*/
@Override
public int getIconHeight() {
return HEIGHT;
}
@ -94,18 +97,21 @@ public class ChartIcon implements Icon, XMLable {
}
@Override
public void readXML(XMLableReader reader) {
//do nothing
}
@Override
public void writeXML(XMLPrintWriter writer) {
//do nothing
}
/**
* @return 克隆后的对象
* @throws CloneNotSupportedException 如果克隆失败则抛出此异常
*/
@Override
public Object clone() throws CloneNotSupportedException {
ChartIcon cloned = (ChartIcon) super.clone();
cloned.imagePath = this.imagePath;

30
designer-chart/src/main/java/com/fr/design/chart/gui/ChartComponent.java

@ -55,12 +55,12 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene
this();
populate(cc);
}
public ChartComponent(BaseChartCollection cc) {
this();
populate(cc);
}
public ChartComponent(ChartCollection cc, PropertyChangeListener l) {
this();
populate(cc);
@ -72,6 +72,7 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene
* 右键编辑 图表编辑层的监听事件, 在停止编辑时 响应整个编辑模板(form, sheet)的改变.
* @param l 监听事件
*/
@Override
public void addStopEditingListener(PropertyChangeListener l) {
if (!listeners.contains(l)) {
listeners.add(l);
@ -87,6 +88,7 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene
/**
* 停止编辑, 通知事情, 刷新画出新界面.
*/
@Override
public void reset() {
fireStopEditing();
@ -97,6 +99,7 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene
repaint();
}
@Override
public void populate(BaseChartCollection cc) { // kunsnat_bug: 5471 实现设置的即时预览
try {// clone 为了判断编辑前后的值.
this.chartCollection4Design = (ChartCollection)cc;
@ -107,6 +110,7 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene
reset();
}
@Override
public BaseChartCollection update() {
return this.chartCollection4Design;
}
@ -180,53 +184,63 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene
* @param event 鼠标事件
* 不设置鼠标点击跳转事件
*/
@Override
public void mouseClicked(MouseEvent event) {
//do nothing
}
/**
* 鼠标按压
* @param e 鼠标事件
*/
@Override
public void mousePressed(MouseEvent e) {
//do nothing
}
/**
* 鼠标松开
* @param e 鼠标事件
*/
public void mouseReleased(MouseEvent e) {
@Override
public void mouseReleased(MouseEvent e) {
//do nothing
}
/**
* 鼠标进入
* @param e 鼠标事件
*/
@Override
public void mouseEntered(MouseEvent e) {
//do nothing
}
/**
* 鼠标退出
* @param e 鼠标事件
*/
@Override
public void mouseExited(MouseEvent e) {
//do nothing
}
/**
* 鼠标拖拽
* @param e 鼠标事件
*/
public void mouseDragged(MouseEvent e) {
@Override
public void mouseDragged(MouseEvent e) {
//do nothing
}
/**
* 鼠标移动
* @param e 鼠标事件
*/
@Override
public void mouseMoved(MouseEvent e) {
//do nothing
}
private boolean needRefreshChartGlyph() {

5
designer-chart/src/main/java/com/fr/design/chartx/CustomChartDataPane.java

@ -3,6 +3,8 @@ package com.fr.design.chartx;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.CustomChartDataDefinition;
import com.fr.design.chartx.fields.diff.GaugeCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.GaugeDataSetFieldsPane;
import com.fr.design.chartx.fields.diff.MultiCategoryCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.MultiCategoryDataSetFieldsPane;
import com.fr.design.chartx.fields.diff.ScatterCellDataFieldsPane;
@ -86,8 +88,7 @@ public class CustomChartDataPane extends ChartDataPane {
case RING:
case SLOT:
case CUVETTE:
//todo 仪表板没写好
return new SingleDataPane(new SingleCategoryDataSetFieldsPane(), new SingleCategoryCellDataFieldsPane());
return new SingleDataPane(new GaugeDataSetFieldsPane(), new GaugeCellDataFieldsPane());
case SCATTER:
case BUBBLE:
return new SingleDataPane(new ScatterDataSetFieldsPane(), new ScatterCellDataFieldsPane());

4
designer-chart/src/main/java/com/fr/design/chartx/component/CellDataSeriesXYValueCorrelationPane.java

@ -37,7 +37,7 @@ public class CellDataSeriesXYValueCorrelationPane extends AbstractCorrelationPan
field.getSeriesName().getFieldName(),
field.getXField().getFieldName(),
field.getYField().getFieldName(),
field.getValueField().getFieldName()
field.getSizeField().getFieldName()
};
result.add(array);
}
@ -57,7 +57,7 @@ public class CellDataSeriesXYValueCorrelationPane extends AbstractCorrelationPan
bubbleColumnField.setSeriesName(series);
bubbleColumnField.setXField(xField);
bubbleColumnField.setYField(yField);
bubbleColumnField.setValueField(value);
bubbleColumnField.setSizeField(value);
bubbleColumnFieldList.add(bubbleColumnField);
}

82
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/GaugeCellDataFieldsPane.java

@ -0,0 +1,82 @@
package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.GaugeColumnFieldCollection;
import com.fr.design.chartx.component.AbstractSingleFilterPane;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.i18n.Toolkit;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
/**
* Created by Wim on 2019/11/07.
*/
public class GaugeCellDataFieldsPane extends AbstractCellDataFieldsPane<GaugeColumnFieldCollection> {
private TinyFormulaPane category;
private TinyFormulaPane value;
private AbstractSingleFilterPane filterPane;
@Override
protected void initComponents() {
category = new TinyFormulaPane();
value = new TinyFormulaPane();
filterPane = new AbstractSingleFilterPane() {
@Override
public String title4PopupWindow() {
return Toolkit.i18nText("Fine-Design_Chart_Category");
}
};
JPanel northPane = new JPanel(new BorderLayout(0, 6));
northPane.add(createCenterPane(), BorderLayout.CENTER);
northPane.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 8));
this.setLayout(new BorderLayout(0, 6));
this.add(northPane, BorderLayout.NORTH);
JPanel contentPane = new JPanel(new BorderLayout());
contentPane.add(new JPanel(), BorderLayout.NORTH);
contentPane.add(filterPane, BorderLayout.CENTER);
this.add(TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), contentPane), BorderLayout.CENTER);
}
@Override
protected JPanel createSouthPane() {
return filterPane;
}
@Override
protected String[] fieldLabels() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Style_Format_Category_Name"),
Toolkit.i18nText("Fine-Design_Chart_Pointer_Value")
};
}
@Override
protected TinyFormulaPane[] formulaPanes() {
return new TinyFormulaPane[]{
category, value
};
}
@Override
public GaugeColumnFieldCollection updateBean() {
GaugeColumnFieldCollection gauge = new GaugeColumnFieldCollection();
updateField(category, gauge.getCategory());
updateField(value, gauge.getValue());
filterPane.updateBean(gauge.getCategory().getFilterProperties());
return gauge;
}
@Override
public void populateBean(GaugeColumnFieldCollection ob) {
populateField(category, ob.getCategory());
populateField(value, ob.getValue());
filterPane.populateBean(ob.getCategory().getFilterProperties());
}
}

84
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/GaugeDataSetFieldsPane.java

@ -0,0 +1,84 @@
package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.GaugeColumnFieldCollection;
import com.fr.design.chartx.component.AbstractSingleFilterPane;
import com.fr.design.chartx.fields.AbstractDataSetFieldsPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.i18n.Toolkit;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import java.awt.BorderLayout;
/**
* Created by Wim on 2019/11/07.
*/
public class GaugeDataSetFieldsPane extends AbstractDataSetFieldsPane<GaugeColumnFieldCollection> {
private UIComboBox category;
private UIComboBox value;
private AbstractSingleFilterPane filterPane;
@Override
protected void initComponents() {
category = new UIComboBox();
value = new UIComboBox();
filterPane = new AbstractSingleFilterPane() {
@Override
public String title4PopupWindow() {
return Toolkit.i18nText("Fine-Design_Chart_Category");
}
};
JPanel northPane = new JPanel(new BorderLayout(0, 6));
northPane.add(new JSeparator(), BorderLayout.CENTER);
northPane.add(createCenterPane(), BorderLayout.SOUTH);
northPane.setBorder(BorderFactory.createEmptyBorder(4, 24, 0, 15));
this.setLayout(new BorderLayout(0, 6));
this.add(northPane, BorderLayout.NORTH);
JPanel contentPane = new JPanel(new BorderLayout());
contentPane.add(new JPanel(), BorderLayout.NORTH);
contentPane.add(filterPane, BorderLayout.CENTER);
this.add(TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), contentPane), BorderLayout.CENTER);
}
@Override
protected String[] fieldLabels() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Style_Format_Category_Name"),
Toolkit.i18nText("Fine-Design_Chart_Pointer_Value")
};
}
@Override
protected UIComboBox[] filedComboBoxes() {
return new UIComboBox[]{
category, value
};
}
@Override
public GaugeColumnFieldCollection updateBean() {
GaugeColumnFieldCollection gauge = new GaugeColumnFieldCollection();
updateField(category, gauge.getCategory());
updateField(value, gauge.getValue());
filterPane.updateBean(gauge.getCategory().getFilterProperties());
return gauge;
}
@Override
public void populateBean(GaugeColumnFieldCollection ob) {
populateField(category, ob.getCategory());
populateField(value, ob.getValue());
filterPane.populateBean(ob.getCategory().getFilterProperties());
}
}

22
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieCellDataFieldsPane.java

@ -4,10 +4,19 @@ import com.fr.chartx.data.field.diff.MultiPieColumnFieldCollection;
import com.fr.design.chartx.component.MultiTinyFormulaPaneWithUISpinner;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Component;
/**
* Created by shine on 2019/6/18.
@ -30,7 +39,18 @@ public class MultiPieCellDataFieldsPane extends AbstractCellDataFieldsPane<Multi
@Override
protected JPanel createNorthPane() {
return levelPane;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"), SwingConstants.LEFT), nameField}
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, new double[]{p}, new double[]{ChartDataPane.LABEL_WIDTH, 122}, 0, 6);
panel.setBorder(BorderFactory.createEmptyBorder(6, 0, 0, 15));
JPanel northPane = new JPanel(new BorderLayout(0, 6));
northPane.add(panel, BorderLayout.NORTH);
northPane.add(new JSeparator(), BorderLayout.CENTER);
northPane.add(levelPane, BorderLayout.SOUTH);
return northPane;
}
@Override

25
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieDataSetFieldsPane.java

@ -4,11 +4,19 @@ import com.fr.chartx.data.field.diff.MultiPieColumnFieldCollection;
import com.fr.design.chartx.component.MultiComboBoxPaneWithUISpinner;
import com.fr.design.chartx.fields.AbstractDataSetFieldsPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.CalculateComboBox;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.List;
@ -35,7 +43,20 @@ public class MultiPieDataSetFieldsPane extends AbstractDataSetFieldsPane<MultiPi
@Override
protected JPanel createNorthPane() {
return levelComboBoxPane;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"), SwingConstants.LEFT), nameField}
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, new double[]{p}, new double[]{ChartDataPane.LABEL_WIDTH, 122}, 0, 6);
panel.setBorder(BorderFactory.createEmptyBorder(6, 0, 0, 15));
JPanel northPane = new JPanel(new BorderLayout(0, 6));
northPane.add(panel, BorderLayout.NORTH);
northPane.add(new JSeparator(), BorderLayout.CENTER);
northPane.add(levelComboBoxPane, BorderLayout.SOUTH);
return northPane;
}
@ -85,7 +106,7 @@ public class MultiPieDataSetFieldsPane extends AbstractDataSetFieldsPane<MultiPi
@Override
public MultiPieColumnFieldCollection updateBean() {
MultiPieColumnFieldCollection result = new MultiPieColumnFieldCollection();
result.setTargetName(nameField.getName());
result.setTargetName(nameField.getText());
levelComboBoxPane.update(result.getLevels());

12
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/ScatterDataSetFieldsPane.java

@ -22,7 +22,7 @@ public class ScatterDataSetFieldsPane extends AbstractDataSetFieldsPane<BubbleCo
private UIComboBoxWithNone series;
private UIComboBox xField;
private UIComboBox yField;
private UIComboBoxWithNone value;
private UIComboBoxWithNone size;
//todo 数据筛选
private AbstractSingleFilterPane filterPane;
@ -34,7 +34,7 @@ public class ScatterDataSetFieldsPane extends AbstractDataSetFieldsPane<BubbleCo
series = new UIComboBoxWithNone();
xField = new UIComboBox();
yField = new UIComboBox();
value = new UIComboBoxWithNone();
size = new UIComboBoxWithNone();
filterPane = new AbstractSingleFilterPane() {
@Override
@ -59,7 +59,7 @@ public class ScatterDataSetFieldsPane extends AbstractDataSetFieldsPane<BubbleCo
@Override
protected UIComboBox[] filedComboBoxes() {
return new UIComboBox[]{
series, xField, yField, value
series, xField, yField, size
};
}
@ -80,7 +80,8 @@ public class ScatterDataSetFieldsPane extends AbstractDataSetFieldsPane<BubbleCo
updateField(series, field.getSeriesName());
updateField(xField, field.getXField());
updateField(yField, field.getYField());
updateField(value, field.getValueField());
updateField(size, field.getSizeField());
filterPane.updateBean(field.getSeriesName().getFilterProperties());
return collection;
}
@ -90,6 +91,7 @@ public class ScatterDataSetFieldsPane extends AbstractDataSetFieldsPane<BubbleCo
populateField(series, field.getSeriesName());
populateField(xField, field.getXField());
populateField(yField, field.getYField());
populateField(value, field.getValueField());
populateField(size, field.getSizeField());
filterPane.populateBean(field.getSeriesName().getFilterProperties());
}
}

9
designer-chart/src/main/java/com/fr/design/chartx/single/CellDataPane.java

@ -4,8 +4,11 @@ import com.fr.chartx.data.CellDataDefinition;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.i18n.Toolkit;
import com.fr.stable.AssistUtils;
import java.awt.BorderLayout;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
/**
* Created by shine on 2019/5/21.
@ -43,7 +46,11 @@ public class CellDataPane extends FurtherBasicBeanPane<CellDataDefinition> {
@Override
public void populateBean(CellDataDefinition ob) {
cellDataFieldsPane.populateBean(ob.getColumnFieldCollection());
Type dataType = ((ParameterizedType) cellDataFieldsPane.getClass().getGenericSuperclass()).getActualTypeArguments()[0];
if (AssistUtils.equals(ob.getColumnFieldCollection().getClass(), dataType)) {
cellDataFieldsPane.populateBean(ob.getColumnFieldCollection());
}
}
@Override

8
designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java

@ -11,9 +11,12 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.DatabaseTableDataPane;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.stable.AssistUtils;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;
/**
@ -101,8 +104,11 @@ public class DataSetPane extends FurtherBasicBeanPane<DataSetDefinition> {
checkBoxUse();
tableDataPane.populateBean(ob.getNameTableData());
Type dataType = ((ParameterizedType) dataSetFieldsPane.getClass().getGenericSuperclass()).getActualTypeArguments()[0];
if (AssistUtils.equals(ob.getColumnFieldCollection().getClass(), dataType)) {
dataSetFieldsPane.populateBean(ob.getColumnFieldCollection());
}
dataSetFieldsPane.populateBean(ob.getColumnFieldCollection());
}
@Override

29
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/GisMapPlotPane.java

@ -25,7 +25,7 @@ public class GisMapPlotPane extends AbstractDeprecatedChartTypePane {
private static final long serialVersionUID = 2595221900000305396L;
private static final int GISMAP = 0;
private UITextField keyInput;
public GisMapPlotPane(){
@ -34,7 +34,7 @@ public class GisMapPlotPane extends AbstractDeprecatedChartTypePane {
Component[][] components = null;
styleList = createStyleList();
checkDemosBackground();
JPanel layoutPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(4);
@ -45,7 +45,7 @@ public class GisMapPlotPane extends AbstractDeprecatedChartTypePane {
tmp.setDemoGroup(styleList.toArray(new ChartSelectDemoPane[styleList.size()]));
}
}
keyInput = new UITextField();
double[] columnSize = { f };
@ -58,16 +58,16 @@ public class GisMapPlotPane extends AbstractDeprecatedChartTypePane {
new Component[]{keyInput},
};
}
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
}
@Override
public void reLayout(String chartID){
//do nothing
}
@Override
@ -93,7 +93,8 @@ public class GisMapPlotPane extends AbstractDeprecatedChartTypePane {
return ChartConstants.GIS_CHAER;
}
protected String[] getTypeLayoutPath() {
@Override
protected String[] getTypeLayoutPath() {
return new String[]{"/com/fr/design/images/chart/GisMapPlot/layout/0.png",
"/com/fr/design/images/chart/GisMapPlot/layout/1.png",
};
@ -110,6 +111,7 @@ public class GisMapPlotPane extends AbstractDeprecatedChartTypePane {
/**
* 保存界面属性
*/
@Override
public void updateBean(Chart chart) {
if(needsResetChart(chart)){
resetChart(chart);
@ -126,14 +128,14 @@ public class GisMapPlotPane extends AbstractDeprecatedChartTypePane {
} else {
plot = new GisMapPlot();
}
try {
chart.switchPlot((Plot)plot.clone());
} catch (CloneNotSupportedException e) {
FineLoggerFactory.getLogger().error("Error In LineChart");
chart.switchPlot(new GisMapPlot());
}
plot = (GisMapPlot) chart.getPlot();
boolean index = plot.isGisType();
if(styleList.get(BAIDU).isPressing){
@ -141,7 +143,7 @@ public class GisMapPlotPane extends AbstractDeprecatedChartTypePane {
}else{
plot.setGisType(false);
}
if(index != plot.isGisType()){
if(plot.isGisType()){
this.keyInput.setText(plot.getBaiduKey());
@ -161,6 +163,7 @@ public class GisMapPlotPane extends AbstractDeprecatedChartTypePane {
/**
* 更新界面内容
*/
@Override
public void populateBean(Chart chart) {
GisMapPlot plot = (GisMapPlot) chart.getPlot();
@ -168,7 +171,7 @@ public class GisMapPlotPane extends AbstractDeprecatedChartTypePane {
styleList.get(BAIDU).isPressing = true;
styleList.get(GOOGLE).isPressing = false;
keyInput.setText(plot.getBaiduKey());
}else{
styleList.get(GOOGLE).isPressing = true;
styleList.get(BAIDU).isPressing =false;
@ -182,6 +185,7 @@ public class GisMapPlotPane extends AbstractDeprecatedChartTypePane {
* 界面标题
* @return 标题
*/
@Override
public String title4PopupWindow() {
return Toolkit.i18nText("Fine-Design_Chart_GIS_Map_OLD");
}
@ -195,7 +199,8 @@ public class GisMapPlotPane extends AbstractDeprecatedChartTypePane {
}
public Chart getDefaultChart() {
@Override
public Chart getDefaultChart() {
return GisMapIndependentChart.gisChartTypes[0];
}
}

23
designer-chart/src/main/java/com/fr/van/chart/bubble/BubbleIndependentVanChartInterface.java

@ -1,11 +1,14 @@
package com.fr.van.chart.bubble;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.AbstractVanSingleDataPane;
import com.fr.design.chartx.fields.diff.ScatterCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.ScatterDataSetFieldsPane;
import com.fr.design.chartx.fields.diff.SingleCategoryCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.SingleCategoryDataSetFieldsPane;
import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
@ -18,6 +21,7 @@ import com.fr.design.mainframe.chart.gui.data.report.BubblePlotReportDataContent
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.plugin.chart.bubble.VanChartBubblePlot;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.bubble.data.VanChartBubblePlotTableDataContentPane;
import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort;
import com.fr.van.chart.designer.other.VanChartOtherPane;
@ -123,8 +127,27 @@ public class BubbleIndependentVanChartInterface extends AbstractIndependentVanCh
@Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractVanSingleDataPane(listener) {
VanChartBubblePlot plot;
@Override
public void populate(ChartCollection collection) {
if (collection == null) {
return;
}
VanChart chart = collection.getSelectedChartProvider(VanChart.class);
if (chart == null) {
return;
}
plot = chart.getPlot();
super.populate(collection);
}
@Override
protected SingleDataPane createSingleDataPane() {
if (plot != null && plot.isForceBubble()) {
return new SingleDataPane(new SingleCategoryDataSetFieldsPane(), new SingleCategoryCellDataFieldsPane());
}
return new SingleDataPane(new ScatterDataSetFieldsPane(), new ScatterCellDataFieldsPane());
}
};

3
designer-chart/src/main/java/com/fr/van/chart/custom/CustomIndependentVanChartInterface.java

@ -1,5 +1,6 @@
package com.fr.van.chart.custom;
import com.fr.design.chartx.CustomChartDataPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
@ -73,6 +74,6 @@ public class CustomIndependentVanChartInterface extends AbstractIndependentVanCh
}
public ChartDataPane getChartDataPane(AttributeChangeListener listener){
return new VanChartCustomDataPane(listener);
return new CustomChartDataPane(listener);
}
}

19
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePane.java

@ -33,6 +33,7 @@ public class VanChartLineTypePane extends BasicPane {
private UIButtonGroup nullValueBreak;//空值断开
private JPanel lineWidthPane;
private JPanel lineStylePane;
public VanChartLineTypePane() {
@ -42,13 +43,6 @@ public class VanChartLineTypePane extends BasicPane {
nullValueBreak = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Open"), Toolkit.i18nText("Fine-Design_Chart_Close")});
lineTypeComboBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
checkLineWidth();
}
});
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
@ -62,11 +56,11 @@ public class VanChartLineTypePane extends BasicPane {
Arrays.fill(row, p);
double[] col = {f, e};
JPanel contentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
lineStylePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
this.setLayout(new BorderLayout(0, 6));
this.add(typeAndWidthPane, BorderLayout.NORTH);
this.add(contentPane, BorderLayout.CENTER);
this.add(lineStylePane, BorderLayout.CENTER);
}
private JPanel createTypeAndWidthPane() {
@ -79,6 +73,7 @@ public class VanChartLineTypePane extends BasicPane {
@Override
public void actionPerformed(ActionEvent e) {
checkLineWidth();
checkLineStyle();
}
});
@ -124,6 +119,12 @@ public class VanChartLineTypePane extends BasicPane {
}
}
private void checkLineStyle() {
if (lineStylePane != null && lineTypeComboBox != null) {
lineStylePane.setVisible(!ComparatorUtils.equals(lineTypeComboBox.getSelectedItem(),LineType.NONE));
}
}
public void checkLarge(boolean large) {
if (large) {
lineTypeComboBox.setSelectedItem(LineType.NONE);

79
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTrendLinePane.java

@ -1,29 +1,29 @@
package com.fr.van.chart.designer.component;
import com.fr.chart.base.AttrColor;
import com.fr.chart.base.AttrLineStyle;
import com.fr.chart.base.LineStyleInfo;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.plugin.chart.base.TrendLineType;
import com.fr.plugin.chart.base.VanChartAttrTrendLine;
import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.plugin.chart.type.LineType;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* Created by Mitisky on 15/10/19.
@ -33,62 +33,90 @@ public class VanChartTrendLinePane extends BasicPane{
private UITextField trendLineName;
private ColorSelectBox trendLineColor;
private LineComboBox trendLineStyle;//线型
private LineTypeComboBox trendLineStyle;//线型
private UISpinner lineWidthSpinner;//线宽
private UIComboBox trendLineType;//趋势线函数类型
private UISpinner prePeriod;
private UISpinner afterPeriod;
private JPanel trendLineHidePane;
public VanChartTrendLinePane() {
this.setLayout(new BorderLayout());
initComponents();
}
private void initComponents(){
this.setLayout(new BorderLayout(0,6));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p,p,p,p,p,p};
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] col = {f, e};
trendLineName = new UITextField();
trendLineColor = new ColorSelectBox(100);
trendLineStyle = new LineComboBox(VanChartConstants.ALERT_LINE_STYLE);
trendLineStyle = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.NORMAL, LineType.DASH});
lineWidthSpinner = new UISpinner(0.5, Integer.MAX_VALUE, 0.5, 2);
trendLineType = new UIComboBox(TYPES);
prePeriod = new UISpinner(0, Integer.MAX_VALUE, 1, 0);
afterPeriod = new UISpinner(0, Integer.MAX_VALUE, 1, 0);
double[] r = {p, p};
double[] c = {f, p, f, p};
Component[][] periodComps = new Component[][]{
new Component[]{prePeriod, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cycle")), afterPeriod, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cycle"))},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_TrendLine_Forward")), null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_After_Period")), null},
new Component[]{prePeriod, new UILabel(Toolkit.i18nText("Fine-Design_Chart_Cycle")), afterPeriod, new UILabel(Toolkit.i18nText("Fine-Design_Chart_Cycle"))},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_TrendLine_Forward")), null, new UILabel(Toolkit.i18nText("Fine-Design_Chart_After_Period")), null},
};
JPanel periodPane = TableLayoutHelper.createTableLayoutPane(periodComps, r, c);
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Period"));
UILabel label = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Period"));
label.setVerticalAlignment(SwingConstants.TOP);
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Name")), trendLineName},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Name")), trendLineName},
new Component[]{
FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")),
UIComponentUtils.wrapWithBorderLayoutPane(trendLineStyle)
}
};
Component[][] componentsMayHide = new Component[][]{
new Component[]{
FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style")),
UIComponentUtils.wrapWithBorderLayoutPane(trendLineStyle)
},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")), trendLineColor},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Type")), trendLineType},
FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Line_Width")),
UIComponentUtils.wrapWithBorderLayoutPane(lineWidthSpinner)},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), trendLineColor},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Type")), trendLineType},
new Component[]{label, periodPane}
};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p,p,p}, col);
trendLineHidePane = TableLayout4VanChartHelper.createGapTableLayoutPane(componentsMayHide, new double[]{p,p,p,p}, col);
trendLineStyle.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
checkHidePaneVisible();
}
});
checkHidePaneVisible();
this.add(panel, BorderLayout.CENTER);
this.add(trendLineHidePane, BorderLayout.SOUTH);
}
protected String title4PopupWindow(){
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_TrendLine");
return Toolkit.i18nText("Fine-Design_Chart_TrendLine");
}
public void populate(VanChartAttrTrendLine trendLine) {
checkHidePaneVisible();
if(trendLine != null){
trendLineName.setText(trendLine.getTrendLineName());
LineStyleInfo lineStyleInfo = trendLine.getLineStyleInfo();
trendLineColor.setSelectObject(lineStyleInfo.getAttrLineColor().getSeriesColor());
trendLineStyle.setSelectedLineStyle(lineStyleInfo.getAttrLineStyle().getLineStyle());
trendLineStyle.setSelectedItem(lineStyleInfo.getAttrLineStyle().getLineType());
lineWidthSpinner.setValue(lineStyleInfo.getAttrLineStyle().getLineWidth());
trendLineType.setSelectedItem(trendLine.getTrendLineType());
prePeriod.setValue(trendLine.getPrePeriod());
afterPeriod.setValue(trendLine.getAfterPeriod());
@ -100,7 +128,8 @@ public class VanChartTrendLinePane extends BasicPane{
trendLine.setTrendLineName(trendLineName.getText());
LineStyleInfo lineStyleInfo = trendLine.getLineStyleInfo();
lineStyleInfo.setAttrLineStyle(new AttrLineStyle(trendLineStyle.getSelectedLineStyle()));
lineStyleInfo.getAttrLineStyle().setLineWidth(lineWidthSpinner.getValue());
lineStyleInfo.getAttrLineStyle().setLineType((LineType) trendLineStyle.getSelectedItem());
lineStyleInfo.setAttrLineColor(new AttrColor(trendLineColor.getSelectObject()));
trendLine.setTrendLineType((TrendLineType) trendLineType.getSelectedItem());
@ -110,4 +139,10 @@ public class VanChartTrendLinePane extends BasicPane{
return trendLine;
}
private void checkHidePaneVisible(){
if (trendLineHidePane != null && trendLineStyle != null){
trendLineHidePane.setVisible(trendLineStyle.getSelectedItem() != LineType.NONE);
}
}
}

1
designer-chart/src/main/java/com/fr/van/chart/designer/other/zoom/ZoomPaneWithOutMode.java

@ -13,5 +13,6 @@ public class ZoomPaneWithOutMode extends ZoomPane {
@Override
protected void initCustomModePane(double[] columnSize, double p) {
//do nothing
}
}

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

@ -385,6 +385,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected void checkAllUse() {
checkCardPane();
checkLabelPane();
limitPane.checkMaxProPortionUse();
}
protected void checkCardPane() {

4
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java

@ -57,6 +57,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
super(isXAxis);
}
@Override
protected JPanel createContentPane(boolean isXAxis){
double p = TableLayout.PREFERRED;
@ -81,6 +82,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
@Override
protected void addOverlapGroupButton(JPanel panel) {
//do nothing
}
private JPanel createValueDefinition(){
@ -93,6 +95,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
return PlotFactory.createAutoFormatPane();
}
@Override
protected void checkFormatType() {
valueFormat.setComboBoxModel(true);
}
@ -104,6 +107,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
timeMinMaxValuePane.update(timeAxis);
}
@Override
public VanChartTimeAxis updateBean(String axisName, int position) {
VanChartTimeAxis axis = new VanChartTimeAxis(axisName, VanChartConstants.AXIS_BOTTOM);
updateBean(axis);

4
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartValueAxisPane.java

@ -38,6 +38,7 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
super(isXAxis);
}
@Override
protected JPanel createContentPane(boolean isXAxis){
double p = TableLayout.PREFERRED;
@ -62,6 +63,7 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
@Override
protected void addOverlapGroupButton(JPanel panel) {
//do nothing
}
protected JPanel createMinMaxValuePane(double[] row, double[] col){
@ -126,6 +128,7 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Value_Axis");
}
@Override
public void populateBean(VanChartAxis axis){
VanChartValueAxis valueAxis = (VanChartValueAxis)axis;
super.populateBean(valueAxis);
@ -153,6 +156,7 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
}
}
@Override
public VanChartValueAxis updateBean(String axisName, int position){
VanChartValueAxis axis = new VanChartValueAxis(axisName, position);
updateBean(axis);

1
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java

@ -54,6 +54,7 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
return new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART);
}
@Override
protected JPanel createMinMaxValuePane(double[] row, double[] col) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;

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

@ -5,9 +5,9 @@ import com.fr.base.Utils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.style.FRFontPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
@ -16,12 +16,12 @@ import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
import com.fr.general.GeneralUtils;
import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.attr.axis.VanChartAlertValue;
import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.plugin.chart.type.LineType;
import com.fr.stable.Constants;
import com.fr.stable.StableUtils;
import com.fr.van.chart.designer.component.LineTypeComboBox;
import javax.swing.BoxLayout;
import javax.swing.JPanel;
@ -42,7 +42,8 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
private static final long serialVersionUID = -1208941770684286439L;
private UIButtonGroup alertAxis;
protected TinyFormulaPane alertValue;
protected LineComboBox alertLineStyle;
protected LineTypeComboBox alertLineStyle;//线型
private UISpinner lineWidthSpinner;//线宽
protected ColorSelectBox alertLineColor;
private UIButtonGroup alertTextPosition;
@ -63,7 +64,8 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
//設置大小,防止文本過長導致界面“變形”
alertValue.setPreferredSize(new Dimension(VALUE_WD, HT));
alertLineStyle = new LineComboBox(VanChartConstants.ALERT_LINE_STYLE);
alertLineStyle = new LineTypeComboBox(new LineType[]{LineType.NORMAL, LineType.DASH});
lineWidthSpinner = new UISpinner(0.5, Integer.MAX_VALUE, 0.5, 2);
alertLineColor = new ColorSelectBox(100);
alertTextPosition = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Top"),com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Bottom")});
alertText = new TinyFormulaPane();
@ -95,7 +97,7 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
{
double p = TableLayout.PREFERRED;
double[] columnSize = {p,p};
double[] rowSize = {p,p,p,p};
double[] rowSize = {p,p,p,p,p};
Component[][] components = getTopPaneComponents();
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
@ -106,6 +108,7 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout_Position")),alertAxis},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Value")),alertValue},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style")),alertLineStyle},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Width")), lineWidthSpinner},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")),alertLineColor},
};
}
@ -154,7 +157,8 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
checkPositionPane();
alertValue.populateBean(Utils.objectToString(chartAlertValue.getAlertValueFormula()));
alertLineStyle.setSelectedLineStyle(chartAlertValue.getLineStyle().getLineStyle());
alertLineStyle.setSelectedItem(chartAlertValue.getLineStyle().getLineType());
lineWidthSpinner.setValue(chartAlertValue.getLineStyle().getLineWidth());
alertLineColor.setSelectObject(chartAlertValue.getLineColor().getSeriesColor());
if(VanChartAttrHelper.isXAxis(chartAlertValue.getAxisName())){
@ -178,7 +182,8 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
chartAlertValue.setAlertValueFormula(BaseFormula.createFormulaBuilder().build(alertValue.updateBean()));
chartAlertValue.getLineColor().setSeriesColor(alertLineColor.getSelectObject());
chartAlertValue.getLineStyle().setLineStyle(alertLineStyle.getSelectedLineStyle());
chartAlertValue.getLineStyle().setLineType((LineType) alertLineStyle.getSelectedItem());
chartAlertValue.getLineStyle().setLineWidth(lineWidthSpinner.getValue());
String contentString = alertText.updateBean();
Object contentObj;

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

@ -4,14 +4,16 @@ import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.type.LineType;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.LineTypeComboBox;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
@ -39,11 +41,21 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
private ColorSelectBox verticalColorBackground;
protected BackgroundListControlPane customIntervalBackground;
private LineTypeComboBox horizonLineType;//横向线型
private LineTypeComboBox verticalLineType;//纵向线型
private JPanel horizontalColorPane;
private JPanel verticalColorPane;
public VanChartAxisAreaPane() {
initComponents();
}
protected void initComponents() {
horizontalGridLine = new ColorSelectBox(100);
verticalGridLine = new ColorSelectBox(100);
horizonLineType = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.NORMAL, LineType.DASH});
verticalLineType = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.NORMAL, LineType.DASH});
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
@ -52,7 +64,7 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{
new Component[]{createGridLinePane(new double[]{p, p, p}, new double[]{f, e})},
new Component[]{createGridLinePane()},
new Component[]{createAlertLinePane()},
new Component[]{createIntervalPane(new double[]{p, p, p, p}, new double[]{f, s})},
};
@ -61,25 +73,62 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
this.add(panel, BorderLayout.CENTER);
}
private JPanel createGridLinePane(double[] row, double[] col) {
horizontalGridLine = new ColorSelectBox(100);
verticalGridLine = new ColorSelectBox(100);
Component[][] components = getGridLinePaneComponents();
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Grid_Line"), panel);
}
protected JPanel createGridLinePane() {
protected Component[][] getGridLinePaneComponents() {
return new Component[][]{
Component[][] upComponent = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal")), horizontalGridLine},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical")), verticalGridLine},
new Component[]{null, horizontalGridLine}
};
horizontalColorPane = TableLayout4VanChartHelper.createGapTableLayoutPane(upComponent);
Component[][] downComponent = new Component[][]{
new Component[]{null,null},
new Component[]{null, verticalGridLine}
};
verticalColorPane = TableLayout4VanChartHelper.createGapTableLayoutPane(downComponent);
horizonLineType.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (horizontalGridLine == null || horizonLineType == null){
return;
}
horizontalColorPane.setVisible(horizonLineType.getSelectedItem() != LineType.NONE);
}
});
verticalLineType.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (verticalGridLine == null || verticalLineType == null){
return;
}
verticalColorPane.setVisible(verticalLineType.getSelectedItem() != LineType.NONE);
}
});
checkColorBoxVisible();
JPanel horizonLineTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal"), horizonLineType);
JPanel horizontal = new JPanel(new BorderLayout());
horizontal.add(horizonLineTypePane, BorderLayout.NORTH);
horizontal.add(horizontalColorPane, BorderLayout.CENTER);
JPanel verticalLineTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical"), verticalLineType);
JPanel vertical = new JPanel(new BorderLayout());
vertical.add(verticalLineTypePane, BorderLayout.NORTH);
vertical.add(verticalColorPane, BorderLayout.CENTER);
JPanel panel = new JPanel(new BorderLayout(0, 4));
panel.add(horizontal, BorderLayout.NORTH);
panel.add(vertical, BorderLayout.CENTER);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Grid_Line"), panel);
}
protected JPanel createAlertLinePane() {
alertLine = getAlertLinePane();
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Line"), alertLine);
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Alert_Line"), alertLine);
alertLine.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 0));
return panel;
}
@ -89,7 +138,7 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
}
protected JPanel createIntervalPane(double[] row, double[] col) {
isDefaultIntervalBackground = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Default_Interval"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Interval_Background")});
isDefaultIntervalBackground = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Default_Interval"), Toolkit.i18nText("Fine-Design_Chart_Custom_Interval_Background")});
horizontalColorBackground = new ColorSelectBox(100);
verticalColorBackground = new ColorSelectBox(100);
Component[][] components = getIntervalPaneComponents();
@ -99,8 +148,8 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
cardLayout = new CardLayout();
centerPane = new JPanel(cardLayout);
centerPane.add(defaultPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Default_Interval"));
centerPane.add(customIntervalBackground, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Interval_Background"));
centerPane.add(defaultPane, Toolkit.i18nText("Fine-Design_Chart_Default_Interval"));
centerPane.add(customIntervalBackground, Toolkit.i18nText("Fine-Design_Chart_Custom_Interval_Background"));
isDefaultIntervalBackground.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -108,10 +157,10 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
}
});
JPanel intervalPane = new JPanel(new BorderLayout(0, 6));
JPanel panel1 = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Interval_Background"), isDefaultIntervalBackground);
JPanel panel1 = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Interval_Background"), isDefaultIntervalBackground);
intervalPane.add(panel1, BorderLayout.NORTH);
intervalPane.add(centerPane, BorderLayout.CENTER);
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Interval_Background"), intervalPane);
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Interval_Background"), intervalPane);
intervalPane.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 0));
return panel;
}
@ -123,16 +172,16 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
protected Component[][] getIntervalPaneComponents() {
return new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal")), horizontalColorBackground},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical")), verticalColorBackground},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal")), horizontalColorBackground},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical")), verticalColorBackground},
};
}
private void checkCardPane() {
if (isDefaultIntervalBackground.getSelectedIndex() == 0) {
cardLayout.show(centerPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Default_Interval"));
cardLayout.show(centerPane, Toolkit.i18nText("Fine-Design_Chart_Default_Interval"));
} else {
cardLayout.show(centerPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Interval_Background"));
cardLayout.show(centerPane, Toolkit.i18nText("Fine-Design_Chart_Custom_Interval_Background"));
}
}
@ -142,6 +191,7 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
public void populateBean(Plot plot) {
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot;
checkColorBoxVisible();
populateGridLine(rectanglePlot);
@ -155,9 +205,11 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
checkCardPane();
}
protected void populateGridLine(VanChartRectanglePlot rectanglePlot) {
private void populateGridLine(VanChartRectanglePlot rectanglePlot) {
horizontalGridLine.setSelectObject(rectanglePlot.getDefaultYAxis().getMainGridColor());
verticalGridLine.setSelectObject(rectanglePlot.getDefaultXAxis().getMainGridColor());
horizonLineType.setSelectedItem(rectanglePlot.getDefaultYAxis().getGridLineType());
verticalLineType.setSelectedItem(rectanglePlot.getDefaultXAxis().getGridLineType());
}
@ -179,9 +231,11 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
customIntervalBackground.update(plot, isDefaultIntervalBackground.getSelectedIndex() == 0);
}
protected void updateGirdLine(VanChartRectanglePlot rectanglePlot) {
private void updateGirdLine(VanChartRectanglePlot rectanglePlot) {
rectanglePlot.getDefaultYAxis().setMainGridColor(horizontalGridLine.getSelectObject());
rectanglePlot.getDefaultXAxis().setMainGridColor(verticalGridLine.getSelectObject());
rectanglePlot.getDefaultYAxis().setGridLineType((LineType)horizonLineType.getSelectedItem());
rectanglePlot.getDefaultXAxis().setGridLineType((LineType)verticalLineType.getSelectedItem());
}
/**
@ -199,4 +253,14 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
public Plot updateBean() {
return null;
}
private void checkColorBoxVisible() {
if (horizontalColorPane != null && horizonLineType != null){
horizontalColorPane.setVisible(horizonLineType.getSelectedItem() != LineType.NONE);
}
if (verticalColorPane != null && verticalLineType != null){
verticalColorPane.setVisible(verticalLineType.getSelectedItem() != LineType.NONE);
}
}
}

20
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/radar/VanChartRadarAxisAreaPane.java

@ -2,12 +2,16 @@ package com.fr.van.chart.designer.style.background.radar;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.background.AlertLineListControlPane;
import com.fr.van.chart.designer.style.background.BackgroundListControlPane;
import com.fr.van.chart.designer.style.background.VanChartAxisAreaPane;
import javax.swing.JPanel;
import java.awt.Component;
import java.util.Arrays;
/**
* 样式-背景-绘图区背景-雷达图只有Y轴的配置间隔背景网格线警戒线
@ -17,11 +21,21 @@ public class VanChartRadarAxisAreaPane extends VanChartAxisAreaPane {
private static final long serialVersionUID = 2459614679918546393L;
//雷达图只有横向的y轴的网格线配置
protected Component[][] getGridLinePaneComponents() {
return new Component[][]{
@Override
protected JPanel createGridLinePane() {
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")),horizontalGridLine},
};
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] row = new double[components.length];
Arrays.fill(row, p);
double[] col = {f, e};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Grid_Line"), panel);
}
protected Component[][] getIntervalPaneComponents() {

38
designer-chart/src/main/java/com/fr/van/chart/gauge/GaugeIndependentVanChartInterface.java

@ -1,7 +1,14 @@
package com.fr.van.chart.gauge;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.AbstractVanSingleDataPane;
import com.fr.design.chartx.fields.diff.GaugeCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.GaugeDataSetFieldsPane;
import com.fr.design.chartx.fields.diff.SingleCategoryCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.SingleCategoryDataSetFieldsPane;
import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
@ -15,6 +22,7 @@ import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotTableDataContent
import com.fr.design.mainframe.chart.gui.data.table.MeterPlotTableDataContentPane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.custom.component.CategoryCustomPlotTableDataContentPane;
import com.fr.van.chart.custom.component.MeterCustomPlotReportDataContentPane;
import com.fr.van.chart.custom.component.MeterCustomPlotTableDataContentPane;
@ -107,4 +115,34 @@ public class GaugeIndependentVanChartInterface extends AbstractIndependentVanCha
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot){
return new VanChartGaugeSeriesPane(parent, plot);
}
@Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractVanSingleDataPane(listener) {
VanChartGaugePlot gaugePlot;
@Override
public void populate(ChartCollection collection) {
if (collection == null) {
return;
}
VanChart chart = collection.getSelectedChartProvider(VanChart.class);
if (chart == null) {
return;
}
gaugePlot = chart.getPlot();
super.populate(collection);
}
@Override
protected SingleDataPane createSingleDataPane() {
if (gaugePlot != null && !gaugePlot.isMultiPointer()) {
return new SingleDataPane(new GaugeDataSetFieldsPane(), new GaugeCellDataFieldsPane());
}
return new SingleDataPane(new SingleCategoryDataSetFieldsPane(), new SingleCategoryCellDataFieldsPane());
}
};
}
}

1
designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java

@ -242,6 +242,7 @@ public class FormCreatorDropTarget extends DropTarget {
*/
@Override
public synchronized void dropActionChanged(DropTargetDragEvent dtde) {
//do nothing
}
/**

33
designer-realize/src/main/java/com/fr/design/style/StylePane.java

@ -8,7 +8,10 @@ import com.fr.base.NameStyle;
import com.fr.base.ScreenResolution;
import com.fr.base.Style;
import com.fr.base.core.StyleUtils;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.fun.StyleUIConfigProvider;
import com.fr.design.fun.MultiStyleUIConfigProvider;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane;
@ -18,6 +21,7 @@ import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.FloatSelection;
import com.fr.grid.selection.Selection;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.solution.sandbox.collection.PluginSandboxCollections;
import com.fr.report.cell.CellElement;
import com.fr.report.cell.DefaultTemplateCellElement;
import com.fr.report.cell.FloatElement;
@ -38,6 +42,8 @@ import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.util.List;
import java.util.Set;
/**
* Style Pane.
@ -48,6 +54,7 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
private static final int FONT_INDEX = 2;
private static final int BORDER_INDEX = 3;
private static final int BACKGROUND_INDEX = 4;
private static final int NEXT_TAB_INDEX = 5;
private ElementCasePane reportPane;
protected Style editing;
private NameStyle globalStyle;
@ -56,9 +63,17 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
private FRFontPane frFontPane = null;
private BorderPane borderPane = null;
private BackgroundPane backgroundPane = null;
private static List<StyleUIConfigProvider> configList = PluginSandboxCollections.newSandboxList();
private PreivewArea previewArea;
private JPanel previewPane;
static {
Set<MultiStyleUIConfigProvider> preferenceConfigProviders = ExtraDesignClassManager.getInstance().getArray(MultiStyleUIConfigProvider.XML_TAG);
for (MultiStyleUIConfigProvider provider : preferenceConfigProviders) {
configList.addAll(provider.getConfigList());
}
}
/**
* Constructor
*/
@ -84,6 +99,9 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
mainTabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Border"), FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane());
mainTabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background"), FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane());
for (StyleUIConfigProvider config : configList) {
mainTabbedPane.addTab(config.configName(), FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane());
}
mainTabbedPane.addChangeListener(tabChangeActionListener);
this.setPreferredSize(new Dimension(450, 480));
}
@ -344,6 +362,9 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
if (this.backgroundPane != null) {
this.backgroundPane.populate(editing.getBackground());
}
for(StyleUIConfigProvider tabConfig : configList){
tabConfig.populateConfig(this.editing);
}
updatePreviewArea();
}
@ -378,6 +399,9 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
if (this.backgroundPane != null) {
style = style.deriveBackground(this.backgroundPane.update());
}
for(StyleUIConfigProvider tabConfig : configList){
style = tabConfig.updateConfig();
}
return style;
}
@ -401,6 +425,9 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
tabbedPane.setComponentAt(selectedIndex, StylePane.this.getBorderPane());
} else if (selectedIndex == BACKGROUND_INDEX) {
tabbedPane.setComponentAt(selectedIndex, StylePane.this.getBackgroundPane());
} else if (configList.size() + NEXT_TAB_INDEX > selectedIndex && configList.get(selectedIndex - NEXT_TAB_INDEX) != null) {
tabbedPane.setComponentAt(selectedIndex, configList.get(selectedIndex - NEXT_TAB_INDEX).uiComponent(StylePane.this));
configList.get(selectedIndex - NEXT_TAB_INDEX).populateConfig(StylePane.this.editing);
}
}
updatePreviewArea();
@ -419,7 +446,7 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
/**
* 预览Style的面板
*
*
* @author richer
*/
public static class PreivewArea extends JComponent {
@ -461,7 +488,7 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
}
}

2
designer-realize/src/main/java/com/fr/grid/GridUI.java

@ -1209,7 +1209,7 @@ public class GridUI extends ComponentUI {
* @return 有效返回true
*/
public static boolean validate(Rectangle2D rect) {
return rect != null && ComparatorUtils.equals(rect.getX(), INVALID_INTEGER);
return rect != null && !ComparatorUtils.equals(rect.getX(), INVALID_INTEGER);
}

12
designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java

@ -5,8 +5,10 @@ import com.fr.design.EnvChangeEntrance;
import com.fr.design.constants.DesignerLaunchStatus;
import com.fr.design.env.DesignerWorkspaceGenerator;
import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.env.LocalDesignerWorkspaceInfo;
import com.fr.log.FineLoggerFactory;
import com.fr.module.Activator;
import com.fr.stable.StringUtils;
import com.fr.value.NotNullLazyValue;
import com.fr.workspace.WorkContext;
import com.fr.workspace.Workspace;
@ -19,6 +21,8 @@ import org.jetbrains.annotations.NotNull;
*/
public class DesignerWorkspaceProvider extends Activator {
private static final String SPECIFY_WORKSPACE = "fr.designer.workspace";
private NotNullLazyValue<StartupArgs> startupArgs = new NotNullLazyValue<StartupArgs>() {
@NotNull
@Override
@ -37,7 +41,13 @@ public class DesignerWorkspaceProvider extends Activator {
} else {
try {
String current = DesignerEnvManager.getEnvManager().getCurEnvName();
DesignerWorkspaceInfo workspaceInfo = DesignerEnvManager.getEnvManager().getWorkspaceInfo(current);
String workspacePath;
DesignerWorkspaceInfo workspaceInfo;
if (StringUtils.isNotEmpty(workspacePath = System.getProperty(SPECIFY_WORKSPACE))) {
workspaceInfo = LocalDesignerWorkspaceInfo.create(StringUtils.EMPTY, workspacePath);
} else {
workspaceInfo = DesignerEnvManager.getEnvManager().getWorkspaceInfo(current);
}
Workspace workspace = DesignerWorkspaceGenerator.generate(workspaceInfo);
boolean checkValid = workspace != null && workspaceInfo.checkValid();
if (!checkValid) {

Loading…
Cancel
Save