Browse Source

Merge branch 'release/9.0' of http://cloud.finedevelop.com:2015/scm/~kerry/design into release/9.0

master
kerry 7 years ago
parent
commit
ffa6626a2a
  1. 6
      designer/src/com/fr/design/mainframe/InformationCollector.java
  2. 20
      designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java

6
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.JSONArray;
import com.fr.json.JSONException; import com.fr.json.JSONException;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
import com.fr.record.DBRecordManager; import com.fr.record.DBRecordXManager;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.EncodeConstants; import com.fr.stable.EncodeConstants;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
@ -217,7 +217,7 @@ public class InformationCollector implements XMLReadable, XMLWriter {
Table table = new Table(TABLE_NAME); Table table = new Table(TABLE_NAME);
try { try {
conn = DBRecordManager.getDB().createConnection(); conn = DBRecordXManager.getDB().createConnection();
ResultSet rs = selectAllFromLogDB(conn, table); ResultSet rs = selectAllFromLogDB(conn, table);
if(rs == null){ if(rs == null){
@ -254,7 +254,7 @@ public class InformationCollector implements XMLReadable, XMLWriter {
private void deleteLogDB(Connection conn, Table table) { private void deleteLogDB(Connection conn, Table table) {
try { try {
conn = DBRecordManager.getDB().createConnection(); conn = DBRecordXManager.getDB().createConnection();
Delete delete = new Delete(table); Delete delete = new Delete(table);
delete.execute(conn); delete.execute(conn);
} catch (Exception e) { } catch (Exception e) {

20
designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java

@ -3,6 +3,7 @@ package com.fr.design.mainframe;
import java.awt.*; import java.awt.*;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -246,25 +247,32 @@ public class MobileWidgetTable extends JTable {
* @return String[][] 二维数组[0][0]widgetName * @return String[][] 二维数组[0][0]widgetName
*/ */
private String[][] getData() { private String[][] getData() {
List<String> mobileWidgetList = new ArrayList<String>();
if (designer.isFormParaDesigner()) { if (designer.isFormParaDesigner()) {
return new String[0][0]; 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]; return new String[0][0];
} }
List<String> 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]; String[][] widgetName = new String[mobileWidgetList.size() + 1][1];
widgetName[0][0] = Inter.getLocText("FR-Designer_WidgetOrder"); widgetName[0][0] = Inter.getLocText("FR-Designer_WidgetOrder");
for (int i = 0; i < mobileWidgetList.size(); i++) { for (int i = 0; i < mobileWidgetList.size(); i++) {
widgetName[i + 1][0] = mobileWidgetList.get(i); widgetName[i + 1][0] = mobileWidgetList.get(i);
} }
if (!body.isSorted()) {
body.setSorted(true); body.setSorted(true);
}
return widgetName; return widgetName;
} }

Loading…
Cancel
Save