Browse Source

Merge remote-tracking branch 'origin/release/9.0' into release/9.0

master
momeak 7 years ago
parent
commit
d343aa4517
  1. 40
      designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java
  2. 92
      designer/src/com/fr/design/mainframe/bbs/BBSConstants.java
  3. 24
      designer/src/com/fr/design/mainframe/bbs/BBSGuestPane.java
  4. 12
      designer/src/com/fr/design/mainframe/bbs/bbs.properties
  5. 2
      designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java
  6. 11
      designer/src/com/fr/design/widget/WidgetPane.java
  7. 4
      designer/src/com/fr/design/widget/ui/ParameterTreeComboBox.java
  8. 123
      designer/src/com/fr/start/ReportSplashPane.java
  9. 2
      designer_base/src/com/fr/design/DesignerEnvManager.java
  10. 2
      designer_base/src/com/fr/design/actions/file/OpenTemplateAction.java
  11. 66
      designer_base/src/com/fr/design/actions/help/AboutPane.java
  12. 5
      designer_base/src/com/fr/design/constants/UIConstants.java
  13. 5
      designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java
  14. 2
      designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java
  15. 2
      designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java
  16. 18
      designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java
  17. 2
      designer_base/src/com/fr/design/gui/icombobox/FunctionComboBox.java
  18. 4
      designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java
  19. 2
      designer_base/src/com/fr/design/gui/icontainer/UIScrollPaneUI.java
  20. BIN
      designer_base/src/com/fr/design/images/control/down.png
  21. 4
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  22. 2
      designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  23. 66
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java
  24. 5
      designer_base/src/com/fr/design/mainframe/widget/accessibles/AccessibleIconEditor.java
  25. 13
      designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java
  26. 20
      designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java
  27. 19
      designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java
  28. 15
      designer_base/src/com/fr/design/widget/component/DateValuePane.java
  29. 74
      designer_base/src/com/fr/design/widget/component/NumberEditorValidatePane.java
  30. 21
      designer_base/src/com/fr/start/BaseDesigner.java
  31. 1
      designer_chart/src/com/fr/design/chart/javascript/ChartEmailPane.java
  32. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java
  33. 409
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java
  34. 23
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java
  35. 5
      designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java
  36. 2
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartHtmlLabelPane.java
  37. 24
      designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPaneWithOutImageAndShadow.java
  38. 27
      designer_chart/src/com/fr/plugin/chart/designer/data/VanChartMoreCateReportDataContentPane.java
  39. 27
      designer_chart/src/com/fr/plugin/chart/designer/data/VanChartMoreCateTableDataContentPane.java
  40. 1
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  41. 10
      designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  42. 56
      designer_chart/src/com/fr/plugin/chart/drillmap/designer/data/comp/DrillMapLayerPane.java
  43. 44
      designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java
  44. 15
      designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java
  45. 3
      designer_chart/src/com/fr/plugin/chart/heatmap/designer/type/VanChartHeatMapTypePane.java
  46. 3
      designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapPlotPane.java
  47. 9
      designer_chart/src/com/fr/plugin/chart/pie/VanChartPieSeriesPane.java
  48. 2
      designer_chart/src/com/fr/plugin/chart/range/component/LegendLabelFormatPane.java
  49. 4
      designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleWLayoutBorderStyleEditor.java
  50. 4
      designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java
  51. 4
      designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java

40
designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java

