Browse Source

Merge branch 'release/10.0' of http://cloud.finedevelop.com:2015/scm/~mata.li/designrel into release/10.0

final/10.0
Mata.Li 6 years ago
parent
commit
de653417ab
  1. 14
      designer-base/src/main/java/com/fr/design/fun/ConnectionProvider.java
  2. 2
      designer-base/src/main/java/com/fr/design/style/color/ColorSelectDetailPane.java
  3. 18
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java
  4. 1
      designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPane.java
  5. 34
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/BBSConstants.java
  6. 2
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java
  7. 2
      designer-realize/src/main/java/com/fr/design/webattr/ReportWebWidgetConstants.java
  8. 41
      designer-realize/src/main/java/com/fr/start/SplashContext.java
  9. 2
      designer-realize/src/main/java/com/fr/start/preload/ImagePreLoader.java

14
designer-base/src/main/java/com/fr/design/fun/ConnectionProvider.java

@ -10,32 +10,36 @@ import com.fr.stable.fun.mark.Mutable;
*/ */
public interface ConnectionProvider extends Mutable { public interface ConnectionProvider extends Mutable {
public static final String XML_TAG = "ConnectionProvider"; String XML_TAG = "ConnectionProvider";
// 2016-12-14 1 -> 2 , 增加connection.feature方法导致不兼容. // 2016-12-14 1 -> 2 , 增加connection.feature方法导致不兼容.
int CURRENT_LEVEL = 2; int CURRENT_LEVEL = 2;
/** /**
* 数据连接弹出菜单的名字 * 数据连接弹出菜单的名字
*
* @return 名字 * @return 名字
*/ */
public String nameForConnection(); String nameForConnection();
/** /**
* 数据连接弹出菜单的图标 * 数据连接弹出菜单的图标
*
* @return 图标路径 * @return 图标路径
*/ */
public String iconPathForConnection(); String iconPathForConnection();
/** /**
* 数据连接的类型 * 数据连接的类型
*
* @return 连接类型 * @return 连接类型
*/ */
public Class<? extends com.fr.data.impl.Connection> classForConnection(); Class<? extends com.fr.data.impl.Connection> classForConnection();
/** /**
* 数据连接的设计界面 * 数据连接的设计界面
*
* @return 设计界面 * @return 设计界面
*/ */
public Class<? extends BasicBeanPane<? extends Connection>> appearanceForConnection(); Class<? extends BasicBeanPane<? extends Connection>> appearanceForConnection();
} }

2
designer-base/src/main/java/com/fr/design/style/color/ColorSelectDetailPane.java

@ -95,7 +95,7 @@ public class ColorSelectDetailPane extends BasicPane {
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
ColorSelectionModel model = (ColorSelectionModel) e.getSource(); ColorSelectionModel model = (ColorSelectionModel) e.getSource();
colorChooserPreview.setMyColor(model.getSelectedColor()); colorChooserPreview.setMyColor(model.getSelectedColor());
colorChooserPreview.paint(colorChooserPreview.getGraphics()); colorChooserPreview.repaint();
} }
}); });
previewPanel.add(colorChooserPreview); previewPanel.add(colorChooserPreview);

18
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java

