Browse Source

Merge remote-tracking branch 'origin/bugfix/10.0' into bugfix/10.0

bugfix/10.0
Yvan 4 years ago
parent
commit
59563d2b48
  1. 9
      designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java
  2. 21
      designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java
  3. 1
      designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDependenceSettingPane.java
  4. 11
      designer-base/src/main/java/com/fr/design/mainframe/App.java
  5. 2
      designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java
  6. 10
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java
  7. 10
      designer-chart/src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java
  8. 1
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java
  9. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  10. 35
      designer-chart/src/main/resources/com/fr/design/editor/script/i18n.js
  11. 1
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java
  12. 6
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java
  13. 14
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java
  14. 8
      designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java
  15. 4
      designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/impl/AbstractSendDataToCloud.java

9
designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java

@ -14,10 +14,10 @@ import javax.swing.BoxLayout;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import java.awt.Dimension;
import java.util.Iterator;
import java.util.Map;
import java.util.LinkedHashMap;
import java.util.Map;
import java.awt.Dimension;
@Open
public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
@ -69,7 +69,12 @@ public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
selectedItemScrollPane.setViewportView(selectedItemPane);
selectedItemScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
selectedItemScrollPane.setMinimumSize(new Dimension((int) selectedItemScrollPane.getPreferredSize().getWidth(), MIN_HEIGHT));
dealScrollPane(selectedItemScrollPane);
propertyChangePane.add(selectedItemScrollPane);
}
protected void dealScrollPane(JScrollPane scrollPane){
}
public void updateBean(T ob) {

21
designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java vendored

@ -25,13 +25,19 @@ public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
private static final String HOST_NAME = "127.0.0.1";
private static final String LOCAL_HOTS_NAME = "localhost";
private static final String QUOTATION = ":";
private static final String PORT = Integer.toString(DesignerEnvManager.getEnvManager().getEmbedServerPort());
private static String port = Integer.toString(DesignerEnvManager.getEnvManager().getEmbedServerPort());
static {
FILTER_SET.add(HTTP + HOST_NAME + QUOTATION + PORT + PATH);
FILTER_SET.add(HTTPS + HOST_NAME + QUOTATION + PORT + PATH);
FILTER_SET.add(HTTP + LOCAL_HOTS_NAME + QUOTATION + PORT + PATH);
FILTER_SET.add(HTTPS + LOCAL_HOTS_NAME + QUOTATION + PORT + PATH);
initFilerSet(port);
}
private static void initFilerSet(String newPort) {
FILTER_SET.clear();
FILTER_SET.add(HTTP + HOST_NAME + QUOTATION + newPort + PATH);
FILTER_SET.add(HTTPS + HOST_NAME + QUOTATION + newPort + PATH);
FILTER_SET.add(HTTP + LOCAL_HOTS_NAME + QUOTATION + newPort + PATH);
FILTER_SET.add(HTTPS + LOCAL_HOTS_NAME + QUOTATION + newPort + PATH);
port = newPort;
}
private String name;
@ -164,6 +170,11 @@ public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
@Override
public boolean checkValid() {
boolean result = false;
String newPort = Integer.toString(DesignerEnvManager.getEnvManager().getEmbedServerPort());
if (!ComparatorUtils.equals(port, newPort)) {
// 使用过程中 更改了内置服务器端口 重新初始化下
initFilerSet(newPort);
}
if (FILTER_SET.contains(connection.getUrl())) {
FineLoggerFactory.getLogger().error("url is same with local designer");
return result;

1
designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDependenceSettingPane.java

@ -142,6 +142,7 @@ public class LayerDependenceSettingPane extends JPanel implements ItemListener {
this.model.clear();
this.model.addAll(dependenceList);
this.model.fireTableDataChanged();
}

11
designer-base/src/main/java/com/fr/design/mainframe/App.java

@ -41,4 +41,15 @@ public interface App<T extends BaseBook> extends Mutable, Aftermath {
* @return 报表
*/
T asIOFile(FILE tplFile);
/**
* 输出workbook等对象
* @param tplFile 文件
* @param needCheck 是否需要check
* @return
*/
default T asIOFile(FILE tplFile, boolean needCheck) {
return asIOFile(tplFile);
}
}

2
designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java

@ -56,7 +56,7 @@ public final class JTemplateFactory {
String[] defaultAppExtensions = app.defaultExtensions();
for (String defaultAppExtension : defaultAppExtensions) {
if (defaultAppExtension.equalsIgnoreCase(fileExtension)) {
BaseBook bb = app.asIOFile(file);
BaseBook bb = app.asIOFile(file, false);
if (bb != null) {
return (T) bb;
}

10
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java

@ -15,9 +15,10 @@ import com.fr.log.FineLoggerFactory;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import java.util.Iterator;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.util.Iterator;
/**
* Created by IntelliJ IDEA.
@ -27,6 +28,9 @@ import java.util.Iterator;
* Time : 上午9:16
*/
public class DataSeriesConditionPane extends ConditionAttributesPane<ConditionAttr> {
private static final int SCROLL_BAR_UNIT_INCREMENT = 16;
protected Plot plot;
public DataSeriesConditionPane(Plot plot) {
@ -43,6 +47,10 @@ public class DataSeriesConditionPane extends ConditionAttributesPane<ConditionAt
this(null);
}
protected void dealScrollPane(JScrollPane scrollPane){
scrollPane.getVerticalScrollBar().setUnitIncrement(SCROLL_BAR_UNIT_INCREMENT);
}
private void initAvailableActionList() {
addBasicAction();
addAxisPositionAction();

10
designer-chart/src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java

@ -2,6 +2,8 @@ package com.fr.extended.chart;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.i18n.Toolkit;
import com.fr.general.GeneralUtils;
import com.fr.stable.StringUtils;
import java.util.List;
@ -17,6 +19,11 @@ public class UIComboBoxWithNone extends UIComboBox {
public UIComboBoxWithNone() {
super();
addDefaultItem();
setDefaultSelectedItem();
}
protected void setDefaultSelectedItem() {
setSelectedItem(StringUtils.EMPTY);
}
@Override
@ -43,7 +50,8 @@ public class UIComboBoxWithNone extends UIComboBox {
//找不到的都选中无。中文的无 英文下是none。
//改正:找不到的且anObject不是null的 全部选中无。
if (getSelectedIndex() == -1 && anObject != null) {
//改正:找不到的且anObject不是null的且anObject不是空字符串的 全部选中无。
if (getSelectedIndex() == -1 && StringUtils.isNotEmpty(GeneralUtils.objectToString(anObject))) {
super.setSelectedItem(getDefaultLocaleString());
}
}

1
designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java

@ -73,5 +73,6 @@ public class VanChartColumnPlotLabelDetailPane extends VanChartPlotLabelDetailPa
public void update(AttrLabelDetail detail) {
super.update(detail);
checkOrientationEnable(detail);
checkOrientation();
}
}

2
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java

@ -334,7 +334,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
checkPositionEnabled();
}
private void checkOrientation() {
protected void checkOrientation() {
if (orientation != null && borderPaneWithTitle != null && backgroundPaneWithTitle != null) {
boolean horizontal = orientation.getSelectedIndex() == HORIZONTAL_INDEX;

35
designer-chart/src/main/resources/com/fr/design/editor/script/i18n.js

@ -16,7 +16,12 @@
"BI-Basic_Font_Color": "文字颜色",
"BI-Word_Align_Left": "文字居左",
"BI-Word_Align_Center": "文字居中",
"BI-Word_Align_Right": "文字居右"
"BI-Word_Align_Right": "文字居右",
"BI-Basic_Cancel": "取消",
"BI-Basic_Save": "保存",
"BI-Basic_More": "更多",
"BI-Custom_Color": "自定义颜色",
"BI-Transparent_Color": "透明"
};
var taiwan = {
@ -35,7 +40,12 @@
"BI-Basic_Font_Color": "文字顏色",
"BI-Word_Align_Left": "文字居左",
"BI-Word_Align_Center": "文字居中",
"BI-Word_Align_Right": "文字居右"
"BI-Word_Align_Right": "文字居右",
"BI-Basic_Cancel": "取消",
"BI-Basic_Save": "保存",
"BI-Basic_More": "更多",
"BI-Custom_Color": "自定義顏色",
"BI-Transparent_Color": "透明"
};
var english = {
@ -54,7 +64,12 @@
"BI-Basic_Font_Color": "Font Color",
"BI-Word_Align_Left": "Align Left",
"BI-Word_Align_Center": "Align Center",
"BI-Word_Align_Right": "Align Right"
"BI-Word_Align_Right": "Align Right",
"BI-Basic_Cancel": "Cancel",
"BI-Basic_Save": "Save",
"BI-Basic_More": "More",
"BI-Custom_Color": "Custom Color",
"BI-Transparent_Color": "Transparent Color"
};
var japanese = {
@ -73,7 +88,12 @@
"BI-Basic_Font_Color": "テキストの色",
"BI-Word_Align_Left": "左のテキスト",
"BI-Word_Align_Center": "テキスト中心",
"BI-Word_Align_Right": "右のテキスト"
"BI-Word_Align_Right": "右のテキスト",
"BI-Basic_Cancel": "キャンセル",
"BI-Basic_Save": "セーブ",
"BI-Basic_More": "もっと",
"BI-Custom_Color": "カスタムカラー",
"BI-Transparent_Color": "トランスペアレント"
};
var korean = {
@ -92,7 +112,12 @@
"BI-Basic_Font_Color": "텍스트 색상",
"BI-Word_Align_Left": "왼쪽 텍스트",
"BI-Word_Align_Center": "텍스트 중심",
"BI-Word_Align_Right": "오른쪽 텍스트"
"BI-Word_Align_Right": "오른쪽 텍스트",
"BI-Basic_Cancel": "취소",
"BI-Basic_Save": "저장",
"BI-Basic_More": "더",
"BI-Custom_Color": "맞춤 색상",
"BI-Transparent_Color": "투명한"
};
function transformI18n(language) {

1
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java

@ -160,6 +160,7 @@ public class XCardSwitchButton extends XButton {
return;
}
deleteCard(this, index);
selectionModel.setSelectedCreator(designer.getRootComponent());
designer.fireTargetModified();
LayoutUtils.layoutRootContainer(designer.getRootComponent());
FormHierarchyTreePane.getInstance().refreshRoot();

6
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java

@ -176,8 +176,10 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane {
this.functionalWhenUnactivatedCheckBox.setSelected(!isFunctionalWhenUnactivated);
this.bindListeners2Widgets();
this.addAttributeChangeListener(changeListener);
// 直接return时 也要处理下相应数据
MobileCollapsedStyle style = ((ChartEditor) xCreator.toData()).getMobileCollapsedStyle();
if (!FormDesignerUtils.isAppRelayout(designer) || isInAbsoluteLayout()) {
fix(style);
return;
}
@ -199,8 +201,6 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane {
}
}
});
MobileCollapsedStyle style = ((ChartEditor) xCreator.toData()).getMobileCollapsedStyle();
this.mobileCollapsedStyleEditor.setStyle(style);
fix(style);
this.mobileCollapsedStyleEditor.setSelected(style.isCollapsedWork());

14
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java

@ -66,10 +66,10 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
@Override
public SearchResult getLessSearchResult(String[] searchText) {
this.recentModelList = new SearchResult();
SearchResult modelList = new SearchResult();
for (String aSearchText : searchText) {
recentModelList = getRecentModelList(aSearchText);
addToRecentModelList(aSearchText);
}
if (recentModelList != null && recentModelList.size() > 0) {
modelList.add(new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Latest")));
@ -87,8 +87,12 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
return new SearchResult();
}
private synchronized SearchResult getRecentModelList(String searchText) {
return searchBySort(searchText);
/**
* 将单次遍历的关键词的搜索结果添加到结果集中
* @param searchText
*/
private synchronized void addToRecentModelList(String searchText) {
searchBySort(searchText);
}
public List<AlphaCellModel> getRecentModelList() {
@ -161,7 +165,6 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
* 按序搜索
*/
private synchronized SearchResult searchBySort(String key) {
recentModelList = new SearchResult();
try {
initReader();
@ -175,7 +178,6 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
Query query = new TermQuery(term);
TopFieldDocs docs = searcher.search(query, MAX_SIZE, sortKey);
ScoreDoc[] scores = docs.scoreDocs;
this.recentModelList = new SearchResult();
//遍历结果
for (ScoreDoc scoreDoc : scores) {
Document document = searcher.doc(scoreDoc.doc);

8
designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java

@ -42,7 +42,11 @@ class CptApp extends AbstractWorkBookApp {
@Override
public WorkBook asIOFile(FILE file) {
return asIOFile(file, true);
}
@Override
public WorkBook asIOFile(FILE file, boolean needCheck) {
if (XMLEncryptUtils.isCptEncoded() &&
!XMLEncryptUtils.checkVaild(DesignerEnvManager.getEnvManager().getEncryptionKey())) {
if (!new DecodeDialog(file).isPwdRight()) {
@ -67,7 +71,9 @@ class CptApp extends AbstractWorkBookApp {
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Report_NS_Exception_ReadError") + file, exp);
}
checkNameStyle(namestyle);
if (needCheck) {
checkNameStyle(namestyle);
}
return tpl;
}

4
designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/impl/AbstractSendDataToCloud.java

@ -126,9 +126,9 @@ public abstract class AbstractSendDataToCloud implements XMLable {
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return;
} finally {
fileEntityBuilder.deleteFileAndZipFile(file, pathName);
}
fileEntityBuilder.deleteFileAndZipFile(file, pathName);
}

Loading…
Cancel
Save