Browse Source

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

master
plough 7 years ago
parent
commit
5827202288
  1. 6
      designer/src/com/fr/design/mainframe/InformationCollector.java
  2. 18
      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.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) {

18
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<String> mobileWidgetList = new ArrayList<String>();
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<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];
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);
}
return widgetName;
}

Loading…
Cancel
Save