@ -102,31 +102,41 @@ public class CellWidgetPropertyPane extends BasicPane {
} }
public void update() { public void update() {
if (cellElement == null) {// 利用默认的CellElement. if (cellElement == null || !cellEditorDefPane.isShouldFireSelectedEvent()) {
return; return;
} }
final CellSelection finalCS = (CellSelection) ePane.getSelection(); final CellSelection finalCS = (CellSelection) ePane.getSelection();
final TemplateElementCase tplEC = ePane.getEditingElementCase(); final TemplateElementCase tplEC = ePane.getEditingElementCase();
ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() { if(finalCS.isSelectedOneCell(ePane)){
public void dealWith(CellElement editCellElement) { if(tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow())== null){//cellElement未加入到report中时要添加进去
Widget cellWidget = cellEditorDefPane.update(); tplEC.addCellElement(cellElement);
// p:最后把这个cellEditorDef设置到CellGUIAttr.
TemplateCellElement cellElement = (TemplateCellElement) editCellElement;
if (cellWidget instanceof NoneWidget) {
cellElement.setWidget(null);
} else {
if (cellElement.getWidget() != null) {
cellWidget = upDateWidgetAuthority(cellElement, cellWidget);
}
cellElement.setWidget(cellWidget);
}
} }
}); setCellWidget(cellElement);
}else{
ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() {
public void dealWith(CellElement editCellElement) {
// p:最后把这个cellEditorDef设置到CellGUIAttr.
TemplateCellElement templateCellElement = (TemplateCellElement) editCellElement;
setCellWidget(templateCellElement);
}
});
}
if(DesignerContext.getDesignerFrame().getSelectedJTemplate() != null){ if(DesignerContext.getDesignerFrame().getSelectedJTemplate() != null){
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
} }
} }
private void setCellWidget(TemplateCellElement cellElement){
Widget cellWidget = cellEditorDefPane.update();
if (cellWidget instanceof NoneWidget) {
cellElement.setWidget(null);
} else {
if (cellElement.getWidget() != null) {
cellWidget = upDateWidgetAuthority(cellElement, cellWidget);
}
cellElement.setWidget(cellWidget);
}
}
public void reInitAllListener(){ public void reInitAllListener(){
cellEditorDefPane.registerListener(); cellEditorDefPane.registerListener();

92
designer/src/com/fr/design/mainframe/bbs/BBSConstants.java

@ -1,59 +1,69 @@
/** /**
* *
*/ */
package com.fr.design.mainframe.bbs; package com.fr.design.mainframe.bbs;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.SiteCenter;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import java.util.Properties; import java.util.Properties;
/** /**
* @author neil * @author neil
*
* @date: 2015-3-10-上午9:50:13 * @date: 2015-3-10-上午9:50:13
*/ */
public class BBSConstants { public class BBSConstants {
//判断是否更新的关键字 //判断是否更新的关键字
public static final String UPDATE_KEY = loadAttribute("UPDATE_KEY", "newIsPopup"); public static final String UPDATE_KEY = loadAttribute("UPDATE_KEY", "newIsPopup");
private static final String GUEST_KEY = "USER"; private static final String GUEST_KEY = "USER";
private static final String LINK_KEY = "LINK"; private static final String GUEST_KEY_ONLINE = "guest.user";
private static final int GUEST_NUM = 5; private static final String LINK_KEY = "LINK";
private static final String LINK_KEY_ONLINE = "guest.link";
//用户名信息数组
public static final String[] ALL_GUEST = loadAllGuestsInfo(GUEST_KEY); private static Properties PROP = null;
//用户论坛链接信息
public static final String[] ALL_LINK = loadAllGuestsInfo(LINK_KEY); public static String[] getAllGuest() {
return loadAllGuestsInfoOnline(GUEST_KEY_ONLINE, loadAllGuestsInfo(GUEST_KEY));
private static Properties PROP = null; }
//加载所有用户的信息, 用户名, 论坛连接 public static String[] getAllLink() {
private static String[] loadAllGuestsInfo(String key){ return loadAllGuestsInfoOnline(LINK_KEY_ONLINE, loadAllGuestsInfo(LINK_KEY));
String[] allGuests = new String[GUEST_NUM]; }
for (int i = 0; i < GUEST_NUM; i++) {
allGuests[i] = loadAttribute(key + i, StringUtils.EMPTY); //加载所有用户的信息, 用户名, 论坛连接
} private static String loadAllGuestsInfo(String key) {
return loadAttribute(key, StringUtils.EMPTY);
return allGuests; }
}
//如果要定制, 直接改bbs.properties就行了 //加载所有用户的信息, 用户名, 论坛连接
private static String loadAttribute(String key, String defaultValue) { private static String[] loadAllGuestsInfoOnline(String key, String defaultValue) {
if (PROP == null) { String[] allGuests = new String[0];
PROP = new Properties(); String guest = SiteCenter.getInstance().acquireUrlByKind(key, defaultValue);
try { if (StringUtils.isNotEmpty(guest)) {
PROP.load(IOUtils.getResourceAsStream("/com/fr/design/mainframe/bbs/bbs.properties", BBSConstants.class)); allGuests = guest.split("\\|");
} catch (Exception e) { }
} return allGuests;
} }
String p = PROP.getProperty(key); //如果要定制, 直接改bbs.properties就行了
if (StringUtils.isEmpty(p)) { private static String loadAttribute(String key, String defaultValue) {
p = defaultValue; if (PROP == null) {
} PROP = new Properties();
return p; try {
} PROP.load(IOUtils.getResourceAsStream("/com/fr/design/mainframe/bbs/bbs.properties", BBSConstants.class));
} catch (Exception e) {
}
}
String p = PROP.getProperty(key);
if (StringUtils.isEmpty(p)) {
p = defaultValue;
}
return p;
}
} }

24
designer/src/com/fr/design/mainframe/bbs/BBSGuestPane.java

@ -3,15 +3,6 @@
*/ */
package com.fr.design.mainframe.bbs; package com.fr.design.mainframe.bbs;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.URI;
import javax.swing.JPanel;
import com.fr.design.gui.ilable.ActionLabel; import com.fr.design.gui.ilable.ActionLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
@ -21,6 +12,12 @@ import com.fr.general.Inter;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.start.BBSGuestPaneProvider; import com.fr.start.BBSGuestPaneProvider;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.URI;
/** /**
* @author neil * @author neil
* *
@ -54,9 +51,12 @@ public class BBSGuestPane extends JPanel implements BBSGuestPaneProvider{
double[] colSize = {p}; double[] colSize = {p};
Component[][] components = new Component[rowSize.length][colSize.length]; Component[][] components = new Component[rowSize.length][colSize.length];
for (int i = 0; i < components.length; i++) { String[] allGuest = BBSConstants.getAllGuest();
String userName = BBSConstants.ALL_GUEST[i]; String[] allLink = BBSConstants.getAllLink();
String url = BBSConstants.ALL_LINK[i]; int min = Math.min(allGuest.length, components.length);
for (int i = 0; i < min; i++) {
String userName = allGuest[i];
String url = allLink[i];
components[i][0] = getURLActionLabel(userName, url); components[i][0] = getURLActionLabel(userName, url);
} }

12
designer/src/com/fr/design/mainframe/bbs/bbs.properties

@ -4,16 +4,8 @@ COLLECT_URL=http://www.finereporthelp.com:8081/bbs/ReportServer?op=bbs&cmd=colle
DEFAULT_URL=http\://bbs.finereport.com/home.php?mod=space&do=notice DEFAULT_URL=http\://bbs.finereport.com/home.php?mod=space&do=notice
GET_MESSAGE_URL=http://feedback.finedevelop.com:3000/bbs/message/count GET_MESSAGE_URL=http://feedback.finedevelop.com:3000/bbs/message/count
GET_SIGN_INFO_URL=http\://bbs.finereport.com GET_SIGN_INFO_URL=http\://bbs.finereport.com
LINK0=http\://bbs.finereport.com/space-uid-55823.html LLINK= http\://bbs.fanruan.com/home.php?mod=space&uid=66470&do=profile|http\://bbs.fanruan.com/home.php?mod=space&uid=67190&do=profile|http\://bbs.fanruan.com/home.php?mod=space&uid=65659&do=profile|http\://bbs.fanruan.com/home.php?mod=space&uid=60352&do=profile|http\://bbs.fanruan.com/home.php?mod=space&uid=78157&do=profile
LINK1=http\://bbs.finereport.com/space-uid-56940.html
LINK2=http\://bbs.finereport.com/space-uid-51621.html
LINK3=http\://bbs.finereport.com/space-uid-52618.html
LINK4=http\://bbs.finereport.com/space-uid-48993.html
SHARE_URL=http\://bbs.finereport.com SHARE_URL=http\://bbs.finereport.com
USER0=\u6590\u6CE2\u90A3\u5951(\u5B59\u70B3\u6DA6) UUSER=cherishdqy\uFF08\u9093\u79CB\u4E91\uFF09|yets11\uFF08\u9676\u5B5D\u6587\uFF09|\u661F\u75D5\uFF08\u71D5\u5B8F\u4F1F\uFF09|\u9759\u542C\u7985\u9E23\uFF08\u674E\u51A0\u519B\uFF09|yiyemeiying\uFF08\u5218\u4F73\uFF09
USER1=deafire(\u674E\u5FD7\u4F1F)
USER2=\u963F\u8FEA(\u8C22\u8FEA)
USER3=bingjie(\u5F20\u8BB0\u82B1)
USER4=\u6D77\u7EF5\u5B9D\u5B9D(\u90DD\u6B63)
VERIFY_URL=http://www.finereporthelp.com:8081/bbs/ReportServer?op=bbs&cmd=verify VERIFY_URL=http://www.finereporthelp.com:8081/bbs/ReportServer?op=bbs&cmd=verify
UPDATE_INFO_URL=http://bbs.finereport.com/source/plugin/infor/infor.html UPDATE_INFO_URL=http://bbs.finereport.com/source/plugin/infor/infor.html

2
designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java

@ -159,7 +159,7 @@ public class ErrorInfoUploader {
try { try {
success = ComparatorUtils.equals(new JSONObject(res).get("status"), "success"); success = ComparatorUtils.equals(new JSONObject(res).get("status"), "success");
} catch (Exception ex) { } catch (Exception ex) {
success = false; success = true;
} }
return success; return success;
} }

11
designer/src/com/fr/design/widget/WidgetPane.java

@ -47,6 +47,12 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
this.initComponents(pane); this.initComponents(pane);
} }
public boolean isShouldFireSelectedEvent(){
return shouldFireSelectedEvent;
}
protected void initComponents(ElementCasePane pane) { protected void initComponents(ElementCasePane pane) {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
@ -136,8 +142,8 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
String name = ((NameWidget) widget).getName(); String name = ((NameWidget) widget).getName();
shouldFireSelectedEvent = false; shouldFireSelectedEvent = false;
editorTypeComboBox.setSelectedItem(new Item(name, name)); editorTypeComboBox.setSelectedItem(new Item(name, name));
shouldFireSelectedEvent = true;
cellEditorCardPane.populate(widget); cellEditorCardPane.populate(widget);
shouldFireSelectedEvent = true;
} }
// 内置组件 // 内置组件
else { else {
@ -145,10 +151,9 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
if (ArrayUtils.contains(ButtonConstants.CLASSES4BUTTON, clazz)) { if (ArrayUtils.contains(ButtonConstants.CLASSES4BUTTON, clazz)) {
clazz = Button.class; clazz = Button.class;
} }
cellEditorCardPane.populate(widget);
shouldFireSelectedEvent = false; shouldFireSelectedEvent = false;
editorTypeComboBox.setSelectedItemByWidgetClass(clazz); editorTypeComboBox.setSelectedItemByWidgetClass(clazz);
cellEditorCardPane.populate(widget);
shouldFireSelectedEvent = true; shouldFireSelectedEvent = true;
} }
removeAttributeChangeListener(); removeAttributeChangeListener();

4
designer/src/com/fr/design/widget/ui/ParameterTreeComboBox.java

@ -15,6 +15,7 @@ import com.fr.general.Inter;
import com.fr.script.Calculator; import com.fr.script.Calculator;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.ParameterProvider; import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultMutableTreeNode;
@ -76,7 +77,8 @@ public class ParameterTreeComboBox extends FRTreeComboBox {
if (obj instanceof TreePath) { if (obj instanceof TreePath) {
return ((Parameter)((ExpandMutableTreeNode)((TreePath)obj).getLastPathComponent()).getUserObject()).getName(); return ((Parameter)((ExpandMutableTreeNode)((TreePath)obj).getLastPathComponent()).getUserObject()).getName();
} }
return (String)obj; Object item = this.getEditor().getItem();
return item == null ? StringUtils.EMPTY : item.toString();
} }
@Override @Override

123
designer/src/com/fr/start/ReportSplashPane.java

@ -1,5 +1,5 @@
/** /**
* *
*/ */
package com.fr.start; package com.fr.start;
@ -8,6 +8,7 @@ import com.fr.base.FRContext;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.design.mainframe.bbs.BBSConstants; import com.fr.design.mainframe.bbs.BBSConstants;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.Inter;
import com.fr.general.ModuleContext; import com.fr.general.ModuleContext;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.CoreGraphHelper; import com.fr.stable.CoreGraphHelper;
@ -27,36 +28,37 @@ import java.util.TimerTask;
/** /**
* @author neil * @author neil
*
* @date: 2015-3-13-上午9:47:58 * @date: 2015-3-13-上午9:47:58
*/ */
public class ReportSplashPane extends SplashPane{ public class ReportSplashPane extends SplashPane {
private static final String OEM_PATH = "/com/fr/base/images/oem"; private static final String OEM_PATH = "/com/fr/base/images/oem";
private static final String SPLASH_CN = "splash_chinese.png"; private static final String SPLASH_MAC_CN = "splash_chinese_mac.png";
private static final String SPLASH_EN = "splash_english.png"; private static final String SPLASH_MAC_EN = "splash_english_mac.png";
private static final String SPLASH_MAC_CN = "splash_chinese_mac.png";
private static final String SPLASH_MAC_EN = "splash_english_mac.png"; private static final Color MODULE_COLOR = new Color(230, 230, 230);
private static final Color MODULE_COLOR = new Color(230, 230, 230);
private static final int MODULE_INFO_X = 25; private static final int MODULE_INFO_X = 25;
private static final int MODULE_INFO_Y = 270; private static final int MODULE_INFO_Y = 270;
private static final Color THANK_COLOR = new Color(72, 216, 249); private static final Color THANK_COLOR = new Color(72, 216, 249);
private static final int THANK_INFO_X = 460; private static final int THANK_INFO_X = 460;
private static final String GUEST = getRandomUser(); private static final String GUEST = getRandomUser();
private String showText = ""; private String showText = "";
private String moduleID = ""; private String moduleID = "";
private int loadingIndex = 0; private int loadingIndex = 0;
private String[] loading = new String[]{"..", "....", "......"}; private String[] loading = new String[]{"..", "....", "......"};
private java.util.Timer timer = new java.util.Timer(); private java.util.Timer timer = new java.util.Timer();
public ReportSplashPane() { public ReportSplashPane() {
init();
}
private void init() {
this.setBackground(null); this.setBackground(null);
timer.schedule(new TimerTask() { timer.schedule(new TimerTask() {
public void run() { public void run() {
loadingIndex++; loadingIndex++;
@ -64,19 +66,18 @@ public class ReportSplashPane extends SplashPane{
ReportSplashPane.this.repaint(); ReportSplashPane.this.repaint();
} }
}, 0, 300); }, 0, 300);
ModuleListener moduleListener = new ModuleAdapter() {
@Override
public void onStartBefore(String moduleName, String moduleI18nName) {
moduleID = moduleI18nName;
loadingIndex++;
ReportSplashPane.this.setShowText(moduleID.isEmpty() ? StringUtils.EMPTY : moduleID + loading[loadingIndex % 3]);
ReportSplashPane.this.repaint();
}
};
ModuleContext.registerModuleListener(moduleListener); ModuleContext.registerModuleListener(moduleListener);
} }
private ModuleListener moduleListener = new ModuleAdapter() {
@Override
public void onStartBefore(String moduleName, String moduleI18nName) {
moduleID = moduleI18nName;
loadingIndex++;
ReportSplashPane.this.setShowText(moduleID.isEmpty() ? StringUtils.EMPTY : moduleID + loading[loadingIndex % 3]);
ReportSplashPane.this.repaint();
}
};
protected void paintComponent(Graphics g) { protected void paintComponent(Graphics g) {
super.paintComponent(g); super.paintComponent(g);
@ -104,8 +105,8 @@ public class ReportSplashPane extends SplashPane{
return splashBuffedImage; return splashBuffedImage;
} }
private void paintShowText(Graphics2D splashG2d){ private void paintShowText(Graphics2D splashG2d) {
FontRenderContext fontRenderContext = splashG2d.getFontRenderContext(); FontRenderContext fontRenderContext = splashG2d.getFontRenderContext();
LineMetrics fm = splashG2d.getFont().getLineMetrics("", LineMetrics fm = splashG2d.getFont().getLineMetrics("",
fontRenderContext); fontRenderContext);
@ -119,6 +120,13 @@ public class ReportSplashPane extends SplashPane{
//加载模块信息 //加载模块信息
double y = MODULE_INFO_Y + height + leading + ascent; double y = MODULE_INFO_Y + height + leading + ascent;
GraphHelper.drawString(splashG2d, showText, MODULE_INFO_X, y); GraphHelper.drawString(splashG2d, showText, MODULE_INFO_X, y);
//每次随机感谢一位论坛用户
if (shouldShowThanks()) {
splashG2d.setPaint(THANK_COLOR);
String content = Inter.getLocText("FR-Designer_Thanks-To") + GUEST;
GraphHelper.drawString(splashG2d, content, THANK_INFO_X, y);
}
} }
// 是否显示鸣谢文字 // 是否显示鸣谢文字
@ -131,38 +139,37 @@ public class ReportSplashPane extends SplashPane{
} }
return true; return true;
} }
private static String getRandomUser(){ private static String getRandomUser() {
int num = new Random().nextInt(BBSConstants.ALL_GUEST.length); String[] allGuest = BBSConstants.getAllGuest();
return StringUtils.BLANK + BBSConstants.ALL_GUEST[num]; if (allGuest.length == 0) {
return StringUtils.EMPTY;
}
int num = new Random().nextInt(allGuest.length);
return StringUtils.BLANK + allGuest[num];
} }
/** /**
* 窗口关闭后取消定时获取模块信息的timer * 窗口关闭后取消定时获取模块信息的timer
* */
*/ public void releaseTimer() {
public void releaseTimer() {
timer.cancel(); timer.cancel();
}
/**
* 创建启动画面的背景图片
*
* @return 背景图片
*
*/
public Image createSplashBackground() {
String fileName = getImageName();
return BaseUtils.readImage(StableUtils.pathJoin(OEM_PATH, fileName));
} }
//获取图片文件名
private String getImageName(){
boolean isChina = GeneralContext.isChineseEnv();
//jdk1.8下透明有bug, 设置了setWindowTransparent后, JFrame直接最小化了, 先用mac下的加载图片
return isChina ? SPLASH_MAC_CN : SPLASH_MAC_EN;
}
/**
* 创建启动画面的背景图片
*
* @return 背景图片
*/
public Image createSplashBackground() {
String fileName = getImageName();
return BaseUtils.readImage(StableUtils.pathJoin(OEM_PATH, fileName));
}
//获取图片文件名
} private String getImageName() {
boolean isChina = GeneralContext.isChineseEnv();
//jdk1.8下透明有bug, 设置了setWindowTransparent后, JFrame直接最小化了, 先用mac下的加载图片
return isChina ? SPLASH_MAC_CN : SPLASH_MAC_EN;
}
}

2
designer_base/src/com/fr/design/DesignerEnvManager.java

@ -139,7 +139,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
if (designerEnvManager.nameEnvMap.size() <= 0) { if (designerEnvManager.nameEnvMap.size() <= 0) {
String installHome = StableUtils.getInstallHome(); String installHome = StableUtils.getInstallHome();
if (installHome != null) { if (installHome != null) {
String name = Inter.getLocText("FR-Designer_DEFAULT"); String name = Inter.getLocText("FR-Engine_DEFAULT");
String envPath = StableUtils.pathJoin(new String[]{installHome, ProjectConstants.WEBAPP_NAME, ProjectConstants.WEBINF_NAME}); String envPath = StableUtils.pathJoin(new String[]{installHome, ProjectConstants.WEBAPP_NAME, ProjectConstants.WEBINF_NAME});
designerEnvManager.putEnv(name, LocalEnv.createEnv(envPath)); designerEnvManager.putEnv(name, LocalEnv.createEnv(envPath));
designerEnvManager.setCurEnvName(name); designerEnvManager.setCurEnvName(name);

2
designer_base/src/com/fr/design/actions/file/OpenTemplateAction.java

@ -22,7 +22,7 @@ public class OpenTemplateAction extends UpdateAction {
this.setMenuKeySet(KeySetUtils.OPEN_TEMPLATE); this.setMenuKeySet(KeySetUtils.OPEN_TEMPLATE);
this.setName(getMenuKeySet().getMenuKeySetName()); this.setName(getMenuKeySet().getMenuKeySetName());
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/open.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/open.png"));
this.setAccelerator(getMenuKeySet().getKeyStroke()); this.setAccelerator(getMenuKeySet().getKeyStroke());
} }

66
designer_base/src/com/fr/design/actions/help/AboutPane.java

@ -34,15 +34,15 @@ public class AboutPane extends JPanel {
private static final int DEFAULT_GAP = 12; private static final int DEFAULT_GAP = 12;
private static final String COPYRIGHT_LABEL = "\u00A9 "; private static final String COPYRIGHT_LABEL = "\u00A9 ";
private static final String BUILD_PREFIX = " Build #"; private static final String BUILD_PREFIX = " Build #";
public AboutPane() { public AboutPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
//center panel //center panel
JPanel centerPane=FRGUIPaneFactory.createBorderLayout_L_Pane(); JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
JPanel contentPane=FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();
centerPane.add(contentPane, BorderLayout.NORTH); centerPane.add(contentPane, BorderLayout.NORTH);
BoxCenterAlignmentCopyablePane buildCopyPane = new BoxCenterAlignmentCopyablePane( BoxCenterAlignmentCopyablePane buildCopyPane = new BoxCenterAlignmentCopyablePane(
@ -68,8 +68,8 @@ public class AboutPane extends JPanel {
Inter.getLocText("FR-Designer-Basic_Activation_Key_Copy_OK") Inter.getLocText("FR-Designer-Basic_Activation_Key_Copy_OK")
})); }));
if (shouldShowPhoneAndQQ()){ if (shouldShowPhoneAndQQ()) {
if(ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)){ if (ComparatorUtils.equals(ProductConstants.APP_NAME, FINEREPORT)) {
boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("FR-Designer_Service_Phone") + ProductConstants.COMPARE_TELEPHONE); boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("FR-Designer_Service_Phone") + ProductConstants.COMPARE_TELEPHONE);
contentPane.add(boxCenterAlignmentPane); contentPane.add(boxCenterAlignmentPane);
} }
@ -79,15 +79,19 @@ public class AboutPane extends JPanel {
BoxCenterAligmentPane actionLabel = getURLActionLabel(SiteCenter.getInstance().acquireUrlByKind("website." + FRContext.getLocale(), ProductConstants.WEBSITE_URL)); BoxCenterAligmentPane actionLabel = getURLActionLabel(SiteCenter.getInstance().acquireUrlByKind("website." + FRContext.getLocale(), ProductConstants.WEBSITE_URL));
BoxCenterAligmentPane emailLabel = getEmailActionLabel(SiteCenter.getInstance().acquireUrlByKind("support.email", ProductConstants.SUPPORT_EMAIL)); BoxCenterAligmentPane emailLabel = getEmailActionLabel(SiteCenter.getInstance().acquireUrlByKind("support.email", ProductConstants.SUPPORT_EMAIL));
contentPane.add(actionLabel); contentPane.add(actionLabel);
contentPane.add(emailLabel); contentPane.add(emailLabel);
if (shouldShowThanks()) {
addThankPane(contentPane);
}
} }
// 是否显示服务电话和 qq // 是否显示服务电话和 qq
private boolean shouldShowPhoneAndQQ() { private boolean shouldShowPhoneAndQQ() {
return !FRContext.getLocale().equals(Locale.US); return !FRContext.getLocale().equals(Locale.US);
} }
// 是否显示鸣谢面板 // 是否显示鸣谢面板
private boolean shouldShowThanks() { private boolean shouldShowThanks() {
Locale[] hideLocales = {Locale.US, Locale.KOREA, Locale.JAPAN}; Locale[] hideLocales = {Locale.US, Locale.KOREA, Locale.JAPAN};
@ -98,40 +102,40 @@ public class AboutPane extends JPanel {
} }
return true; return true;
} }
//添加鸣谢面板 //添加鸣谢面板
private void addThankPane(JPanel contentPane){ private void addThankPane(JPanel contentPane) {
BBSGuestPaneProvider pane = StableFactory.getMarkedInstanceObjectFromClass(BBSGuestPaneProvider.XML_TAG, BBSGuestPaneProvider.class); BBSGuestPaneProvider pane = StableFactory.getMarkedInstanceObjectFromClass(BBSGuestPaneProvider.XML_TAG, BBSGuestPaneProvider.class);
if(pane == null){ if (pane == null) {
return; return;
} }
contentPane.add(Box.createVerticalStrut(DEFAULT_GAP)); contentPane.add(Box.createVerticalStrut(DEFAULT_GAP));
contentPane.add((Component) pane); contentPane.add((Component) pane);
} }
private String append(String...strs){ private String append(String... strs) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for(String str : strs){ for (String str : strs) {
sb.append(str); sb.append(str);
} }
return sb.toString(); return sb.toString();
} }
private String getCopyRight(){ private String getCopyRight() {
return append(Inter.getLocText("FR-Designer_About_CopyRight"), COPYRIGHT_LABEL, return append(Inter.getLocText("FR-Designer_About_CopyRight"), COPYRIGHT_LABEL,
ProductConstants.HISTORY, StringUtils.BLANK, SiteCenter.getInstance().acquireUrlByKind("company.name", ProductConstants.COMPANY_NAME)); ProductConstants.HISTORY, StringUtils.BLANK, SiteCenter.getInstance().acquireUrlByKind("company.name", ProductConstants.COMPANY_NAME));
} }
private String getBuildTitle() { private String getBuildTitle() {
return append(ProductConstants.APP_NAME, Inter.getLocText("FR-Designer_About_Version"), return append(ProductConstants.APP_NAME, Inter.getLocText("FR-Designer_About_Version"),
StringUtils.BLANK, ProductConstants.RELEASE_VERSION, BUILD_PREFIX); StringUtils.BLANK, ProductConstants.RELEASE_VERSION, BUILD_PREFIX);
} }
private BoxCenterAligmentPane getEmailActionLabel(final String mailTo){ private BoxCenterAligmentPane getEmailActionLabel(final String mailTo) {
ActionLabel emailLabel = new ActionLabel(mailTo); ActionLabel emailLabel = new ActionLabel(mailTo);
emailLabel.addActionListener(new ActionListener() { emailLabel.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -142,12 +146,12 @@ public class AboutPane extends JPanel {
} }
} }
}); });
return new BoxCenterAligmentPane(emailLabel); return new BoxCenterAligmentPane(emailLabel);
} }
private BoxCenterAligmentPane getURLActionLabel(final String url){ private BoxCenterAligmentPane getURLActionLabel(final String url) {
ActionLabel actionLabel = new ActionLabel(url); ActionLabel actionLabel = new ActionLabel(url);
actionLabel.addActionListener(new ActionListener() { actionLabel.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -158,7 +162,7 @@ public class AboutPane extends JPanel {
} }
} }
}); });
return new BoxCenterAligmentPane(actionLabel); return new BoxCenterAligmentPane(actionLabel);
} }
@ -184,7 +188,7 @@ public class AboutPane extends JPanel {
class BoxCenterAligmentPane extends JPanel { class BoxCenterAligmentPane extends JPanel {
private UILabel textLabel; private UILabel textLabel;
public BoxCenterAligmentPane(String text) { public BoxCenterAligmentPane(String text) {
this(new UILabel(text)); this(new UILabel(text));
} }

5
designer_base/src/com/fr/design/constants/UIConstants.java

@ -106,6 +106,11 @@ public interface UIConstants {
public static final Color TITLED_BORDER_COLOR = new Color(0xededee); public static final Color TITLED_BORDER_COLOR = new Color(0xededee);
public static final Color POP_DIALOG_BORDER = new Color(218, 218, 221); public static final Color POP_DIALOG_BORDER = new Color(218, 218, 221);
public static final Color PROPERTY_DIALOG_BORDER = new Color(0xc9c9cd); public static final Color PROPERTY_DIALOG_BORDER = new Color(0xc9c9cd);
public static final Color TAB_BUTTON_HOVER = new Color(231, 230, 235);
public static final Color TAB_BUTTON_HOVER_SELECTED = new Color(239, 238, 243);
public static final Color TAB_BUTTON_PRESS = new Color(228, 227, 232);
public static final Color TAB_BUTTON_PRESS_SELECTED = new Color(236, 236, 238);
public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.png"); public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.png");

5
designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java

@ -37,6 +37,9 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
//这边需要重新初始化columnNames, 否则nameList长度和columnNames长度不同导致出錯。 //这边需要重新初始化columnNames, 否则nameList长度和columnNames长度不同导致出錯。
if (tableDataComboBox.getSelectedItem() == null) {
return;
}
List<String> nameList = tableDataComboBox.getSelectedItem().calculateColumnNameList(); List<String> nameList = tableDataComboBox.getSelectedItem().calculateColumnNameList();
columnNames = new String[nameList.size()]; columnNames = new String[nameList.size()];
columnNames = tableDataComboBox.getSelectedItem().calculateColumnNameList().toArray(columnNames); columnNames = tableDataComboBox.getSelectedItem().calculateColumnNameList().toArray(columnNames);
@ -56,7 +59,7 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
@Override @Override
public SimpleDSColumn getValue() { public SimpleDSColumn getValue() {
if (this.tableDataComboBox.getSelectedItem() == null && this.columnNameComboBox.getSelectedItem() == null) { if (this.tableDataComboBox.getSelectedItem() == null || this.columnNameComboBox.getSelectedItem() == null) {
return null; return null;
} }
SimpleDSColumn dsColumn = new SimpleDSColumn(); SimpleDSColumn dsColumn = new SimpleDSColumn();

2
designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java

@ -360,7 +360,7 @@ public abstract class JListControlPane extends JControlPane {
this.creator = creators[0]; this.creator = creators[0];
this.setName(Inter.getLocText("FR-Action_Add")); this.setName(Inter.getLocText("FR-Action_Add"));
this.setMnemonic('A'); this.setMnemonic('A');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
} }
@Override @Override

2
designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java

@ -447,7 +447,7 @@ public abstract class UIListControlPane extends UIControlPane {
this.creator = creators[0]; this.creator = creators[0];
this.setName(Inter.getLocText("FR-Action_Add")); this.setName(Inter.getLocText("FR-Action_Add"));
this.setMnemonic('A'); this.setMnemonic('A');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
} }
/** /**

18
designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java

@ -42,19 +42,23 @@ public class UIButtonUI extends BasicButtonUI {
((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
if (b.isExtraPainted()) { if (b.isExtraPainted()) {
if (isPressed(b) && b.isPressedPainted()) { doExtraPainting(b, g2d, w, h, selectedRoles);
GUIPaintUtils.fillPressed(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles));
} else if (isRollOver(b)) {
GUIPaintUtils.fillRollOver(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted());
} else if (b.isNormalPainted()) {
GUIPaintUtils.fillNormal(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted());
}
} }
((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
paintContent(g, b, text); paintContent(g, b, text);
} }
protected void doExtraPainting(UIButton b, Graphics2D g2d, int w, int h, String selectedRoles) {
if (isPressed(b) && b.isPressedPainted()) {
GUIPaintUtils.fillPressed(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles));
} else if (isRollOver(b)) {
GUIPaintUtils.fillRollOver(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted());
} else if (b.isNormalPainted()) {
GUIPaintUtils.fillNormal(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted());
}
}
protected boolean isRollOver(AbstractButton b) { protected boolean isRollOver(AbstractButton b) {
ButtonModel model = b.getModel(); ButtonModel model = b.getModel();
return model.isRollover() && !b.isSelected(); return model.isRollover() && !b.isSelected();

2
designer_base/src/com/fr/design/gui/icombobox/FunctionComboBox.java

@ -60,7 +60,7 @@ public class FunctionComboBox extends UIComboBox {
if (value instanceof DataFunction) { if (value instanceof DataFunction) {
DataFunction function = (DataFunction) value; DataFunction function = (DataFunction) value;
this.setText(DataCoreUtils.getFunctionDisplayName(function)); this.setText(" " + DataCoreUtils.getFunctionDisplayName(function));
} }
return this; return this;

4
designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java

@ -67,9 +67,9 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener {
} }
g2d.setColor(linecolor); g2d.setColor(linecolor);
if (!comboBox.isPopupVisible()) { if (!comboBox.isPopupVisible()) {
g2d.drawRoundRect(0, 0, c.getWidth() - arrowButton.getWidth() + 3, c.getHeight() - 1, UIConstants.LARGEARC, UIConstants.LARGEARC); g2d.drawRoundRect(0, 0, c.getWidth() - arrowButton.getWidth() + 3, c.getHeight() - 1, UIConstants.ARC, UIConstants.ARC);
} else { } else {
g2d.drawRoundRect(0, 0, c.getWidth(), c.getHeight() + 3, UIConstants.LARGEARC, UIConstants.LARGEARC); g2d.drawRoundRect(0, 0, c.getWidth(), c.getHeight() + 3, UIConstants.ARC, UIConstants.ARC);
g2d.drawLine(0, c.getHeight() - 1, c.getWidth(), c.getHeight() - 1); g2d.drawLine(0, c.getHeight() - 1, c.getWidth(), c.getHeight() - 1);
} }
} }

2
designer_base/src/com/fr/design/gui/icontainer/UIScrollPaneUI.java

@ -36,13 +36,11 @@ public class UIScrollPaneUI extends MetalScrollPaneUI implements PropertyChangeL
// Note: It never happened before Java 1.5 that scrollbar is null // Note: It never happened before Java 1.5 that scrollbar is null
JScrollBar sb = scrollpane.getHorizontalScrollBar(); JScrollBar sb = scrollpane.getHorizontalScrollBar();
if (sb != null) { if (sb != null) {
sb.setBackground(Color.red);
sb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE); sb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE);
} }
sb = scrollpane.getVerticalScrollBar(); sb = scrollpane.getVerticalScrollBar();
if (sb != null) { if (sb != null) {
sb.setBackground(Color.red);
sb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE); sb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE);
} }
} }

BIN
designer_base/src/com/fr/design/images/control/down.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

After

Width:  |  Height:  |  Size: 278 B

4
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -183,7 +183,7 @@ FR-Designer_Support_QQ=\u6280\u672FQQ
FR-Designer_Swatch=\u6837\u54C1 FR-Designer_Swatch=\u6837\u54C1
FR-Designer_Tab_title=tab\u6807\u9898 FR-Designer_Tab_title=tab\u6807\u9898
FR-Designer_TableData=\u6570\u636E\u96C6 FR-Designer_TableData=\u6570\u636E\u96C6
FR-Designer_Thank_guest=\u7279\u522B\u9E23\u8C22\u4EE5\u4E0B\u8BBA\u575B\u5E06\u85AF\u5BF9\u8BE5\u7248\u672C\u8BBE\u8BA1\u5668\u6613\u7528\u6027\u505A\u51FA\u7684\u7A81\u51FA\u8D21\u732E FR-Designer_Thank_guest=\u7279\u522B\u9E23\u8C22\u4EE5\u4E0B\u756A\u85AF\u5BF9\u5E06\u8F6F\u4EA7\u54C1\u3001\u6587\u5316\u3001\u751F\u6001\u5EFA\u8BBE\u505A\u51FA\u7684\u7A81\u51FA\u8D21\u732E
FR-Designer_Thanks-To=\u9E23\u8C22 FR-Designer_Thanks-To=\u9E23\u8C22
FR-Designer_Title=\u6807\u9898 FR-Designer_Title=\u6807\u9898
FR-Designer_Total=\u603B\u5171 FR-Designer_Total=\u603B\u5171
@ -951,7 +951,7 @@ zeroMarginWarn=\u7531\u4E8E\u6253\u5370\u673A\u5B58\u5728\u7269\u7406\u8FB9\u8DD
Widget-Date_Selector_Return_Type=\u8FD4\u56DE\u503C\u7C7B\u578B Widget-Date_Selector_Return_Type=\u8FD4\u56DE\u503C\u7C7B\u578B
Utils-Switch_To_Template_Reportlet=\u5207\u6362\u5230\u6A21\u677F\u7F51\u7EDC\u62A5\u8868 Utils-Switch_To_Template_Reportlet=\u5207\u6362\u5230\u6A21\u677F\u7F51\u7EDC\u62A5\u8868
satisfy=\u6EE1\u8DB3\u6761\u4EF6 satisfy=\u6EE1\u8DB3\u6761\u4EF6
FR-Designer_WidgetDisplyPosition=\u63A7\u4EF6\u663E\u793A\u4F4D\u7F6E FR-Designer_WidgetDisplyPosition=\u663E\u793A\u4F4D\u7F6E
FR-Base_Top=\u4E0A FR-Base_Top=\u4E0A
FR-Designer_Form-CheckBox=\u590D\u9009\u6846 FR-Designer_Form-CheckBox=\u590D\u9009\u6846
Reportlet-Parameter_Type=\u53C2\u6570\u4F20\u9012\u65B9\u5F0F Reportlet-Parameter_Type=\u53C2\u6570\u4F20\u9012\u65B9\u5F0F

2
designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -171,7 +171,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
public OpenReportAction() { public OpenReportAction() {
this.setName(KeySetUtils.OPEN_TEMPLATE.getMenuKeySetName()); this.setName(KeySetUtils.OPEN_TEMPLATE.getMenuKeySetName());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/open.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/open.png"));
} }
@Override @Override

66
designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

@ -4,10 +4,12 @@ import com.fr.base.BaseUtils;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonUI;
import com.fr.design.gui.icontainer.UIEastResizableContainer; import com.fr.design.gui.icontainer.UIEastResizableContainer;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.GUIPaintUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.Inter; import com.fr.general.Inter;
@ -38,7 +40,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private static final int ARROW_RANGE_START = CONTENT_WIDTH - 30; private static final int ARROW_RANGE_START = CONTENT_WIDTH - 30;
// 弹出对话框高度 // 弹出对话框高度
private static final int POPUP_MIN_HEIGHT = 145; private static final int POPUP_MIN_HEIGHT = 145;
private static final int POPUP_MAX_HEIGHT = 480;
private static final int POPUP_DEFAULT_HEIGHT = 356; private static final int POPUP_DEFAULT_HEIGHT = 356;
public static final String KEY_CELL_ELEMENT = "cellElement"; public static final String KEY_CELL_ELEMENT = "cellElement";
public static final String KEY_CELL_ATTR = "cellAttr"; public static final String KEY_CELL_ATTR = "cellAttr";
@ -521,6 +522,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
} }
public void reAddContentArea() {
propertyPanel.add(contentArea, BorderLayout.CENTER);
}
public boolean isVisible() { public boolean isVisible() {
return isVisible; return isVisible;
} }
@ -578,7 +583,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
popupDialog.replaceContentPane(this); popupDialog.replaceContentPane(this);
} }
if (popupPane != null && !isRightPaneVisible()) { if (popupPane != null && !isRightPaneVisible()) {
popupPane.replaceContentPane(contentPane); popupPane.replaceContentPane(contentArea);
} }
refreshContainer(); refreshContainer();
@ -588,6 +593,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
return contentPane; return contentPane;
} }
public Container getContentArea() {
return contentArea;
}
public void replaceHeaderPane(JComponent pane) { public void replaceHeaderPane(JComponent pane) {
contentArea.remove(headerPane); contentArea.remove(headerPane);
int height = Math.min(pane.getPreferredSize().height, MAX_PARA_HEIGHT); int height = Math.min(pane.getPreferredSize().height, MAX_PARA_HEIGHT);
@ -612,7 +621,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
hideCurrentPopupPane(); hideCurrentPopupPane();
replaceContentPane(contentPane); replaceContentPane(contentPane);
} else if(popupPane != null) { } else if(popupPane != null) {
popupPane.replaceContentPane(contentPane); popupPane.replaceContentPane(contentArea);
} }
} }
@ -638,6 +647,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
selectedItem = this; selectedItem = this;
} }
private boolean isTabButtonSelected() {
return button.getBackground() == selectedBtnBackground;
}
private void initButton() { private void initButton() {
button = new UIButton(BaseUtils.readIcon(getBtnIconUrl())) { button = new UIButton(BaseUtils.readIcon(getBtnIconUrl())) {
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
@ -649,6 +662,20 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
}; };
button.set4LargeToolbarButton(); button.set4LargeToolbarButton();
button.setUI(new UIButtonUI() {
@Override
protected void doExtraPainting(UIButton b, Graphics2D g2d, int w, int h, String selectedRoles) {
if (isPressed(b) && b.isPressedPainted()) {
Color pressColor = isTabButtonSelected() ? UIConstants.TAB_BUTTON_PRESS_SELECTED : UIConstants.TAB_BUTTON_PRESS;
GUIPaintUtils.fillPressed(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), pressColor);
} else if (isRollOver(b)) {
Color hoverColor = isTabButtonSelected() ? UIConstants.TAB_BUTTON_HOVER_SELECTED : UIConstants.TAB_BUTTON_HOVER;
GUIPaintUtils.fillRollOver(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted(), hoverColor);
} else if (b.isNormalPainted()) {
GUIPaintUtils.fillNormal(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted());
}
}
});
originBtnBackground = button.getBackground(); originBtnBackground = button.getBackground();
button.addActionListener(new ActionListener() { button.addActionListener(new ActionListener() {
@Override @Override
@ -714,6 +741,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
if (isPoppedOut) { if (isPoppedOut) {
isPoppedOut = false; isPoppedOut = false;
popupDialog.setVisible(false); popupDialog.setVisible(false);
reAddContentArea();
initContentPane(); initContentPane();
onResize(); onResize();
if (isEnabled()) { if (isEnabled()) {
@ -726,9 +754,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
private class FixedPopupPane extends JPopupMenu { private class FixedPopupPane extends JPopupMenu {
private JComponent contentPane; private Container contentPane;
private PropertyItem propertyItem;
FixedPopupPane(PropertyItem propertyItem) { FixedPopupPane(PropertyItem propertyItem) {
contentPane = propertyItem.getContentPane(); this.propertyItem = propertyItem;
contentPane = propertyItem.getContentArea();
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(new PopupToolPane(propertyItem), BorderLayout.NORTH); this.add(new PopupToolPane(propertyItem), BorderLayout.NORTH);
this.add(contentPane, BorderLayout.CENTER); this.add(contentPane, BorderLayout.CENTER);
@ -736,14 +767,24 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
setPreferredSize(new Dimension(CONTAINER_WIDTH - TAB_WIDTH, POPUP_DEFAULT_HEIGHT)); setPreferredSize(new Dimension(CONTAINER_WIDTH - TAB_WIDTH, POPUP_DEFAULT_HEIGHT));
} }
@Override
public void setVisible(boolean visible) {
super.setVisible(visible);
if (visible == true) {
replaceContentPane(propertyItem.getContentArea());
} else {
propertyItem.reAddContentArea();
}
}
public void menuSelectionChanged(boolean isIncluded) { public void menuSelectionChanged(boolean isIncluded) {
} }
public JComponent getContentPane() { public Container getContentPane() {
return contentPane; return contentPane;
} }
public void replaceContentPane(JComponent pane) { public void replaceContentPane(Container pane) {
this.remove(this.contentPane); this.remove(this.contentPane);
this.add(this.contentPane = pane); this.add(this.contentPane = pane);
refreshContainer(); refreshContainer();
@ -920,7 +961,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private Point mouseDownCompCoords; private Point mouseDownCompCoords;
private JPanel contentWrapper; private JPanel contentWrapper;
private JComponent contentPane; private Container contentPane;
private JPanel defaultPane; // 无可用配置项 private JPanel defaultPane; // 无可用配置项
private PropertyItem propertyItem; private PropertyItem propertyItem;
public PopupDialog(PropertyItem propertyItem) { public PopupDialog(PropertyItem propertyItem) {
@ -930,7 +971,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
this.propertyItem = propertyItem; this.propertyItem = propertyItem;
PopupToolPane popupToolPane = new PopupToolPane(propertyItem, PopupToolPane.UP_BUTTON); PopupToolPane popupToolPane = new PopupToolPane(propertyItem, PopupToolPane.UP_BUTTON);
popupToolPane.setParentDialog(this); popupToolPane.setParentDialog(this);
contentPane = propertyItem.getContentPane(); contentPane = propertyItem.getContentArea();
contentWrapper = new JPanel(new BorderLayout()); contentWrapper = new JPanel(new BorderLayout());
contentWrapper.add(popupToolPane, BorderLayout.NORTH); contentWrapper.add(popupToolPane, BorderLayout.NORTH);
@ -969,10 +1010,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public void replaceContentPane(PropertyItem propertyItem) { public void replaceContentPane(PropertyItem propertyItem) {
this.propertyItem = propertyItem; this.propertyItem = propertyItem;
replaceContentPane(propertyItem.getContentPane()); replaceContentPane(propertyItem.getContentArea());
} }
public void replaceContentPane(JComponent contentPane) { public void replaceContentPane(Container contentPane) {
contentWrapper.remove(this.contentPane); contentWrapper.remove(this.contentPane);
contentWrapper.add(this.contentPane = contentPane, BorderLayout.CENTER); contentWrapper.add(this.contentPane = contentPane, BorderLayout.CENTER);
refreshContainer(); refreshContainer();
@ -996,9 +1037,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
if (bounds.height < POPUP_MIN_HEIGHT) { if (bounds.height < POPUP_MIN_HEIGHT) {
bounds.height = POPUP_MIN_HEIGHT; bounds.height = POPUP_MIN_HEIGHT;
} }
if (bounds.height > POPUP_MAX_HEIGHT) {
bounds.height = POPUP_MAX_HEIGHT;
}
mouseDownCompCoords.y = currCoords.y; mouseDownCompCoords.y = currCoords.y;
setBounds(bounds); setBounds(bounds);
} }

5
designer_base/src/com/fr/design/mainframe/widget/accessibles/AccessibleIconEditor.java

@ -27,11 +27,6 @@ public class AccessibleIconEditor extends UneditableAccessibleEditor {
return new RendererField(new IconCellRenderer()); return new RendererField(new IconCellRenderer());
} }
protected void setBorderVisible(){
this.setBorder(BorderFactory.createLineBorder(Color.lightGray));
}
@Override @Override
protected void showEditorPane() { protected void showEditorPane() {
if (customIconPane == null) { if (customIconPane == null) {

13
designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java

@ -1,9 +1,6 @@
package com.fr.design.mainframe.widget.accessibles; package com.fr.design.mainframe.widget.accessibles;
import java.awt.BorderLayout; import java.awt.*;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.ArrayList; import java.util.ArrayList;
@ -45,11 +42,9 @@ public class BaseAccessibleEditor extends BasicPane implements AccessibleEditor
this.decoder = dec; this.decoder = dec;
initComponents(); initComponents();
txtValue.setEditable(dec != null); txtValue.setEditable(dec != null);
setBorderVisible(); ((JComponent) txtValue).setOpaque(true);
} ((JComponent) txtValue).setBorder(BorderFactory.createLineBorder(Color.lightGray));
((JComponent) txtValue).setBackground(Color.WHITE);
protected void setBorderVisible(){
((JComponent) txtValue).setBorder(null);
} }
@Override @Override

20
designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java

@ -1,7 +1,6 @@
package com.fr.design.roleAuthority; package com.fr.design.roleAuthority;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRCoreContext;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.DesignTableDataManager;
@ -15,7 +14,6 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DockingView; import com.fr.design.mainframe.DockingView;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.VT4FR;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
@ -184,16 +182,9 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo
} }
private void initbuttonGroup() { private void initbuttonGroup() {
isSupportFS = supportFineDecision();
Icon[] iconArray = null; Icon[] iconArray = new Icon[]{BaseUtils.readIcon("/com/fr/web/images/platform/demo.png")};
String[] textArray = null; String[] textArray = new String[]{Inter.getLocText("FR-Designer_FS_Name")};
if (isSupportFS) {
iconArray = new Icon[]{BaseUtils.readIcon("/com/fr/web/images/platform/demo.png")};
textArray = new String[]{Inter.getLocText("FR-Designer_FS_Name")};
} else {
iconArray = new Icon[]{BaseUtils.readIcon("/com/fr/web/images/platform/platform_16_16.png")};
textArray = new String[]{Inter.getLocText("M_Server-Platform_Manager")};
}
buttonGroup = new UIHeadGroup(iconArray, textArray) { buttonGroup = new UIHeadGroup(iconArray, textArray) {
public void tabChanged(int index) { public void tabChanged(int index) {
roleTree.setEditable(false); roleTree.setEditable(false);
@ -212,11 +203,6 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo
buttonGroup.setNeedLeftRightOutLine(false); buttonGroup.setNeedLeftRightOutLine(false);
} }
private boolean supportFineDecision() {
byte[] bytes = FRCoreContext.getBytes();
return VT4FR.isLicAvailable(bytes) && VT4FR.FS_BI.support();
}
private int getMode(){ private int getMode(){
return isSupportFS?FS_MANAGE: REPORT_PLATEFORM_MANAGE; return isSupportFS?FS_MANAGE: REPORT_PLATEFORM_MANAGE;
} }

19
designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java

@ -85,13 +85,18 @@ public class GUIPaintUtils {
* @param isPressedPainted 是否按压画 * @param isPressedPainted 是否按压画
*/ */
public static final void fillRollOver(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted) { public static final void fillRollOver(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted) {
fillRollOver(g2d, x, y, width, height, isRound, rectDirection, isAuthorityEdited, isPressedPainted, null);
}
public static final void fillRollOver(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted, Color hoverColor) {
GradientPaint gp; GradientPaint gp;
if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { if (hoverColor != null) {
gp = new GradientPaint(1, 1, hoverColor, 1, height - 1, hoverColor);
} else if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) {
gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.HOVER_BLUE); gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.HOVER_BLUE);
} else if (isPressedPainted) { } else if (isPressedPainted) {
gp = new GradientPaint(1, 1, UIConstants.ATTRIBUTE_HOVER, 1, height - 1, UIConstants.ATTRIBUTE_HOVER); gp = new GradientPaint(1, 1, UIConstants.ATTRIBUTE_HOVER, 1, height - 1, UIConstants.ATTRIBUTE_HOVER);
}else { } else {
// gp = new GradientPaint(1, 1, UIConstants.NORMAL_BACKGROUND, 1, height - 1, UIConstants.HOVER_BLUE);
gp = new GradientPaint(1, 1, UIConstants.HOVER_BLUE, 1, height - 1, UIConstants.HOVER_BLUE); gp = new GradientPaint(1, 1, UIConstants.HOVER_BLUE, 1, height - 1, UIConstants.HOVER_BLUE);
} }
fillPaint(g2d, x, y, width, height, isRound, rectDirection, gp, UIConstants.ARC); fillPaint(g2d, x, y, width, height, isRound, rectDirection, gp, UIConstants.ARC);
@ -110,8 +115,14 @@ public class GUIPaintUtils {
* *
*/ */
public static final void fillPressed(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited) { public static final void fillPressed(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited) {
fillPressed(g2d, x, y, width, height, isRound, rectDirection, isAuthorityEdited, null);
}
public static final void fillPressed(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, Color pressedColor) {
Color oldColor = g2d.getColor(); Color oldColor = g2d.getColor();
if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { if (pressedColor != null) {
g2d.setColor(pressedColor);
} else if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) {
g2d.setColor(UIConstants.AUTHORITY_PRESS_BLUE); g2d.setColor(UIConstants.AUTHORITY_PRESS_BLUE);
} else { } else {
g2d.setColor(UIConstants.ATTRIBUTE_PRESS); g2d.setColor(UIConstants.ATTRIBUTE_PRESS);

15
designer_base/src/com/fr/design/widget/component/DateValuePane.java

@ -1,11 +1,12 @@
package com.fr.design.widget.component; package com.fr.design.widget.component;
import com.fr.base.Formula;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.editor.editor.*; import com.fr.design.editor.editor.*;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
@ -17,13 +18,16 @@ import java.awt.*;
public class DateValuePane extends JPanel { public class DateValuePane extends JPanel {
private UIButtonGroup widgetValueHead; private UIButtonGroup widgetValueHead;
private Editor[] editor; private Editor[] editor;
private static final String NONE_EDITOR_NAME = Inter.getLocText("None");
private static final String DATE_EDITOR_NAME = Inter.getLocText("Date");
private static final String FORMULA_EDITOR_NAME = Inter.getLocText("Parameter-Formula");
public DateValuePane() { public DateValuePane() {
editor = new Editor[]{ editor = new Editor[]{
new NoneEditor(null, Inter.getLocText("None")), new NoneEditor(null, NONE_EDITOR_NAME),
new DateEditor(true, Inter.getLocText("Date")), new DateEditor(true, DATE_EDITOR_NAME),
new FormulaEditor(Inter.getLocText("Parameter-Formula")) new FormulaEditor(FORMULA_EDITOR_NAME)
}; };
this.setLayout(new BorderLayout(0, LayoutConstants.VGAP_SMALL)); this.setLayout(new BorderLayout(0, LayoutConstants.VGAP_SMALL));
final CardLayout cardLayout = new CardLayout(); final CardLayout cardLayout = new CardLayout();
@ -56,6 +60,9 @@ public class DateValuePane extends JPanel {
int index = widgetValueHead.getSelectedIndex(); int index = widgetValueHead.getSelectedIndex();
Editor e = editor[index]; Editor e = editor[index];
Object value = e.getValue(); Object value = e.getValue();
if(value == null && ComparatorUtils.equals(FORMULA_EDITOR_NAME, e.getName())){
value = new Formula(StringUtils.EMPTY);
}
return value; return value;
} }

74
designer_base/src/com/fr/design/widget/component/NumberEditorValidatePane.java

@ -1,7 +1,6 @@
package com.fr.design.widget.component; package com.fr.design.widget.component;
import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.IntervalConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UIBasicSpinner; import com.fr.design.gui.ispinner.UIBasicSpinner;
@ -12,6 +11,7 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.form.ui.NumberEditor; import com.fr.form.ui.NumberEditor;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
@ -35,10 +35,8 @@ public class NumberEditorValidatePane extends JPanel {
private SpinnerNumberModel minValueModel; private SpinnerNumberModel minValueModel;
private UISpinner decimalLength; private UISpinner decimalLength;
private JPanel limitNumberPane; private JPanel limitNumberPane;
private UITextField maxValueErrorTextField; private UITextField errorMsgTextField;
private UITextField minValueErrorTextField; private JPanel errorMsgTextFieldPane;
private JPanel maxValueFieldPane;
private JPanel minValueFieldPane;
private ActionListener allowDecimalsListener; private ActionListener allowDecimalsListener;
@ -79,13 +77,10 @@ public class NumberEditorValidatePane extends JPanel {
this.setMinValueCheckBox.addActionListener(setMinListener); this.setMinValueCheckBox.addActionListener(setMinListener);
this.minValueSpinner.addChangeListener(minValueChangeListener); this.minValueSpinner.addChangeListener(minValueChangeListener);
setMinValueCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); setMinValueCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
initMaxMinValueFieldPane(); initErrorMsgPane();
JPanel maxValueBorderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel errorMsgBorderPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
maxValueBorderPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L5, 0, 0)); errorMsgBorderPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L5, IntervalConstants.INTERVAL_L1, 0));
maxValueBorderPane.add(maxValueFieldPane, BorderLayout.CENTER); errorMsgBorderPane.add(errorMsgTextFieldPane, BorderLayout.CENTER);
JPanel minValueBorderPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
minValueBorderPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L5, IntervalConstants.INTERVAL_L1, 0));
minValueBorderPane.add(minValueFieldPane, BorderLayout.CENTER);
UILabel numberLabel = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Double", "Numbers"})); UILabel numberLabel = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Double", "Numbers"}));
limitNumberPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{numberLabel, decimalLength}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); limitNumberPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{numberLabel, decimalLength}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7);
limitNumberPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L5, 0, 0)); limitNumberPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L5, 0, 0));
@ -96,37 +91,20 @@ public class NumberEditorValidatePane extends JPanel {
new Component[]{limitNumberPane, null}, new Component[]{limitNumberPane, null},
new Component[]{allowNegativeCheckBox, null}, new Component[]{allowNegativeCheckBox, null},
new Component[]{setMaxValueCheckBox, maxValueSpinner}, new Component[]{setMaxValueCheckBox, maxValueSpinner},
new Component[]{maxValueBorderPane, null},
new Component[]{setMinValueCheckBox, minValueSpinner}, new Component[]{setMinValueCheckBox, minValueSpinner},
new Component[]{minValueBorderPane, null}, new Component[]{errorMsgBorderPane, null},
}; };
double[] rowSize = {p, p, p, p, p, p, p}; double[] rowSize = {p, p, p, p, p, p};
double[] columnSize = {p, f}; double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1);
this.add(panel); this.add(panel);
} }
private void initMaxMinValueFieldPane() { private void initErrorMsgPane() {
maxValueErrorTextField = new UITextField(); errorMsgTextField = new UITextField();
minValueErrorTextField = new UITextField(); errorMsgTextFieldPane = TableLayoutHelper.createGapTableLayoutPane(
new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Widget_Error_Tip")), errorMsgTextField}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1);
maxValueFieldPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Widget_Error_Tip")), maxValueErrorTextField}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7);
setMaxValueCheckBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
maxValueFieldPane.setVisible(setMaxValueCheckBox.isSelected());
}
});
minValueFieldPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Widget_Error_Tip")), minValueErrorTextField}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7);
setMinValueCheckBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
minValueFieldPane.setVisible(setMinValueCheckBox.isSelected());
}
});
} }
@ -257,28 +235,31 @@ public class NumberEditorValidatePane extends JPanel {
allowNegativeCheckBox.setSelected(e.isAllowNegative()); allowNegativeCheckBox.setSelected(e.isAllowNegative());
if (e.getMaxValue() == Double.MAX_VALUE) { if (e.getMaxValue() == Double.MAX_VALUE) {
setMaxValueCheckBox.setSelected(false); setMaxValueCheckBox.setSelected(false);
maxValueFieldPane.setVisible(false); // maxValueFieldPane.setVisible(false);
maxValueSpinner.setValue(new Double(Double.MAX_VALUE)); maxValueSpinner.setValue(new Double(Double.MAX_VALUE));
maxValueSpinner.setEnabled(false); maxValueSpinner.setEnabled(false);
} else { } else {
setMaxValueCheckBox.setSelected(true); setMaxValueCheckBox.setSelected(true);
maxValueSpinner.setEnabled(true); maxValueSpinner.setEnabled(true);
maxValueFieldPane.setVisible(true);
maxValueSpinner.setValue(new Double(e.getMaxValue())); maxValueSpinner.setValue(new Double(e.getMaxValue()));
} }
if (e.getMinValue() == -Double.MAX_VALUE) { if (e.getMinValue() == -Double.MAX_VALUE) {
setMinValueCheckBox.setSelected(false); setMinValueCheckBox.setSelected(false);
minValueFieldPane.setVisible(false);
minValueSpinner.setValue(new Double(-Double.MAX_VALUE)); minValueSpinner.setValue(new Double(-Double.MAX_VALUE));
minValueSpinner.setEnabled(false); minValueSpinner.setEnabled(false);
} else { } else {
setMinValueCheckBox.setSelected(true); setMinValueCheckBox.setSelected(true);
minValueFieldPane.setVisible(true);
minValueSpinner.setEnabled(true); minValueSpinner.setEnabled(true);
minValueSpinner.setValue(new Double(e.getMinValue())); minValueSpinner.setValue(new Double(e.getMinValue()));
} }
errorMsgTextField.setText(e.getRegErrorMessage());
if(e.getMaxValue() == Double.MAX_VALUE || e.getMinValue() == -Double.MAX_VALUE){
errorMsgTextFieldPane.setVisible(true);
}else{
errorMsgTextFieldPane.setVisible(false);
}
} }
public void update(NumberEditor ob) { public void update(NumberEditor ob) {
@ -289,15 +270,22 @@ public class NumberEditorValidatePane extends JPanel {
ob.setAllowNegative(allowNegativeCheckBox.isSelected()); ob.setAllowNegative(allowNegativeCheckBox.isSelected());
if (setMaxValueCheckBox.isSelected()) { if (setMaxValueCheckBox.isSelected()) {
ob.setMaxValue(Double.parseDouble("" + maxValueSpinner.getValue())); ob.setMaxValue(Double.parseDouble(StringUtils.EMPTY + maxValueSpinner.getValue()));
} else { } else {
ob.setMaxValue(Double.MAX_VALUE); ob.setMaxValue(Double.MAX_VALUE);
} }
if (setMinValueCheckBox.isSelected()) { if (setMinValueCheckBox.isSelected()) {
ob.setMinValue(Double.parseDouble("" + minValueSpinner.getValue())); ob.setMinValue(Double.parseDouble(StringUtils.EMPTY + minValueSpinner.getValue()));
} else { } else {
ob.setMinValue(-Double.MAX_VALUE); ob.setMinValue(-Double.MAX_VALUE);
} }
if(setMinValueCheckBox.isSelected() || setMaxValueCheckBox.isSelected()){
errorMsgTextFieldPane.setVisible(true);
}else{
errorMsgTextFieldPane.setVisible(false);
errorMsgTextField.setText(StringUtils.EMPTY);
}
ob.setRegErrorMessage(errorMsgTextField.getText());
} }
} }