@ -2,8 +2,8 @@ package com.fr.design.mainframe.chart.gui.style.axis;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.chart.base.AxisUnitType;
import com.fr.chart.base.ChartBaseUtils; import com.fr.chart.base.ChartBaseUtils;
import com.fr.chart.base.ChartConstants;
import com.fr.chart.chartattr.Axis; import com.fr.chart.chartattr.Axis;
import com.fr.chart.chartattr.Bar2DPlot; import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.NumberAxis; import com.fr.chart.chartattr.NumberAxis;
@ -78,7 +78,7 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
axisLineStylePane = new ChartAxisLineStylePane(); axisLineStylePane = new ChartAxisLineStylePane();
zeroPane = aliagnZero4Second(); zeroPane = aliagnZero4Second();
axisReversed = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_AxisReversed")); axisReversed = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_AxisReversed"));
unitCombox = new UIComboBox(ChartConstants.UNIT_I18N_VALUES); unitCombox = new UIComboBox(AxisUnitType.getI18NValues());
formatPane = new FormatPaneWithOutFont(); formatPane = new FormatPaneWithOutFont();
axisLabelPane = new ChartAxisLabelPane(); axisLabelPane = new ChartAxisLabelPane();
dataPane = createDataDefinePane(); dataPane = createDataDefinePane();
@ -257,10 +257,10 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
axisLineStylePane.update(axis); axisLineStylePane.update(axis);
axis.setAxisReversed(this.axisReversed.isSelected()); axis.setAxisReversed(this.axisReversed.isSelected());
String unitValue = Utils.objectToString(unitCombox.getSelectedItem()); String unitValue = Utils.objectToString(unitCombox.getSelectedItem());
if(ComparatorUtils.equals(unitValue, ChartConstants.UNIT_I18N_VALUES[0])) { if(ComparatorUtils.equals(unitValue, AxisUnitType.UNIT_NONE.toLocaleString())) {
unitValue = null; unitValue = null;
} }
numberAxis.setShowUnit(ChartConstants.getUnitValueFromKey(unitValue)); numberAxis.setShowUnit(AxisUnitType.parse(unitValue));
if(numberAxis.isSurpportAxisTitle()) { if(numberAxis.isSurpportAxisTitle()) {
updateAxisTitle(numberAxis); updateAxisTitle(numberAxis);
} }
@ -378,11 +378,13 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
axisLineStylePane.populate(axis); axisLineStylePane.populate(axis);
axisReversed.setSelected(axis.hasAxisReversed()); axisReversed.setSelected(axis.hasAxisReversed());
String unitKey = numberAxis.getShowUnit(); String unitKey;
if(StringUtils.isBlank(unitKey)) { if(numberAxis.getShowUnit() != null) {
unitKey = ChartConstants.UNIT_I18N_KEYS[0]; unitKey = numberAxis.getShowUnit().getStringType();
}else{
unitKey = AxisUnitType.UNIT_NONE.getStringType();
} }
unitCombox.setSelectedItem(ChartConstants.getUnitKey2Value(unitKey)); unitCombox.setSelectedItem(AxisUnitType.parse(unitKey).toLocaleString());
if(numberAxis.isSurpportAxisTitle()) { if(numberAxis.isSurpportAxisTitle()) {
populateAxisTitle(axis); populateAxisTitle(axis);

1
designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPane.java

@ -142,6 +142,7 @@ public class AutoRefreshPane extends BasicBeanPane<RefreshMoreLabel> {
} }
}); });
dialog.pack();
dialog.setModal(true); dialog.setModal(true);
dialog.setVisible(true); dialog.setVisible(true);
} }

34
designer-realize/src/main/java/com/fr/design/mainframe/bbs/BBSConstants.java

