Browse Source

Merging in latest from upstream (BA/design:refs/heads/release/9.0)

* commit '5a55c7b7afb38d076e46a8489d84b55f77b75e3e': (47 commits)
  REPORT-3262 splash
  REPORT-4553 windows下下拉框选择后弹出对话框但是下拉框不收起
  删除无用import
  REPORT-4581 报表块样式-标题样式不起作用
  REPORT-4580 部分视觉验收bug=>18,弹出框悬停背景色
  REPORT-4580 部分视觉验收bug=>6,统一小箭头
  REPORT-4580 部分视觉验收bug=>14(按钮高度调整)
  REPORT-4192 切换tab后重命名actio也要重新初始化下
  REPORT-4047 [9.0一轮回归]单个单元格设置边框后,再对包含此单元格的一片单元格设置背景,边框消失
  解决9.0bug
  fix
  BI启动用了UIbutton,导致FRCoreContext提前加载了
  REPORT-4554 属性面板弹出后部分内容消失
  REPORT-4554 弹出的属性面板最值
  REPORT-4554 tab导航按钮样式
  图标
  REPORT-4558
  滚动条按钮红边
  1
  改图标
  ...
master
xiaoxia 7 years ago
parent
commit
86cad4bb6c
  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. 4
      designer/src/com/fr/design/mainframe/form/FormElementCaseDesigner.java
  7. 11
      designer/src/com/fr/design/widget/WidgetPane.java
  8. 4
      designer/src/com/fr/design/widget/ui/ParameterTreeComboBox.java
  9. 38
      designer/src/com/fr/poly/PolyDesignUI.java
  10. 9
      designer/src/com/fr/poly/PolyUtils.java
  11. 1
      designer/src/com/fr/poly/creator/ECBlockEditor.java
  12. 2
      designer/src/com/fr/quickeditor/CellQuickEditor.java
  13. 171
      designer/src/com/fr/start/ReportSplashPane.java
  14. 2
      designer_base/src/com/fr/design/DesignerEnvManager.java
  15. 2
      designer_base/src/com/fr/design/actions/file/OpenTemplateAction.java
  16. 66
      designer_base/src/com/fr/design/actions/help/AboutPane.java
  17. 6
      designer_base/src/com/fr/design/constants/UIConstants.java
  18. 5
      designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java
  19. 3
      designer_base/src/com/fr/design/gui/UILookAndFeel.java
  20. 2
      designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java
  21. 4
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  22. 2
      designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java
  23. 18
      designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java
  24. 2
      designer_base/src/com/fr/design/gui/icombobox/FunctionComboBox.java
  25. 4
      designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java
  26. 2
      designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java
  27. 2
      designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java
  28. 2
      designer_base/src/com/fr/design/gui/icontainer/UIScrollPaneUI.java
  29. 5
      designer_base/src/com/fr/design/gui/style/BackgroundPane.java
  30. 23
      designer_base/src/com/fr/design/gui/style/BorderPane.java
  31. 18
      designer_base/src/com/fr/design/gui/style/FormatPane.java
  32. BIN
      designer_base/src/com/fr/design/images/control/down.png
  33. 4
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  34. 2
      designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  35. 67
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java
  36. 7
      designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java
  37. 30
      designer_base/src/com/fr/design/mainframe/form/FormECDesignerProvider.java
  38. 5
      designer_base/src/com/fr/design/mainframe/widget/accessibles/AccessibleIconEditor.java
  39. 13
      designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java
  40. 20
      designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java
  41. 2
      designer_base/src/com/fr/design/scrollruler/HorizontalRulerUI.java
  42. 2
      designer_base/src/com/fr/design/scrollruler/VerticalRulerUI.java
  43. 19
      designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java
  44. 15
      designer_base/src/com/fr/design/widget/component/DateValuePane.java
  45. 74
      designer_base/src/com/fr/design/widget/component/NumberEditorValidatePane.java
  46. 21
      designer_base/src/com/fr/start/BaseDesigner.java
  47. 72
      designer_base/src/com/fr/start/SplashPane.java
  48. 6
      designer_base/src/com/fr/start/SplashWindow.java
  49. 1
      designer_chart/src/com/fr/design/chart/javascript/ChartEmailPane.java
  50. 34
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java
  51. 3
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java
  52. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java
  53. 409
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java
  54. 5
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java
  55. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java
  56. 19
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java
  57. 8
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java
  58. 23
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java
  59. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/ChartTabPane.java
  60. 16
      designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleSeriesPane.java
  61. 4
      designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java
  62. 6
      designer_chart/src/com/fr/plugin/chart/column/VanChartColumnSeriesPane.java
  63. 50
      designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java
  64. 2
      designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java
  65. 1
      designer_chart/src/com/fr/plugin/chart/designer/PlotFactory.java
  66. 5
      designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java
  67. 16
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTrendLinePane.java
  68. 24
      designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPaneWithOutImageAndShadow.java
  69. 13
      designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java
  70. 20
      designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartImageMarkerPane.java
  71. 27
      designer_chart/src/com/fr/plugin/chart/designer/data/VanChartMoreCateReportDataContentPane.java
  72. 27
      designer_chart/src/com/fr/plugin/chart/designer/data/VanChartMoreCateTableDataContentPane.java
  73. 5
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrContentPane.java
  74. 6
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionListControlPane.java
  75. 11
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java
  76. 2
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java
  77. 8
      designer_chart/src/com/fr/plugin/chart/designer/style/datasheet/VanChartDataSheetPane.java
  78. 1
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  79. 50
      designer_chart/src/com/fr/plugin/chart/designer/style/series/StackedAndAxisNameObjectCreator.java
  80. 24
      designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  81. 111
      designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartCustomStackAndAxisEditPane.java
  82. 10
      designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartEffectPane.java
  83. 104
      designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java
  84. 7
      designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java
  85. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartTooltipPane.java
  86. 56
      designer_chart/src/com/fr/plugin/chart/drillmap/designer/data/comp/DrillMapLayerPane.java
  87. 44
      designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java
  88. 15
      designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java
  89. 3
      designer_chart/src/com/fr/plugin/chart/heatmap/designer/type/VanChartHeatMapTypePane.java
  90. 10
      designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java
  91. 2
      designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java
  92. 3
      designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapPlotPane.java
  93. 29
      designer_chart/src/com/fr/plugin/chart/map/line/VanChartLineMapEffectPane.java
  94. 4
      designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotReportDataContentPane.java
  95. 5
      designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java
  96. 6
      designer_chart/src/com/fr/plugin/chart/pie/RadiusCardLayoutPane.java
  97. 9
      designer_chart/src/com/fr/plugin/chart/pie/VanChartPieSeriesPane.java
  98. 1
      designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarSeriesPane.java
  99. 7
      designer_chart/src/com/fr/plugin/chart/range/component/LegendLabelFormatPane.java
  100. 10
      designer_chart/src/com/fr/plugin/chart/scatter/VanChartScatterSeriesPane.java
  101. Some files were not shown because too many files have changed in this diff Show More

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

