From 83191c1f5b000364992b71fd23053ce36e3a7281 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 14 Nov 2017 11:50:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E5=85=BC?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/InformationCollector.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/InformationCollector.java b/designer/src/com/fr/design/mainframe/InformationCollector.java index 37e712378a..7cc6eb6c44 100644 --- a/designer/src/com/fr/design/mainframe/InformationCollector.java +++ b/designer/src/com/fr/design/mainframe/InformationCollector.java @@ -23,7 +23,7 @@ import com.fr.general.http.HttpClient; import com.fr.json.JSONArray; import com.fr.json.JSONException; import com.fr.json.JSONObject; -import com.fr.record.DBRecordManager; +import com.fr.record.DBRecordXManager; import com.fr.stable.ArrayUtils; import com.fr.stable.EncodeConstants; import com.fr.stable.ProductConstants; @@ -217,7 +217,7 @@ public class InformationCollector implements XMLReadable, XMLWriter { Table table = new Table(TABLE_NAME); try { - conn = DBRecordManager.getDB().createConnection(); + conn = DBRecordXManager.getDB().createConnection(); ResultSet rs = selectAllFromLogDB(conn, table); if(rs == null){ @@ -254,7 +254,7 @@ public class InformationCollector implements XMLReadable, XMLWriter { private void deleteLogDB(Connection conn, Table table) { try { - conn = DBRecordManager.getDB().createConnection(); + conn = DBRecordXManager.getDB().createConnection(); Delete delete = new Delete(table); delete.execute(conn); } catch (Exception e) { From b212c1ef846aab45f9484d7665d94c57bd8d61e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Tue, 14 Nov 2017 15:49:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=BE=E8=AE=A1=E5=99=A8=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E6=8E=A7=E4=BB=B6=E9=A1=BA=E5=BA=8F=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/MobileWidgetTable.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java index 63b22e421c..982f5aad0d 100644 --- a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java +++ b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java @@ -3,6 +3,7 @@ package com.fr.design.mainframe; import java.awt.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.util.ArrayList; import java.util.List; import javax.swing.BorderFactory; @@ -246,25 +247,32 @@ public class MobileWidgetTable extends JTable { * @return String[][] 二维数组,[0][0]widgetName */ private String[][] getData() { + List mobileWidgetList = new ArrayList(); if (designer.isFormParaDesigner()) { return new String[0][0]; } - WFitLayout body = (WFitLayout) designer.getRootComponent().toData(); + WSortLayout body = (WSortLayout) designer.getRootComponent().toData(); - if (body == null || !body.acceptType(WSortLayout.class)) { + if (body == null) { return new String[0][0]; } - List mobileWidgetList = body.getOrderedMobileWidgetList(); + body.setSorted(false); + + if (body.getWidgetCount() > 0 && body.getWidget(0).acceptType(WAbsoluteBodyLayout.class)) { + WAbsoluteBodyLayout absoluteBodyLayout = (WAbsoluteBodyLayout) ((WAbsoluteLayout.BoundsWidget) body.getWidget(0)).getWidget(); + mobileWidgetList = absoluteBodyLayout.getOrderedMobileWidgetList(); + } else { + mobileWidgetList = body.getOrderedMobileWidgetList(); + } String[][] widgetName = new String[mobileWidgetList.size() + 1][1]; widgetName[0][0] = Inter.getLocText("FR-Designer_WidgetOrder"); for (int i = 0; i < mobileWidgetList.size(); i++) { widgetName[i + 1][0] = mobileWidgetList.get(i); } - if (!body.isSorted()) { - body.setSorted(true); - } + + body.setSorted(true); return widgetName; }