Browse Source

代码质量

master
XiaXiang 8 years ago
parent
commit
213acb8172
  1. 15
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  2. 8
      designer/src/com/fr/design/mainframe/alphafine/searchManager/RecentSearchManager.java

15
designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -595,7 +595,7 @@ public class AlphaFineDialog extends UIDialog {
httpClient.setTimeout(5000);
httpClient.asGet();
if (!httpClient.isServerAlive()) {
FRLogger.getLogger().error("404");
FRLogger.getLogger().error("Failed to sent data to server!");
}
}
@ -626,10 +626,6 @@ public class AlphaFineDialog extends UIDialog {
repaint();
}
private void updatePopup() {
}
private SearchResult getMoreResult(MoreModel selectedValue) {
SearchResult moreResult;
switch (selectedValue.getType()) {
@ -655,14 +651,6 @@ public class AlphaFineDialog extends UIDialog {
return (SearchListModel) searchResultList.getModel();
}
// //测试
// public static void main(String[] args) {
// AlphaFineDialog alphaFineDialog = new AlphaFineDialog(DesignerContext.getDesignerFrame());
// alphaFineDialog.setSize(new Dimension(680,55));
// alphaFineDialog.setVisible(true);
// }
public SearchListModel setListModel(SearchListModel jListModel) {
this.searchListModel = jListModel;
return this.searchListModel;
@ -676,4 +664,5 @@ public class AlphaFineDialog extends UIDialog {
this.searchWorker = searchWorker;
}
}

8
designer/src/com/fr/design/mainframe/alphafine/searchManager/RecentSearchManager.java

@ -89,14 +89,18 @@ public class RecentSearchManager extends XMLFileManager implements AlphaFineSear
String nodeName = reader.getTagName();
if (nodeName.equals("model")) {
String name = reader.getAttrAsString("cellModel", StringUtils.EMPTY);
addModelToList(list, name);
}
}
}
private void addModelToList(List<AlphaCellModel> list, String name) {
try {
list.add(CellModelHelper.getModelFromJson(new JSONObject(name)));
} catch (JSONException e) {
FRLogger.getLogger().error(e.getMessage());
}
}
}
}
@Override
public void writeXML(XMLPrintWriter writer) {

Loading…
Cancel
Save