@ -102,31 +102,41 @@ public class CellWidgetPropertyPane extends BasicPane {
}
public void update() {
if (cellElement == null) {// 利用默认的CellElement.
if (cellElement == null || !cellEditorDefPane.isShouldFireSelectedEvent()) {
return;
}
final CellSelection finalCS = (CellSelection) ePane.getSelection();
final TemplateElementCase tplEC = ePane.getEditingElementCase();
ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() {
public void dealWith(CellElement editCellElement) {
Widget cellWidget = cellEditorDefPane.update();
// 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);
}
if(finalCS.isSelectedOneCell(ePane)){
if(tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow())== null){//cellElement未加入到report中时要添加进去
tplEC.addCellElement(cellElement);
}
});
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){
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(){
cellEditorDefPane.registerListener();

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

@ -1,59 +1,69 @@
/**
*
*
*/
package com.fr.design.mainframe.bbs;
import com.fr.general.IOUtils;
import com.fr.general.SiteCenter;
import com.fr.stable.StringUtils;
import java.util.Properties;
/**
* @author neil
*
* @date: 2015-3-10-上午9:50:13
*/
public class BBSConstants {
//判断是否更新的关键字
public static final String UPDATE_KEY = loadAttribute("UPDATE_KEY", "newIsPopup");
private static final String GUEST_KEY = "USER";
private static final String LINK_KEY = "LINK";
private static final int GUEST_NUM = 5;
//用户名信息数组
public static final String[] ALL_GUEST = loadAllGuestsInfo(GUEST_KEY);
//用户论坛链接信息
public static final String[] ALL_LINK = loadAllGuestsInfo(LINK_KEY);
private static Properties PROP = null;
//加载所有用户的信息, 用户名, 论坛连接
private static String[] loadAllGuestsInfo(String key){
String[] allGuests = new String[GUEST_NUM];
for (int i = 0; i < GUEST_NUM; i++) {
allGuests[i] = loadAttribute(key + i, StringUtils.EMPTY);
}
return allGuests;
}
//如果要定制, 直接改bbs.properties就行了
private static String loadAttribute(String key, String defaultValue) {
if (PROP == null) {
PROP = new Properties();
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;
}
private static final String GUEST_KEY = "USER";
private static final String GUEST_KEY_ONLINE = "guest.user";
private static final String LINK_KEY = "LINK";
private static final String LINK_KEY_ONLINE = "guest.link";
private static Properties PROP = null;
public static String[] getAllGuest() {
return loadAllGuestsInfoOnline(GUEST_KEY_ONLINE, loadAllGuestsInfo(GUEST_KEY));
}
public static String[] getAllLink() {
return loadAllGuestsInfoOnline(LINK_KEY_ONLINE, loadAllGuestsInfo(LINK_KEY));
}
//加载所有用户的信息, 用户名, 论坛连接
private static String loadAllGuestsInfo(String key) {
return loadAttribute(key, StringUtils.EMPTY);
}
//加载所有用户的信息, 用户名, 论坛连接
private static String[] loadAllGuestsInfoOnline(String key, String defaultValue) {
String[] allGuests = new String[0];
String guest = SiteCenter.getInstance().acquireUrlByKind(key, defaultValue);
if (StringUtils.isNotEmpty(guest)) {
allGuests = guest.split("\\|");
}
return allGuests;
}
//如果要定制, 直接改bbs.properties就行了
private static String loadAttribute(String key, String defaultValue) {
if (PROP == null) {
PROP = new Properties();
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;
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.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
@ -21,6 +12,12 @@ import com.fr.general.Inter;
import com.fr.stable.StringUtils;
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
*
@ -54,9 +51,12 @@ public class BBSGuestPane extends JPanel implements BBSGuestPaneProvider{
double[] colSize = {p};
Component[][] components = new Component[rowSize.length][colSize.length];
for (int i = 0; i < components.length; i++) {
String userName = BBSConstants.ALL_GUEST[i];
String url = BBSConstants.ALL_LINK[i];
String[] allGuest = BBSConstants.getAllGuest();
String[] allLink = BBSConstants.getAllLink();
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);
}

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
GET_MESSAGE_URL=http://feedback.finedevelop.com:3000/bbs/message/count
GET_SIGN_INFO_URL=http\://bbs.finereport.com
LINK0=http\://bbs.finereport.com/space-uid-55823.html
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
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
SHARE_URL=http\://bbs.finereport.com
USER0=\u6590\u6CE2\u90A3\u5951(\u5B59\u70B3\u6DA6)
USER1=deafire(\u674E\u5FD7\u4F1F)
USER2=\u963F\u8FEA(\u8C22\u8FEA)
USER3=bingjie(\u5F20\u8BB0\u82B1)
USER4=\u6D77\u7EF5\u5B9D\u5B9D(\u90DD\u6B63)
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
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

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

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

4
designer/src/com/fr/design/mainframe/form/FormElementCaseDesigner.java

@ -229,8 +229,8 @@ public class FormElementCaseDesigner<T extends FormElementCaseProvider, E extend
return conditionAttributesGroupPane;
}
public JPanel getHyperlinkPane() {
return DesignerContext.getDesignerFrame().getSelectedJTemplate().getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance());
public JPanel getHyperlinkPane(JTemplate jt) {
return jt.getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance());
}

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

@ -47,6 +47,12 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
this.initComponents(pane);
}
public boolean isShouldFireSelectedEvent(){
return shouldFireSelectedEvent;
}
protected void initComponents(ElementCasePane pane) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
@ -136,8 +142,8 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
String name = ((NameWidget) widget).getName();
shouldFireSelectedEvent = false;
editorTypeComboBox.setSelectedItem(new Item(name, name));
shouldFireSelectedEvent = true;
cellEditorCardPane.populate(widget);
shouldFireSelectedEvent = true;
}
// 内置组件
else {
@ -145,10 +151,9 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
if (ArrayUtils.contains(ButtonConstants.CLASSES4BUTTON, clazz)) {
clazz = Button.class;
}
cellEditorCardPane.populate(widget);
shouldFireSelectedEvent = false;
editorTypeComboBox.setSelectedItemByWidgetClass(clazz);
cellEditorCardPane.populate(widget);
shouldFireSelectedEvent = true;
}
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.stable.ArrayUtils;
import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
@ -76,7 +77,8 @@ public class ParameterTreeComboBox extends FRTreeComboBox {
if (obj instanceof TreePath) {
return ((Parameter)((ExpandMutableTreeNode)((TreePath)obj).getLastPathComponent()).getUserObject()).getName();
}
return (String)obj;
Object item = this.getEditor().getItem();
return item == null ? StringUtils.EMPTY : item.toString();
}
@Override

38
designer/src/com/fr/poly/PolyDesignUI.java

@ -3,12 +3,7 @@
*/
package com.fr.poly;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.*;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.text.DecimalFormat;
@ -29,6 +24,7 @@ import com.fr.page.PaperSettingProvider;
import com.fr.page.ReportSettingsProvider;
import com.fr.poly.creator.BlockCreator;
import com.fr.poly.creator.ECBlockCreator;
import com.fr.poly.creator.ECBlockEditor;
import com.fr.poly.model.AddedData;
import com.fr.poly.model.AddingData;
import com.fr.report.report.Report;
@ -101,6 +97,7 @@ public class PolyDesignUI extends ComponentUI {
paintAddingData(g2d, addData);
}
paintPaginateLine(g2d);
designer.repaint();
}
private void paintAddedData(Graphics g) {
@ -109,8 +106,8 @@ public class PolyDesignUI extends ComponentUI {
BlockCreator creator = addedData.getAddedAt(i);
// richer:如果当前这个组件正在编辑,那么他是完全被他的编辑器所遮挡的,不需要画出来
if (creator == designer.getSelection()) {
paintPositionLine(g, creator.getX(time), creator.getY(time),
(int) (designer.getHorizontalValue()*time), (int) (designer.getVerticalValue()*time));
paintPositionLine(g, Math.round(creator.getX() * time), Math.round(creator.getY() * time),
Math.round(designer.getHorizontalValue()*time), Math.round(designer.getVerticalValue()*time));
if (creator.getEditor().isDragging()) {
creator.getEditor().paintAbsorptionline(g);
//如果与其他块重合了, 需要画出提示禁止重叠
@ -121,8 +118,8 @@ public class PolyDesignUI extends ComponentUI {
creator.getEditor().hideForbiddenWindow();
}
} else {
paintCreator(g, creator, (int) (creator.getX()*time - designer.getHorizontalValue()*time), (int) (creator.getY()*time - designer.getVerticalValue()*time),
(int) (creator.getWidth()*time), (int) (creator.getHeight()*time));
paintCreator(g, creator, creator.getX() - designer.getHorizontalValue(), creator.getY() - designer.getVerticalValue(),
creator.getWidth(), creator.getHeight());
}
}
}
@ -223,16 +220,19 @@ public class PolyDesignUI extends ComponentUI {
ArrayList<JComponent> dbcomponents = new ArrayList<JComponent>();
// richer:禁止双缓冲行为,否则会出现两个图像
ComponentUtils.disableBuffer(comp, dbcomponents);
// Graphics clipg = g.create(x, y, width*resolution/ScreenResolution.getScreenResolution(), height*resolution/ScreenResolution.getScreenResolution());
//
BufferedImage img = CoreGraphHelper.createBufferedImage(comp.getWidth(), comp.getHeight(), BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = img.createGraphics();
comp.printAll(g2d);
g2d.dispose();
g.drawImage(img,x,y,width,height,null);
if (comp instanceof ECBlockCreator) {
Graphics clipg = g.create((int) (x * time), (int) (y * time), (int) (width * time), (int) (height * time));
comp.paint(clipg);
clipg.dispose();
}else {
BufferedImage img = CoreGraphHelper.createBufferedImage(comp.getWidth(), comp.getHeight(), BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = img.createGraphics();
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
comp.printAll(g2d);
g2d.dispose();
g.drawImage(img, (int) (x * time), (int) (y * time), (int) (width * time), (int) (height * time),null);
}
// comp.paint(clipg);
// clipg.dispose();
ComponentUtils.resetBuffer(dbcomponents);
}

9
designer/src/com/fr/poly/PolyUtils.java

@ -115,11 +115,10 @@ public class PolyUtils {
AddedData addedData = designer.getAddedData();
for (int count = addedData.getAddedCount() - 1; count >= 0; count--) {
BlockCreator creator = addedData.getAddedAt(count);
float times = (float) designer.getResolution()/ScreenResolution.getScreenResolution();
int cx = (int) (creator.getX() * times);
int cy = (int) (creator.getY() * times);
int cw = (int) (creator.getWidth() * times);
int ch = (int) (creator.getHeight() * times);
int cx = creator.getX();
int cy = creator.getY();
int cw = creator.getWidth();
int ch = creator.getHeight();
if (x >= cx && x <= (cx + cw)) {
if(y >= cy && y <= (cy + ch)) {
return creator;

1
designer/src/com/fr/poly/creator/ECBlockEditor.java

@ -34,6 +34,7 @@ import java.awt.*;
*/
public class ECBlockEditor extends BlockEditor<ECBlockPane, PolyECBlock> {
private static final int HEIGHT_MORE = 5;
private int resolution = ScreenResolution.getScreenResolution();
public ECBlockEditor(PolyDesigner designer, ECBlockCreator creator) {
super(designer, creator);

2
designer/src/com/fr/quickeditor/CellQuickEditor.java

@ -235,6 +235,8 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
public void actionPerformed(ActionEvent e) {
cellInsertActions = ActionFactory.createCellInsertAction(ElementCasePane.class, tc);
selectedIndex = comboBox.getSelectedIndex();
comboBox.setPopupVisible(false);
comboBox.repaint();
cellInsertActions[selectedIndex].actionPerformed(e);
comboBox.setSelectedIndex(currentSelectedIndex);
}

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

@ -1,16 +1,16 @@
/**
*
*
*/
package com.fr.start;
import com.bulenkov.iconloader.IconLoader;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.base.GraphHelper;
import com.fr.design.mainframe.bbs.BBSConstants;
import com.fr.general.GeneralContext;
import com.fr.general.Inter;
import com.fr.general.ModuleContext;
import com.fr.stable.Constants;
import com.fr.stable.CoreGraphHelper;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.module.ModuleAdapter;
@ -18,45 +18,43 @@ import com.fr.stable.module.ModuleListener;
import javax.swing.*;
import java.awt.*;
import java.awt.font.FontRenderContext;
import java.awt.font.LineMetrics;
import java.awt.image.BufferedImage;
import java.util.Locale;
import java.util.Random;
import java.util.TimerTask;
/**
* @author neil
*
* @date: 2015-3-13-上午9:47:58
*/
public class ReportSplashPane extends SplashPane{
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_EN = "splash_english.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 int MODULE_INFO_X = 25;
private static final int MODULE_INFO_Y = 270;
private static final Color THANK_COLOR = new Color(72, 216, 249);
private static final int THANK_INFO_X = 460;
public class ReportSplashPane extends SplashPane {
private static final String OEM_PATH = "/com/fr/base/images/oem";
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(255, 255, 255);
private static final int MODULE_INFO_X = 54;
private static final int MODULE_INFO_Y = 340;
private static final Color THANK_COLOR = new Color(255, 255, 255, (int) (0.4 * 255 + 0.5));
private static final int THANK_INFO_Y = 382;
private static final String GUEST = getRandomUser();
private String showText = "";
private String moduleID = "";
private int loadingIndex = 0;
private String[] loading = new String[]{"..", "....", "......"};
private java.util.Timer timer = new java.util.Timer();
public ReportSplashPane() {
init();
}
private void init() {
this.setBackground(null);
timer.schedule(new TimerTask() {
public void run() {
loadingIndex++;
@ -64,61 +62,49 @@ public class ReportSplashPane extends SplashPane{
ReportSplashPane.this.repaint();
}
}, 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);
}
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) {
super.paintComponent(g);
Graphics2D g2d = (Graphics2D) g;
Image image = getSplashImage();
ImageIcon imageIcon = new ImageIcon(image);
GraphHelper.paintImage(g2d, imageIcon.getIconWidth(), imageIcon.getIconHeight(), image, Constants.IMAGE_DEFAULT, Constants.NULL, Constants.CENTER, -1, -1);
Icon icon = IconLoader.getIcon(StableUtils.pathJoin(OEM_PATH, getImageName()));
icon.paintIcon(null, g, 0, 0);
paintShowText((Graphics2D) g);
}
public void setShowText(String text) {
this.showText = text;
}
public BufferedImage getSplashImage() {
// p:初始化splashImage,其中画了字符.
Image image = createSplashBackground();
BufferedImage splashBuffedImage = CoreGraphHelper.toBufferedImage(image);
Graphics2D splashG2d = splashBuffedImage.createGraphics();
splashG2d.setPaint(new Color(230, 230, 230));
splashG2d.setFont(new Font("Dialog", Font.PLAIN, 11));
//绘制需要显示的文本
paintShowText(splashG2d);
return splashBuffedImage;
public Image getSplashImage() {
Icon icon = IconLoader.getIcon(StableUtils.pathJoin(OEM_PATH, getImageName()));
return ((ImageIcon) IconLoader.getIconSnapshot(icon)).getImage();
}
private void paintShowText(Graphics2D splashG2d){
FontRenderContext fontRenderContext = splashG2d.getFontRenderContext();
LineMetrics fm = splashG2d.getFont().getLineMetrics("",
fontRenderContext);
double leading = fm.getLeading();
double ascent = fm.getAscent();
double height = fm.getHeight();
private void paintShowText(Graphics2D splashG2d) {
GraphHelper.applyRenderingHints(splashG2d);
splashG2d.setPaint(MODULE_COLOR);
splashG2d.setFont(new Font("Dialog", Font.PLAIN, 12));
//加载模块信息
double y = MODULE_INFO_Y + height + leading + ascent;
GraphHelper.drawString(splashG2d, showText, MODULE_INFO_X, y);
GraphHelper.drawString(splashG2d, showText, MODULE_INFO_X, MODULE_INFO_Y);
//每次随机感谢一位论坛用户
if (shouldShowThanks()) {
splashG2d.setPaint(THANK_COLOR);
String content = Inter.getLocText("FR-Designer_Thanks-To") + GUEST;
GraphHelper.drawString(splashG2d, content, MODULE_INFO_X, THANK_INFO_Y);
}
}
// 是否显示鸣谢文字
@ -131,38 +117,37 @@ public class ReportSplashPane extends SplashPane{
}
return true;
}
private static String getRandomUser(){
int num = new Random().nextInt(BBSConstants.ALL_GUEST.length);
return StringUtils.BLANK + BBSConstants.ALL_GUEST[num];
private static String getRandomUser() {
String[] allGuest = BBSConstants.getAllGuest();
if (allGuest.length == 0) {
return StringUtils.EMPTY;
}
int num = new Random().nextInt(allGuest.length);
return StringUtils.BLANK + allGuest[num];
}
/**
* 窗口关闭后取消定时获取模块信息的timer
*
*/
public void releaseTimer() {
* 窗口关闭后取消定时获取模块信息的timer
*/
public void releaseTimer() {
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) {
String installHome = StableUtils.getInstallHome();
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});
designerEnvManager.putEnv(name, LocalEnv.createEnv(envPath));
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.setName(getMenuKeySet().getMenuKeySetName());
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());
}

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

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

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

3
designer_base/src/com/fr/design/gui/UILookAndFeel.java

@ -1,6 +1,5 @@
package com.fr.design.gui;
import com.fr.base.BaseUtils;
import com.fr.design.gui.borders.*;
import com.fr.design.gui.frpane.UIBasicOptionPaneUI;
import com.fr.design.gui.ibutton.UIBasicButtonUI;
@ -110,8 +109,6 @@ public class UILookAndFeel extends MetalLookAndFeel {
table.put("RadioButtonMenuItem.border", border);
table.put("ToolTip.border", new BorderUIResource(new UIToolTipBorder(true)));
table.put("ToolTip.borderInactive", new BorderUIResource(new UIToolTipBorder(false)));
table.put("Tree.expandedIcon", BaseUtils.readIcon("/com/fr/design/images/tree/open.png"));
table.put("Tree.collapsedIcon", BaseUtils.readIcon("/com/fr/design/images/tree/close.png"));
table.put("PopupMenu.border", new UIPopupMenuBorder());
table.put("PopupMenu.foreground", new ColorUIResource(255, 0, 0));
table.put("SplitPane.dividerSize", new Integer(7));

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.setName(Inter.getLocText("FR-Action_Add"));
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

4
designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java

@ -37,6 +37,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
protected CardLayout cardLayout;
protected JPanel cardPane;
protected BasePlot plot;
private static final int TOP_TOOLBAR_HEIGHT = 24;
public UIControlPane() {
this.initComponentPane();
@ -192,11 +193,10 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
topToolBar.setLayout(new BorderLayout());
ShortCut addItem = addItemShortCut().getShortCut();
addItem.intoJToolBar(topToolBar);
topToolBar.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = { p, f};
double[] rowSize = {p};
double[] rowSize = {TOP_TOOLBAR_HEIGHT};
Component[][] components = new Component[][]{
new Component[]{new UILabel(getAddItemText()), topToolBar},
};

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.setName(Inter.getLocText("FR-Action_Add"));
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);
if (b.isExtraPainted()) {
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());
}
doExtraPainting(b, g2d, w, h, selectedRoles);
}
((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
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) {
ButtonModel model = b.getModel();
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) {
DataFunction function = (DataFunction) value;
this.setText(DataCoreUtils.getFunctionDisplayName(function));
this.setText(" " + DataCoreUtils.getFunctionDisplayName(function));
}
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);
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 {
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);
}
}

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

@ -308,7 +308,7 @@ public class UIEastResizableContainer extends JPanel {
}
}
// g.drawImage(button, 2, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null);
g.drawImage(button, 18, 9, 5, 5, null);
g.drawImage(button, 18, 7, 5, 10, null);
}
}

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

@ -502,7 +502,7 @@ public class UIResizableContainer extends JPanel {
button = UIConstants.DRAG_LEFT_PRESS;
}
}
g.drawImage(button, 3, ARROW_MARGIN_VERTICAL, 5, 5, null);
g.drawImage(button, 3, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null);
} else {
g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null);
if (containerWidth == toolPaneHeight) {

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
JScrollBar sb = scrollpane.getHorizontalScrollBar();
if (sb != null) {
sb.setBackground(Color.red);
sb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE);
}
sb = scrollpane.getVerticalScrollBar();
if (sb != null) {
sb.setBackground(Color.red);
sb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE);
}
}

5
designer_base/src/com/fr/design/gui/style/BackgroundPane.java

@ -33,6 +33,10 @@ public class BackgroundPane extends AbstractBasicStylePane {
protected BackgroundQuickPane[] paneList;
//获取当前面板
protected JPanel currentPane = null;
public BackgroundPane() {
this.initComponents();
}
@ -141,6 +145,7 @@ public class BackgroundPane extends AbstractBasicStylePane {
if (pane.accept(background)) {
pane.populateBean(background);
typeComboBox.setSelectedIndex(i);
currentPane = paneList[i];
return;
}
}

23
designer_base/src/com/fr/design/gui/style/BorderPane.java

@ -16,6 +16,7 @@ import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
@ -202,12 +203,24 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse
CellBorderStyle cellBorderStyle = this.update();
HashSet<String> borderSet = new HashSet<String>(Arrays.asList(BORDERARRAY));
if (borderSet.contains(globalNameListener.getGlobalName())) {
style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(),
cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor());
} else {
style = style.deriveBackground(backgroundPane.update());
if (backgroundPane.currentPane != backgroundPane.paneList[1]){
if (borderSet.contains(globalNameListener.getGlobalName())) {
style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(),
cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor());
style = style.deriveBackground(backgroundPane.update());
} else {
style = style.deriveBackground(backgroundPane.update());
}
}else {
if (borderSet.contains(globalNameListener.getGlobalName()) && !((ColorBackgroundQuickPane) backgroundPane.currentPane).isBackGroundColor()){
style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(),
cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor());
style = style.deriveBackground(backgroundPane.update());
} else {
style = style.deriveBackground(backgroundPane.update());
}
}
return style;
}

