|
|
@ -250,26 +250,23 @@ public class MobileWidgetTable extends JTable { |
|
|
|
return new String[0][0]; |
|
|
|
return new String[0][0]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//选择的控件
|
|
|
|
WFitLayout body = (WFitLayout) designer.getRootComponent().toData(); |
|
|
|
XCreator selectedCreator = designer.getSelectionModel().getSelection().getSelectedCreator(); |
|
|
|
|
|
|
|
Widget selectedModel = selectedCreator != null ? selectedCreator.toData() : null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (selectedModel == null) { |
|
|
|
if (body == null || !body.acceptType(WSortLayout.class)) { |
|
|
|
return new String[0][0]; |
|
|
|
return new String[0][0]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 选择的控件有两种类型,一种是WLayout,代表容器,一种是Widget,代表控件
|
|
|
|
List<String> mobileWidgetList = body.getOrderedMobileWidgetList(); |
|
|
|
if (selectedModel.acceptType(WSortLayout.class)) { |
|
|
|
|
|
|
|
List<String> mobileWidgetList = ((WSortLayout) selectedModel).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); |
|
|
|
} |
|
|
|
} |
|
|
|
return widgetName; |
|
|
|
if (!body.isSorted()) { |
|
|
|
} else { |
|
|
|
body.setSorted(true); |
|
|
|
return new String[0][0]; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return widgetName; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean isCollapsed() { |
|
|
|
public boolean isCollapsed() { |
|
|
|