@ -26,29 +26,51 @@ public class BBSConstants {
private static Properties PROP = null; private static Properties PROP = null;
/**
* 获取所有的感谢对象无法获取在线使用默认
* @return 感谢对象的数组
*/
public static String[] getAllGuest() { public static String[] getAllGuest() {
return loadAllGuestsInfoOnline(GUEST_KEY_ONLINE, loadAllGuestsInfo(GUEST_KEY)); return loadAllGuestsInfoOnline(GUEST_KEY_ONLINE, loadAllGuestsInfo(GUEST_KEY));
} }
/**
* 获取所有的链接无法获取在线使用默认
* @return 链接的数组
*/
public static String[] getAllLink() { public static String[] getAllLink() {
return loadAllGuestsInfoOnline(LINK_KEY_ONLINE, loadAllGuestsInfo(LINK_KEY)); return loadAllGuestsInfoOnline(LINK_KEY_ONLINE, loadAllGuestsInfo(LINK_KEY));
} }
//加载所有用户的信息, 用户名, 论坛连接 /**
* 获取所有的感谢对象手动选择策略
* @return 感谢对象的数组
*/
public static String[] getAllGuestManual(boolean isOnline) {
String guest;
if (isOnline) {
guest = CloudCenter.getInstance().acquireUrlByKind(GUEST_KEY_ONLINE, StringUtils.EMPTY);
} else {
guest = loadAllGuestsInfo(GUEST_KEY);
}
if (StringUtils.isNotEmpty(guest)) {
return guest.split("\\|");
}
return new String[0];
}
private static String loadAllGuestsInfo(String key) { private static String loadAllGuestsInfo(String key) {
return loadAttribute(key, StringUtils.EMPTY); return loadAttribute(key, StringUtils.EMPTY);
} }
//加载所有用户的信息, 用户名, 论坛连接
private static String[] loadAllGuestsInfoOnline(String key, String defaultValue) { private static String[] loadAllGuestsInfoOnline(String key, String defaultValue) {
String[] allGuests = new String[0];
String guest = CloudCenter.getInstance().acquireUrlByKind(key, defaultValue); String guest = CloudCenter.getInstance().acquireUrlByKind(key, defaultValue);
if (StringUtils.isNotEmpty(guest)) { if (StringUtils.isNotEmpty(guest)) {
allGuests = guest.split("\\|"); return guest.split("\\|");
} }
return allGuests; return new String[0];
} }
//如果要定制, 直接改bbs.properties就行了 //如果要定制, 直接改bbs.properties就行了
private static String loadAttribute(String key, String defaultValue) { private static String loadAttribute(String key, String defaultValue) {
if (PROP == null) { if (PROP == null) {

2
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java

@ -427,7 +427,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
} }
} }
if (ComparatorUtils.equals(getGlobalName(), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preview"))) { if (ComparatorUtils.equals(getGlobalName(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview"))) {
cellGUIAttr.setPreviewContent(previewCellContent.isSelected()); cellGUIAttr.setPreviewContent(previewCellContent.isSelected());
} }

2
designer-realize/src/main/java/com/fr/design/webattr/ReportWebWidgetConstants.java

@ -129,7 +129,7 @@ public class ReportWebWidgetConstants {
BaseUtils.readIcon("/com/fr/web/images/appendRow.png"), AppendColumnRow.class); BaseUtils.readIcon("/com/fr/web/images/appendRow.png"), AppendColumnRow.class);
public static final WidgetOption DELETECOLUMNROW = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Delete_Record"), public static final WidgetOption DELETECOLUMNROW = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Delete_Record"),
BaseUtils.readIcon("/com/fr/web/images/deleteRow.png"), DeleteColumnRow.class); BaseUtils.readIcon("/com/fr/web/images/deleteRow.png"), DeleteColumnRow.class);
public static final WidgetOption VERIFY = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify"), BaseUtils.readIcon("/com/fr/web/images/verify.gif"), public static final WidgetOption VERIFY = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify"), BaseUtils.readIcon("/com/fr/web/images/verify.png"),
Verify.class); Verify.class);
public static final WidgetOption SUBMITFORCIBLY = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Submit_Forcibly"), public static final WidgetOption SUBMITFORCIBLY = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Submit_Forcibly"),
BaseUtils.readIcon("/com/fr/web/images/save2.png"), SubmitForcibly.class); BaseUtils.readIcon("/com/fr/web/images/save2.png"), SubmitForcibly.class);

41
designer-realize/src/main/java/com/fr/start/SplashContext.java