18
designer_base/src/com/fr/design/gui/style/FormatPane.java

@ -9,7 +9,9 @@ import com.fr.data.core.FormatField.FormatContents;
import com.fr.design.border.UIRoundedBorder;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.icombobox.*;
import com.fr.design.gui.icombobox.TextFontComboBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -21,8 +23,6 @@ import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.border.TitledBorder;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.text.Format;
@ -108,8 +108,7 @@ public class FormatPane extends AbstractBasicStylePane {
UILabel font = new UILabel(Inter.getLocText("FR-Designer_FRFont"), SwingConstants.LEFT);
JPanel fontPane = new JPanel(new BorderLayout());
fontPane.add(font, BorderLayout.NORTH);
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
typeComboBox.setPreferredSize(new Dimension(155,20));
JPanel typePane = new JPanel(new BorderLayout());
typePane.add(typeComboBox, BorderLayout.CENTER);
@ -118,11 +117,16 @@ public class FormatPane extends AbstractBasicStylePane {
frFontPane.setBorder(LEFT_BORDER);
Component[][] components = getComponent(fontPane, centerPane, typePane);
this.add(createContentPane(components), BorderLayout.CENTER);
}
protected JPanel createContentPane (Component[][] components) {
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_MEDIUM);
this.add(panel, BorderLayout.CENTER);
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_MEDIUM);
}

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_Tab_title=tab\u6807\u9898
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_Title=\u6807\u9898
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
Utils-Switch_To_Template_Reportlet=\u5207\u6362\u5230\u6A21\u677F\u7F51\u7EDC\u62A5\u8868
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-Designer_Form-CheckBox=\u590D\u9009\u6846
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() {
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

67
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.constants.UIConstants;
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.ilable.UILabel;
import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.GUIPaintUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont;
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 POPUP_MIN_HEIGHT = 145;
private static final int POPUP_MAX_HEIGHT = 480;
private static final int POPUP_DEFAULT_HEIGHT = 356;
public static final String KEY_CELL_ELEMENT = "cellElement";
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() {
return isVisible;
}
@ -578,7 +583,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
popupDialog.replaceContentPane(this);
}
if (popupPane != null && !isRightPaneVisible()) {
popupPane.replaceContentPane(contentPane);
popupPane.replaceContentPane(contentArea);
}
refreshContainer();
@ -588,6 +593,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
return contentPane;
}
public Container getContentArea() {
return contentArea;
}
public void replaceHeaderPane(JComponent pane) {
contentArea.remove(headerPane);
int height = Math.min(pane.getPreferredSize().height, MAX_PARA_HEIGHT);
@ -612,7 +621,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
hideCurrentPopupPane();
replaceContentPane(contentPane);
} else if(popupPane != null) {
popupPane.replaceContentPane(contentPane);
popupPane.replaceContentPane(contentArea);
}
}
@ -638,6 +647,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
selectedItem = this;
}
private boolean isTabButtonSelected() {
return button.getBackground() == selectedBtnBackground;
}
private void initButton() {
button = new UIButton(BaseUtils.readIcon(getBtnIconUrl())) {
public Dimension getPreferredSize() {
@ -649,6 +662,20 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
}
};
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();
button.addActionListener(new ActionListener() {
@Override
@ -714,6 +741,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
if (isPoppedOut) {
isPoppedOut = false;
popupDialog.setVisible(false);
reAddContentArea();
initContentPane();
onResize();
if (isEnabled()) {
@ -726,9 +754,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
}
private class FixedPopupPane extends JPopupMenu {
private JComponent contentPane;
private Container contentPane;
private PropertyItem propertyItem;
FixedPopupPane(PropertyItem propertyItem) {
contentPane = propertyItem.getContentPane();
this.propertyItem = propertyItem;
contentPane = propertyItem.getContentArea();
this.setLayout(new BorderLayout());
this.add(new PopupToolPane(propertyItem), BorderLayout.NORTH);
this.add(contentPane, BorderLayout.CENTER);
@ -736,14 +767,24 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
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 JComponent getContentPane() {
public Container getContentPane() {
return contentPane;
}
public void replaceContentPane(JComponent pane) {
public void replaceContentPane(Container pane) {
this.remove(this.contentPane);
this.add(this.contentPane = pane);
refreshContainer();
@ -811,6 +852,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
} else if (isMovable) {
setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
setBackground(UIConstants.POPUP_TITLE_BACKGROUND);
} else {
setCursor(Cursor.getDefaultCursor());
}
@ -920,7 +962,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private Point mouseDownCompCoords;
private JPanel contentWrapper;
private JComponent contentPane;
private Container contentPane;
private JPanel defaultPane; // 无可用配置项
private PropertyItem propertyItem;
public PopupDialog(PropertyItem propertyItem) {
@ -930,7 +972,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
this.propertyItem = propertyItem;
PopupToolPane popupToolPane = new PopupToolPane(propertyItem, PopupToolPane.UP_BUTTON);
popupToolPane.setParentDialog(this);
contentPane = propertyItem.getContentPane();
contentPane = propertyItem.getContentArea();
contentWrapper = new JPanel(new BorderLayout());
contentWrapper.add(popupToolPane, BorderLayout.NORTH);
@ -969,10 +1011,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public void replaceContentPane(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.add(this.contentPane = contentPane, BorderLayout.CENTER);
refreshContainer();
@ -996,9 +1038,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
if (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;
setBounds(bounds);
}

7
designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java

@ -18,6 +18,7 @@ import java.awt.*;
public class ColorBackgroundQuickPane extends BackgroundQuickPane {
private NewColorSelectPane detailColorSelectPane;
private boolean isBackGroundColor;
public ColorBackgroundQuickPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
@ -28,6 +29,7 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane {
public void populateBean(Background background) {
ColorBackground colorBackgroud = (ColorBackground) background;
isBackGroundColor = false;
this.detailColorSelectPane.setColor(colorBackgroud.getColor());
}
@ -36,6 +38,10 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane {
return ColorBackground.getInstance(this.detailColorSelectPane.getNotNoneColor());
}
public boolean isBackGroundColor(){
return isBackGroundColor;
}
/**
* 给组件登记一个观察者监听事件
*
@ -45,6 +51,7 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane {
detailColorSelectPane.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
listener.doChange();
isBackGroundColor = true;
}
});
}

30
designer_base/src/com/fr/design/mainframe/form/FormECDesignerProvider.java

@ -6,85 +6,87 @@ import java.awt.image.BufferedImage;
import javax.swing.JComponent;
import com.fr.design.designer.TargetComponent;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.menu.MenuDef;
import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef;
import com.fr.form.FormElementCaseProvider;
public interface FormECDesignerProvider {
public static final String XML_TAG = "FormElementCaseDesigner";
String XML_TAG = "FormElementCaseDesigner";
/**
* 选中目标的 对应Menu
* @return 返回MenuDef数组.
*/
public MenuDef[] menus4Target();
MenuDef[] menus4Target();
/**
* 获取焦点
*/
public void requestFocus() ;
void requestFocus() ;
/**
* 工具栏菜单字体字号等
* @return 工具栏菜单数组
*/
public ToolBarDef[] toolbars4Target();
ToolBarDef[] toolbars4Target();
/**
* 表单的报表块的工具按钮复制剪切那行
* @return 工具按钮
*/
public JComponent[] toolBarButton4Form();
JComponent[] toolBarButton4Form();
/**
* 模板菜单
* @return 返回菜单
*/
public ShortCut[] shortcut4TemplateMenu();
ShortCut[] shortcut4TemplateMenu();
/**
*当前正在编辑的elementcase
* @return 当前正在编辑的elementcase
*/
public FormElementCaseProvider getEditingElementCase();
FormElementCaseProvider getEditingElementCase();
/**
* 右上角属性表
* @return 属性面板
*/
public JComponent getEastDownPane();
JComponent getEastDownPane();
/**
* 右下角控件树或者扩展属性
* @return 属性面板
*/
public JComponent getEastUpPane();
JComponent getEastUpPane();
/**
* 条件属性面板
* @return 属性面板
*/
public JComponent getConditionAttrPane();
JComponent getConditionAttrPane();
/**
* 超级链接面板
* @param jt 当前模板JForm
* @return 属性面板
*/
public JComponent getHyperlinkPane();
JComponent getHyperlinkPane(JTemplate jt);
/**
* 超级链接面板
* @return 属性面板
*/
public TargetComponent getEditingElementCasePane();
TargetComponent getEditingElementCasePane();
/**
* 获取当前ElementCase的缩略图
* @param elementCaseContainerSize 缩略图的大小
* @return
*/
public BufferedImage getElementCaseImage(Dimension elementCaseContainerSize);
BufferedImage getElementCaseImage(Dimension elementCaseContainerSize);
}

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());
}
protected void setBorderVisible(){
this.setBorder(BorderFactory.createLineBorder(Color.lightGray));
}
@Override
protected void showEditorPane() {
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;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
@ -45,11 +42,9 @@ public class BaseAccessibleEditor extends BasicPane implements AccessibleEditor
this.decoder = dec;
initComponents();
txtValue.setEditable(dec != null);
setBorderVisible();
}
protected void setBorderVisible(){
((JComponent) txtValue).setBorder(null);
((JComponent) txtValue).setOpaque(true);
((JComponent) txtValue).setBorder(BorderFactory.createLineBorder(Color.lightGray));
((JComponent) txtValue).setBackground(Color.WHITE);
}
@Override

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

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

2
designer_base/src/com/fr/design/scrollruler/HorizontalRulerUI.java

@ -27,7 +27,7 @@ public class HorizontalRulerUI extends RulerUI {
g.setColor(BaseRuler.UNIT_SIGN_COLOR);
if (i % BaseRuler.SCALE_10 == 0) {
double times = (double)HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getJTemplateResolution() / ScreenResolution.getScreenResolution();
String text = Utils.convertNumberStringToString(Math.round(i / times));
String text = Utils.convertNumberStringToString(Math.round((i / times) / showText));
Graphics2D gg = (Graphics2D) g.create((int) (toPX(i) / ratio) - extra + 1, 0, BaseRuler.NUMBER_100, size.height);
BaseUtils.drawStringStyleInRotation(gg, BaseRuler.NUMBER_100, BaseRuler.NUMBER_14, text, Style.getInstance().deriveHorizontalAlignment(
Style.LEFT_TO_RIGHT).deriveFRFont(BaseRuler.TEXT_FONT), ScreenResolution.getScreenResolution());

2
designer_base/src/com/fr/design/scrollruler/VerticalRulerUI.java

@ -24,7 +24,7 @@ public class VerticalRulerUI extends RulerUI{
g.setColor(BaseRuler.UNIT_SIGN_COLOR);
if (i % BaseRuler.SCALE_10 == 0) {
double times = (double) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getJTemplateResolution() / ScreenResolution.getScreenResolution();
String text = Utils.convertNumberStringToString(Math.round(i / times));
String text = Utils.convertNumberStringToString(Math.round((i / times) / showText));
GraphHelper.drawLine(g, size.width, toPX(i) / ratio - extra, 0, toPX(i) / ratio - extra);
Graphics2D gg = (Graphics2D) g.create(0, (int) (toPX(i) / ratio - extra + 1), size.width, BaseRuler.NUMBER_99);
BaseUtils.drawStringStyleInRotation(gg, BaseRuler.NUMBER_11, BaseRuler.NUMBER_100, text, Style.getInstance().deriveVerticalAlignment(1).deriveRotation(

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

@ -85,13 +85,18 @@ public class GUIPaintUtils {
* @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) {
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;
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);
} else if (isPressedPainted) {
gp = new GradientPaint(1, 1, UIConstants.ATTRIBUTE_HOVER, 1, height - 1, UIConstants.ATTRIBUTE_HOVER);
}else {
// gp = new GradientPaint(1, 1, UIConstants.NORMAL_BACKGROUND, 1, height - 1, UIConstants.HOVER_BLUE);
} else {
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);
@ -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) {
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();
if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) {
if (pressedColor != null) {
g2d.setColor(pressedColor);
} else if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) {
g2d.setColor(UIConstants.AUTHORITY_PRESS_BLUE);
} else {
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;
import com.fr.base.Formula;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.editor.editor.*;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
@ -17,13 +18,16 @@ import java.awt.*;
public class DateValuePane extends JPanel {
private UIButtonGroup widgetValueHead;
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() {
editor = new Editor[]{
new NoneEditor(null, Inter.getLocText("None")),
new DateEditor(true, Inter.getLocText("Date")),
new FormulaEditor(Inter.getLocText("Parameter-Formula"))
new NoneEditor(null, NONE_EDITOR_NAME),
new DateEditor(true, DATE_EDITOR_NAME),
new FormulaEditor(FORMULA_EDITOR_NAME)
};
this.setLayout(new BorderLayout(0, LayoutConstants.VGAP_SMALL));
final CardLayout cardLayout = new CardLayout();
@ -56,6 +60,9 @@ public class DateValuePane extends JPanel {
int index = widgetValueHead.getSelectedIndex();
Editor e = editor[index];
Object value = e.getValue();
if(value == null && ComparatorUtils.equals(FORMULA_EDITOR_NAME, e.getName())){
value = new Formula(StringUtils.EMPTY);
}
return value;
}

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

@ -1,7 +1,6 @@
package com.fr.design.widget.component;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
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.form.ui.NumberEditor;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
@ -35,10 +35,8 @@ public class NumberEditorValidatePane extends JPanel {
private SpinnerNumberModel minValueModel;
private UISpinner decimalLength;
private JPanel limitNumberPane;
private UITextField maxValueErrorTextField;
private UITextField minValueErrorTextField;
private JPanel maxValueFieldPane;
private JPanel minValueFieldPane;
private UITextField errorMsgTextField;
private JPanel errorMsgTextFieldPane;
private ActionListener allowDecimalsListener;
@ -79,13 +77,10 @@ public class NumberEditorValidatePane extends JPanel {
this.setMinValueCheckBox.addActionListener(setMinListener);
this.minValueSpinner.addChangeListener(minValueChangeListener);
setMinValueCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
initMaxMinValueFieldPane();
JPanel maxValueBorderPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
maxValueBorderPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L5, 0, 0));
maxValueBorderPane.add(maxValueFieldPane, 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);
initErrorMsgPane();
JPanel errorMsgBorderPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
errorMsgBorderPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L5, IntervalConstants.INTERVAL_L1, 0));
errorMsgBorderPane.add(errorMsgTextFieldPane, BorderLayout.CENTER);
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.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L5, 0, 0));
@ -96,37 +91,20 @@ public class NumberEditorValidatePane extends JPanel {
new Component[]{limitNumberPane, null},
new Component[]{allowNegativeCheckBox, null},
new Component[]{setMaxValueCheckBox, maxValueSpinner},
new Component[]{maxValueBorderPane, null},
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};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7);
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1);
this.add(panel);
}
private void initMaxMinValueFieldPane() {
maxValueErrorTextField = new UITextField();
minValueErrorTextField = new UITextField();
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());
}
});
private void initErrorMsgPane() {
errorMsgTextField = 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);
}
@ -257,28 +235,31 @@ public class NumberEditorValidatePane extends JPanel {
allowNegativeCheckBox.setSelected(e.isAllowNegative());
if (e.getMaxValue() == Double.MAX_VALUE) {
setMaxValueCheckBox.setSelected(false);
maxValueFieldPane.setVisible(false);
// maxValueFieldPane.setVisible(false);
maxValueSpinner.setValue(new Double(Double.MAX_VALUE));
maxValueSpinner.setEnabled(false);
} else {
setMaxValueCheckBox.setSelected(true);
maxValueSpinner.setEnabled(true);
maxValueFieldPane.setVisible(true);
maxValueSpinner.setValue(new Double(e.getMaxValue()));
}
if (e.getMinValue() == -Double.MAX_VALUE) {
setMinValueCheckBox.setSelected(false);
minValueFieldPane.setVisible(false);
minValueSpinner.setValue(new Double(-Double.MAX_VALUE));
minValueSpinner.setEnabled(false);
} else {
setMinValueCheckBox.setSelected(true);
minValueFieldPane.setVisible(true);
minValueSpinner.setEnabled(true);
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) {
@ -289,15 +270,22 @@ public class NumberEditorValidatePane extends JPanel {
ob.setAllowNegative(allowNegativeCheckBox.isSelected());
if (setMaxValueCheckBox.isSelected()) {
ob.setMaxValue(Double.parseDouble("" + maxValueSpinner.getValue()));
ob.setMaxValue(Double.parseDouble(StringUtils.EMPTY + maxValueSpinner.getValue()));
} else {
ob.setMaxValue(Double.MAX_VALUE);
}
if (setMinValueCheckBox.isSelected()) {
ob.setMinValue(Double.parseDouble("" + minValueSpinner.getValue()));
ob.setMinValue(Double.parseDouble(StringUtils.EMPTY + minValueSpinner.getValue()));
} else {
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.FILEFactory;
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.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 java.awt.*;
@ -54,6 +64,10 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
setDebugEnv();
}
RestartHelper.deleteRecordFilesWhenStart();
//初始化插件引擎
PluginStartup.start();
SiteCenter.getInstance();
DesignUtils.setPort(getStartPort());
// 如果端口被占用了 说明程序已经运行了一次,也就是说,已经建立一个监听服务器,现在只要给服务器发送命令就好了
@ -83,8 +97,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
DesignUtils.initLookAndFeel();
DesignUtils.creatListeningServer(getStartPort(), startFileSuffix());
//初始化插件引擎
PluginManager.init();
// 初始化Log Handler
DesignerEnvManager.loadLogSetting();
DesignerFrame df = createDesignerFrame();

72
designer_base/src/com/fr/start/SplashPane.java

@ -1,12 +1,11 @@
/**
*
*
*/
package com.fr.start;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.image.BufferedImage;
import javax.swing.ImageIcon;
import javax.swing.JPanel;
@ -19,22 +18,20 @@ import com.fr.stable.CoreGraphHelper;
/**
* @author neil
*
* @date: 2015-3-13-上午10:20:43
*/
public class SplashPane extends JPanel{
public class SplashPane extends JPanel {
/**
* 获取已经绘制完毕的启动画面
*
* @return 绘制完毕的启动画面
*/
public Image getSplashImage() {
Image image = createSplashBackground();
return CoreGraphHelper.toBufferedImage(image);
}
/**
* 获取已经绘制完毕的启动画面
*
* @return 绘制完毕的启动画面
*
*/
public BufferedImage getSplashImage() {
Image image = createSplashBackground();
return CoreGraphHelper.toBufferedImage(image);
}
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2d = (Graphics2D) g;
@ -44,35 +41,32 @@ public class SplashPane extends JPanel{
}
/**
* 设置在启动过程中, 动态改变的文本, 当前启动的模块信息
*
* @param text 指定的文本
*
*/
public void setShowText(String text) {
}
* 设置在启动过程中, 动态改变的文本, 当前启动的模块信息
*
* @param text 指定的文本
*/
public void setShowText(String text) {
}
/**
* 创建启动画面的背景图片
*
* @return 背景图片
*
*/
public Image createSplashBackground() {
/**
* 创建启动画面的背景图片
*
* @return 背景图片
*/
public Image createSplashBackground() {
if (GeneralContext.isChineseEnv()) {
return BaseUtils.readImage("/com/fr/base/images/oem/splash_chinese.png");
}
return BaseUtils.readImage("/com/fr/base/images/oem/splash_english.png");
}
/**
* 窗口关闭后取消定时获取模块信息的timer
*
*/
public void releaseTimer() {
}
* 窗口关闭后取消定时获取模块信息的timer
*/
public void releaseTimer() {
}
}

6
designer_base/src/com/fr/start/SplashWindow.java

@ -14,13 +14,14 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.OperatingSystem;
import com.sun.awt.AWTUtilities;
public class SplashWindow extends JFrame {
private SplashPane splash = null;
@SuppressWarnings("LeakingThisInConstructor")
public SplashWindow(SplashPane splashPane) {
public SplashWindow(SplashPane splashPane) {
// alex:必须设置这个属性为true,才可以用透明背景
System.setProperty("sun.java2d.noddraw", "true");
@ -45,7 +46,8 @@ public class SplashWindow extends JFrame {
this.setAlwaysOnTop(false);
this.setUndecorated(true);
AWTUtilities.setWindowOpaque(this, false);
//使窗体背景透明
if (OperatingSystem.isWindows()) {
this.setBackground(new Color(0,0,0,0));

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

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

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

@ -9,7 +9,6 @@ import com.fr.chart.base.AttrChangeType;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.TableLayout;
@ -28,6 +27,8 @@ import java.awt.event.ActionListener;
*/
public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
private static final int WIDTH = 100;
private static final int EDIT_AREA_WIDTH = 180;
private static final int LABEL_WIDTH = 20;
private static final int MIN_TIME = 0;
private static final int MAX_TIME = Integer.MAX_VALUE;
private static final int CONSTANT_TEN = 10;
@ -97,38 +98,47 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
private JPanel createCarouseConfigPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] columnSize = {p, f, p};
double[] rowSize = {p, p, p};
timeInterval = new UISpinner(MIN_TIME, MAX_TIME, 1, 0);
colorSelectBox4carousel = new ColorSelectBoxWithOutTransparent(WIDTH);
switchStyleGroup = new UIButtonGroup(new String[]{Inter.getLocText("FR-Designer_Show"), Inter.getLocText("FR-Designer_Hide")});
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Arrow_Style")), switchStyleGroup},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), timeInterval},
new Component[]{new UILabel(Inter.getLocText("Background")),colorSelectBox4carousel}
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Arrow_Style")), switchStyleGroup, null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), timeInterval, new UILabel(Inter.getLocText("FR-Base-Time_Second"))},
new Component[]{new UILabel(Inter.getLocText("Background")),colorSelectBox4carousel, null}
};
return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
}
private JPanel createTitleStylePane(){
styleAttrPane = new ChartTextAttrPane(){
private JPanel createTitleStylePane() {
final UILabel text = new UILabel(Inter.getLocText("Plugin-Chart_Character"), SwingConstants.LEFT);
styleAttrPane = new ChartTextAttrPane() {
protected JPanel getContentPane(JPanel buttonPane) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, EDIT_AREA_WIDTH};
double[] rowSize = {p, p};
return TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize);
}
protected Component[][] getComponents(JPanel buttonPane) {
return new Component[][]{
new Component[]{fontNameComboBox, null},
new Component[]{buttonPane, null}
new Component[]{text, fontNameComboBox},
new Component[]{null, buttonPane}
};
}
};
styleAttrPane.setPreferredSize(new Dimension(WIDTH, (int) styleAttrPane.getPreferredSize().getHeight()));
return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-Chart_Character"), styleAttrPane);
return styleAttrPane;
}
private JPanel createButtonBackgroundColorPane(){
colorSelectBox4button = new ColorSelectBoxWithOutTransparent(WIDTH);
return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Background"), colorSelectBox4button);
return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Background"), colorSelectBox4button, EDIT_AREA_WIDTH);
}
private JPanel createButtonConfigPane() {

3
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java

@ -30,7 +30,8 @@ import java.util.List;
*/
public abstract class AbstractReportDataContentPane extends BasicBeanPane<ChartCollection>{
private static final double ROW = 6;
protected static final double COMPONENT_WIDTH = 124;
protected UICorrelationPane seriesPane;
protected abstract String[] columnNames();

4
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java

@ -13,7 +13,9 @@ import java.util.List;
public abstract class AbstractTableDataContentPane extends BasicBeanPane<ChartCollection>{
private boolean isNeedSummaryCaculateMethod = true;
protected static final double COMPONENT_WIDTH = 124;
private boolean isNeedSummaryCaculateMethod = true;
public abstract void updateBean(ChartCollection ob);

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.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartdata.NormalTableDataDefinition;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
@ -26,212 +27,230 @@ import java.util.List;
/**
* 多分类轴 的数据集定义界面.
*
* @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2013-9-3 上午10:00:28
*/
public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableDataContentPane implements UIObserver{
private static final long serialVersionUID = -3305681053750642843L;
private static final int COMBOX_GAP = 8;
private static final int COMBOX_WIDTH = 95;
private static final int COMBOX_HEIGHT = 20;
private JPanel boxPane;
private ArrayList<UIComboBox> boxList = new ArrayList<UIComboBox>();
private UIButton addButton;
private UIObserverListener uiobListener = null;
public CategoryPlotMoreCateTableDataContentPane() {
// do nothing
}
public CategoryPlotMoreCateTableDataContentPane(ChartDataPane parent) {
categoryCombox = new UIComboBox();
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")) ;
public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableDataContentPane implements UIObserver {
private static final long serialVersionUID = -3305681053750642843L;
private static final int COMBOX_GAP = 8;
private static final int COMBOX_WIDTH = 95;
private static final int COMBOX_HEIGHT = 20;
private JPanel boxPane;
private ArrayList<UIComboBox> boxList = new ArrayList<UIComboBox>();
private UIButton addButton;
private UIObserverListener uiobListener = null;
public List<UIComboBox> getBoxList() {
return boxList;
}
public CategoryPlotMoreCateTableDataContentPane() {
// do nothing
}
public CategoryPlotMoreCateTableDataContentPane(ChartDataPane parent) {
categoryCombox = new UIComboBox();
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));
addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
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));
categoryPane.add(boxPane, BorderLayout.SOUTH);
this.setLayout(new BorderLayout());
this.add(categoryPane, BorderLayout.NORTH);
this.add(getJSeparator());
seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot());
this.add(seriesTypeComboxPane, BorderLayout.SOUTH);
addButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if(boxList.size() < 2) {
addNewCombox();
relayoutPane();
}
checkSeriseUse(categoryCombox.getSelectedItem() != null);
}
});
categoryCombox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
checkSeriseUse(categoryCombox.getSelectedItem() != null);
makeToolTipUse(categoryCombox);
checkAddButton();
}
});
}
protected void checkSeriseUse(boolean hasUse) {
super.checkSeriseUse(hasUse);
addButton.setEnabled(hasUse);
}
private UIComboBox addNewCombox() {
final JPanel buttonPane = new JPanel();
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 2));
final UIComboBox combox = new UIComboBox();
combox.setPreferredSize(new Dimension(COMBOX_WIDTH, COMBOX_HEIGHT));
int count = categoryCombox.getItemCount();
for(int i = 0; i < count; i++) {
combox.addItem(categoryCombox.getItemAt(i));
}
combox.registerChangeListener(uiobListener);
combox.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
makeToolTipUse(combox);
}
});
combox.setSelectedItem(categoryCombox.getItemAt(0));
makeToolTipUse(combox);
buttonPane.add(combox);
UIButton delButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/toolbarbtn/close.png"));
buttonPane.add(delButton);
boxPane.add(buttonPane);
boxList.add(combox);
checkAddButton();
delButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
boxPane.remove(buttonPane);
boxList.remove(combox);
checkAddButton();
relayoutPane();
}
});
delButton.registerChangeListener(uiobListener);
return combox;
}
private void checkAddButton() {
int size = boxList.size();
addButton.setEnabled(size < 2 && categoryCombox.getSelectedItem() != null);
}
private void relayoutPane() {
this.revalidate();
}
/**
*检查 某些Box是否可用
* @param hasUse 是否使用.
*/
public void checkBoxUse(boolean hasUse) {
super.checkBoxUse(hasUse);
checkAddButton();
}
this.setLayout(new BorderLayout());
this.add(categoryPane, BorderLayout.NORTH);
this.add(getJSeparator());
seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot());
this.add(seriesTypeComboxPane, BorderLayout.SOUTH);
addButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (boxList.size() < 2) {
addNewCombox();
relayoutPane();
}
checkSeriseUse(categoryCombox.getSelectedItem() != null);
}
});
categoryCombox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
checkSeriseUse(categoryCombox.getSelectedItem() != null);
makeToolTipUse(categoryCombox);
checkComponent();
}
});
}
protected void checkSeriseUse(boolean hasUse) {
super.checkSeriseUse(hasUse);
addButton.setEnabled(hasUse);
}
private UIComboBox addNewCombox() {
final JPanel buttonPane = new JPanel();
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 2));
final UIComboBox combox = new UIComboBox();
combox.setPreferredSize(new Dimension(COMBOX_WIDTH, COMBOX_HEIGHT));
int count = categoryCombox.getItemCount();
for (int i = 0; i < count; i++) {
combox.addItem(categoryCombox.getItemAt(i));
}
combox.registerChangeListener(uiobListener);
combox.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
makeToolTipUse(combox);
}
});
combox.setSelectedItem(categoryCombox.getItemAt(0));
makeToolTipUse(combox);
buttonPane.add(combox);
UIButton delButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/toolbarbtn/close.png"));
buttonPane.add(delButton);
boxPane.add(buttonPane);
boxList.add(combox);
checkComponent();
delButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
boxPane.remove(buttonPane);
boxList.remove(combox);
checkComponent();
relayoutPane();
}
});
delButton.registerChangeListener(uiobListener);
return combox;
}
private void checkAddButton() {
int size = boxList.size();
addButton.setEnabled(size < 2 && categoryCombox.getSelectedItem() != null);
}
protected void checkComponent() {
checkAddButton();
}
private void relayoutPane() {
this.revalidate();
}
/**
* 检查 某些Box是否可用
*
* @param hasUse 是否使用.
*/
public void checkBoxUse(boolean hasUse) {
super.checkBoxUse(hasUse);
checkComponent();
}
protected void refreshBoxListWithSelectTableData(List list) {
super.refreshBoxListWithSelectTableData(list);
for(int i = 0, size = boxList.size(); i < size; i++) {
refreshBoxItems(boxList.get(i), list);
}
super.refreshBoxListWithSelectTableData(list);
for (int i = 0, size = boxList.size(); i < size; i++) {
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());
}
}
}
}
}

