Browse Source

Merge branch 'feature/10.0' of https://cloud.finedevelop.com/scm/design/design into feature/10.0

# Conflicts:
#	designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/StartupMessageCollector.java
research/11.0
vito 5 years ago
parent
commit
2391cc83f9
  1. 15
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 35
      designer-base/src/main/java/com/fr/design/ExtraDesignClassManager.java
  3. 2
      designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java
  4. 7
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java
  5. 26
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java
  6. 8
      designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java
  7. 12
      designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java
  8. 3
      designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java
  9. 12
      designer-base/src/main/java/com/fr/design/fun/ToolbarItemProvider.java
  10. 12
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractToolbarItem.java
  11. 3657
      designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/modes/FormulaTokenMaker.java
  12. 4
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  13. 2
      designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java
  14. 1
      designer-base/src/main/java/com/fr/design/update/ui/dialog/RestoreResultDialog.java
  15. 8
      designer-base/src/main/resources/com/fr/design/gui/syntax/ui/rsyntaxtextarea/modes/FormulaTokenMaker.flex
  16. 70
      designer-base/src/test/java/com/fr/design/ExtraDesignClassManagerTest.java
  17. 82
      designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java
  18. 5
      designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java
  19. 4
      designer-chart/src/main/java/com/fr/design/chart/fun/ChartTypeUIProvider.java
  20. 2
      designer-chart/src/main/java/com/fr/design/chart/fun/impl/AbstractChartTypeUI.java
  21. 15
      designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java
  22. 1
      designer-form/src/main/java/com/fr/design/designer/properties/FormWidgetAuthorityEditPane.java
  23. 11
      designer-form/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java
  24. 20
      designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java
  25. 10
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java
  26. 3
      designer-realize/src/main/java/com/fr/design/mainframe/cell/CellElementEditPane.java
  27. 18
      designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/solid/SolidCollectConstants.java
  28. 97
      designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/solid/SolidCollector.java
  29. 2
      designer-realize/src/main/java/com/fr/design/webattr/FToolBar.java
  30. 11
      designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java
  31. 2
      designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java
  32. 2
      designer-realize/src/main/java/com/fr/design/webattr/WebSettingPane.java
  33. 22
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java
  34. 5
      designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java
  35. 2
      designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java

15
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