21
designer_base/src/com/fr/start/BaseDesigner.java

@ -22,10 +22,20 @@ import com.fr.env.SignIn;
import com.fr.file.FILE; import com.fr.file.FILE;
import com.fr.file.FILEFactory; import com.fr.file.FILEFactory;
import com.fr.file.FileFILE; import com.fr.file.FileFILE;
import com.fr.general.*; import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger;
import com.fr.general.GeneralContext;
import com.fr.general.Inter;
import com.fr.general.ModuleContext;
import com.fr.general.SiteCenter;
import com.fr.plugin.PluginCollector; import com.fr.plugin.PluginCollector;
import com.fr.plugin.manage.PluginManager; import com.fr.plugin.manage.PluginManager;
import com.fr.stable.*; import com.fr.plugin.manage.PluginStartup;
import com.fr.stable.ArrayUtils;
import com.fr.stable.BuildContext;
import com.fr.stable.OperatingSystem;
import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -54,6 +64,10 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
setDebugEnv(); setDebugEnv();
} }
RestartHelper.deleteRecordFilesWhenStart(); RestartHelper.deleteRecordFilesWhenStart();
//初始化插件引擎
PluginStartup.start();
SiteCenter.getInstance();
DesignUtils.setPort(getStartPort()); DesignUtils.setPort(getStartPort());
// 如果端口被占用了 说明程序已经运行了一次,也就是说,已经建立一个监听服务器,现在只要给服务器发送命令就好了 // 如果端口被占用了 说明程序已经运行了一次,也就是说,已经建立一个监听服务器,现在只要给服务器发送命令就好了
@ -83,8 +97,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
DesignUtils.initLookAndFeel(); DesignUtils.initLookAndFeel();
DesignUtils.creatListeningServer(getStartPort(), startFileSuffix()); DesignUtils.creatListeningServer(getStartPort(), startFileSuffix());
//初始化插件引擎
PluginManager.init();
// 初始化Log Handler // 初始化Log Handler
DesignerEnvManager.loadLogSetting(); DesignerEnvManager.loadLogSetting();
DesignerFrame df = createDesignerFrame(); DesignerFrame df = createDesignerFrame();