5
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java

@ -37,12 +37,9 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
valueBox = new UIComboBox();
filterPane = new ChartDataFilterPane(new MeterPlot(), parent);
nameBox.setPreferredSize(new Dimension(100, 20));
valueBox.setPreferredSize(new Dimension(100, 20));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = { p,f};
double[] columnSize = {f, COMPONENT_WIDTH};
double[] rowSize = {p, p};
Component[][] components = createComponents();

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

@ -216,7 +216,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
@Override
public void mouseClicked(MouseEvent e) {
if (valueFormatPane == null) {
valueFormatPane = new FormatPane();
valueFormatPane = new FormatPaneWithOutFont();
}
Point comPoint = dataPointValueFormat.getLocationOnScreen();
Point arrowPoint = new Point(comPoint.x - DET, comPoint.y + dataPointValueFormat.getHeight());

19
designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

@ -134,9 +134,6 @@ public class ChartTextAttrPane extends BasicPane {
bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"));
italic = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
Component[] components1 = new Component[]{
fontColor, italic, bold
};
@ -144,16 +141,20 @@ public class ChartTextAttrPane extends BasicPane {
buttonPane.add(fontSizeComboBox, BorderLayout.CENTER);
buttonPane.add(GUICoreUtils.createFlowPane(components1, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST);
this.setLayout(new BorderLayout());
this.add(getContentPane(buttonPane), BorderLayout.CENTER);
populate(FRFont.getInstance());
}
protected JPanel getContentPane (JPanel buttonPane) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f,e};
double[] rowSize = {p, p, p};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize);
this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER);
populate(FRFont.getInstance());
return TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize);
}
protected Component[][] getComponents(JPanel buttonPane) {

8
designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java

@ -259,9 +259,9 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
if (designTypeButtonGroup.getSelectedIndex() == 0) {
return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width, upControlPane.getPreferredSize().height + MARGIN_TOP);
} else {
int extra = stagePanel == null ? 0 : stagePanel.getPreferredSize().height + this.MARGIN_TOP;
int extra = stagePanel == null ? 0 : stagePanel.getPreferredSize().height + MARGIN_TOP;
return new Dimension(colorGroup.getPreferredSize().width + textGroup.getPreferredSize().width,
extra + textGroup.getPreferredSize().height + upControlPane.getPreferredSize().height + OFF_HEIGHT);
extra + textGroup.getPreferredSize().height + upControlPane.getPreferredSize().height + OFF_HEIGHT + MARGIN_TOP);
}
}
@ -616,8 +616,8 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
@Override
public void layoutContainer(Container parent) {
upControlPane.setBounds(MARGIN_LEFT, MARGIN_TOP, UPCONTROLPANE_WIDTH, upControlPane.getPreferredSize().height);
colorGroup.setBounds(COLORGROUP_MARGIN_LEFT, MARGIN_TOP + upControlPane.getPreferredSize().height + LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height);
textGroup.setBounds(colorGroup.getPreferredSize().width + COLORGROUP_MARGIN_LEFT, upControlPane.getPreferredSize().height + LAYOUR_DET, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height);
colorGroup.setBounds(COLORGROUP_MARGIN_LEFT, 2 * MARGIN_TOP + upControlPane.getPreferredSize().height + LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height);
textGroup.setBounds(colorGroup.getPreferredSize().width + COLORGROUP_MARGIN_LEFT, MARGIN_TOP + upControlPane.getPreferredSize().height + LAYOUR_DET, textGroup.getPreferredSize().width, textGroup.getPreferredSize().height);
}
@Override

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.FRContext;
import com.fr.base.background.ColorBackground;
import com.fr.chart.base.*;
import com.fr.chart.chartattr.*;
import com.fr.chart.base.AttrContents;
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.charttypes.BarIndependentChart;
import com.fr.design.beans.FurtherBasicBeanPane;
@ -43,6 +53,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
protected List<ChartImagePane> styleList;
protected JPanel stylePane; //样式布局的面板
private JPanel typePane;
protected abstract String[] getTypeIconPath();
protected abstract String[] getTypeTipName();
protected abstract String[] getTypeLayoutPath();
@ -70,7 +81,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
checkDemosBackground();
JPanel typePane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(4);
typePane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(4);
for(int i = 0; i < typeDemo.size(); i++) {
ChartImagePane tmp = typeDemo.get(i);
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;
}
@ -586,6 +597,10 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
&& chart.getPlot().getPlotStyle() != ChartConstants.STYLE_NONE;
}
protected JPanel getTypePane(){
return typePane;
}
public Chart getDefaultChart() {
return BarIndependentChart.barChartTypes[0];
}

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