@ -24,6 +24,7 @@ import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogFormatter;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.general.SupportLocale;
import com.fr.general.locale.LocaleCenter;
import com.fr.general.locale.LocaleMark;
import com.fr.general.xml.GeneralXMLTools;
@ -116,7 +117,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
private Color paginationLineColor = Color.black; // line color of paper
private boolean supportCellEditorDef = false;
private boolean isDragPermited = false;
private Locale language = Locale.getDefault();
private Locale language = checkLocale(Locale.getDefault());
//2014-8-26默认显示全部, 因为以前的版本, 虽然是false, 实际上是显示所有表, 因此这边要兼容
private boolean useOracleSystemSpace = true;
private int cachingTemplateLimit = CACHINGTEMPLATE_LIMIT;
@ -1343,7 +1344,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
String tmpVal;
if ((tmpVal = reader.getElementValue()) != null) {
if (!CommonUtils.isNumber(tmpVal)) {
setLanguage(CommonUtils.stringToLocale(tmpVal));
setLanguage(checkLocale(CommonUtils.stringToLocale(tmpVal)));
} else {
// 用于兼容10.0之前的版本
int value = Integer.parseInt(tmpVal);
@ -1392,6 +1393,16 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
}
}
/**
* 对国际化进行校验
* 非简繁英日韩的默认环境 设计器全部默认为英文版本
* @param locale
* @return
*/
private Locale checkLocale(Locale locale) {
return SupportLocale.getInstance().isSupport(locale) ? locale : Locale.US;
}
private void readReportLengthUnit(XMLableReader reader) {
String tmpVal;
if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) {

35
designer-base/src/main/java/com/fr/design/ExtraDesignClassManager.java

@ -20,6 +20,7 @@ import com.fr.plugin.AbstractExtraClassManager;
import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.injectable.PluginSingleInjection;
import com.fr.plugin.solution.closeable.CloseableContainedSet;
import com.fr.stable.Filter;
import com.fr.stable.plugin.ExtraDesignClassManagerProvider;
import java.util.ArrayList;
@ -41,7 +42,7 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement
private static ExtraDesignClassManager classManager = new ExtraDesignClassManager();
private Set<ShortCut> shortCuts = new CloseableContainedSet<>(HashSet.class);
public static ExtraDesignClassManager getInstance() {
return classManager;
}
@ -111,26 +112,39 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement
return result.toArray(new WidgetOption[result.size()]);
}
public WidgetOption[] getWebWidgetOptions() {
return getWebWidgetOptions(new Filter<ToolbarItemProvider>() {
@Override
public boolean accept(ToolbarItemProvider toolbarItemProvider) {
return true;
}
});
}
public WidgetOption[] getWebWidgetOptions(Filter<ToolbarItemProvider> filter) {
Set<ToolbarItemProvider> set = getArray(ToolbarItemProvider.XML_TAG);
if (set.isEmpty()) {
return getWebWidgetOptions(set, filter);
}
public WidgetOption[] getWebWidgetOptions(Set<ToolbarItemProvider> set, Filter<ToolbarItemProvider> filter) {
if (set == null || set.isEmpty()) {
return new WidgetOption[0];
}
List<WidgetOption> list = new ArrayList<>();
for (ToolbarItemProvider provider : set) {
WidgetOption option = WidgetOptionFactory.createByWidgetClass(
provider.nameForWidget(),
IOUtils.readIcon(provider.iconPathForWidget()),
provider.classForWidget()
);
list.add(option);
if (filter != null && filter.accept(provider)) {
WidgetOption option = WidgetOptionFactory.createByWidgetClass(
provider.nameForWidget(),
IOUtils.readIcon(provider.iconPathForWidget()),
provider.classForWidget()
);
list.add(option);
}
}
return list.toArray(new WidgetOption[list.size()]);
}
public Map<Class<? extends Widget>, Class<?>> getFormWidgetOptionsMap() {
Set<FormWidgetOptionProvider> set = getArray(FormWidgetOptionProvider.XML_TAG);
Map<Class<? extends Widget>, Class<?>> map = new HashMap<>();
@ -168,7 +182,6 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement
}
public WidgetOption[] getCellWidgetOptions() {
Set<CellWidgetOptionProvider> set = getArray(CellWidgetOptionProvider.XML_TAG);
if (set.isEmpty()) {

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

@ -21,7 +21,7 @@ public class SwitchExistEnv extends MenuDef {
initMenuDef();
}
private void initMenuDef() {
private void initMenuDef() {
Iterator<String> nameIt = DesignerEnvManager.getEnvManager().getEnvNameIterator();
while (nameIt.hasNext()) {
String name = nameIt.next();

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

@ -35,7 +35,7 @@ public class ConnectionTableProcedurePane extends BasicPane {
private ConnectionComboBoxPanel connectionComboBox;
private UICheckBox tableCheckBox;
private UICheckBox viewCheckBox;
private UITextField searchField;
protected UITextField searchField;
private TableViewList tableViewList;
private java.util.List<DoubleClickSelectedNodeOnTreeListener> listeners = new java.util.ArrayList<DoubleClickSelectedNodeOnTreeListener>();
@ -90,12 +90,17 @@ public class ConnectionTableProcedurePane extends BasicPane {
this.add(tableViewListPane, BorderLayout.CENTER);
this.add(filterPane, BorderLayout.SOUTH);
this.setPreferredSize(new Dimension(WIDTH, getPreferredSize().height));
addKeyMonitor();
}
protected void filter(Connection connection, String conName, List<String> nameList) {
connection.addConnection(nameList, conName, new Class[]{AbstractDatabaseConnection.class});
}
protected void addKeyMonitor() {
}
protected JPanel createCheckBoxgroupPane() {
JPanel checkBoxgroupPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2);
JPanel first = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();

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

@ -57,6 +57,8 @@ import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.util.ArrayList;
import java.util.List;
@ -95,6 +97,30 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
connection.addConnection(nameList, conName, new Class[]{JDBCDatabaseConnection.class, JNDIDatabaseConnection.class});
}
@Override
protected void addKeyMonitor() {
searchField.addKeyListener(new KeyListener() {
@Override
public void keyTyped(KeyEvent e) {
}
@Override
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
e.setKeyCode(KeyEvent.VK_UP);
DBTableDataPane.this.connectionTableProcedurePane.requestFocus();
}
}
@Override
public void keyReleased(KeyEvent e) {
}
});
}
};
connectionTableProcedurePane.addDoubleClickListener(new DoubleClickSelectedNodeOnTreeListener() {

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

@ -11,6 +11,7 @@ import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.general.http.HttpClient;
import com.fr.general.http.HttpToolbox;
import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.PluginStoreConstants;
@ -293,10 +294,9 @@ public class WebViewDlgHelper {
new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() throws Exception {
HttpClient httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("shop.plugin.update") + "?" + PluginUtils.FR_VERSION + "=" + ProductConstants.VERSION + "&version=" + PluginStoreConstants.getInstance().getProps("VERSION"));
httpClient.asGet();
if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) {
String text = httpClient.getResponseText();
String url = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.update");
if (url != null) {
String text = HttpToolbox.get(url + "?" + PluginUtils.FR_VERSION + "=" + ProductConstants.VERSION + "&version=" + PluginStoreConstants.getInstance().getProps("VERSION"));
JSONObject resultJSONObject = new JSONObject(text);
String isLatest = resultJSONObject.optString("result");
if (!ComparatorUtils.equals(isLatest, LATEST)) {

12
designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java

@ -264,11 +264,6 @@ public class HistoryTemplateListCache implements CallbackEvent {
if (size == index + 1 && index > 0) {
//如果删除的是后一个Tab,则定位到前一个
MutilTempalteTabPane.getInstance().setSelectedIndex(index - 1);
JTemplate selectedFile = MutilTempalteTabPane.getInstance().getSelectedFile();
if (!isCurrentEditingFile(selectedFile.getPath())) {
//如果此时面板上的实时刷新的selectedIndex得到的和历史的不一样
DesignerContext.getDesignerFrame().activateJTemplate(selectedFile);
}
}
}
}
@ -277,6 +272,13 @@ public class HistoryTemplateListCache implements CallbackEvent {
if (openFileCount == 0) {
DesignerContext.getDesignerFrame().addAndActivateJTemplate();
}
JTemplate selectedFile = MutilTempalteTabPane.getInstance().getSelectedFile();
if (!isCurrentEditingFile(selectedFile.getPath())) {
//如果此时面板上的实时刷新的selectedIndex得到的和历史的不一样
DesignerContext.getDesignerFrame().activateJTemplate(selectedFile);
}
MutilTempalteTabPane.getInstance().repaint();
}

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

@ -156,6 +156,9 @@ public class MutilTempalteTabPane extends JComponent {
}
public JTemplate getSelectedFile() {
if (openedTemplate.size() == selectedIndex) {
selectedIndex = Math.max(--selectedIndex, 0);
}
return openedTemplate.get(selectedIndex);
}

12
designer-base/src/main/java/com/fr/design/fun/ToolbarItemProvider.java

@ -1,6 +1,8 @@
package com.fr.design.fun;
import com.fr.design.mainframe.JTemplate;
import com.fr.form.ui.Widget;
import com.fr.stable.Filter;
import com.fr.stable.fun.mark.Mutable;
/**
@ -8,7 +10,7 @@ import com.fr.stable.fun.mark.Mutable;
* @since : 8.0
* 自定义web工具栏菜单
*/
public interface ToolbarItemProvider extends Mutable {
public interface ToolbarItemProvider extends Mutable, Filter<JTemplate> {
String XML_TAG = "ToolbarItemProvider";
@ -36,4 +38,12 @@ public interface ToolbarItemProvider extends Mutable {
*/
String nameForWidget();
/**
* 模板决策报表 or cpt是否支持此工具栏按钮
* JTemplate 模板
* @return 支持返回true, 否则false
*/
@Override
boolean accept(JTemplate template);
}

12
designer-base/src/main/java/com/fr/design/fun/impl/AbstractToolbarItem.java

@ -1,6 +1,9 @@
package com.fr.design.fun.impl;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.fun.ToolbarItemProvider;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.JVirtualTemplate;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
@ -10,6 +13,7 @@ import com.fr.stable.fun.mark.API;
@API(level = ToolbarItemProvider.CURRENT_LEVEL)
public abstract class AbstractToolbarItem extends AbstractProvider implements ToolbarItemProvider {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@ -18,4 +22,12 @@ public abstract class AbstractToolbarItem extends AbstractProvider implements To
public String mark4Provider() {
return getClass().getName();
}
@Override
public boolean accept(JTemplate jTemplate) {
if (jTemplate == null) {
jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
}
return jTemplate == null || jTemplate.isJWorkBook() || jTemplate instanceof JVirtualTemplate;
}
}

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

File diff suppressed because it is too large Load Diff

4
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -532,7 +532,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
String oldName = fnf.getName();
String suffix = fnf.isDirectory() ? StringUtils.EMPTY : oldName.substring(oldName.lastIndexOf(CoreConstants.DOT), oldName.length());
oldName = oldName.replace(suffix, StringUtils.EMPTY);
oldName = StringUtils.replaceLast(oldName, suffix, StringUtils.EMPTY);
this.setLayout(new BorderLayout());
this.setModal(true);
@ -651,7 +651,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
String oldName = fnf.getName();
String suffix = fnf.isDirectory() ? StringUtils.EMPTY : oldName.substring(oldName.lastIndexOf(CoreConstants.DOT), oldName.length());
oldName = oldName.replaceAll(suffix, StringUtils.EMPTY);
oldName = StringUtils.replaceLast(oldName, suffix, StringUtils.EMPTY);
// 输入为空或者没有修改
if (ComparatorUtils.equals(userInput, oldName)) {

2
designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java

@ -60,4 +60,4 @@ public final class JTemplateFactory {
ALL_APP.remove(app);
}
}
}
}

1
designer-base/src/main/java/com/fr/design/update/ui/dialog/RestoreResultDialog.java

@ -12,6 +12,7 @@ import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.project.ProjectConstants;
import javax.swing.AbstractAction;
import javax.swing.BorderFactory;
import javax.swing.JDialog;

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

@ -578,7 +578,13 @@ FunctionNames = "ABS"|
"YEAR"|
"year"|
"YEARDELTA"|
"yeardelta"
"yeardelta"|
"SUMPRECISE"|
"sumprecise"|
"QUERY"|
"query"|
"WEBIMAGE"|
"webimage"
%state MLC

70
designer-base/src/test/java/com/fr/design/ExtraDesignClassManagerTest.java

@ -0,0 +1,70 @@
package com.fr.design;
import com.fr.config.dao.DaoContext;
import com.fr.config.dao.impl.LocalClassHelperDao;
import com.fr.config.dao.impl.LocalEntityDao;
import com.fr.config.dao.impl.LocalXmlEntityDao;
import com.fr.design.fun.ToolbarItemProvider;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.JVirtualTemplate;
import com.fr.general.ModuleContext;
import com.fr.log.FineLoggerFactory;
import com.fr.report.restriction.CellCountRestriction;
import com.fr.report.restriction.ReportRestrictionScene;
import com.fr.restriction.Restrictions;
import com.fr.stable.Filter;
import com.fr.stable.module.Module;
import junit.framework.TestCase;
import org.easymock.EasyMock;
import org.junit.Assert;
import java.util.HashSet;
import java.util.Set;
/**
* @author zack
* @version 10.0
* Created by zack on 2019/9/17
*/
public class ExtraDesignClassManagerTest extends TestCase {
@Override
protected void setUp() throws Exception {
DaoContext.setEntityDao(new LocalEntityDao());
DaoContext.setClassHelperDao(new LocalClassHelperDao());
DaoContext.setXmlEntityDao(new LocalXmlEntityDao());
ModuleContext.startModule(Module.PAGE_MODULE);
Restrictions.register(ReportRestrictionScene.CELL_COUNT, new CellCountRestriction());
}
public void testGetWebOption() {
try {
final JTemplate jTemplate = new JVirtualTemplate(null);
ToolbarItemProvider item = EasyMock.mock(ToolbarItemProvider.class);
ToolbarItemProvider item1 = EasyMock.mock(ToolbarItemProvider.class);
EasyMock.expect(item.accept(jTemplate)).andReturn(false).anyTimes();
EasyMock.expect(item.classForWidget()).andReturn(null).anyTimes();
EasyMock.expect(item.iconPathForWidget()).andReturn("").anyTimes();
EasyMock.expect(item.nameForWidget()).andReturn("1").anyTimes();
EasyMock.expect(item1.accept(jTemplate)).andReturn(true).anyTimes();
EasyMock.expect(item1.classForWidget()).andReturn(null).anyTimes();
EasyMock.expect(item1.iconPathForWidget()).andReturn("").anyTimes();
EasyMock.expect(item1.nameForWidget()).andReturn("2").anyTimes();
EasyMock.replay(item);
EasyMock.replay(item1);
Set<ToolbarItemProvider> set = new HashSet<>();
set.add(item);
set.add(item1);
WidgetOption[] widgetOptions = ExtraDesignClassManager.getInstance().getWebWidgetOptions(set, new Filter<ToolbarItemProvider>() {
@Override
public boolean accept(ToolbarItemProvider toolbarItemProvider) {
return toolbarItemProvider.accept(jTemplate);
}
});
Assert.assertEquals(1, widgetOptions.length);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
}

82
designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java

@ -125,7 +125,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
public static final String TYPE_PANE_DEFAULT_TITLE = "DEFAULT_NAME";
public synchronized static ChartTypeInterfaceManager getInstance() {
return classManager;
}
@ -158,7 +158,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
}
});
}
public static WidgetOption[] initWidgetOption() {
String[] chartIDs = ChartTypeManager.getInstance().getAllChartIDs();
@ -201,8 +201,8 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartGanttPlot.VAN_CHART_GANTT_PLOT_ID, new GanttIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartStructurePlot.STRUCTURE_PLOT_ID, new StructureIndependentVanChartInterface());
}
private static void readDefault() {
addChartTypeInterface(DEPRECATED_CHART_PRIORITY, ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface());
@ -225,7 +225,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
}
private static void addChartTypeInterface(String priority, String plotID, ChartTypeUIProvider provider) {
if (chartTypeInterfaces != null) {
if (!chartTypeInterfaces.containsKey(priority)) {
//新建一个具体图表列表
@ -252,14 +252,14 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
}
return null;
}
/**
* 把所有的pane加到list里
*
* @param paneList pane容器
*/
public void addPlotTypePaneList(List<FurtherBasicBeanPane<? extends ChartProvider>> paneList, Map<String, Map<String, FurtherBasicBeanPane<? extends ChartProvider>>> allChartTypePane) {
List<Integer> priorityList = getPriorityInOrder();
for (Integer aPriorityList : priorityList) {
String priority = String.valueOf(aPriorityList);
@ -302,9 +302,9 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
public String getTitle4PopupWindow(String plotID) {
return getName(plotID);
}
private List<Integer> getPriorityInOrder() {
List<Integer> priorityList = new ArrayList<Integer>();
if (chartTypeInterfaces != null) {
Iterator iterator = chartTypeInterfaces.entrySet().iterator();
@ -374,11 +374,15 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
}
result[i] = Reflect.on(chart).call("demoImagePath").get();
}
if (ArrayUtils.isNotEmpty(result)) {
return result;
}
} catch (Exception e) {
//do nothing
}
return new String[0];
return new String[]{getIconPath(chartID)};
}
public String[] getSubName(String chartID) {
@ -464,7 +468,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
return provider.getPlotTypePane().title4PopupWindow();
}
public ChartDataPane getChartDataPane(String plotID, AttributeChangeListener listener) {
ChartTypeUIProvider provider = getChartTypeInterface(plotID);
if (provider != null) {
@ -473,7 +477,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
return new ChartDataPane(listener);
}
public AbstractChartAttrPane[] getAttrPaneArray(String plotID, AttributeChangeListener listener) {
ChartTypeUIProvider provider = getChartTypeInterface(plotID);
if (provider != null) {
@ -481,9 +485,9 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
}
return new AbstractChartAttrPane[0];
}
public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent) {
ChartTypeUIProvider provider = getChartTypeInterface(plot.getPlotID());
@ -493,7 +497,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
return null;
}
public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent) {
ChartTypeUIProvider provider = getChartTypeInterface(plot.getPlotID());
@ -503,7 +507,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
return null;
}
public ConditionAttributesPane getPlotConditionPane(Plot plot) {
ChartTypeUIProvider provider = getChartTypeInterface(plot.getPlotID());
@ -513,7 +517,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
return null;
}
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot) {
ChartTypeUIProvider provider = getChartTypeInterface(plot.getPlotID());
@ -523,7 +527,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
return null;
}
/**
* 是否使用默认的界面为了避免界面来回切换
*
@ -536,7 +540,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
if (provider != null) {
return provider.isUseDefaultPane();
}
return true;
}
@ -551,31 +555,37 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
return true;
}
@Override
public void mount(PluginSingleInjection injection) {
if (isIndependentChartUIProvider(injection)) {
if (isChartTypeUIProvider(injection)) {
String id = injection.getAttribute("chartID");
if (StringUtils.isEmpty(id)) {
id = injection.getAttribute("plotID");
}
String priority = injection.getAttribute("priority", DEFAULT_PRIORITY);
String plotID = injection.getAttribute("plotID");
ChartTypeUIProvider instance = (ChartTypeUIProvider) injection.getObject();
addChartTypeInterface(priority, plotID, instance);
addChartTypeInterface(priority, id, instance);
}
}
@Override
public void demount(PluginSingleInjection injection) {
if (isIndependentChartUIProvider(injection)) {
if (isChartTypeUIProvider(injection)) {
String priority = injection.getAttribute("priority", DEFAULT_PRIORITY);
String plotID = injection.getAttribute("plotID");
removeChartTypeInterface(priority, plotID);
String id = injection.getAttribute("chartID");
if (StringUtils.isEmpty(id)) {
id = injection.getAttribute("plotID");
}
removeChartTypeInterface(priority, id);
}
}
private void removeChartTypeInterface(String priority, String plotID) {
if (chartTypeInterfaces != null) {
if (chartTypeInterfaces.containsKey(priority)) {
Map<String, ChartTypeUIProvider> chartUIList = chartTypeInterfaces.get(priority);
@ -583,11 +593,11 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
}
}
}
private boolean isIndependentChartUIProvider(PluginSingleInjection injection) {
return !(injection == null || injection.getObject() == null) && ChartTypeUIProvider.XML_TAG.equals(injection.getName()) && injection.getObject() instanceof ChartTypeUIProvider;
private boolean isChartTypeUIProvider(PluginSingleInjection injection) {
return !(injection == null || injection.getObject() == null) && (ChartTypeUIProvider.XML_TAG.equals(injection.getName()) || ChartTypeUIProvider.OLD_TAG.equals(injection.getName())) && injection.getObject() instanceof ChartTypeUIProvider;
}

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

@ -11,6 +11,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.DefaultListCellRenderer;
@ -98,8 +99,8 @@ public class ChartTypePane extends ChartCommonWizardPane {
String[] subName = ChartTypeInterfaceManager.getInstance().getSubName(id);
ChartTypePane.this.iconListModel.clear();
for (int i = 0, len = demoImagePath.length; i < len; i++) {
String ImagePath = demoImagePath[i];
for (int i = 0, len = subName.length; i < len; i++) {
String ImagePath = demoImagePath.length > i ? demoImagePath[i] : StringUtils.EMPTY;
String chartName = subName[i];
ChartTypePane.this.iconListModel.addElement(new ChartIcon(ImagePath, chartName));
}

4
designer-chart/src/main/java/com/fr/design/chart/fun/ChartTypeUIProvider.java

@ -23,7 +23,9 @@ import com.fr.stable.fun.Level;
*/
public interface ChartTypeUIProvider extends Level {
String XML_TAG = SpecialLevel.IndependentChartUIProvider.getTagName();
String XML_TAG = "ChartTypeUIProvider";
String OLD_TAG = SpecialLevel.IndependentChartUIProvider.getTagName();
int CURRENT_API_LEVEL = 3;

2
designer-chart/src/main/java/com/fr/design/chart/fun/impl/AbstractChartTypeUI.java

@ -16,10 +16,12 @@ import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPa
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* Created by shine on 2019/09/03.
*/
@API(level = ChartTypeUIProvider.CURRENT_API_LEVEL)
public abstract class AbstractChartTypeUI extends AbstractProvider implements ChartTypeUIProvider {
@Override

15
designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.chart;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.attr.ChartProvider;
import com.fr.design.ChartTypeInterfaceManager;
@ -130,6 +131,10 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
}
};
@Deprecated
public void reLayout(Chart currentChart) {
}
/**
* 重新构造面板
* @param currentChart 图表
@ -225,8 +230,14 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
return;
}
if (checkNeedsReLayout(collection.getSelectedChartProvider())) {
reLayout(collection.getSelectedChartProvider());
ChartProvider chartProvider = collection.getSelectedChartProvider();
if (checkNeedsReLayout(chartProvider)) {
String chartID = chartProvider.getID();
if ("WaferChipChart".equals(chartID) || "BoxPlotChart".equals(chartID)) {
reLayout((Chart)chartProvider);
} else {
reLayout(chartProvider);
}
}
this.collection = collection;

1
designer-form/src/main/java/com/fr/design/designer/properties/FormWidgetAuthorityEditPane.java

@ -56,6 +56,7 @@ public class FormWidgetAuthorityEditPane extends AuthorityEditPane {
for (String selectedRole : selectedArray) {
for (Widget widget : widgets) {
widget.changeVisibleAuthorityState(selectedRole, widgetVisible.isSelected());
widgetAvailable.setEnabled(widgetVisible.isSelected());
}
}
doAfterAuthority();

11
designer-form/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java

@ -1,13 +1,17 @@
package com.fr.design.mainframe.widget.accessibles;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.fun.ToolbarItemProvider;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.mainframe.FormWebWidgetConstants;
import com.fr.design.mainframe.widget.editors.ElementCaseToolBarPane;
import com.fr.design.mainframe.widget.wrappers.ElementCaseToolBarWrapper;
import com.fr.form.web.FormToolBarManager;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Filter;
import javax.swing.SwingUtilities;
import java.util.ArrayList;
@ -52,6 +56,13 @@ public class AccessibleElementCaseToolBarEditor extends UneditableAccessibleEdit
List<WidgetOption> defaultOptions = Arrays.asList(FormWebWidgetConstants.getFormElementCaseToolBarInstance());
List<WidgetOption> options = new ArrayList<WidgetOption>();
options.addAll(defaultOptions);
WidgetOption[] widgetOptions = ExtraDesignClassManager.getInstance().getWebWidgetOptions(new Filter<ToolbarItemProvider>() {
@Override
public boolean accept(ToolbarItemProvider toolbarItemProvider) {
return toolbarItemProvider.accept(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate());
}
});
options.addAll(Arrays.asList(widgetOptions));
return options.toArray(new WidgetOption[options.size()]);
}

20
designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java

@ -24,6 +24,7 @@ import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.widget.accessibles.AccessibleBackgroundEditor;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.ui.designer.AbstractDataModify;
import com.fr.design.widget.ui.designer.component.UIBoundSpinner;
import com.fr.form.ui.container.WParameterLayout;
import com.fr.general.Background;
@ -61,7 +62,7 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> {
public void initComponent() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
designerWidth = new UISpinner(1, Integer.MAX_VALUE, 1);
designerWidth = new UIBoundSpinner(1, Integer.MAX_VALUE, 1);
JPanel advancePane = createAdvancePane();
UIExpandablePane advanceExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, advancePane);
this.add(advanceExpandablePane, BorderLayout.NORTH);
@ -162,16 +163,29 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> {
public WParameterLayout updateBean() {
WParameterLayout wParameterLayout = (WParameterLayout) creator.toData();
wParameterLayout.setLabelName(labelNameTextField.getText());
wParameterLayout.setDesignWidth((int) designerWidth.getValue());
if (isCompsOutOfDesignerWidth((int) designerWidth.getValue())) {
designerWidth.setValue(wParameterLayout.getDesignWidth());
} else {
wParameterLayout.setDesignWidth((int) designerWidth.getValue());
}
wParameterLayout.setDelayDisplayContent(displayReport.isSelected());
wParameterLayout.setUseParamsTemplate(useParamsTemplate.isSelected());
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
jTemplate.needAddTemplateIdAttr(useParamsTemplate.isSelected());
wParameterLayout.setBackground((Background) background.getValue());
wParameterLayout.setPosition((int)hAlignmentPane.getSelectedItem());
wParameterLayout.setPosition((int) hAlignmentPane.getSelectedItem());
return wParameterLayout;
}
private boolean isCompsOutOfDesignerWidth(int designerWidth){
for(int i=0; i<root.getComponentCount(); i++){
Component comp = root.getComponent(i);
if(comp.getX() + comp.getWidth() > designerWidth){
return true;
}
}
return false;
}
@Override
public DataCreatorUI dataUI() {
return null;

10
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java

@ -19,6 +19,7 @@ import com.fr.design.mainframe.MobileWidgetListPane;
import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.form.ui.container.WParameterLayout;
import com.fr.form.ui.container.WSortLayout;
import com.fr.general.CloudCenter;
import com.fr.general.ComparatorUtils;
import com.fr.general.SiteCenter;
import com.fr.log.FineLoggerFactory;
@ -87,9 +88,7 @@ public class ParaMobileDefinePane extends MobileWidgetDefinePane {
double[] rowSize = {p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}};
if (ExtraReportClassManager.getInstance().getArray(MobileParamStyleProvider.MARK_STRING).size() != 0) {
tipLabel = null;
} else {
if (ExtraReportClassManager.getInstance().getArray(MobileParamStyleProvider.MARK_STRING).isEmpty()) {
((WParameterLayout) (paraCreator.toData())).setProvider((MobileParamStyleProvider) ((Item) paramLocationComboBox.getItemAt(0)).getValue());
}
Component[][] components = new Component[][]{
@ -127,10 +126,9 @@ public class ParaMobileDefinePane extends MobileWidgetDefinePane {
@Override
public void mouseClicked(MouseEvent e) {
try {
//todo 添加对应插件下载地址
Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("plugin.download")));
Desktop.getDesktop().browse(new URI(CloudCenter.getInstance().acquireUrlByKind("plugin.mobile.style")));
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
}
}
@Override

3
designer-realize/src/main/java/com/fr/design/mainframe/cell/CellElementEditPane.java

@ -62,8 +62,7 @@ public class CellElementEditPane extends BasicPane {
@Override
public void tabChanged(int index) {
card.show(center, paneList.get(index).title4PopupWindow());
paneList.get(index).populateBean(cellelement, ePane);// 设置面板变了,也要populate
paneList.get(index).addAttributeChangeListener(listener);
populate(ePane);
if (titleChangeListener != null) {
titleChangeListener.fireTitleChange(getSelectedTabName());
}

18
designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/solid/SolidCollectConstants.java

@ -0,0 +1,18 @@
package com.fr.design.mainframe.messagecollect.solid;
/**
* Created by alex sung on 2019/9/5.
*/
public class SolidCollectConstants {
private SolidCollectConstants(){}
/**
* 客户端请求subject
*/
public static final String REQUEST_SUBJECT = "solid";
/**
* 客户端请求超时鉴权时间默认1h失效
*/
public static final long TIME_OUT = 60 * 60 * 1000;
}

97
designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/solid/SolidCollector.java

@ -0,0 +1,97 @@
package com.fr.design.mainframe.messagecollect.solid;
import com.fr.general.CloudCenter;
import com.fr.general.http.HttpToolbox;
import com.fr.json.JSON;
import com.fr.json.JSONFactory;
import com.fr.log.FineLoggerFactory;
import com.fr.security.JwtUtils;
import com.fr.stable.CommonUtils;
import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import static com.fr.design.mainframe.messagecollect.solid.SolidCollectConstants.REQUEST_SUBJECT;
import static com.fr.design.mainframe.messagecollect.solid.SolidCollectConstants.TIME_OUT;
/**
* 设计器固化信息回传类
* Created by alex sung on 2019/8/22.
*/
public class SolidCollector {
private static final String CONTENT_URL = "/v10/collect/solid";
private static final String DELETE_URL = "/v10/collect/solid/delete";
private static final String UNLOCK_URL = "/v10/collect/solid/unlock";
private static final String ATTR_CIPHER_TEXT = "cipherText";
private static final String ATTR_SIGNATURE = "signature";
private static final String SOLID_UPLOAD_URL = CloudCenter.getInstance().acquireUrlByKind("design.solid");
private static volatile SolidCollector instance;
public static SolidCollector getInstance() {
if (instance == null) {
synchronized (SolidCollector.class) {
if (instance == null) {
instance = new SolidCollector();
}
}
}
return instance;
}
/**
* 回传文件给云中心并删除服务端本地文件
*/
public void sendToCloudCenterAndDeleteFile() {
if (WorkContext.getCurrent().isLocal()) {
return;
}
FineLoggerFactory.getLogger().info("start to get solid content from server...");
try {
String content = requestContent();
if (StringUtils.isNotEmpty(content)) {
String cipherText = JSONFactory.createJSON(JSON.OBJECT, content).optString("data");
if(StringUtils.isNotEmpty(cipherText)){
Map<String, Object> params = new HashMap<>();
params.put(ATTR_CIPHER_TEXT, cipherText);
params.put(ATTR_SIGNATURE, String.valueOf(CommonUtils.signature()));
HttpToolbox.post(SOLID_UPLOAD_URL, params);
String deleteUrl = WorkContext.getCurrent().getPath() + DELETE_URL;
HttpToolbox.post(deleteUrl, getParams());
}
}
FineLoggerFactory.getLogger().info("send solid content to cloud center success.");
} catch (Exception e) {
FineLoggerFactory.getLogger().info(e.getMessage(), e);
} finally {
String unlockUrl = WorkContext.getCurrent().getPath() + UNLOCK_URL;
try {
HttpToolbox.post(unlockUrl, getParams());
} catch (IOException e) {
FineLoggerFactory.getLogger().warn(e.getMessage(), e);
}
}
}
/**
* 获取服务端固化文件内容
* @return 回传内容
*/
public String requestContent() throws Exception {
Map<String, String> params = new HashMap<String, String>();
params.put("token", JwtUtils.createDefaultJWT(REQUEST_SUBJECT, TIME_OUT));
return HttpToolbox.get(WorkContext.getCurrent().getPath() + CONTENT_URL, params);
}
private Map<String, Object> getParams() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("token", JwtUtils.createDefaultJWT(REQUEST_SUBJECT, TIME_OUT));
return params;
}
}

2
designer-realize/src/main/java/com/fr/design/webattr/FToolBar.java

@ -17,7 +17,7 @@ public class FToolBar {
}
public void setButtonlist(List<ToolBarButton> buttonlist) {
if (buttonlist == null || buttonlist.size() < 0) {
if (buttonlist == null ) {
this.buttonlist = new ArrayList<ToolBarButton>();
} else {
this.buttonlist = buttonlist;

11
designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java

@ -35,6 +35,7 @@ import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.image.ImageObserver;
import java.util.List;
/**
* 新的拖拽ToolBar button以实现自定义工具栏 报表web设置那儿的.应该不叫ToolBarDragPane因为实际没有提供drag功能
@ -225,6 +226,16 @@ public class ToolBarDragPane extends WidgetToolBarPane {
public void setAllEnabled(boolean b) {
GUICoreUtils.setEnabled(this, b);
isEnabled = b;
removeAllListener(northToolBar.getToolBarButtons());
}
private void removeAllListener(List<ToolBarButton> toolBarButtons) {
for (ToolBarButton button : toolBarButtons) {
button.setEnabled(isEnabled);
if (!isEnabled) {
button.removeMouseListener(button);
}
}
}
/**

2
designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java

@ -124,7 +124,7 @@ public class ToolBarPane extends BasicBeanPane<ToolBar> {
}
private void setToolBar(List<ToolBarButton> list) {
if (list == null || list.size() < 0) {
if (list == null ) {
return;
}
this.removeAll();

2
designer-realize/src/main/java/com/fr/design/webattr/WebSettingPane.java

@ -122,8 +122,8 @@ public abstract class WebSettingPane<T extends WebContent> extends BasicBeanPane
choseComboBox.removeItemListener(itemListener);
choseComboBox.setSelectedIndex(SERVER_SET);
choseComboBox.addItemListener(itemListener);
checkEnabled(false);
populateServerSettings();
checkEnabled(false);
return;
}
// 模板设置

22
designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

@ -27,6 +27,7 @@ import com.fr.design.selection.SelectionListener;
import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.FloatSelection;
import com.fr.grid.selection.Selection;
import com.fr.report.cell.TemplateCellElement;
import com.fr.stable.ColumnRow;
import com.fr.stable.ColumnRowGroup;
import com.fr.stable.StringUtils;
@ -427,7 +428,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
dealSelectColRow(add, cellselection);
} else {
ColumnRow columnRow = ColumnRow.valueOf(cellselection.getColumn(), cellselection.getRow());
String allColumnRow = columnRow.toString();
String allColumnRow = newValue.toString();
if (!allColumnRow.contains(columnRow.toString())) {
add.addColumnRow(columnRow);
}
@ -454,11 +455,22 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
newAdd.clear();
for (int i = 0; i < cs; i++) {
for (int j = 0; j < rs; j++) {
ColumnRow columnRow = ColumnRow.valueOf(c + i, r + j);
if (!allColumnRow.contains(columnRow.toString())) {
add.addColumnRow(columnRow);
TemplateCellElement cellElement = ePane.getEditingElementCase().getTemplateCellElement(c + i, r + j );
if (cellElement != null && ((i + c) != 0 || (r + j) != 0)) {
String value = cellElement.toString();
if (!newAdd.contains(value) && !allColumnRow.contains(value)) {
add.addColumnRow(ColumnRow.valueOf(value));
}
newAdd.add(value);
}
if (cellElement == null) {
ColumnRow columnRow = ColumnRow.valueOf(c + i, r + j);
if (!allColumnRow.contains(columnRow.toString())) {
add.addColumnRow(columnRow);
}
newAdd.add(columnRow.toString());
}
newAdd.add(columnRow.toString());
}
}
int oldSize = oldAdd.size();

5
designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java

@ -136,6 +136,7 @@ public class ECBlockEditor extends BlockEditor<ECBlockPane, PolyECBlock> {
* @date 2014-11-24-下午3:48:19
*/
public void resetSelectionAndChooseState() {
boolean chooseBlock = designer.isChooseBlock();
designer.setChooseType(SelectionType.INNER);
if (DesignerMode.isAuthorityEditing()) {
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
@ -167,7 +168,9 @@ public class ECBlockEditor extends BlockEditor<ECBlockPane, PolyECBlock> {
conditionAttributesGroupPane.populate(editComponent);
EastRegionContainerPane.getInstance().updateCellElementState(isSelectedOneCell());
if (chooseBlock) {
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_CELL_ATTR);
}
}
// 超级链接

2
designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java

@ -103,7 +103,7 @@ public class CellFormulaQuickEditor extends CellQuickEditor {
formulaButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
String text = formulaTextField.getText();
final UIFormula formulaPane = FormulaFactory.createFormulaPane();
final UIFormula formulaPane = FormulaFactory.createFormulaPaneWhenReserveFormula();
formulaPane.populate(BaseFormula.createFormulaBuilder().build(text));
formulaPane.showLargeWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override

Loading…
Cancel
Save