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] =?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 63b22e421..982f5aad0 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; }