@ -21,7 +21,7 @@ public abstract class ChartTabPane extends MultiTabPane<Chart> {
@Override
protected void initLayout() {
JPanel tabPanel = new JPanel(new BorderLayout());
tabPanel.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 10, getBackground()));
tabPanel.setBorder(BorderFactory.createMatteBorder(0, 5, 0, 10, getBackground()));
tabPanel.add(tabPane, BorderLayout.CENTER);
this.setLayout(new BorderLayout(0, 4));
this.add(tabPanel, BorderLayout.NORTH);

16
designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleSeriesPane.java

@ -12,7 +12,7 @@ import com.fr.plugin.chart.bubble.component.VanChartBubblePane;
import com.fr.plugin.chart.custom.component.VanChartCustomAxisConditionPane;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.style.series.VanChartAbstractPlotSeriesPane;
import com.fr.plugin.chart.designer.style.series.VanChartCustomStackAndAxisEditPane;
import com.fr.plugin.chart.designer.style.series.VanChartStackedAndAxisListControlPane;
import javax.swing.*;
import java.awt.*;
@ -39,10 +39,13 @@ public class VanChartBubbleSeriesPane extends VanChartAbstractPlotSeriesPane {
new Component[]{getColorPane()},
new Component[]{createBubblePane()},
new Component[]{createStackedAndAxisPane()},
new Component[]{createLargeDataModelPane()}
new Component[]{null}
};
if (!((VanChartBubblePlot)plot).isForceBubble()) {
components[3] = new Component[]{createLargeDataModelPane()};
}
contentPane = TableLayoutHelper.createTableLayoutPane(components, row, col);
return contentPane;
}
@ -56,18 +59,19 @@ public class VanChartBubbleSeriesPane extends VanChartAbstractPlotSeriesPane {
@Override
//堆积和坐标轴设置(自定义柱形图等用到)
protected JPanel createStackedAndAxisPane() {
stackAndAxisEditPane = new VanChartCustomStackAndAxisEditPane(){
stackAndAxisEditPane = new VanChartStackedAndAxisListControlPane(){
@Override
protected Class<? extends BasicBeanPane> getStackAndAxisPaneClass() {
return VanChartCustomAxisConditionPane.class;
}
@Override
protected String getPaneTitle(){
public String getPaneTitle(){
return Inter.getLocText("Plugin-ChartF_Custom_Axis");
}
};
return stackAndAxisEditPane;
stackAndAxisEditExpandablePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(stackAndAxisEditPane.getPaneTitle(), stackAndAxisEditPane);
return stackAndAxisEditExpandablePane;
}
private JPanel createBubblePane() {

4
designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java

@ -48,10 +48,8 @@ public class VanChartBubblePlotTableDataContentPane extends AbstractTableDataCon
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f};
double[] rowSize = {p, p};
double[] columnSize_north = {p, f};
double[] columnSize_north = {f, COMPONENT_WIDTH};
double[] rowSize_north = {p, p, p, p};
Component[][] components_north = new Component[][]{

6
designer_chart/src/com/fr/plugin/chart/column/VanChartColumnSeriesPane.java

@ -69,13 +69,17 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane {
private JPanel createSeriesStylePane(double[] row, double[] col) {
isFixedWidth = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_YES"), Inter.getLocText("Plugin-ChartF_NO")});
columnWidth = new UISpinner(0,1000,1,0);
columnWidth.setBorder(BorderFactory.createEmptyBorder(0, (int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH + TableLayout4VanChartHelper.COMPONENT_INTERVAL,0,0));
seriesGap = new UINumberDragPane(-100, 100);
categoryGap = new UINumberDragPane(0, 100);
isFillWithImage = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_YES"), Inter.getLocText("Plugin-ChartF_NO")});
imagePane = new ImageBackgroundQuickPane(false);
imagePane.setBorder(BorderFactory.createEmptyBorder(0,(int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH + TableLayout4VanChartHelper.COMPONENT_INTERVAL,0,0));
JPanel panel1 = new JPanel(new BorderLayout());
panel1.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Fixed_Column_Width"),isFixedWidth), BorderLayout.NORTH);
JPanel isFixedWidthPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Fixed_Column_Width"),isFixedWidth);
isFixedWidthPane.setBorder(BorderFactory.createEmptyBorder(0,0,6,0));
panel1.add(isFixedWidthPane, BorderLayout.NORTH);
panel1.add(columnWidth, BorderLayout.CENTER);
Component[][] components2 = new Component[][]{

50
designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java

@ -33,12 +33,13 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
private LiteConditionPane liteConditionPane;
public VanChartCustomStackAndAxisConditionPane(){
public VanChartCustomStackAndAxisConditionPane() {
}
private void doLayoutPane(){
private void doLayoutPane() {
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
this.removeAll();
//配置界面
JPanel deployPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
@ -56,23 +57,22 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
liteConditionPane.setPreferredSize(new Dimension(300, 300));
}
private JPanel createDeployPane()
{
private JPanel createDeployPane() {
isStacked = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_YES"), Inter.getLocText("Plugin-ChartF_NO")});
isPercentStacked = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_YES"), Inter.getLocText("Plugin-ChartF_NO")});
double p = TableLayout.PREFERRED;
double[] columnSize = {p,p};
double[] rowSize = {p,p,p,p};
double[] columnSize = {p, p};
double[] rowSize = {p, p, p, p};
return TableLayoutHelper.createTableLayoutPane(getDeployComponents(), rowSize, columnSize);
}
protected Component[][] getDeployComponents() {
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("ChartF-X_Axis")),XAxis},
new Component[]{new UILabel(Inter.getLocText("ChartF-Y_Axis")),YAxis},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Type_Stacked")),isStacked},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_PercentStacked")),isPercentStacked},
new Component[]{new UILabel(Inter.getLocText("ChartF-X_Axis")), XAxis},
new Component[]{new UILabel(Inter.getLocText("ChartF-Y_Axis")), YAxis},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Type_Stacked")), isStacked},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_PercentStacked")), isPercentStacked},
};
isStacked.addActionListener(new ActionListener() {
@ -93,8 +93,8 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
isPercentStacked.setEnabled(isStacked.getSelectedIndex() == 0);
}
public void populateBean(ConditionAttr conditionAttr){
AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis)conditionAttr.getExisted(AttrSeriesStackAndAxis.class);
public void populateBean(ConditionAttr conditionAttr) {
AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis) conditionAttr.getExisted(AttrSeriesStackAndAxis.class);
XAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getXAxisNamesArray());
YAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getYAxisNameArray());
@ -113,30 +113,26 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
checkBox();
}
public void updateBean(ConditionAttr conditionAttr){
AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis)conditionAttr.getExisted(AttrSeriesStackAndAxis.class);
seriesStackAndAxis.setXAxisIndex(XAxis.getSelectedIndex());
seriesStackAndAxis.setYAxisIndex(YAxis.getSelectedIndex());
updateStackAndPercent(seriesStackAndAxis);
AbstractCondition con = (AbstractCondition) this.liteConditionPane.updateBean();
conditionAttr.setCondition(con);
}
protected void updateStackAndPercent(AttrSeriesStackAndAxis seriesStackAndAxis) {
seriesStackAndAxis.setStacked(isStacked.getSelectedIndex() == 0);
if(seriesStackAndAxis.isStacked()){
if (seriesStackAndAxis.isStacked()) {
seriesStackAndAxis.setPercentStacked(isPercentStacked.getSelectedIndex() == 0);
} else {
seriesStackAndAxis.setPercentStacked(false);
}
}
public ConditionAttr updateBean(){
public ConditionAttr updateBean() {
ConditionAttr conditionAttr = new ConditionAttr();
updateBean(conditionAttr);
AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis();
seriesStackAndAxis.setXAxisIndex(XAxis.getSelectedIndex());
seriesStackAndAxis.setYAxisIndex(YAxis.getSelectedIndex());
updateStackAndPercent(seriesStackAndAxis);
conditionAttr.addDataSeriesCondition(seriesStackAndAxis);
AbstractCondition con = (AbstractCondition) this.liteConditionPane.updateBean();
conditionAttr.setCondition(con);
return conditionAttr;
}

2
designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java

@ -13,7 +13,7 @@ public abstract class AbstractVanChartScrollPane<T> extends BasicScrollPane<T> {
protected void layoutContentPane() {
leftcontentPane = createContentPane();
leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 5, 0, 5, original));
leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 5, 0, 10, original));
this.add(leftcontentPane);
}

1
designer_chart/src/com/fr/plugin/chart/designer/PlotFactory.java