1
designer_chart/src/com/fr/design/chart/javascript/ChartEmailPane.java

@ -45,7 +45,6 @@ public class ChartEmailPane extends EmailPane{
} else { } else {
double[] rSizes = { preferred, preferred, preferred, preferred, preferred, fill, preferred}; double[] rSizes = { preferred, preferred, preferred, preferred, preferred, fill, preferred};
contentPane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{ contentPane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{
{new UILabel(Inter.getLocText("Name") + ":", SwingConstants.RIGHT), itemNameTextField},
{new UILabel(), tipsPane1}, {new UILabel(), tipsPane1},
createLinePane(Inter.getLocText("HJS-Mail_to"), maitoEditor = new UITextField()), createLinePane(Inter.getLocText("HJS-Mail_to"), maitoEditor = new UITextField()),
createLinePane(Inter.getLocText("HJS-CC_to"), ccEditor = new UITextField()), createLinePane(Inter.getLocText("HJS-CC_to"), ccEditor = new UITextField()),

2
designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java

@ -114,7 +114,7 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
} }
private JPanel createTitleStylePane() { private JPanel createTitleStylePane() {
UILabel text = new UILabel(Inter.getLocText("Plugin-Chart_Character"), SwingConstants.LEFT); final UILabel text = new UILabel(Inter.getLocText("Plugin-Chart_Character"), SwingConstants.LEFT);
styleAttrPane = new ChartTextAttrPane() { styleAttrPane = new ChartTextAttrPane() {
protected JPanel getContentPane(JPanel buttonPane) { protected JPanel getContentPane(JPanel buttonPane) {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;

409
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java

@ -4,6 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.Bar2DPlot; import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartdata.NormalTableDataDefinition; import com.fr.chart.chartdata.NormalTableDataDefinition;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
@ -26,212 +27,230 @@ import java.util.List;
/** /**
* 多分类轴 的数据集定义界面. * 多分类轴 的数据集定义界面.
*
* @author kunsnat E-mail:kunsnat@gmail.com * @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2013-9-3 上午10:00:28 * @version 创建时间2013-9-3 上午10:00:28
*/ */
public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableDataContentPane implements UIObserver{ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableDataContentPane implements UIObserver {
private static final long serialVersionUID = -3305681053750642843L; private static final long serialVersionUID = -3305681053750642843L;
private static final int COMBOX_GAP = 8; private static final int COMBOX_GAP = 8;
private static final int COMBOX_WIDTH = 95; private static final int COMBOX_WIDTH = 95;
private static final int COMBOX_HEIGHT = 20; private static final int COMBOX_HEIGHT = 20;
private JPanel boxPane; private JPanel boxPane;
private ArrayList<UIComboBox> boxList = new ArrayList<UIComboBox>(); private ArrayList<UIComboBox> boxList = new ArrayList<UIComboBox>();
private UIButton addButton; private UIButton addButton;
private UIObserverListener uiobListener = null; private UIObserverListener uiobListener = null;
public CategoryPlotMoreCateTableDataContentPane() { public List<UIComboBox> getBoxList() {
// do nothing return boxList;
} }
public CategoryPlotMoreCateTableDataContentPane(ChartDataPane parent) { public CategoryPlotMoreCateTableDataContentPane() {
categoryCombox = new UIComboBox(); // do nothing
categoryCombox.setPreferredSize(new Dimension(COMBOX_WIDTH,COMBOX_HEIGHT)); }
JPanel categoryPane = new JPanel(new BorderLayout(4,0)); public CategoryPlotMoreCateTableDataContentPane(ChartDataPane parent) {
categoryPane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground())); categoryCombox = new UIComboBox();
UILabel categoryLabel = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name")) ; categoryCombox.setPreferredSize(new Dimension(COMBOX_WIDTH,COMBOX_HEIGHT));
JPanel categoryPane = new JPanel(new BorderLayout(4, 0));
categoryPane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground()));
UILabel categoryLabel = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name"));
categoryLabel.setPreferredSize(new Dimension(85,COMBOX_HEIGHT)); categoryLabel.setPreferredSize(new Dimension(85,COMBOX_HEIGHT));
addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png")); addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
addButton.setPreferredSize(new Dimension(20, COMBOX_HEIGHT)); addButton.setPreferredSize(new Dimension(20, COMBOX_HEIGHT));
categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox, addButton,null,categoryLabel,null}));
categoryPane.setBorder(BorderFactory.createEmptyBorder(0,24,10,15));
categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox, addButton, null, categoryLabel, null}));
boxPane = new JPanel(); categoryPane.setBorder(BorderFactory.createEmptyBorder(0,24,10,15));
boxPane = new JPanel();
boxPane.setLayout(new BoxLayout(boxPane, BoxLayout.Y_AXIS)); boxPane.setLayout(new BoxLayout(boxPane, BoxLayout.Y_AXIS));
categoryPane.add(boxPane, BorderLayout.SOUTH); categoryPane.add(boxPane, BorderLayout.SOUTH);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(categoryPane, BorderLayout.NORTH); this.add(categoryPane, BorderLayout.NORTH);
this.add(getJSeparator()); this.add(getJSeparator());
seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot()); seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot());
this.add(seriesTypeComboxPane, BorderLayout.SOUTH); this.add(seriesTypeComboxPane, BorderLayout.SOUTH);
addButton.addActionListener(new ActionListener() { addButton.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if(boxList.size() < 2) { if (boxList.size() < 2) {
addNewCombox(); addNewCombox();
relayoutPane(); relayoutPane();
} }
checkSeriseUse(categoryCombox.getSelectedItem() != null); checkSeriseUse(categoryCombox.getSelectedItem() != null);
} }
}); });
categoryCombox.addItemListener(new ItemListener() { categoryCombox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
checkSeriseUse(categoryCombox.getSelectedItem() != null); checkSeriseUse(categoryCombox.getSelectedItem() != null);
makeToolTipUse(categoryCombox); makeToolTipUse(categoryCombox);
checkAddButton(); checkComponent();
} }
}); });
} }
protected void checkSeriseUse(boolean hasUse) { protected void checkSeriseUse(boolean hasUse) {
super.checkSeriseUse(hasUse); super.checkSeriseUse(hasUse);
addButton.setEnabled(hasUse); addButton.setEnabled(hasUse);
} }
private UIComboBox addNewCombox() { private UIComboBox addNewCombox() {
final JPanel buttonPane = new JPanel(); final JPanel buttonPane = new JPanel();
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 2)); buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 2));
final UIComboBox combox = new UIComboBox(); final UIComboBox combox = new UIComboBox();
combox.setPreferredSize(new Dimension(COMBOX_WIDTH, COMBOX_HEIGHT)); combox.setPreferredSize(new Dimension(COMBOX_WIDTH, COMBOX_HEIGHT));
int count = categoryCombox.getItemCount(); int count = categoryCombox.getItemCount();
for(int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
combox.addItem(categoryCombox.getItemAt(i)); combox.addItem(categoryCombox.getItemAt(i));
} }
combox.registerChangeListener(uiobListener); combox.registerChangeListener(uiobListener);
combox.addItemListener(new ItemListener() { combox.addItemListener(new ItemListener() {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
makeToolTipUse(combox); makeToolTipUse(combox);
} }
}); });
combox.setSelectedItem(categoryCombox.getItemAt(0)); combox.setSelectedItem(categoryCombox.getItemAt(0));
makeToolTipUse(combox); makeToolTipUse(combox);
buttonPane.add(combox); buttonPane.add(combox);
UIButton delButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/toolbarbtn/close.png")); UIButton delButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/toolbarbtn/close.png"));
buttonPane.add(delButton); buttonPane.add(delButton);
boxPane.add(buttonPane); boxPane.add(buttonPane);
boxList.add(combox); boxList.add(combox);
checkAddButton(); checkComponent();
delButton.addActionListener(new ActionListener() { delButton.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
boxPane.remove(buttonPane); boxPane.remove(buttonPane);
boxList.remove(combox); boxList.remove(combox);
checkAddButton(); checkComponent();
relayoutPane(); relayoutPane();
} }
}); });
delButton.registerChangeListener(uiobListener); delButton.registerChangeListener(uiobListener);
return combox; return combox;
} }
private void checkAddButton() { private void checkAddButton() {
int size = boxList.size(); int size = boxList.size();
addButton.setEnabled(size < 2 && categoryCombox.getSelectedItem() != null); addButton.setEnabled(size < 2 && categoryCombox.getSelectedItem() != null);
} }
private void relayoutPane() { protected void checkComponent() {
this.revalidate(); checkAddButton();
} }
private void relayoutPane() {
/** this.revalidate();
*检查 某些Box是否可用 }
* @param hasUse 是否使用.
*/
public void checkBoxUse(boolean hasUse) { /**
super.checkBoxUse(hasUse); * 检查 某些Box是否可用
*
checkAddButton(); * @param hasUse 是否使用.
} */
public void checkBoxUse(boolean hasUse) {
super.checkBoxUse(hasUse);
checkComponent();
}
protected void refreshBoxListWithSelectTableData(List list) { protected void refreshBoxListWithSelectTableData(List list) {
super.refreshBoxListWithSelectTableData(list); super.refreshBoxListWithSelectTableData(list);
for(int i = 0, size = boxList.size(); i < size; i++) { for (int i = 0, size = boxList.size(); i < size; i++) {
refreshBoxItems(boxList.get(i), list); refreshBoxItems(boxList.get(i), list);
} }
}
/**
* 给组件登记一个观察者监听事件
*
* @param listener 观察者监听事件
*/
public void registerChangeListener(UIObserverListener listener) {
uiobListener = listener;
}
/**
* 组件是否需要响应添加的观察者事件
*
* @return 如果需要响应观察者事件则返回true否则返回false
*/
public boolean shouldResponseChangeListener() {
return true;
}
/**
* 更新 多分类相关界面
*
* @param collection
*/
public void populateBean(ChartCollection collection) {
super.populateBean(collection);
boxList.clear();
TopDefinitionProvider top = collection.getSelectedChart().getFilterDefinition();
if (top instanceof NormalTableDataDefinition) {
NormalTableDataDefinition normal = (NormalTableDataDefinition) top;
int size = normal.getMoreCateSize();
for (int i = 0; i < size; i++) {
UIComboBox box = addNewCombox();
box.setSelectedItem(normal.getMoreCateWithIndex(i));
}
}
checkAddButton();
checkSeriseUse(categoryCombox.getSelectedItem() != null);
}
/**
* 保存多分类界面到collection
*
* @param collection
*/
public void updateBean(ChartCollection collection) {
super.updateBean(collection);
TopDefinitionProvider top = collection.getSelectedChart().getFilterDefinition();
Plot plot = collection.getSelectedChart().getPlot();
if (top instanceof NormalTableDataDefinition) {
NormalTableDataDefinition normal = (NormalTableDataDefinition) top;
normal.clearMoreCate();
updateMoreCate(normal, plot);
}
}
protected void updateMoreCate(NormalTableDataDefinition normal, Plot plot) {
for (int i = 0, size = boxList.size(); i < size; i++) {
UIComboBox box = boxList.get(i);
if (box.getSelectedItem() != null) {
normal.addMoreCate(box.getSelectedItem().toString());
}
}
} }
/**
* 给组件登记一个观察者监听事件
*
* @param listener 观察者监听事件
*/
public void registerChangeListener(UIObserverListener listener) {
uiobListener = listener;
}
/**
* 组件是否需要响应添加的观察者事件
*
* @return 如果需要响应观察者事件则返回true否则返回false
*/
public boolean shouldResponseChangeListener() {
return true;
}
/**
* 更新 多分类相关界面
* @param collection
*/
public void populateBean(ChartCollection collection) {
super.populateBean(collection);
boxList.clear();
TopDefinitionProvider top = collection.getSelectedChart().getFilterDefinition();
if(top instanceof NormalTableDataDefinition) {
NormalTableDataDefinition normal = (NormalTableDataDefinition)top;
int size = normal.getMoreCateSize();
for(int i = 0; i < size; i++) {
UIComboBox box = addNewCombox();
box.setSelectedItem(normal.getMoreCateWithIndex(i));
}
}
checkAddButton();
checkSeriseUse(categoryCombox.getSelectedItem() != null);
}
/**
* 保存多分类界面到collection
* @param collection
*/
public void updateBean(ChartCollection collection) {
super.updateBean(collection);
TopDefinitionProvider top = collection.getSelectedChart().getFilterDefinition();
if(top instanceof NormalTableDataDefinition) {
NormalTableDataDefinition normal = (NormalTableDataDefinition)top;
normal.clearMoreCate();
for(int i = 0, size = boxList.size(); i < size; i++) {
UIComboBox box = boxList.get(i);
if(box.getSelectedItem() != null) {
normal.addMoreCate(box.getSelectedItem().toString());
}
}
}
}
} }