@ -24,6 +24,7 @@ public class SplashContext {
public static final String SPLASH_PATH = "/com/fr/design/images/splash_10.gif"; public static final String SPLASH_PATH = "/com/fr/design/images/splash_10.gif";
public static final String SPLASH_CACHE_NAME = "splash_10.gif"; public static final String SPLASH_CACHE_NAME = "splash_10.gif";
private static final int FETCH_ONLINE_MAX_TIMES = 10;
private static final SplashContext SPLASH_CONTEXT = new SplashContext(); private static final SplashContext SPLASH_CONTEXT = new SplashContext();
@ -33,7 +34,8 @@ public class SplashContext {
private int loadingIndex = 0; private int loadingIndex = 0;
private String[] loading = new String[]{"..", "....", "......"}; private String[] loading = new String[]{"..", "....", "......"};
private static final String GUEST = getRandomUser(); private int fetchOnlineTimes = 0;
private String guest = StringUtils.EMPTY;
private ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); private ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
@ -81,6 +83,7 @@ public class SplashContext {
scheduler.scheduleAtFixedRate(new Runnable() { scheduler.scheduleAtFixedRate(new Runnable() {
@Override @Override
public void run() { public void run() {
showThanks();
loadingIndex++; loadingIndex++;
updateModuleLog(moduleID.isEmpty() ? StringUtils.EMPTY : moduleID + loading[loadingIndex % 3]); updateModuleLog(moduleID.isEmpty() ? StringUtils.EMPTY : moduleID + loading[loadingIndex % 3]);
} }
@ -90,7 +93,6 @@ public class SplashContext {
@Override @Override
public void on(Event event, String i18n) { public void on(Event event, String i18n) {
showThanks();
moduleID = i18n; moduleID = i18n;
loadingIndex++; loadingIndex++;
updateModuleLog(moduleID.isEmpty() ? StringUtils.EMPTY : moduleID + loading[loadingIndex % 3]); updateModuleLog(moduleID.isEmpty() ? StringUtils.EMPTY : moduleID + loading[loadingIndex % 3]);
@ -110,21 +112,42 @@ public class SplashContext {
/** /**
* 获取随机感谢人员 * 获取随机感谢人员
*/ */
private static String getRandomUser() { private String getRandomUser(String[] allGuest) {
String[] allGuest = BBSConstants.getAllGuest();
if (allGuest.length == 0) {
return StringUtils.EMPTY;
}
int num = new Random().nextInt(allGuest.length); int num = new Random().nextInt(allGuest.length);
return StringUtils.BLANK + allGuest[num]; return StringUtils.BLANK + allGuest[num];
} }
/** /**
* 展示感谢信息 * 尝试获取在线资源达到尝试上限之后使用默认值
*/
private void tryFetchOnline() {
if (StringUtils.isNotEmpty(guest)) {
return;
}
String[] allGuest;
if (fetchOnlineTimes < FETCH_ONLINE_MAX_TIMES) {
allGuest = BBSConstants.getAllGuestManual(true);
if (allGuest.length == 0) {
fetchOnlineTimes++;
return;
}
} else {
allGuest = BBSConstants.getAllGuestManual(false);
}
guest = getRandomUser(allGuest);
}
/**
* 展示感谢信息这里场景是优先使用在线名单
* 甚至可以因此可以延迟几秒显示目前是尝试
* 获取10次在线资源最大时间3秒
*/ */
private void showThanks() { private void showThanks() {
if (shouldShowThanks()) { if (shouldShowThanks()) {
updateThanksLog(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Thanks_To") + GUEST); tryFetchOnline();
if (StringUtils.isNotEmpty(guest)) {
updateThanksLog(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Thanks_To") + guest);
}
} }
} }

2
designer-realize/src/main/java/com/fr/start/preload/ImagePreLoader.java

@ -370,7 +370,7 @@ public class ImagePreLoader {
"com/fr/web/images/scale.png", "com/fr/web/images/scale.png",
"com/fr/web/images/appendRow.png", "com/fr/web/images/appendRow.png",
"com/fr/web/images/deleteRow.png", "com/fr/web/images/deleteRow.png",
"com/fr/web/images/verify.gif", "com/fr/web/images/verify.png",
"com/fr/web/images/save2.png", "com/fr/web/images/save2.png",
"com/fr/design/images/m_file/export.png", "com/fr/design/images/m_file/export.png",
"com/fr/web/images/showValue.png", "com/fr/web/images/showValue.png",

Loading…
Cancel
Save