@ -327,6 +327,7 @@ public class PlotFactory {
public static FormatPane createAutoFormatPane(){
FormatPane formatPane = new FormatPane(){
protected Component[][] getComponent (JPanel fontPane, JPanel centerPane, JPanel typePane) {
typePane.setBorder(BorderFactory.createEmptyBorder());
return new Component[][]{
new Component[]{typePane,null},
new Component[]{centerPane, null},

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.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
@ -42,9 +41,11 @@ public class TableLayout4VanChartHelper {
double f = TableLayout.FILL;
double[] columnSize = {f, componentWidth};
double[] rowSize = {p, p};
UILabel label = new UILabel(title);
label.setVerticalAlignment(SwingConstants.TOP);
Component[][] components = new Component[][]{
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);
}

16
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTrendLinePane.java

@ -47,16 +47,18 @@ public class VanChartTrendLinePane extends BasicPane{
trendLineStyle = new LineComboBox(VanChartConstants.ALERT_LINE_STYLE);
trendLineType = new UIComboBox(TYPES);
prePeriod = new UISpinner(0,Integer.MAX_VALUE,1,0);
afterPeriod = new UISpinner(0,Integer.MAX_VALUE,1,0);
double[] r = {p,p};
double[] c = {p,f,p};
prePeriod = new UISpinner(0, Integer.MAX_VALUE, 1, 0);
afterPeriod = new UISpinner(0, Integer.MAX_VALUE, 1, 0);
double[] r = {p, p};
double[] c = {f, p, f, p};
Component[][] periodComps = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Chart_TrendLine_Forward")), prePeriod, new UILabel(Inter.getLocText("Plugin-ChartF_Cycle"))},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_After_Period")), afterPeriod, new UILabel(Inter.getLocText("Plugin-ChartF_Cycle"))},
new Component[]{prePeriod, new UILabel(Inter.getLocText("Plugin-ChartF_Cycle")), afterPeriod, new UILabel(Inter.getLocText("Plugin-ChartF_Cycle"))},
new Component[]{new UILabel(Inter.getLocText("Chart_TrendLine_Forward")), null, new UILabel(Inter.getLocText("Plugin-ChartF_After_Period")), null},
};
JPanel periodPane = TableLayoutHelper.createTableLayoutPane(periodComps, r, c);
UILabel label = new UILabel(Inter.getLocText("Plugin-ChartF_Period"));
label.setVerticalAlignment(SwingConstants.TOP);
Component[][] components = new Component[][]{
new Component[]{null, null},
@ -64,7 +66,7 @@ public class VanChartTrendLinePane extends BasicPane{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")), trendLineStyle},
new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")), trendLineColor},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_type")), trendLineType},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Period")), periodPane}
new Component[]{label, periodPane}
};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);

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

13
designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java

@ -2,7 +2,9 @@ package com.fr.plugin.chart.designer.component.format;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.style.FormatPane;
import com.fr.design.layout.TableLayout;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*;
import java.awt.*;
@ -14,12 +16,21 @@ import java.awt.*;
public class FormatPaneWithOutFont extends FormatPane {
private static final int HEIGHT = 30;
protected JPanel createContentPane(Component[][] components) {
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] rowSize = {p, p, p};
double[] columnSize = {f, e};
return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
}
protected Component[][] getComponent (JPanel fontPane, JPanel centerPane, JPanel typePane) {
typePane.setBorder(BorderFactory.createEmptyBorder());
return new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Base_Format"), SwingConstants.LEFT), typePane},
new Component[]{centerPane, null},
new Component[]{null, centerPane},
};
}

20
designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartImageMarkerPane.java