23
designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java

@ -4,8 +4,18 @@ import com.fr.base.ChartPreStyleManagerProvider;
import com.fr.base.ChartPreStyleServerManager; import com.fr.base.ChartPreStyleServerManager;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.background.ColorBackground; import com.fr.base.background.ColorBackground;
import com.fr.chart.base.*; import com.fr.chart.base.AttrContents;
import com.fr.chart.chartattr.*; import com.fr.chart.base.AttrFillStyle;
import com.fr.chart.base.ChartConstants;
import com.fr.chart.base.ChartPreStyle;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.base.TextAttr;
import com.fr.chart.chartattr.Axis;
import com.fr.chart.chartattr.CategoryPlot;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Legend;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartattr.Title;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.charttypes.BarIndependentChart; import com.fr.chart.charttypes.BarIndependentChart;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
@ -43,6 +53,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
protected List<ChartImagePane> styleList; protected List<ChartImagePane> styleList;
protected JPanel stylePane; //样式布局的面板 protected JPanel stylePane; //样式布局的面板
private JPanel typePane;
protected abstract String[] getTypeIconPath(); protected abstract String[] getTypeIconPath();
protected abstract String[] getTypeTipName(); protected abstract String[] getTypeTipName();
protected abstract String[] getTypeLayoutPath(); protected abstract String[] getTypeLayoutPath();
@ -70,7 +81,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
checkDemosBackground(); checkDemosBackground();
JPanel typePane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(4); typePane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(4);
for(int i = 0; i < typeDemo.size(); i++) { for(int i = 0; i < typeDemo.size(); i++) {
ChartImagePane tmp = typeDemo.get(i); ChartImagePane tmp = typeDemo.get(i);
typePane.add(tmp); typePane.add(tmp);
@ -133,7 +144,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
} }
//子类覆盖 //子类覆盖
protected Plot getSelectedClonedPlot(){ protected <T extends Plot> T getSelectedClonedPlot(){
return null; return null;
} }
@ -586,6 +597,10 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
&& chart.getPlot().getPlotStyle() != ChartConstants.STYLE_NONE; && chart.getPlot().getPlotStyle() != ChartConstants.STYLE_NONE;
} }
protected JPanel getTypePane(){
return typePane;
}
public Chart getDefaultChart() { public Chart getDefaultChart() {
return BarIndependentChart.barChartTypes[0]; return BarIndependentChart.barChartTypes[0];
} }

5
designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java

@ -5,7 +5,6 @@ import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -42,9 +41,11 @@ public class TableLayout4VanChartHelper {
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {f, componentWidth}; double[] columnSize = {f, componentWidth};
double[] rowSize = {p, p}; double[] rowSize = {p, p};
UILabel label = new UILabel(title);
label.setVerticalAlignment(SwingConstants.TOP);
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText(title)), component}, new Component[]{label, component},
}; };
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, COMPONENT_INTERVAL, LayoutConstants.VGAP_LARGE); return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, COMPONENT_INTERVAL, LayoutConstants.VGAP_LARGE);
} }

2
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartHtmlLabelPane.java

@ -15,7 +15,6 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.base.VanChartHtmlLabel; import com.fr.plugin.chart.base.VanChartHtmlLabel;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.style.VanChartStylePane; import com.fr.plugin.chart.designer.style.VanChartStylePane;
import javax.swing.*; import javax.swing.*;
@ -66,7 +65,6 @@ public class VanChartHtmlLabelPane extends JPanel{
}; };
JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
contentPane.setBorder(BorderFactory.createEmptyBorder(0, (int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH + TableLayout4VanChartHelper.COMPONENT_INTERVAL,0,0));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(contentPane, BorderLayout.CENTER); this.add(contentPane, BorderLayout.CENTER);

24
designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPaneWithOutImageAndShadow.java

@ -16,23 +16,20 @@ import java.awt.*;
*/ */
public class VanChartBackgroundPaneWithOutImageAndShadow extends VanChartBackgroundPane { public class VanChartBackgroundPaneWithOutImageAndShadow extends VanChartBackgroundPane {
public VanChartBackgroundPaneWithOutImageAndShadow() { @Override
initComponents(); protected JPanel initContentPanel() {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = { p,p,p,p,p}; double[] rowSize = { p,p,p};
JPanel panel = TableLayoutHelper.createTableLayoutPane(getPaneComponents(),rowSize,columnSize); return TableLayoutHelper.createTableLayoutPane(getPaneComponents(),rowSize,columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
} }
@Override @Override
protected void initList() { protected void initList() {
paneList.add(new NullBackgroundQuickPane(){ paneList.add(new NullBackgroundQuickPane() {
/** /**
* 名称 * 名称
* *
@ -46,14 +43,15 @@ public class VanChartBackgroundPaneWithOutImageAndShadow extends VanChartBackgro
paneList.add(new ColorBackgroundQuickPane()); paneList.add(new ColorBackgroundQuickPane());
} }
@Override @Override
protected Component[][] getPaneComponents() { protected Component[][] getPaneComponents() {
return new Component[][]{ return new Component[][]{
new Component[]{null, null}, new Component[]{typeComboBox, null},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Shape_Fill")), typeComboBox}, new Component[]{centerPane, null},
new Component[]{null, centerPane}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Alpha")), transparent},
new Component[]{new UILabel(Inter.getLocText("Plugin-Chart_Alpha")), transparent},
}; };
} }
} }

27
designer_chart/src/com/fr/plugin/chart/designer/data/VanChartMoreCateReportDataContentPane.java

@ -27,27 +27,24 @@ public class VanChartMoreCateReportDataContentPane extends CategoryPlotMoreCateR
} }
protected void updateMoreCate(NormalReportDataDefinition reportDefinition, Plot plot) { protected void updateMoreCate(NormalReportDataDefinition reportDefinition, Plot plot) {
//todo@shine9.0 super.updateMoreCate(reportDefinition, plot);
// super.updateMoreCate(reportDefinition, plot); ((VanChartPlot) plot).setCategoryNum(getFormualList().size() + 1);
// ((VanChartPlot) plot).setCategoryNum(getFormualList().size() + 1); if (!getFormualList().isEmpty()) {
// if (!getFormualList().isEmpty()) { plot.getDataSheet().setVisible(false);
// plot.getDataSheet().setVisible(false); }
// }
} }
protected void checkComponent() { protected void checkComponent() {
//todo@shine9.0 super.checkComponent();
// super.checkComponent(); checkBoxList(isSupportMultiCategory);
// checkBoxList(isSupportMultiCategory);
} }
private void checkBoxList(boolean isSupportMulticategory) { private void checkBoxList(boolean isSupportMulticategory) {
//todo@shine9.0 if (getFormualList().size() != 0) {
// if (getFormualList().size() != 0) { for (int i = 0; i < getFormualList().size(); i++) {
// for (int i = 0; i < getFormualList().size(); i++) { getFormualList().get(i).setEnabled(isSupportMulticategory);
// getFormualList().get(i).setEnabled(isSupportMulticategory); }
// } }
// }
} }
} }

27
designer_chart/src/com/fr/plugin/chart/designer/data/VanChartMoreCateTableDataContentPane.java

@ -28,27 +28,24 @@ public class VanChartMoreCateTableDataContentPane extends CategoryPlotMoreCateTa
} }
protected void updateMoreCate(NormalTableDataDefinition normal, Plot plot) { protected void updateMoreCate(NormalTableDataDefinition normal, Plot plot) {
//todo@shine9.0 super.updateMoreCate(normal, plot);
// super.updateMoreCate(normal, plot); ((VanChartPlot) plot).setCategoryNum(getBoxList().size() + 1);
// ((VanChartPlot) plot).setCategoryNum(getBoxList().size() + 1); if (!getBoxList().isEmpty()) {
// if (!getBoxList().isEmpty()) { plot.getDataSheet().setVisible(false);
// plot.getDataSheet().setVisible(false); }
// }
} }
protected void checkComponent() { protected void checkComponent() {
//todo@shine9.0 super.checkComponent();
// super.checkComponent(); checkBoxList(isSupportMultiCategory);
// checkBoxList(isSupportMultiCategory);
} }
private void checkBoxList(boolean isSupportMulticategory) { private void checkBoxList(boolean isSupportMulticategory) {
//todo@shine9.0 if (getBoxList().size() != 0) {
// if (getBoxList().size() != 0) { for (int i = 0; i < getBoxList().size(); i++) {
// for (int i = 0; i < getBoxList().size(); i++) { getBoxList().get(i).setEnabled(isSupportMulticategory);
// getBoxList().get(i).setEnabled(isSupportMulticategory); }
// } }
// }
} }
} }

1
designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java

@ -205,6 +205,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
private void checkStyleUse() { private void checkStyleUse() {
textFontPane.setVisible(style.getSelectedIndex() == 1); textFontPane.setVisible(style.getSelectedIndex() == 1);
textFontPane.setPreferredSize(style.getSelectedIndex() == 1 ? new Dimension(0, 60) : new Dimension(0, 0));
} }
private void checkPosition() { private void checkPosition() {

10
designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java

@ -68,6 +68,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
protected JPanel stackAndAxisEditExpandablePane;//堆積和坐標軸展开面板 protected JPanel stackAndAxisEditExpandablePane;//堆積和坐標軸展开面板
private RadiusCardLayoutPane radiusPane;//半径设置界面 private RadiusCardLayoutPane radiusPane;//半径设置界面
private JPanel radiusPaneWithTitle;
private UIButtonGroup<DataProcessor> largeDataModelGroup;//大数据模式 private UIButtonGroup<DataProcessor> largeDataModelGroup;//大数据模式
@ -158,9 +159,10 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
} }
//半径界面 //半径界面
protected RadiusCardLayoutPane createRadiusPane() { protected JPanel createRadiusPane() {
radiusPane = initRadiusPane(); radiusPane = initRadiusPane();
return radiusPane; radiusPaneWithTitle = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Radius_Set"), radiusPane);
return ((VanChartPlot)plot).isInCustom() ? null : radiusPaneWithTitle;
} }
protected JPanel createLargeDataModelPane() { protected JPanel createLargeDataModelPane() {
@ -309,10 +311,10 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
* @param plot * @param plot
*/ */
private void checkRadiusPane(Plot plot) { private void checkRadiusPane(Plot plot) {
radiusPane.setVisible(true); radiusPaneWithTitle.setVisible(true);
if (plot instanceof VanChartPlot){ if (plot instanceof VanChartPlot){
if (((VanChartPlot) plot).isInCustom()){ if (((VanChartPlot) plot).isInCustom()){
radiusPane.setVisible(false); radiusPaneWithTitle.setVisible(false);
} }
} }
} }

56
designer_chart/src/com/fr/plugin/chart/drillmap/designer/data/comp/DrillMapLayerPane.java

@ -8,12 +8,13 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.drillmap.DrillMapHelper; import com.fr.plugin.chart.drillmap.DrillMapHelper;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
import com.fr.plugin.chart.type.MapType;
import com.fr.plugin.chart.type.ZoomLevel;
import com.fr.plugin.chart.map.designer.type.VanChartMapSourceChoosePane; import com.fr.plugin.chart.map.designer.type.VanChartMapSourceChoosePane;
import com.fr.plugin.chart.map.server.CompatibleGeoJSONTreeHelper; import com.fr.plugin.chart.map.server.CompatibleGeoJSONTreeHelper;
import com.fr.plugin.chart.type.MapType;
import com.fr.plugin.chart.type.ZoomLevel;
import javax.swing.*; import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultMutableTreeNode;
@ -48,29 +49,28 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
@Override @Override
protected void layoutContentPane() { protected void layoutContentPane() {
leftcontentPane = createContentPane(); leftcontentPane = createContentPane();
leftcontentPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); leftcontentPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
this.add(leftcontentPane); this.add(leftcontentPane);
} }
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
if(mapDataTree == null){ if (mapDataTree == null) {
mapDataTree = new MapDataTree(CompatibleGeoJSONTreeHelper.getRootNodeWithoutPara(oldGeoUrl)); mapDataTree = new MapDataTree(CompatibleGeoJSONTreeHelper.getRootNodeWithoutPara(oldGeoUrl));
mapDataTree.setRootVisible(true); mapDataTree.setRootVisible(true);
} }
JPanel mapDataTreePanel = new JPanel(new BorderLayout());
mapDataTreePanel.add(mapDataTree);
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {f}; double[] columnSize = {f};
double[] rowSize = {p,p,p,p,p,p}; double[] rowSize = {p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Layer_Tree"))}, new Component[]{createTitlePane(Inter.getLocText("Plugin-ChartF_Layer_Tree"), mapDataTreePanel)},
new Component[]{new JSeparator()}, new Component[]{createTitlePane(Inter.getLocText("Plugin-ChartF_Layer_Detail"), createLayerDetailPane())}
new Component[]{mapDataTree},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Layer_Detail"))},
new Component[]{new JSeparator()},
new Component[]{createLayerDetailPane()}
}; };
JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
@ -79,21 +79,29 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
return panel; return panel;
} }
private JPanel createTitlePane (String title, JPanel panel) {
JPanel jPanel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(title, panel);
panel.setBorder(BorderFactory.createEmptyBorder(10,5,0,0));
jPanel.setBorder(BorderFactory.createEmptyBorder(0,5,0,0));
return jPanel;
}
private JPanel createLayerDetailPane() { private JPanel createLayerDetailPane() {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] columnSize = {p,p,p}; double f = TableLayout.FILL;
double[] columnSize = {f, p, p};
double[] rowSize = new double[depth + 1]; double[] rowSize = new double[depth + 1];
detailComps = new Component[depth + 1][3]; detailComps = new Component[depth + 1][3];
rowSize[0] = p; rowSize[0] = p;
detailComps[0] = new Component[]{ detailComps[0] = new Component[]{
new UILabel(Inter.getLocText("Plugin-Chart_Descriptor")), new UILabel(Inter.getLocText("Plugin-Chart_Descriptor")),
new UILabel(Inter.getLocText("Plugin-ChartF_Layer_Zoom_Level")), new UILabel(Inter.getLocText("Plugin-ChartF_Zoom_Layer")),
new UILabel(Inter.getLocText("Plugin-ChartF_Layer_Map_Type")) new UILabel(Inter.getLocText("Plugin-ChartF_Layer_Map_Type"))
}; };
for(int i = 0; i < depth; i++){ for (int i = 0; i < depth; i++) {
rowSize[i + 1] = p; rowSize[i + 1] = p;
int d = i + 1; int d = i + 1;
UILabel label = new UILabel(String.format("%s%d%s",Inter.getLocText("Plugin-ChartF_Index1"), d, Inter.getLocText("Plugin-ChartF_Index3"))); UILabel label = new UILabel(String.format("%s%d%s", Inter.getLocText("Plugin-ChartF_Index1"), d, Inter.getLocText("Plugin-ChartF_Index3")));
UIComboBox level = new UIComboBox(VanChartMapSourceChoosePane.ZOOM_LEVELS); UIComboBox level = new UIComboBox(VanChartMapSourceChoosePane.ZOOM_LEVELS);
level.setEnabled(i != 0); level.setEnabled(i != 0);
UIComboBox type = new UIComboBox(TEMP.get(oldMapType)); UIComboBox type = new UIComboBox(TEMP.get(oldMapType));
@ -112,16 +120,16 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
public void populateBean(ChartCollection ob) { public void populateBean(ChartCollection ob) {
VanChartDrillMapPlot drillMapPlot = DrillMapHelper.getDrillMapPlot(ob); VanChartDrillMapPlot drillMapPlot = DrillMapHelper.getDrillMapPlot(ob);
if(drillMapPlot != null) { if (drillMapPlot != null) {
java.util.List<ZoomLevel> levelList = drillMapPlot.getLayerLevelList(); java.util.List<ZoomLevel> levelList = drillMapPlot.getLayerLevelList();
java.util.List<MapType> mapTypeList = drillMapPlot.getLayerMapTypeList(); java.util.List<MapType> mapTypeList = drillMapPlot.getLayerMapTypeList();
if(detailComps == null || drillMapPlot.getMapType() != oldMapType || !ComparatorUtils.equals(drillMapPlot.getGeoUrl(), oldGeoUrl)){ if (detailComps == null || drillMapPlot.getMapType() != oldMapType || !ComparatorUtils.equals(drillMapPlot.getGeoUrl(), oldGeoUrl)) {
oldMapType = drillMapPlot.getMapType(); oldMapType = drillMapPlot.getMapType();
oldGeoUrl = drillMapPlot.getGeoUrl(); oldGeoUrl = drillMapPlot.getGeoUrl();
DefaultMutableTreeNode root = CompatibleGeoJSONTreeHelper.getNodeByJSONPath(oldGeoUrl); DefaultMutableTreeNode root = CompatibleGeoJSONTreeHelper.getNodeByJSONPath(oldGeoUrl);
if(root != null){ if (root != null) {
mapDataTree.changeRootNode(root); mapDataTree.changeRootNode(root);
depth = root.getDepth() + 1;//根节点也算一层 depth = root.getDepth() + 1;//根节点也算一层
} }
@ -132,18 +140,18 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
//根据层级初始属性,一切以json那边读到的层级为准 //根据层级初始属性,一切以json那边读到的层级为准
int levelSize = levelList.size(); int levelSize = levelList.size();
for(int i = levelSize; i < depth; i++){ for (int i = levelSize; i < depth; i++) {
levelList.add(ZoomLevel.AUTO); levelList.add(ZoomLevel.AUTO);
} }
MapType mapType = drillMapPlot.getMapType() == MapType.POINT ? MapType.POINT : MapType.AREA; MapType mapType = drillMapPlot.getMapType() == MapType.POINT ? MapType.POINT : MapType.AREA;
int typeSize = mapTypeList.size(); int typeSize = mapTypeList.size();
for(int j = typeSize; j < depth; j++){ for (int j = typeSize; j < depth; j++) {
mapTypeList.add(mapType); mapTypeList.add(mapType);
} }
for(int i = 0; i < depth; i++){ for (int i = 0; i < depth; i++) {
Component[] components = detailComps[i + 1]; Component[] components = detailComps[i + 1];
if(components != null) { if (components != null) {
UIComboBox level = (UIComboBox) components[1]; UIComboBox level = (UIComboBox) components[1];
UIComboBox type = (UIComboBox) components[2]; UIComboBox type = (UIComboBox) components[2];
if (level != null) { if (level != null) {
@ -168,11 +176,11 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
@Override @Override
public void updateBean(ChartCollection ob) { public void updateBean(ChartCollection ob) {
VanChartDrillMapPlot drillMapPlot = DrillMapHelper.getDrillMapPlot(ob); VanChartDrillMapPlot drillMapPlot = DrillMapHelper.getDrillMapPlot(ob);
if(drillMapPlot != null && detailComps != null) { if (drillMapPlot != null && detailComps != null) {
java.util.List<ZoomLevel> levelList = new ArrayList<ZoomLevel>(); java.util.List<ZoomLevel> levelList = new ArrayList<ZoomLevel>();
java.util.List<MapType> mapTypeList = new ArrayList<MapType>(); java.util.List<MapType> mapTypeList = new ArrayList<MapType>();
for (Component[] com : detailComps) { for (Component[] com : detailComps) {
if(com[1] instanceof UIComboBox && com[2] instanceof UIComboBox) { if (com[1] instanceof UIComboBox && com[2] instanceof UIComboBox) {
UIComboBox level = (UIComboBox) com[1]; UIComboBox level = (UIComboBox) com[1];
UIComboBox type = (UIComboBox) com[2]; UIComboBox type = (UIComboBox) com[2];
levelList.add((ZoomLevel) level.getSelectedItem()); levelList.add((ZoomLevel) level.getSelectedItem());

44
designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java

@ -33,7 +33,8 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
protected JPanel getInteractivePane(VanChartPlot plot){ protected JPanel getInteractivePane(VanChartPlot plot){
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p, p, p, p, p, p, p, p, p}; double[] rowSize = {p, p, p, p, p, p, p, p, p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createToolBarPane(new double[]{p, p, p}, columnSize),null}, new Component[]{createToolBarPane(new double[]{p, p, p}, columnSize),null},
@ -49,16 +50,29 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
private JPanel createDrillToolsPane() { private JPanel createDrillToolsPane() {
openOrClose = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); openOrClose = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
JPanel openOrClosePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Drill_Dir"), openOrClose);
textAttrPane = new ChartTextAttrPane(){ textAttrPane = new ChartTextAttrPane(){
@Override
protected JPanel getContentPane (JPanel buttonPane) {
double p = TableLayout.PREFERRED;
double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {e};
double[] rowSize = {p, p};
return TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize);
}
@Override
protected Component[][] getComponents(JPanel buttonPane) { protected Component[][] getComponents(JPanel buttonPane) {
return new Component[][]{ return new Component[][]{
new Component[]{fontNameComboBox, null}, new Component[]{fontNameComboBox},
new Component[]{buttonPane, null} new Component[]{buttonPane}
}; };
} }
}; };
backgroundPane = new VanChartBackgroundPane4DrillMap(); backgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow();
selectBackgroundPane = new VanChartBackgroundPane4DrillMap(); selectBackgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow();
catalogSuperLink = new VanChartCatalogHyperLinkPane(); catalogSuperLink = new VanChartCatalogHyperLinkPane();
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
@ -75,7 +89,7 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
drillPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); drillPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
panel.add(openOrClose, BorderLayout.NORTH); panel.add(openOrClosePane, BorderLayout.NORTH);
panel.add(drillPane, BorderLayout.CENTER); panel.add(drillPane, BorderLayout.CENTER);
openOrClose.addChangeListener(new ChangeListener() { openOrClose.addChangeListener(new ChangeListener() {
@ -85,13 +99,15 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
} }
}); });
JPanel panel1 = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Drill_Dir"), panel); JPanel panel1 = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Drill"), panel);
panel.setBorder(BorderFactory.createEmptyBorder(10,5,0,0)); panel.setBorder(BorderFactory.createEmptyBorder(10,5,0,0));
return panel1; return panel1;
} }
private JPanel createTitlePane(String title, Component component) { private JPanel createTitlePane(String title, Component component) {
return TableLayout4VanChartHelper.createGapTableLayoutPane(title, component); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(title, component, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
panel.setBorder(BorderFactory.createEmptyBorder(0,12,0,0));
return panel;
} }
private void checkEnable() { private void checkEnable() {
@ -138,16 +154,4 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
catalogSuperLink.update(plot); catalogSuperLink.update(plot);
} }
} }
public class VanChartBackgroundPane4DrillMap extends VanChartBackgroundPaneWithOutImageAndShadow{
@Override
protected Component[][] getPaneComponents() {
return new Component[][]{
new Component[]{null},
new Component[]{typeComboBox},
new Component[]{centerPane},
new Component[]{transparent},
};
}
}
} }

15
designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java

@ -13,11 +13,9 @@ import com.fr.design.style.color.ColorSelectBox;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.attr.GaugeDetailStyle; import com.fr.plugin.chart.attr.GaugeDetailStyle;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.AttrLabel; import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.style.series.VanChartAbstractPlotSeriesPane; import com.fr.plugin.chart.designer.style.series.VanChartAbstractPlotSeriesPane;
import com.fr.plugin.chart.pie.RadiusCardLayoutPane;
import com.fr.plugin.chart.type.GaugeStyle; import com.fr.plugin.chart.type.GaugeStyle;
import com.fr.stable.Constants; import com.fr.stable.Constants;
@ -119,21 +117,21 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
new Component[]{null, null}, new Component[]{null, null},
getPaneBackgroundColor(), getPaneBackgroundColor(),
getInnerPaneBackgroundColor(), getInnerPaneBackgroundColor(),
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()} new Component[]{createRadiusPane(), null}
}; };
case SLOT: case SLOT:
return new Component[][]{ return new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
getNeedleColor(), getNeedleColor(),
getSlotBackgroundColor(), getSlotBackgroundColor(),
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()} new Component[]{createRadiusPane(), null}
}; };
case THERMOMETER: case THERMOMETER:
return new Component[][]{ return new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
getNeedleColor(), getNeedleColor(),
getSlotBackgroundColor(), getSlotBackgroundColor(),
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()} new Component[]{createRadiusPane(), null}
}; };
default: default:
return new Component[][]{ return new Component[][]{
@ -142,16 +140,11 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
getHingeBackgroundColor(), getHingeBackgroundColor(),
getNeedleColor(), getNeedleColor(),
getPaneBackgroundColor(), getPaneBackgroundColor(),
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()} new Component[]{createRadiusPane(), null}
}; };
} }
} }
//半径界面
protected RadiusCardLayoutPane initRadiusPane() {
return ((VanChartPlot)plot).isInCustom() ? null : new RadiusCardLayoutPane();
}
private Component[] getHingeColor() { private Component[] getHingeColor() {
hingeColor = new ColorSelectBox(120); hingeColor = new ColorSelectBox(120);
return new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Hinge")),hingeColor}; return new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Hinge")),hingeColor};

3
designer_chart/src/com/fr/plugin/chart/heatmap/designer/type/VanChartHeatMapTypePane.java

@ -64,8 +64,7 @@ public class VanChartHeatMapTypePane extends VanChartMapPlotPane {
populateSourcePane(plot); populateSourcePane(plot);
boolean enabled = !CompatibleGEOJSONHelper.isDeprecated(plot.getGeoUrl()); boolean enabled = !CompatibleGEOJSONHelper.isDeprecated(plot.getGeoUrl());
//todo@shine9.0 GUICoreUtils.setEnabled(this.getTypePane(), enabled);
//GUICoreUtils.setEnabled(this.getTypePane(), enabled);
GUICoreUtils.setEnabled(this.getSourceChoosePane().getSourceComboBox(), enabled); GUICoreUtils.setEnabled(this.getSourceChoosePane().getSourceComboBox(), enabled);
checkDemosBackground(); checkDemosBackground();

3
designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapPlotPane.java

@ -93,8 +93,7 @@ public class VanChartMapPlotPane extends AbstractVanChartTypePane {
populateSourcePane(plot); populateSourcePane(plot);
boolean enabled = !CompatibleGEOJSONHelper.isDeprecated(plot.getGeoUrl()); boolean enabled = !CompatibleGEOJSONHelper.isDeprecated(plot.getGeoUrl());
//todo@shine9.0 GUICoreUtils.setEnabled(this.getTypePane(), enabled);
//GUICoreUtils.setEnabled(this.getTypePane(), enabled);
GUICoreUtils.setEnabled(this.sourceChoosePane.getSourceComboBox(), enabled); GUICoreUtils.setEnabled(this.sourceChoosePane.getSourceComboBox(), enabled);
checkDemosBackground(); checkDemosBackground();

9
designer_chart/src/com/fr/plugin/chart/pie/VanChartPieSeriesPane.java

@ -10,7 +10,6 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.PiePlot4VanChart; import com.fr.plugin.chart.PiePlot4VanChart;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.style.series.VanChartAbstractPlotSeriesPane; import com.fr.plugin.chart.designer.style.series.VanChartAbstractPlotSeriesPane;
@ -62,7 +61,7 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_StartAngle")),startAngle}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_StartAngle")),startAngle},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_EndAngle")),endAngle}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_EndAngle")),endAngle},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_InnerRadius")),innerRadius}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_InnerRadius")),innerRadius},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")), createRadiusPane()}, new Component[]{createRadiusPane(),null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Rotation")),supportRotation} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Rotation")),supportRotation}
}; };
@ -71,12 +70,6 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel);
} }
//半径界面
protected RadiusCardLayoutPane initRadiusPane() {
return ((VanChartPlot)plot).isInCustom() ? null : new RadiusCardLayoutPane();
}
public void populateBean(Plot plot) { public void populateBean(Plot plot) {
if(plot == null) { if(plot == null) {
return; return;

2
designer_chart/src/com/fr/plugin/chart/range/component/LegendLabelFormatPane.java

@ -33,6 +33,8 @@ public class LegendLabelFormatPane extends JPanel{
Inter.getLocText("Plugin-ChartF_Custom")}); Inter.getLocText("Plugin-ChartF_Custom")});
labelFormat = new FormatPaneWithOutFont(); labelFormat = new FormatPaneWithOutFont();
htmlLabelPane = new VanChartHtmlLabelPaneWithOutWidthAndHeight(); htmlLabelPane = new VanChartHtmlLabelPaneWithOutWidthAndHeight();
htmlLabelPane.setBorder(BorderFactory.createEmptyBorder(0, (int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH + TableLayout4VanChartHelper.COMPONENT_INTERVAL,0,0));
centerPane = new JPanel(new CardLayout()){ centerPane = new JPanel(new CardLayout()){
@Override @Override

4
designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleWLayoutBorderStyleEditor.java

@ -27,10 +27,6 @@ public class AccessibleWLayoutBorderStyleEditor extends UneditableAccessibleEdit
return new RendererField(new LayoutBorderStyleRenderer()); return new RendererField(new LayoutBorderStyleRenderer());
} }
protected void setBorderVisible(){
this.setBorder(BorderFactory.createLineBorder(Color.lightGray));
}
@Override @Override
protected void showEditorPane() { protected void showEditorPane() {
if (borderPane == null) { if (borderPane == null) {

4
designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java

@ -21,7 +21,7 @@ import com.fr.design.widget.ui.designer.AbstractDataModify;
import com.fr.form.ui.container.WParameterLayout; import com.fr.form.ui.container.WParameterLayout;
import com.fr.general.Background; import com.fr.general.Background;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.Constants; import com.fr.report.stable.FormConstants;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -82,7 +82,7 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> {
Icon[] hAlignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), Icon[] hAlignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"),}; BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"),};
Integer[] hAlignment = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT}; Integer[] hAlignment = new Integer[]{FormConstants.LEFTPOSITION, FormConstants.CENTERPOSITION, FormConstants.RIGHTPOSITION};
hAlignmentPane = new UIButtonGroup<Integer>(hAlignmentIconArray, hAlignment); hAlignmentPane = new UIButtonGroup<Integer>(hAlignmentIconArray, hAlignment);
hAlignmentPane.setAllToolTips(new String[]{Inter.getLocText("FR-Designer-StyleAlignment_Left") hAlignmentPane.setAllToolTips(new String[]{Inter.getLocText("FR-Designer-StyleAlignment_Left")
, Inter.getLocText("FR-Designer-StyleAlignment_Center"), Inter.getLocText("FR-Designer-StyleAlignment_Right")}); , Inter.getLocText("FR-Designer-StyleAlignment_Center"), Inter.getLocText("FR-Designer-StyleAlignment_Right")});

4
designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java

@ -82,7 +82,7 @@ public class LabelDefinePane extends AbstractDataModify<Label> {
@Override @Override
public void populateBean(Label ob) { public void populateBean(Label ob) {
formWidgetValuePane.populate(ob); formWidgetValuePane.populate(ob);
isStyleAlignmentWrapText.setSelected(ob.isAutoLine()); isStyleAlignmentWrapText.setSelected(ob.isWrap());
isPageSetupVertically.setSelected(ob.isVerticalCenter()); isPageSetupVertically.setSelected(ob.isVerticalCenter());
hAlignmentPane.setSelectedItem(ob.getTextalign()); hAlignmentPane.setSelectedItem(ob.getTextalign());
frFontPane.populateBean(ob.getFont()); frFontPane.populateBean(ob.getFont());
@ -93,7 +93,7 @@ public class LabelDefinePane extends AbstractDataModify<Label> {
public Label updateBean() { public Label updateBean() {
Label layout = (Label) creator.toData(); Label layout = (Label) creator.toData();
formWidgetValuePane.update(layout); formWidgetValuePane.update(layout);
layout.setAutoLine(isStyleAlignmentWrapText.isSelected()); layout.setWrap(isStyleAlignmentWrapText.isSelected());
layout.setVerticalCenter(isPageSetupVertically.isSelected()); layout.setVerticalCenter(isPageSetupVertically.isSelected());
layout.setTextalign((int) hAlignmentPane.getSelectedItem()); layout.setTextalign((int) hAlignmentPane.getSelectedItem());
layout.setFont(frFontPane.update(layout.getFont())); layout.setFont(frFontPane.update(layout.getFont()));

Loading…
Cancel
Save