@ -26,14 +26,14 @@ public class VanChartImageMarkerPane extends BasicBeanPane<VanChartAttrMarker> {
public VanChartImageMarkerPane() {
imageBackgroundPane = new ImageBackgroundQuickPane(false);
imageBackgroundPane.setPreferredSize(new Dimension((int)TableLayout4VanChartHelper.EDIT_AREA_WIDTH, (int)imageBackgroundPane.getPreferredSize().getHeight()));
imageBackgroundPane.setPreferredSize(getImageBackgroundPreferredSize(imageBackgroundPane.getPreferredSize()));
width = new UISpinner(0, 100, 0.5, 30);
height = new UISpinner(0, 100, 0.5, 30);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p,p,p};
double[] col = {p,f};
double[] row = {p, p, p};
double[] col = {p, f};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Width")), width},
@ -43,11 +43,15 @@ public class VanChartImageMarkerPane extends BasicBeanPane<VanChartAttrMarker> {
JPanel sizePanel = TableLayoutHelper.createTableLayoutPane(components, row, col);
JPanel panel = createContentPane(imageBackgroundPane, sizePanel);
panel.setBorder(BorderFactory.createEmptyBorder(0,72,0,0));
panel.setBorder(BorderFactory.createEmptyBorder(0, 72, 0, 0));
this.add(panel);
}
protected Dimension getImageBackgroundPreferredSize(Dimension dimension) {
return new Dimension((int) TableLayout4VanChartHelper.EDIT_AREA_WIDTH, (int) dimension.getHeight());
}
protected JPanel createContentPane(ImageBackgroundQuickPane imageBackgroundPane, JPanel sizePanel) {
JPanel panel = new JPanel(new BorderLayout(0, 4));
panel.add(imageBackgroundPane, BorderLayout.CENTER);
@ -67,11 +71,11 @@ public class VanChartImageMarkerPane extends BasicBeanPane<VanChartAttrMarker> {
@Override
public void populateBean(VanChartAttrMarker marker) {
if(marker == null){
if (marker == null) {
marker = new VanChartAttrMarker();
marker.setCommon(false);
}
if(marker.getImageBackground() != null){
if (marker.getImageBackground() != null) {
imageBackgroundPane.populateBean(marker.getImageBackground());
}
width.setValue(marker.getWidth());
@ -88,10 +92,10 @@ public class VanChartImageMarkerPane extends BasicBeanPane<VanChartAttrMarker> {
return marker;
}
public void updateBean(VanChartAttrMarker marker){
public void updateBean(VanChartAttrMarker marker) {
marker.setCommon(false);
marker.setMarkerType(MarkerType.MARKER_NULL);
ImageBackground background = (ImageBackground)imageBackgroundPane.updateBean();
ImageBackground background = (ImageBackground) imageBackgroundPane.updateBean();
background.setLayout(Constants.IMAGE_EXTEND);
marker.setImageBackground(background);
marker.setWidth(width.getValue());

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) {
//todo@shine9.0
// super.updateMoreCate(reportDefinition, plot);
// ((VanChartPlot) plot).setCategoryNum(getFormualList().size() + 1);
// if (!getFormualList().isEmpty()) {
// plot.getDataSheet().setVisible(false);
// }
super.updateMoreCate(reportDefinition, plot);
((VanChartPlot) plot).setCategoryNum(getFormualList().size() + 1);
if (!getFormualList().isEmpty()) {
plot.getDataSheet().setVisible(false);
}
}
protected void checkComponent() {
//todo@shine9.0
// super.checkComponent();
// checkBoxList(isSupportMultiCategory);
super.checkComponent();
checkBoxList(isSupportMultiCategory);
}
private void checkBoxList(boolean isSupportMulticategory) {
//todo@shine9.0
// if (getFormualList().size() != 0) {
// for (int i = 0; i < getFormualList().size(); i++) {
// getFormualList().get(i).setEnabled(isSupportMulticategory);
// }
// }
if (getFormualList().size() != 0) {
for (int i = 0; i < getFormualList().size(); i++) {
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) {
//todo@shine9.0
// super.updateMoreCate(normal, plot);
// ((VanChartPlot) plot).setCategoryNum(getBoxList().size() + 1);
// if (!getBoxList().isEmpty()) {
// plot.getDataSheet().setVisible(false);
// }
super.updateMoreCate(normal, plot);
((VanChartPlot) plot).setCategoryNum(getBoxList().size() + 1);
if (!getBoxList().isEmpty()) {
plot.getDataSheet().setVisible(false);
}
}
protected void checkComponent() {
//todo@shine9.0
// super.checkComponent();
// checkBoxList(isSupportMultiCategory);
super.checkComponent();
checkBoxList(isSupportMultiCategory);
}
private void checkBoxList(boolean isSupportMulticategory) {
//todo@shine9.0
// if (getBoxList().size() != 0) {
// for (int i = 0; i < getBoxList().size(); i++) {
// getBoxList().get(i).setEnabled(isSupportMulticategory);
// }
// }
if (getBoxList().size() != 0) {
for (int i = 0; i < getBoxList().size(); i++) {
getBoxList().get(i).setEnabled(isSupportMulticategory);
}
}
}
}

5
designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrContentPane.java

@ -4,7 +4,6 @@ import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.general.NameObject;
import com.fr.stable.Nameable;
@ -17,7 +16,7 @@ import java.awt.*;
public class VanChartConditionAttrContentPane extends AbstractConditionAttrContentPane{
private static final Dimension DIALOG_SIZE = new Dimension(500, 600);
private UIListControlPane conditionPane;
private VanChartConditionListControlPane conditionPane;
public VanChartConditionAttrContentPane() {
}
@ -43,7 +42,7 @@ public class VanChartConditionAttrContentPane extends AbstractConditionAttrConte
nameables[i]=(new NameObject(collection.getConditionAttr(i).getName(),collection.getConditionAttr(i)));
}
conditionPane.populate(nameables);
conditionPane.populate(nameables, showPane);
conditionPane.doLayout();
}

6
designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionListControlPane.java

@ -6,6 +6,7 @@ import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.general.Inter;
@ -26,9 +27,10 @@ public class VanChartConditionListControlPane extends VanChartUIListControlPane
super(plot);
}
@Override
public void populate(Nameable[] nameableArray) {
public void populate(Nameable[] nameableArray, Class<? extends ConditionAttributesPane> showPane) {
initComponentPane();
NameObjectCreator[] creators = new NameObjectCreator[]{new NameObjectCreator(Inter.getLocText("Condition_Attributes"), ConditionAttr.class, showPane)};
refreshNameableCreator(creators);
super.populate(nameableArray);
}

11
designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java

@ -111,7 +111,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
return null;
}
zoomWidget = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
zoomResize = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
zoomResize = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Change"), Inter.getLocText("Plugin-ChartF_Non_Adjustment")});
from = new TinyFormulaPane();
to = new TinyFormulaPane();
zoomType = new UIButtonGroup(getNameArray(), getValueArray());
@ -131,8 +131,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
double[] columnSize = {f, e};
changeEnablePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, columnSize);
changeEnablePane.setBorder(BorderFactory.createEmptyBorder(10,12,0,0));
zoomTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
zoomTypePane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0));
zoomTypePane = getzoomTypePane(zoomType);
JPanel panel = createZoomPaneContent(zoomWidgetPane, zoomGesturePane, changeEnablePane, zoomTypePane, plot);
zoomWidget.addActionListener(new ActionListener() {
@Override
@ -143,6 +142,12 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-Use_Zoom"), panel);
}
protected JPanel getzoomTypePane(UIButtonGroup zoomType) {
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
panel.setBorder(BorderFactory.createEmptyBorder(0,12,0,0));
return panel;
}
protected JPanel createZoomPaneContent(JPanel zoomWidgetPane, JPanel zoomGesturePane, JPanel changeEnablePane, JPanel zoomTypePane, VanChartPlot plot) {
JPanel panel = new JPanel(new BorderLayout(0, 4));
if (plot.isSupportZoomCategoryAxis()) {//支持缩放控件

2
designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java

@ -176,7 +176,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
};
JPanel showLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_AxisLabel"),showLabel);
labelPanel = TableLayoutHelper.createTableLayoutPane(components, row, col);
labelPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
labelPanel.setBorder(BorderFactory.createEmptyBorder(0,10,0,0));
showLabel.addActionListener(new ActionListener() {
@Override

8
designer_chart/src/com/fr/plugin/chart/designer/style/datasheet/VanChartDataSheetPane.java

@ -4,7 +4,6 @@ import com.fr.base.FRContext;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.DataSheet;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.style.FormatPane;
import com.fr.design.layout.TableLayout;
@ -89,8 +88,9 @@ public class VanChartDataSheetPane extends AbstractVanChartScrollPane<Chart> {
borderPane = new VanChartBorderPane();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {LayoutConstants.CHART_ATTR_TOMARGIN, f};
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH;
double[] columnSize = {d, e};
double[] rowSize = {p,p,p};
Component[][] components = new Component[][]{
new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Base_Format"),formatPane),null},
@ -98,7 +98,7 @@ public class VanChartDataSheetPane extends AbstractVanChartScrollPane<Chart> {
new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"),borderPane),null},
};
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize);
}
@Override

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() {
textFontPane.setVisible(style.getSelectedIndex() == 1);
textFontPane.setPreferredSize(style.getSelectedIndex() == 1 ? new Dimension(0, 60) : new Dimension(0, 0));
}
private void checkPosition() {

50
designer_chart/src/com/fr/plugin/chart/designer/style/series/StackedAndAxisNameObjectCreator.java

@ -0,0 +1,50 @@
package com.fr.plugin.chart.designer.style.series;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.UnrepeatedNameHelper;
import com.fr.general.FRLogger;
import com.fr.general.NameObject;
import com.fr.plugin.chart.base.AttrSeriesStackAndAxis;
import com.fr.plugin.chart.designer.style.background.ChartNameObjectCreator;
import com.fr.stable.Nameable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
/**
* Created by mengao on 2017/9/11.
*/
public class StackedAndAxisNameObjectCreator extends ChartNameObjectCreator {
public StackedAndAxisNameObjectCreator(Object object, String menuName, Class clazz, Class<? extends BasicBeanPane> updatePane) {
super(object, menuName, clazz, updatePane);
}
/**
* create Nameable
*
* @param helper
* @return
*/
public Nameable createNameable(UnrepeatedNameHelper helper) {
Constructor<? extends ConditionAttr> constructor = null;
try {
constructor = clazzOfInitCase.getConstructor();
ConditionAttr conditionAttr = constructor.newInstance();
conditionAttr.addDataSeriesCondition((AttrSeriesStackAndAxis) object);
return new NameObject(helper.createUnrepeatedName(this.menuName()), conditionAttr);
} catch (NoSuchMethodException e) {
FRLogger.getLogger().error(e.getMessage(), e);
} catch (IllegalAccessException e) {
FRLogger.getLogger().error(e.getMessage(), e);
} catch (InstantiationException e) {
FRLogger.getLogger().error(e.getMessage(), e);
} catch (InvocationTargetException e) {
FRLogger.getLogger().error(e.getMessage(), e);
}
return null;
}
}

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

@ -64,9 +64,11 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
private UINumberDragPane transparent;//不透明度
protected VanChartCustomStackAndAxisEditPane stackAndAxisEditPane;//堆積和坐標軸
protected VanChartStackedAndAxisListControlPane stackAndAxisEditPane;//堆積和坐標軸
protected JPanel stackAndAxisEditExpandablePane;//堆積和坐標軸展开面板
private RadiusCardLayoutPane radiusPane;//半径设置界面
private JPanel radiusPaneWithTitle;
private UIButtonGroup<DataProcessor> largeDataModelGroup;//大数据模式
@ -157,9 +159,10 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
}
//半径界面
protected RadiusCardLayoutPane createRadiusPane() {
protected JPanel createRadiusPane() {
radiusPane = initRadiusPane();
return radiusPane;
radiusPaneWithTitle = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Radius_Set"), radiusPane);
return ((VanChartPlot)plot).isInCustom() ? null : radiusPaneWithTitle;
}
protected JPanel createLargeDataModelPane() {
@ -251,13 +254,14 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//堆积和坐标轴设置(自定义柱形图等用到)
protected JPanel createStackedAndAxisPane() {
stackAndAxisEditPane = new VanChartCustomStackAndAxisEditPane();
return stackAndAxisEditPane;
stackAndAxisEditPane = new VanChartStackedAndAxisListControlPane();
stackAndAxisEditExpandablePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(stackAndAxisEditPane.getPaneTitle(), stackAndAxisEditPane);
return stackAndAxisEditExpandablePane;
}
//界面上删除堆积和坐标轴设置
protected void removeStackWholePane() {
contentPane.remove(stackAndAxisEditPane);
contentPane.remove(stackAndAxisEditExpandablePane);
contentPane.repaint();
}
@ -284,7 +288,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
if(stackAndAxisEditPane != null && plot instanceof VanChartRectanglePlot){//堆积和坐标轴
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot)plot;
if(rectanglePlot.isCustomChart()){
stackAndAxisEditPane.populateBean(rectanglePlot);
stackAndAxisEditPane.populate(rectanglePlot);
} else {
removeStackWholePane();
}
@ -307,10 +311,10 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
* @param plot
*/
private void checkRadiusPane(Plot plot) {
radiusPane.setVisible(true);
radiusPaneWithTitle.setVisible(true);
if (plot instanceof VanChartPlot){
if (((VanChartPlot) plot).isInCustom()){
radiusPane.setVisible(false);
radiusPaneWithTitle.setVisible(false);
}
}
}
@ -339,7 +343,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
if(stackAndAxisEditPane != null && plot instanceof VanChartRectanglePlot){//堆积和坐标轴
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot)plot;
if(rectanglePlot.isCustomChart()){
stackAndAxisEditPane.updateBean(rectanglePlot);
stackAndAxisEditPane.update(rectanglePlot);
}
}

111
designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartCustomStackAndAxisEditPane.java

@ -1,111 +0,0 @@
package com.fr.plugin.chart.designer.style.series;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.frpane.UICorrelationComboBoxPane;
import com.fr.design.gui.imenutable.UIMenuNameableCreator;
import com.fr.general.Inter;
import com.fr.plugin.chart.attr.DefaultAxisHelper;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.base.AttrSeriesStackAndAxis;
import com.fr.plugin.chart.column.VanChartCustomStackAndAxisConditionPane;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartUIMenuNameableCreator;
import javax.swing.*;
import java.awt.*;
import java.util.ArrayList;
/**
* Created by Fangjie on 2016/4/28.
*/
public class VanChartCustomStackAndAxisEditPane extends BasicBeanPane<VanChartRectanglePlot> {
//堆积和坐标轴
protected UICorrelationComboBoxPane stackAndAxisPane;
protected JPanel stackAndAxisWholePane;
public VanChartCustomStackAndAxisEditPane() {
initStackedAndAxisPane();
initContentPane();
}
private void initContentPane() {
this.setLayout(new BorderLayout(0, 5));
this.add(stackAndAxisWholePane, BorderLayout.CENTER);
}
//堆积和坐标轴设置(自定义柱形图等用到)
protected JPanel initStackedAndAxisPane() {
stackAndAxisPane = new UICorrelationComboBoxPane();
stackAndAxisWholePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(getPaneTitle(), stackAndAxisPane);
return stackAndAxisWholePane;
}
@Override
public void populateBean(VanChartRectanglePlot plot) {
java.util.List<VanChartAxis> xAxisList = plot.getXAxisList();
java.util.List<VanChartAxis> yAxisList = plot.getYAxisList();
String[] axisXNames = DefaultAxisHelper.getAxisNames(xAxisList);
String[] axisYNames = DefaultAxisHelper.getAxisNames(yAxisList);
java.util.List<UIMenuNameableCreator> menuList = new ArrayList<UIMenuNameableCreator>();
ConditionAttr demo = new ConditionAttr();
AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis();
seriesStackAndAxis.setXAxisNamesArray(axisXNames);
seriesStackAndAxis.setYAxisNameArray(axisYNames);
demo.addDataSeriesCondition(seriesStackAndAxis);
menuList.add(new VanChartUIMenuNameableCreator(getPaneTitle(), demo, getStackAndAxisPaneClass()));
stackAndAxisPane.refreshMenuAndAddMenuAction(menuList);
java.util.List<UIMenuNameableCreator> list = new ArrayList<UIMenuNameableCreator>();
ConditionCollection stackAndAxisCondition = plot.getStackAndAxisCondition();
for(int i = 0, len = stackAndAxisCondition.getConditionAttrSize(); i < len; i++){
ConditionAttr conditionAttr = stackAndAxisCondition.getConditionAttr(i);
AttrSeriesStackAndAxis stackAndAxis = (AttrSeriesStackAndAxis)conditionAttr.getExisted(AttrSeriesStackAndAxis.class);
stackAndAxis.setXAxisNamesArray(axisXNames);
stackAndAxis.setYAxisNameArray(axisYNames);
list.add(new VanChartUIMenuNameableCreator(conditionAttr.getName(), conditionAttr, getStackAndAxisPaneClass()));
}
stackAndAxisPane.populateBean(list);
stackAndAxisPane.doLayout();
}
@Override
public VanChartRectanglePlot updateBean() {
return null;
}
@Override
public void updateBean(VanChartRectanglePlot plot){
ConditionCollection stackAndAxisCondition = plot.getStackAndAxisCondition();
stackAndAxisCondition.clearConditionAttr();
java.util.List<UIMenuNameableCreator> list = stackAndAxisPane.updateBean();
for(UIMenuNameableCreator creator : list){
ConditionAttr conditionAttr = (ConditionAttr)creator.getObj();
conditionAttr.setName(creator.getName());
AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis)conditionAttr.getExisted(AttrSeriesStackAndAxis.class);
seriesStackAndAxis.setStackID(creator.getName());
stackAndAxisCondition.addConditionAttr(conditionAttr);
}
}
@Override
protected String title4PopupWindow() {
return null;
}
protected Class<? extends BasicBeanPane> getStackAndAxisPaneClass() {
return VanChartCustomStackAndAxisConditionPane.class;
}
protected String getPaneTitle(){
return Inter.getLocText("Plugin-ChartF_StackAndSeries");
}
}

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

@ -42,11 +42,15 @@ public class VanChartEffectPane extends BasicBeanPane<AttrEffect> {
this.setLayout(new BorderLayout(0, 5));
if(hasEnabledChoose) {
this.add(panel, BorderLayout.NORTH);
content.setBorder(BorderFactory.createEmptyBorder(10,25,0,15));
setContentPaneBorder();
}
this.add(content, BorderLayout.CENTER);
}
protected void setContentPaneBorder() {
content.setBorder(BorderFactory.createEmptyBorder(10,25,0,15));
}
protected JPanel createContentPane() {
JPanel panel = createPeriodPane();
return panel;
@ -55,7 +59,9 @@ public class VanChartEffectPane extends BasicBeanPane<AttrEffect> {
protected JPanel createPeriodPane(){
JPanel periodPane = new JPanel();
periodPane.setLayout(new BorderLayout(5, 0));
periodPane.add(new UILabel(Inter.getLocText("Plugin-ChartF_Flash_Period")), BorderLayout.WEST);
UILabel label1= new UILabel(Inter.getLocText("Plugin-ChartF_Flash_Period"));
label1.setPreferredSize(new Dimension((int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH, 20));
periodPane.add(label1, BorderLayout.WEST);
periodPane.add(period, BorderLayout.CENTER);
periodPane.add(new UILabel(Inter.getLocText("FR-Base-Time_Second")), BorderLayout.EAST);
return periodPane;

104
designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java

@ -0,0 +1,104 @@
package com.fr.plugin.chart.designer.style.series;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.ShortCut4JControlPane;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.plugin.chart.attr.DefaultAxisHelper;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.base.AttrSeriesStackAndAxis;
import com.fr.plugin.chart.column.VanChartCustomStackAndAxisConditionPane;
import com.fr.plugin.chart.designer.component.VanChartUIListControlPane;
import com.fr.stable.Nameable;
import java.util.ArrayList;
/**
* Created by mengao on 2017/9/11.
* 堆积和坐标轴面板
*/
public class VanChartStackedAndAxisListControlPane extends VanChartUIListControlPane {
@Override
public NameableCreator[] createNameableCreators() {
return new StackedAndAxisNameObjectCreator[]{new StackedAndAxisNameObjectCreator(new AttrSeriesStackAndAxis(), getPaneTitle(), ConditionAttr.class, getStackAndAxisPaneClass())};
}
@Override
protected String title4PopupWindow() {
return Inter.getLocText("Plugin-ChartF_StackAndSeries");
}
protected String getAddItemText() {
return Inter.getLocText("Plugin-ChartF_Add");
}
protected ShortCut4JControlPane[] createShortcuts() {
return new ShortCut4JControlPane[]{
moveUpItemShortCut(),
moveDownItemShortCut(),
removeItemShortCut()
};
}
public void populate(VanChartRectanglePlot plot) {
this.plot = plot;
java.util.List<VanChartAxis> xAxisList = plot.getXAxisList();
java.util.List<VanChartAxis> yAxisList = plot.getYAxisList();
String[] axisXNames = DefaultAxisHelper.getAxisNames(xAxisList);
String[] axisYNames = DefaultAxisHelper.getAxisNames(yAxisList);
java.util.List<StackedAndAxisNameObjectCreator> menuList = new ArrayList<StackedAndAxisNameObjectCreator>();
AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis();
seriesStackAndAxis.setXAxisNamesArray(axisXNames);
seriesStackAndAxis.setYAxisNameArray(axisYNames);
menuList.add(new StackedAndAxisNameObjectCreator(seriesStackAndAxis, getPaneTitle(), ConditionAttr.class, getStackAndAxisPaneClass()));
refreshNameableCreator(menuList.toArray(new StackedAndAxisNameObjectCreator[menuList.size()]));
java.util.List<NameObject> nameObjects = new ArrayList<NameObject>();
ConditionCollection stackAndAxisCondition = plot.getStackAndAxisCondition();
for (int i = 0, len = stackAndAxisCondition.getConditionAttrSize(); i < len; i++) {
ConditionAttr conditionAttr = stackAndAxisCondition.getConditionAttr(i);
AttrSeriesStackAndAxis stackAndAxis = (AttrSeriesStackAndAxis) conditionAttr.getExisted(AttrSeriesStackAndAxis.class);
stackAndAxis.setXAxisNamesArray(axisXNames);
stackAndAxis.setYAxisNameArray(axisYNames);
nameObjects.add(new NameObject(conditionAttr.getName(), conditionAttr));
}
populate(nameObjects.toArray(new NameObject[nameObjects.size()]));
doLayout();
}
@Override
protected void update(Plot plot) {
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot;
ConditionCollection stackAndAxisCondition = rectanglePlot.getStackAndAxisCondition();
stackAndAxisCondition.clearConditionAttr();
Nameable[] nameables = this.update();
for (Nameable nameable : nameables) {
ConditionAttr conditionAttr = (ConditionAttr) ((NameObject) nameable).getObject();
conditionAttr.setName(nameable.getName());
AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis) conditionAttr.getExisted(AttrSeriesStackAndAxis.class);
seriesStackAndAxis.setStackID(nameable.getName());
stackAndAxisCondition.addConditionAttr(conditionAttr);
}
}
protected Class<? extends BasicBeanPane> getStackAndAxisPaneClass() {
return VanChartCustomStackAndAxisConditionPane.class;
}
public String getPaneTitle() {
return Inter.getLocText("Plugin-ChartF_StackAndSeries");
}
}

7
designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java

@ -76,15 +76,16 @@ public class VanChartPlotRefreshTooltipPane extends VanChartPlotTooltipNoCheckPa
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Duration_Time")), duration},
};
JPanel temp = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Duration_Time"), temp);
JPanel temp = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Time"), temp);
}

4
designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartTooltipPane.java

@ -58,12 +58,12 @@ public class VanChartTooltipPane extends AbstractVanChartScrollPane<Chart> {
if(chart == null) {
return;
}
ConditionAttr attrList = chart.getPlot().getConditionCollection().getDefaultAttr();
AttrTooltip attrTooltip = tooltipPane.update();
DataSeriesCondition attr = ((VanChartPlot)chart.getPlot()).getAttrTooltipFromConditionCollection();
ConditionAttr attrList = chart.getPlot().getConditionCollection().getDefaultAttr();
if(attr != null) {
attrList.remove(attr);
}
AttrTooltip attrTooltip = tooltipPane.update();
if (attrTooltip != null) {
attrList.addDataSeriesCondition(attrTooltip);
}

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.general.ComparatorUtils;
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.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.server.CompatibleGeoJSONTreeHelper;
import com.fr.plugin.chart.type.MapType;
import com.fr.plugin.chart.type.ZoomLevel;
import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
@ -48,29 +49,28 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
@Override
protected void layoutContentPane() {
leftcontentPane = createContentPane();
leftcontentPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
leftcontentPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
this.add(leftcontentPane);
}
@Override
protected JPanel createContentPane() {
if(mapDataTree == null){
if (mapDataTree == null) {
mapDataTree = new MapDataTree(CompatibleGeoJSONTreeHelper.getRootNodeWithoutPara(oldGeoUrl));
mapDataTree.setRootVisible(true);
}
JPanel mapDataTreePanel = new JPanel(new BorderLayout());
mapDataTreePanel.add(mapDataTree);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f};
double[] rowSize = {p,p,p,p,p,p};
double[] rowSize = {p, p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Layer_Tree"))},
new Component[]{new JSeparator()},
new Component[]{mapDataTree},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Layer_Detail"))},
new Component[]{new JSeparator()},
new Component[]{createLayerDetailPane()}
new Component[]{createTitlePane(Inter.getLocText("Plugin-ChartF_Layer_Tree"), mapDataTreePanel)},
new Component[]{createTitlePane(Inter.getLocText("Plugin-ChartF_Layer_Detail"), createLayerDetailPane())}
};
JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
@ -79,21 +79,29 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
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() {
double p = TableLayout.PREFERRED;
double[] columnSize = {p,p,p};
double f = TableLayout.FILL;
double[] columnSize = {f, p, p};
double[] rowSize = new double[depth + 1];
detailComps = new Component[depth + 1][3];
rowSize[0] = p;
detailComps[0] = new Component[]{
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"))
};
for(int i = 0; i < depth; i++){
for (int i = 0; i < depth; i++) {
rowSize[i + 1] = p;
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);
level.setEnabled(i != 0);
UIComboBox type = new UIComboBox(TEMP.get(oldMapType));
@ -112,16 +120,16 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
public void populateBean(ChartCollection ob) {
VanChartDrillMapPlot drillMapPlot = DrillMapHelper.getDrillMapPlot(ob);
if(drillMapPlot != null) {
if (drillMapPlot != null) {
java.util.List<ZoomLevel> levelList = drillMapPlot.getLayerLevelList();
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();
oldGeoUrl = drillMapPlot.getGeoUrl();
DefaultMutableTreeNode root = CompatibleGeoJSONTreeHelper.getNodeByJSONPath(oldGeoUrl);
if(root != null){
if (root != null) {
mapDataTree.changeRootNode(root);
depth = root.getDepth() + 1;//根节点也算一层
}
@ -132,18 +140,18 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
//根据层级初始属性,一切以json那边读到的层级为准
int levelSize = levelList.size();
for(int i = levelSize; i < depth; i++){
for (int i = levelSize; i < depth; i++) {
levelList.add(ZoomLevel.AUTO);
}
MapType mapType = drillMapPlot.getMapType() == MapType.POINT ? MapType.POINT : MapType.AREA;
int typeSize = mapTypeList.size();
for(int j = typeSize; j < depth; j++){
for (int j = typeSize; j < depth; j++) {
mapTypeList.add(mapType);
}
for(int i = 0; i < depth; i++){
for (int i = 0; i < depth; i++) {
Component[] components = detailComps[i + 1];
if(components != null) {
if (components != null) {
UIComboBox level = (UIComboBox) components[1];
UIComboBox type = (UIComboBox) components[2];
if (level != null) {
@ -168,11 +176,11 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
@Override
public void updateBean(ChartCollection 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<MapType> mapTypeList = new ArrayList<MapType>();
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 type = (UIComboBox) com[2];
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){
double p = TableLayout.PREFERRED;
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};
Component[][] components = new Component[][]{
new Component[]{createToolBarPane(new double[]{p, p, p}, columnSize),null},
@ -49,16 +50,29 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
private JPanel createDrillToolsPane() {
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(){
@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) {
return new Component[][]{
new Component[]{fontNameComboBox, null},
new Component[]{buttonPane, null}
new Component[]{fontNameComboBox},
new Component[]{buttonPane}
};
}
};
backgroundPane = new VanChartBackgroundPane4DrillMap();
selectBackgroundPane = new VanChartBackgroundPane4DrillMap();
backgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow();
selectBackgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow();
catalogSuperLink = new VanChartCatalogHyperLinkPane();
double p = TableLayout.PREFERRED;
@ -75,7 +89,7 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
drillPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
JPanel panel = new JPanel(new BorderLayout());
panel.add(openOrClose, BorderLayout.NORTH);
panel.add(openOrClosePane, BorderLayout.NORTH);
panel.add(drillPane, BorderLayout.CENTER);
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));
return panel1;
}
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() {
@ -138,16 +154,4 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
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.Inter;
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.designer.TableLayout4VanChartHelper;
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.stable.Constants;
@ -119,21 +117,21 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
new Component[]{null, null},
getPaneBackgroundColor(),
getInnerPaneBackgroundColor(),
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()}
new Component[]{createRadiusPane(), null}
};
case SLOT:
return new Component[][]{
new Component[]{null, null},
getNeedleColor(),
getSlotBackgroundColor(),
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()}
new Component[]{createRadiusPane(), null}
};
case THERMOMETER:
return new Component[][]{
new Component[]{null, null},
getNeedleColor(),
getSlotBackgroundColor(),
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Radius_Set")),createRadiusPane()}
new Component[]{createRadiusPane(), null}
};
default:
return new Component[][]{
@ -142,16 +140,11 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
getHingeBackgroundColor(),
getNeedleColor(),
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() {
hingeColor = new ColorSelectBox(120);
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);
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);
checkDemosBackground();

10
designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java

@ -23,9 +23,9 @@ public class VanAreaMapPlotReportDataContentPane extends AbstractReportDataConte
public VanAreaMapPlotReportDataContentPane(ChartDataPane parent) {
initEveryPane();
initAreaName();
this.add(getContent(), "0,0,2,0");
this.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
JPanel panel = getContent();
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(panel, "0,0,2,0");
}
protected void initAreaName() {
@ -45,11 +45,11 @@ public class VanAreaMapPlotReportDataContentPane extends AbstractReportDataConte
};
}
protected Component getContent() {
protected JPanel getContent() {
return getFormulaPane();
}
protected Component getFormulaPane() {
protected JPanel getFormulaPane() {
return areaName;
}

2
designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java

@ -28,7 +28,7 @@ public class VanPointMapPlotReportDataContentPane extends VanAreaMapPlotReportDa
}
@Override
protected Component getContent() {
protected JPanel getContent() {
longLatReportFormulaPane = new LongLatReportFormulaPane();
JPanel content = new JPanel(new BorderLayout(0, 4));
content.setBorder(BorderFactory.createEmptyBorder(0, 5, 5, 0));

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

@ -93,8 +93,7 @@ public class VanChartMapPlotPane extends AbstractVanChartTypePane {
populateSourcePane(plot);
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);
checkDemosBackground();

29
designer_chart/src/com/fr/plugin/chart/map/line/VanChartLineMapEffectPane.java

@ -19,7 +19,7 @@ import java.awt.event.ItemListener;
/**
* Created by hufan on 2016/12/20.
*/
public class VanChartLineMapEffectPane extends VanChartEffectPane{
public class VanChartLineMapEffectPane extends VanChartEffectPane {
//运动方式
private JPanel typeContentPane;
@ -45,27 +45,38 @@ public class VanChartLineMapEffectPane extends VanChartEffectPane{
panel.add(periodPane, BorderLayout.CENTER);
panel.add(animationTypePane, BorderLayout.SOUTH);
panel.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0));
return panel;
}
protected void setContentPaneBorder() {
return;
}
private Component createAnimationSelectPane() {
JPanel panel = new JPanel(new BorderLayout(5, 0));
panel.add(new UILabel(Inter.getLocText("Plugin-ChartF_Animation_Type")), BorderLayout.WEST);
UILabel label1 = new UILabel(Inter.getLocText("Plugin-ChartF_Animation_Type"));
label1.setPreferredSize(new Dimension((int) TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH, 20));
panel.add(label1, BorderLayout.WEST);
panel.add(animationType, BorderLayout.CENTER);
return panel;
}
private void initTypeContentPane() {
customContentPane = new VanChartImageMarkerPane();
customContentPane = new VanChartImageMarkerPane() {
protected Dimension getImageBackgroundPreferredSize(Dimension dimension) {
return new Dimension((int) TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH, (int) dimension.getHeight());
}
};
CardLayout cardLayout = new CardLayout();
typeContentPane = new JPanel(cardLayout){
typeContentPane = new JPanel(cardLayout) {
@Override
public Dimension getPreferredSize() {
if(ComparatorUtils.equals(animationType.getSelectedItem(), LineMapAnimationType.DEFAULT)){
if (ComparatorUtils.equals(animationType.getSelectedItem(), LineMapAnimationType.DEFAULT)) {
return new Dimension((int) customContentPane.getPreferredSize().getWidth(), 0);
}else {
} else {
return customContentPane.getPreferredSize();
}
}
@ -84,15 +95,15 @@ public class VanChartLineMapEffectPane extends VanChartEffectPane{
});
}
private void checkCardLayout(){
private void checkCardLayout() {
CardLayout cardLayout = (CardLayout) typeContentPane.getLayout();
cardLayout.show(typeContentPane, LineMapAnimationType.getTypes()[animationType.getSelectedIndex()].getStringType());
cardLayout.show(typeContentPane, LineMapAnimationType.getTypes()[animationType.getSelectedIndex()].getStringType());
}
@Override
public void populateBean(AttrEffect ob) {
super.populateBean(ob);
if (ob instanceof AttrLineEffect){
if (ob instanceof AttrLineEffect) {
animationType.setSelectedItem(((AttrLineEffect) ob).getAnimationType());
customContentPane.populateBean(((AttrLineEffect) ob).getAttrMarker());
}

4
designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotReportDataContentPane.java

@ -61,7 +61,7 @@ public class MultiPiePlotReportDataContentPane extends AbstractReportDataContent
private JPanel createNorthPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize_north = {p, f};
double[] columnSize_north = {f, COMPONENT_WIDTH};
double[] rowSize_north = {p, p, p};
levelNumEdit = new UISpinner(1, 15, 1, levelNum){
@ -115,7 +115,7 @@ public class MultiPiePlotReportDataContentPane extends AbstractReportDataContent
private JPanel createCenterPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize_center = {p, f};
double[] columnSize_center = {f, COMPONENT_WIDTH};
double[] rowSize_center = new double[levelNum + 2];
initLevelNameList();

5
designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java

@ -33,6 +33,7 @@ import java.util.List;
public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPane implements UIObserver {
private static final int HT = 20;
private static final int WD = 100;
private UISpinner levelNumEdit;
private UITextField nameField;
protected UIComboBox value;
@ -83,7 +84,7 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
private JPanel createCenterPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize_center = {p, f};
double[] columnSize_center = {f, COMPONENT_WIDTH};
double[] rowSize_center = new double[levelNum + 3];
initLevelNameList();
@ -147,7 +148,7 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
private JPanel createNorthPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize_north = {p, f};
double[] columnSize_north = {f, COMPONENT_WIDTH};
double[] rowSize_north = {p, p, p};
levelNumEdit = new UISpinner(1, 15, 1, levelNum){

6
designer_chart/src/com/fr/plugin/chart/pie/RadiusCardLayoutPane.java

@ -2,7 +2,7 @@ package com.fr.plugin.chart.pie;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -24,7 +24,7 @@ public class RadiusCardLayoutPane extends BasicBeanPane<Plot> {
private static final double MIN_RADIUS = 0;
private static final double MAX_RADIUS = Double.MAX_VALUE;
private UIComboBox radiusType;//半径类型
private UIButtonGroup radiusType;//半径类型
private JPanel radiusContent;//半径的布局界面
private UISpinner radius;//半径值
@ -37,7 +37,7 @@ public class RadiusCardLayoutPane extends BasicBeanPane<Plot> {
Map<String, Component> paneList = new HashMap<String, Component>();
radiusType = new UIComboBox(new String[]{Inter.getLocText("Plugin-ChartF_Auto"), Inter.getLocText("Plugin-ChartF_Fixed_Radius")});
radiusType = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Auto"), Inter.getLocText("Plugin-ChartF_Fixed")});
radius = new UISpinner(MIN_RADIUS, MAX_RADIUS, 1, 100);
radiusContent = new JPanel(new BorderLayout());

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.general.Inter;
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.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_EndAngle")),endAngle},
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}
};
@ -71,12 +70,6 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane {
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) {
if(plot == null) {
return;

1
designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarSeriesPane.java

@ -44,7 +44,6 @@ public class VanChartRadarSeriesPane extends VanChartAbstractPlotSeriesPane {
new Component[]{getColorPane()},
new Component[]{createRadarTypePane()},
new Component[]{createBorderPane()},
new Component[]{createAlphaPane()}
};
}

7
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")});
labelFormat = new FormatPaneWithOutFont();
htmlLabelPane = new VanChartHtmlLabelPaneWithOutWidthAndHeight();
htmlLabelPane.setBorder(BorderFactory.createEmptyBorder(0, (int)TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH + TableLayout4VanChartHelper.COMPONENT_INTERVAL,0,0));
centerPane = new JPanel(new CardLayout()){
@Override
@ -50,8 +52,9 @@ public class LegendLabelFormatPane extends JPanel{
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p,f};
double[] rowSize = {p,p,p};
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Label_Format"), SwingConstants.LEFT), labelFormatStyle},

10
designer_chart/src/com/fr/plugin/chart/scatter/VanChartScatterSeriesPane.java

@ -7,9 +7,10 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.general.Inter;
import com.fr.plugin.chart.custom.component.VanChartCustomAxisConditionPane;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartLineTypePane;
import com.fr.plugin.chart.designer.style.series.VanChartAbstractPlotSeriesPane;
import com.fr.plugin.chart.designer.style.series.VanChartCustomStackAndAxisEditPane;
import com.fr.plugin.chart.designer.style.series.VanChartStackedAndAxisListControlPane;
import com.fr.plugin.chart.scatter.component.VanChartScatterLineTypePane;
import javax.swing.*;
@ -54,18 +55,19 @@ public class VanChartScatterSeriesPane extends VanChartAbstractPlotSeriesPane{
@Override
//堆积和坐标轴设置(自定义柱形图等用到)
protected JPanel createStackedAndAxisPane() {
stackAndAxisEditPane = new VanChartCustomStackAndAxisEditPane(){
stackAndAxisEditPane = new VanChartStackedAndAxisListControlPane(){
@Override
protected Class<? extends BasicBeanPane> getStackAndAxisPaneClass() {
return VanChartCustomAxisConditionPane.class;
}
@Override
protected String getPaneTitle(){
public String getPaneTitle(){
return Inter.getLocText("Plugin-ChartF_Custom_Axis");
}
};
return stackAndAxisEditPane;
stackAndAxisEditExpandablePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(stackAndAxisEditPane.getPaneTitle(), stackAndAxisEditPane);
return stackAndAxisEditExpandablePane;
}
@Override

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save