Browse Source

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

* commit '7325abe76c2a9df916f6db714d36052e56783806': (129 commits)
  REPORT-2897 9.0设计器修改 视觉验收->插入悬浮元素、超级链接弹窗选中状态时字体是白色
  修复间隔背景bug
  条件显示,超链等弹出面板整理
  REPORT-4452 [9.0一轮回归]字体设置中上标下标可以同时被选中
  无JIRA任务,合并冲突
  menu分割线 & tab选中状态
  tmp
  menu分割线 & tab选中状态
  格式
  8.0-9.0合并冲突解决
  去掉新图表超链中名字输入框
  去掉新图表超链中名字输入框
  PFC-607 插件安装删除更新不重启支持 插件模块不放到StableFactory里,保证虚拟机启动后对象一直在
  REPORT-4438 [9.0一轮回归]国际化文件中缺少key
  REPORT-4453 [9.0一轮回归]工具栏撤销按钮只能撤销一步,重做按钮无法高亮 去掉缩放保存
  REPORT-4425 [9.0一轮回归]英文设计器菜单栏有community标签
  SonarQube
  SonarQube
  换张图
  修改组合图问题
  ...
master
kerry 7 years ago
parent
commit
6302efe4bd
  1. 73
      designer/src/com/fr/design/actions/insert/flot/FormulaFloatAction.java
  2. 4
      designer/src/com/fr/design/actions/insert/flot/TextBoxFloatAction.java
  3. 1
      designer/src/com/fr/design/mainframe/AuthorityToolBarPane.java
  4. 1
      designer/src/com/fr/design/mainframe/JWorkBook.java
  5. 28
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  6. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/bigloading.gif
  7. 2
      designer/src/com/fr/design/mainframe/alphafine/search/manager/RecommendSearchManager.java
  8. 9
      designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java
  9. 2
      designer/src/com/fr/design/widget/ui/CheckBoxGroupDefinePane.java
  10. 3
      designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java
  11. 3
      designer_base/src/com/fr/design/ExtraDesignClassManager.java
  12. 1
      designer_base/src/com/fr/design/gui/UILookAndFeel.java
  13. 3
      designer_base/src/com/fr/design/gui/borders/UITextFieldBorder.java
  14. 4
      designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java
  15. 59
      designer_base/src/com/fr/design/gui/frpane/UITabbedPaneUI.java
  16. 61
      designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java
  17. 89
      designer_base/src/com/fr/design/gui/ibutton/UITabGroup.java
  18. 5
      designer_base/src/com/fr/design/gui/ilist/UINameEdList.java
  19. 1
      designer_base/src/com/fr/design/gui/imenu/UIMenuEastAttrItem.java
  20. 8
      designer_base/src/com/fr/design/gui/imenu/UIPopupMenuSeparatorUI.java
  21. 47
      designer_base/src/com/fr/design/gui/ipasswordfield/UIPassWordField.java
  22. 512
      designer_base/src/com/fr/design/gui/ispinner/UISpinner.java
  23. 22
      designer_base/src/com/fr/design/gui/itextarea/UITextArea.java
  24. 83
      designer_base/src/com/fr/design/gui/itextarea/UITextAreaUI.java
  25. 403
      designer_base/src/com/fr/design/gui/itextfield/UINumberField.java
  26. 2
      designer_base/src/com/fr/design/gui/style/FRFontPane.java
  27. 14
      designer_base/src/com/fr/design/locale/designer.properties
  28. 20
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  29. 66
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  30. 21
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  31. 11
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  32. 21
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  33. 4
      designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java
  34. 6
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  35. 10
      designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java
  36. 17
      designer_base/src/com/fr/start/StartServer.java
  37. 4
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java
  38. 13
      designer_chart/src/com/fr/design/chart/ChartTypePane.java
  39. 28
      designer_chart/src/com/fr/design/chart/javascript/ChartEmailPane.java
  40. 489
      designer_chart/src/com/fr/design/chart/series/PlotSeries/MapGroupExtensionPane.java
  41. 2
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPopAttrPane.java
  42. 2
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java
  43. 10
      designer_chart/src/com/fr/design/mainframe/chart/gui/UIEditLabel.java
  44. 155
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java
  45. 31
      designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java
  46. 16
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartDatapointLabelPane.java
  47. 42
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/UserDefinedChartTypePane.java
  48. 5
      designer_chart/src/com/fr/plugin/chart/area/VanChartAreaSeriesPane.java
  49. 111
      designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java
  50. 5
      designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomSeriesPane.java
  51. 1
      designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java
  52. 133
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartUIListControlPane.java
  53. 2
      designer_chart/src/com/fr/plugin/chart/designer/component/format/VanChartFormatPaneWithCheckBox.java
  54. 22
      designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPane.java
  55. 7
      designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPaneWithoutTooltip.java
  56. 339
      designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java
  57. 2
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrContentPane.java
  58. 20
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionListControlPane.java
  59. 17
      designer_chart/src/com/fr/plugin/chart/designer/style/background/AlertLineListControlPane.java
  60. 22
      designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java
  61. 6
      designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java
  62. 1
      designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartCustomIntervalBackgroundPane.java
  63. 20
      designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  64. 4
      designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java

73
designer/src/com/fr/design/actions/insert/flot/FormulaFloatAction.java

@ -6,24 +6,39 @@ package com.fr.design.actions.insert.flot;
import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList;
import com.fr.base.Formula;
import com.fr.design.actions.ElementCaseAction;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.formula.FormulaFactory;
import com.fr.design.formula.UIFormula;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.report.SelectImagePane;
import com.fr.general.Inter;
import com.fr.grid.Grid;
import com.fr.grid.selection.FloatSelection;
import com.fr.report.ReportHelper;
import com.fr.report.cell.FloatElement;
import com.fr.report.cell.cellattr.CellImage;
import com.fr.report.elementcase.TemplateElementCase;
import com.fr.stable.CoreGraphHelper;
import com.fr.stable.StringUtils;
import com.fr.stable.unit.FU;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.File;
/**
* Insert formula.
*/
public class FormulaFloatAction extends AbstractShapeAction {
public class FormulaFloatAction extends ElementCaseAction {
private boolean returnValue = false;
public FormulaFloatAction(ElementCasePane t) {
super(t);
this.setMenuKeySet(FLOAT_INSERT_FORMULA);
@ -49,23 +64,6 @@ public class FormulaFloatAction extends AbstractShapeAction {
}
};
/**
* 动作
*
* @param e 事件
*/
public void actionPerformed(ActionEvent e) {
ElementCasePane jws = getEditingComponent();
if (jws == null) {
return;
}
//
FloatElement floatElement = new FloatElement(new Formula(""));
this.startDraw(floatElement);
doWithDrawingFloatElement();
jws.getGrid().startEditing();
}
private void doWithDrawingFloatElement() {
ElementCasePane jws = (ElementCasePane) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getCurrentElementCasePane();
Grid grid = jws.getGrid();
@ -95,4 +93,43 @@ public class FormulaFloatAction extends AbstractShapeAction {
reportPane.setSelection(new FloatSelection(grid.getDrawingFloatElement().getName()));
}
/**
* 执行动作
*
* @return 成功返回true
*/
@Override
public boolean executeActionReturnUndoRecordNeeded() {
final ElementCasePane reportPane = (ElementCasePane) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getCurrentElementCasePane();
if (reportPane == null) {
return false;
}
reportPane.stopEditing();
final FloatElement floatElement = new FloatElement();
final UIFormula formulaPane = FormulaFactory.createFormulaPane();
formulaPane.populate(new Formula(StringUtils.EMPTY));
BasicDialog dialog = formulaPane.showLargeWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override
public void doOk() {
floatElement.setValue(formulaPane.update());
if (reportPane == null) {
return;
}
reportPane.getGrid().setDrawingFloatElement(floatElement);
doWithDrawingFloatElement();
returnValue = true;
}
@Override
public void doCancel() {
returnValue = false;
}
});
dialog.setVisible(true);
return returnValue;
}
}

4
designer/src/com/fr/design/actions/insert/flot/TextBoxFloatAction.java

@ -54,6 +54,7 @@ public class TextBoxFloatAction extends AbstractShapeAction {
*
* @param e 动作
*/
@Override
public void actionPerformed(ActionEvent e) {
ElementCasePane jws = getEditingComponent();
if (jws == null) {
@ -67,7 +68,7 @@ public class TextBoxFloatAction extends AbstractShapeAction {
private void doWithDrawingFloatElement() {
ElementCasePane jws = (ElementCasePane) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getCurrentElementCasePane();
;
Grid grid = jws.getGrid();
ElementCasePane reportPane = grid.getElementCasePane();
@ -93,5 +94,6 @@ public class TextBoxFloatAction extends AbstractShapeAction {
report.addFloatElement(grid.getDrawingFloatElement());
reportPane.setSelection(new FloatSelection(grid.getDrawingFloatElement().getName()));
reportPane.fireTargetModified();
}
}

1
designer/src/com/fr/design/mainframe/AuthorityToolBarPane.java

@ -238,7 +238,6 @@ public class AuthorityToolBarPane<T extends WebContent> extends BasicBeanPane<Re
dealWithWebContent(webAttr.getWebView(), widget, isSelected, selectedRole);
}
}
}
private void dealWithWebContent(WebContent wc, Widget widget, boolean isSelected, String selectedRole) {

1
designer/src/com/fr/design/mainframe/JWorkBook.java

@ -399,7 +399,6 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setJTemplateResolution(resolution);
polyDezi.updateUI();
}
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified();
}
@Override

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

@ -670,6 +670,8 @@ public class AlphaFineDialog extends UIDialog {
searchTextField.setText(null);
removeSearchResult();
}
} else if (e.getKeyCode() == KeyEvent.VK_ENTER) {
dealWithSearchResult(searchResultList.getSelectedValue());
}
}
});
@ -694,6 +696,15 @@ public class AlphaFineDialog extends UIDialog {
}
/**
* 处理搜索结果
* @param selectedValue
*/
private void dealWithSearchResult(AlphaCellModel selectedValue) {
doNavigate();
saveLocalHistory(selectedValue);
}
/**
* 当鼠标在搜索界面边界外点击时触发
*/
@ -725,6 +736,9 @@ public class AlphaFineDialog extends UIDialog {
//不处理
}
/**
* 导航到结果页面
*/
private void doNavigate() {
AlphaFineDialog.this.dispose();
final AlphaCellModel model = searchResultList.getSelectedValue();
@ -732,15 +746,15 @@ public class AlphaFineDialog extends UIDialog {
}
/**
* 保存本地本地常用
* 保存结果到本地本地常用
*
* @param cellModel
*/
private void saveHistory(AlphaCellModel cellModel) {
private void saveLocalHistory(AlphaCellModel cellModel) {
RecentSearchManager recentSearchManager = RecentSearchManager.getRecentSearchManger();
recentSearchManager.addRecentModel(storeText, cellModel);
recentSearchManager.saveXMLFile();
sendToServer(storeText, cellModel);
sendDataToServer(storeText, cellModel);
}
@ -750,7 +764,7 @@ public class AlphaFineDialog extends UIDialog {
* @param searchKey
* @param cellModel
*/
private void sendToServer(String searchKey, AlphaCellModel cellModel) {
private void sendDataToServer(String searchKey, AlphaCellModel cellModel) {
if (cellModel.isNeedToSendToServer()) {
String username = ConfigManager.getProviderInstance().getBbsUsername();
String uuid = DesignerEnvManager.getEnvManager().getUUID();
@ -908,8 +922,7 @@ public class AlphaFineDialog extends UIDialog {
@Override
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
doNavigate();
saveHistory(getSelectedValue());
dealWithSearchResult(getSelectedValue());
} else if (e.getKeyCode() == KeyEvent.VK_UP) {
if (getSelectedIndex() == 1) {
searchTextField.requestFocus();
@ -926,8 +939,7 @@ public class AlphaFineDialog extends UIDialog {
int selectedIndex = getSelectedIndex();
AlphaCellModel selectedValue = getSelectedValue();
if (e.getClickCount() == 2 && selectedValue.hasAction()) {
doNavigate();
saveHistory(selectedValue);
dealWithSearchResult(selectedValue);
} else if (e.getClickCount() == 1) {
if (selectedValue instanceof MoreModel && ((MoreModel) selectedValue).isNeedMore()) {
dealWithMoreOrLessResult(selectedIndex, (MoreModel) selectedValue);

BIN
designer/src/com/fr/design/mainframe/alphafine/images/bigloading.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 19 KiB

2
designer/src/com/fr/design/mainframe/alphafine/search/manager/RecommendSearchManager.java

@ -16,6 +16,7 @@ import com.fr.json.JSONArray;
import com.fr.json.JSONException;
import com.fr.json.JSONObject;
import com.fr.stable.CodeUtils;
import com.fr.stable.StringUtils;
import java.util.Iterator;
import java.util.List;
@ -37,6 +38,7 @@ public class RecommendSearchManager implements AlphaFineSearchProcessor {
@Override
public synchronized SearchResult getLessSearchResult(String searchText) {
searchText = searchText.replaceAll(StringUtils.BLANK, StringUtils.EMPTY);
this.modelList = new SearchResult();
this.recommendModelList = new SearchResult();
if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isContainRecommend()) {

9
designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java

@ -6,15 +6,12 @@ import com.fr.base.Style;
import com.fr.design.actions.utils.ReportActionUtils;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.MultiTabPane;
import com.fr.design.gui.ibutton.FiveButtonLayout;
import com.fr.design.gui.style.*;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.style.BorderUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.stable.Constants;
import javax.swing.*;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.util.ArrayList;
@ -41,7 +38,7 @@ public class CustomStylePane extends MultiTabPane<Style> {
super();
tabPane.setOneLineTab(true);
tabPane.setDrawLine(false);
tabPane.setLayout(new FiveButtonLayout(1));
tabPane.setLayout(new GridLayout(1, 3, 0, 0));
}
public static void main(String[] args) {
@ -164,8 +161,6 @@ public class CustomStylePane extends MultiTabPane<Style> {
*
*/
public void updateBean(Style ob) {
return;
}
}

2
designer/src/com/fr/design/widget/ui/CheckBoxGroupDefinePane.java

@ -36,7 +36,7 @@ public class CheckBoxGroupDefinePane extends FieldEditorDefinePane<CheckBoxGroup
@Override
protected JPanel setFirstContentPane() {
JPanel advancePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
checkbox = new UICheckBox(Inter.getLocText(new String[]{"Provide", "Choose_All"}));
checkbox = new UICheckBox(Inter.getLocText("FR-Designer_Advanced"));
checkbox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
buttonGroupDictPane = new ButtonGroupDictPane();
checkBoxDictPane = new CheckBoxDictPane();

3
designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java

@ -74,7 +74,6 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor>
return content;
}
public JPanel setValidatePane() {
initListeners();
@ -101,7 +100,7 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor>
this.setMinValueCheckBox.addActionListener(setMinListener);
this.minValueSpinner.addChangeListener(minValueChangeListener);
UILabel numberLabel = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Double", "Numbers"}));
UILabel numberLabel = new UILabel(Inter.getLocText("FR-Designer_Decimal_Places"));
limitNumberPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{numberLabel, decimalLength}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7);
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;

3
designer_base/src/com/fr/design/ExtraDesignClassManager.java

@ -25,7 +25,6 @@ import com.fr.plugin.AbstractExtraClassManager;
import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.injectable.PluginSingleInjection;
import com.fr.plugin.solution.closeable.CloseableContainedSet;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.plugin.ExtraDesignClassManagerProvider;
import java.util.ArrayList;
@ -52,7 +51,7 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement
}
static {
StableFactory.registerMarkedObject(PluginModule.ExtraDesign.getAgentName(), classManager);
PluginModule.registerAgent(PluginModule.ExtraDesign, classManager);
}
public TableDataNameObjectCreator[] getReportTableDataCreators() {

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

@ -171,6 +171,7 @@ public class UILookAndFeel extends MetalLookAndFeel {
table.put("FormattedTextField.border", new UITextFieldBorder());
table.put("TextField.border", new UITextFieldBorder());
table.put("PasswordField.border", new UITextFieldBorder());
table.put("TextArea.border", new UITextFieldBorder());
}

3
designer_base/src/com/fr/design/gui/borders/UITextFieldBorder.java

@ -4,6 +4,7 @@
package com.fr.design.gui.borders;
import com.fr.design.constants.UIConstants;
import com.fr.design.utils.DrawRoutines;
import com.fr.design.utils.ThemeUtils;
@ -54,7 +55,7 @@ public class UITextFieldBorder extends AbstractBorder implements UIResource {
g, ThemeUtils.TEXT_BORDER_DISABLED_COLOR, x, y, w, h);
} else {
DrawRoutines.drawBorder(
g, ThemeUtils.TEXT_BORDER_COLOR, x, y, w, h);
g, UIConstants.POP_DIALOG_BORDER, x, y, w, h);
}
}
}

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

@ -132,6 +132,10 @@ public abstract class UIListControlPane extends UIControlPane {
protected void doAfterLostFocus() {
UIListControlPane.this.updateControlUpdatePane();
}
@Override
protected void doAfterStopEditing() {
saveSettings();
}
};
nameEdList.setCellRenderer(new UINameableListCellRenderer(this));
return nameEdList;

59
designer_base/src/com/fr/design/gui/frpane/UITabbedPaneUI.java

@ -9,7 +9,9 @@ import javax.swing.*;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicTabbedPaneUI;
import java.awt.*;
import java.awt.event.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
/**
* Coder: Sean
@ -30,10 +32,11 @@ public class UITabbedPaneUI extends BasicTabbedPaneUI {
private int addY = -1;
private int rollover = -1;
private Color tabBorderColor = new Color(143, 160, 183);
private Color[] tabSelectedColor = {UIConstants.NORMAL_BLUE, new Color(187, 142, 33), new Color(214, 191, 137)};
private Color[] tabSelectedColor = {UIConstants.NORMAL_BLUE, UIConstants.NORMAL_BLUE, UIConstants.NORMAL_BLUE};
/**
* 创建UI对象
*
* @param c 容器
* @return 返回UI对象
*/
@ -47,8 +50,9 @@ public class UITabbedPaneUI extends BasicTabbedPaneUI {
protected void installListeners() {
super.installListeners();
tabPane.addMouseMotionListener(
(MouseMotionListener)mouseListener);
(MouseMotionListener) mouseListener);
}
protected MouseListener createMouseListener() {
return new UIMouseHandler();
}
@ -56,6 +60,7 @@ public class UITabbedPaneUI extends BasicTabbedPaneUI {
public class UIMouseHandler implements MouseListener, MouseMotionListener {
/**
* 鼠标按下
*
* @param e 事件
*/
public void mousePressed(MouseEvent e) {
@ -63,14 +68,14 @@ public class UITabbedPaneUI extends BasicTabbedPaneUI {
return;
}
int x = e.getX(), y = e.getY();
if (addX!= -1 && isMouseInAdd(x, y)){
if (addX != -1 && isMouseInAdd(x, y)) {
addBtn = ADD_CLICK;
tabPane.repaint();
}
int tabIndex = getTabAtLocation(x, y);
if (tabIndex >= 0 && tabPane.isEnabledAt(tabIndex)) {
if (canClose() && isMouseInClose(x, y)) {
((UITabbedPane)tabPane).doRemoveTab(tabIndex);
((UITabbedPane) tabPane).doRemoveTab(tabIndex);
} else if (tabIndex != tabPane.getSelectedIndex()) {
tabPane.setSelectedIndex(tabIndex);
} else if (tabPane.isRequestFocusEnabled()) {
@ -81,12 +86,15 @@ public class UITabbedPaneUI extends BasicTabbedPaneUI {
/**
* 鼠标进入
*
* @param e 事件
*/
public void mouseEntered(MouseEvent e) {}
public void mouseEntered(MouseEvent e) {
}
/**
* 鼠标离开
*
* @param e 事件
*/
public void mouseExited(MouseEvent e) {
@ -101,36 +109,42 @@ public class UITabbedPaneUI extends BasicTabbedPaneUI {
/**
* 鼠标点击
*
* @param e 事件
*/
public void mouseClicked(MouseEvent e) {}
public void mouseClicked(MouseEvent e) {
}
/**
* 鼠标释放
*
* @param e 事件
*/
public void mouseReleased(MouseEvent e) {
if (addX!= -1 && isMouseInAdd(e.getX(),e.getY())){
String classpath = ((UITabbedPane)tabPane).getClassPath();
String tabName = ((UITabbedPane)tabPane).getTabName();
if (addX != -1 && isMouseInAdd(e.getX(), e.getY())) {
String classpath = ((UITabbedPane) tabPane).getClassPath();
String tabName = ((UITabbedPane) tabPane).getTabName();
try {
addBtn = ADD_NORMAL;
tabPane.addTab(tabName,
(Component) GeneralUtils.classForName(classpath).newInstance());
} catch (Exception ex) {
FRLogger.getLogger().error(ex.getMessage(),ex);
FRLogger.getLogger().error(ex.getMessage(), ex);
}
}
}
/**
* 鼠标拖拽
*
* @param e 事件
*/
public void mouseDragged(MouseEvent e) {}
public void mouseDragged(MouseEvent e) {
}
/**
* 鼠标移动
*
* @param e 事件
*/
public void mouseMoved(MouseEvent e) {
@ -144,7 +158,7 @@ public class UITabbedPaneUI extends BasicTabbedPaneUI {
if (addX != -1 && isMouseInAdd(x, y)) {
addBtn = ADD_OVER;
tabPane.repaint();
}else if(addBtn != ADD_NORMAL){
} else if (addBtn != ADD_NORMAL) {
addBtn = ADD_NORMAL;
tabPane.repaint();
}
@ -154,31 +168,34 @@ public class UITabbedPaneUI extends BasicTabbedPaneUI {
/**
* 判断鼠标是否在添加按钮上
*
* @param x 鼠标坐标x
* @param y 鼠标坐标y
* @return 返回鼠标是否在添加按钮上
*/
private boolean isMouseInAdd(int x, int y){
int addWidth = addBtn.getIconWidth(),addHeight = addBtn.getIconHeight();
private boolean isMouseInAdd(int x, int y) {
int addWidth = addBtn.getIconWidth(), addHeight = addBtn.getIconHeight();
return x >= addX && x <= addX + addWidth && y > addY && y <= addY + addHeight;
}
/**
* 判断鼠标是否在关闭按钮上
*
* @param x 鼠标坐标x
* @param y 鼠标坐标y
* @return 返回鼠标是否在关闭按钮上
*/
private boolean isMouseInClose(int x, int y){
int closeWidth = closeIcon.getIconWidth(),closeHeight = closeIcon.getIconHeight();
private boolean isMouseInClose(int x, int y) {
int closeWidth = closeIcon.getIconWidth(), closeHeight = closeIcon.getIconHeight();
return x >= closeX && x <= closeX + closeWidth && y > closeY && y <= closeY + closeHeight;
}
/**
* 如果tab只剩下最后一个则不画删除按钮
*
* @return 返回当前tab还可否关闭
*/
private boolean canClose(){
private boolean canClose() {
return tabPane.getTabCount() > 1 && ((UITabbedPane) tabPane).isClosable();
}
@ -238,7 +255,7 @@ public class UITabbedPaneUI extends BasicTabbedPaneUI {
drawUITabBorder(g, tabBorderColor, x, y, w, h, tabPlacement);
} else if (isSelected || isRollover) {
drawSelectedUITabBorder(g, tabBorderColor, x, y, w, h, tabPlacement);
if(isRollover && canClose()){
if (isRollover && canClose()) {
closeX = x + w - closeIcon.getIconWidth() - 3;
closeY = 0;
switch (tabPlacement) {
@ -258,6 +275,7 @@ public class UITabbedPaneUI extends BasicTabbedPaneUI {
/**
* 更新界面
*
* @param g
* @param c
*/
@ -427,5 +445,6 @@ public class UITabbedPaneUI extends BasicTabbedPaneUI {
}
}
protected class UITabbedPaneLayout extends TabbedPaneLayout {}
protected class UITabbedPaneLayout extends TabbedPaneLayout {
}
}

61
designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java

@ -7,6 +7,7 @@ import com.fr.design.event.GlobalNameObserver;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.border.Border;
@ -28,7 +29,7 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
protected int selectedIndex = -1;
private List<T> objectList;// 起到一个render的作用
private GlobalNameListener globalNameListener = null;
private String buttonGroupName = "";
private String buttonGroupName = StringUtils.EMPTY;
private boolean isToolBarComponent = false;
private boolean isClick;
@ -179,34 +180,6 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
g2d.setClip(oldClip);
}
/**
* 重载Border画法
*
* @param g
*/
@Override
protected void paintBorder(Graphics g) {
if (isToolBarComponent) {
return;
}
Graphics2D g2d = (Graphics2D) g;
g2d.setColor(UIConstants.SHADOW_GREY);
int width = 0;
for (int i = 0; i < labelButtonList.size() - 1; i++) {
width += labelButtonList.get(i).getWidth() + 1;
int height = labelButtonList.get(i).getHeight();
g.drawLine(width, 0, width, height);
}
width += labelButtonList.get(labelButtonList.size() - 1).getWidth() + 1;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.drawRoundRect(0, 0, width, getHeight() - 1, UIConstants.BUTTON_GROUP_ARC, UIConstants.BUTTON_GROUP_ARC);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
}
/**
* setSelectedItem
*
@ -369,21 +342,21 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
* @param args
*/
public static void main(String... args) {
JFrame jf = new JFrame("test");
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel content = (JPanel) jf.getContentPane();
content.setLayout(new BorderLayout());
Icon[] a1 = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")};
Integer[] a2 = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT};
UIButtonGroup<Integer> bb = new UIButtonGroup<Integer>(a1, a2);
bb.setBounds(20, 20, bb.getPreferredSize().width, bb.getPreferredSize().height);
bb.setSelectedIndex(0);
bb.setEnabled(false);
content.add(bb);
GUICoreUtils.centerWindow(jf);
jf.setSize(400, 400);
jf.setVisible(true);
// JFrame jf = new JFrame("test");
// jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// JPanel content = (JPanel) jf.getContentPane();
// content.setLayout(new BorderLayout());
// Icon[] a1 = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"),
// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")};
// Integer[] a2 = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT};
// UIButtonGroup<Integer> bb = new UIButtonGroup<Integer>(a1, a2);
// bb.setBounds(20, 20, bb.getPreferredSize().width, bb.getPreferredSize().height);
// bb.setSelectedIndex(0);
// bb.setEnabled(false);
// content.add(bb);
// GUICoreUtils.centerWindow(jf);
// jf.setSize(400, 400);
// jf.setVisible(true);
}

89
designer_base/src/com/fr/design/gui/ibutton/UITabGroup.java

@ -1,12 +1,8 @@
package com.fr.design.gui.ibutton;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.*;
import javax.swing.border.Border;
import com.fr.design.constants.UIConstants;
import java.awt.*;
public class UITabGroup extends UIButtonGroup<Integer> {
private boolean isOneLineTab = false;
@ -22,7 +18,7 @@ public class UITabGroup extends UIButtonGroup<Integer> {
* @param index 序号
*/
public void tabChanged(int index) {
return;
}
public UITabGroup(Icon[] iconArray) {
@ -46,83 +42,6 @@ public class UITabGroup extends UIButtonGroup<Integer> {
}
}
@Override
protected void paintBorder(Graphics g) {
Graphics2D g2d = (Graphics2D) g;
g2d.setColor(UIConstants.LINE_COLOR);
if (!isTwoLine()) {
int width = isDrawLine ? ORIGINAL_WIDTH : 0;
for (int i = 0; i < labelButtonList.size() - 1; i++) {
width += labelButtonList.get(i).getWidth() + 1;
int height = labelButtonList.get(i).getHeight();
g.drawLine(width, 0, width, height);
}
width += labelButtonList.get(labelButtonList.size() - 1).getWidth() + 1;
if (isDrawLine) {
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.drawRoundRect(ORIGINAL_WIDTH, 0, width - ORIGINAL_WIDTH, getHeight() - 1, UIConstants.ARC, UIConstants.ARC);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
} else {
g2d.drawRect(0, 0, width, getHeight() - 1);
}
} else if (labelButtonList.size() % 2 != 0) {
paintOddNumberButtons(g, g2d);
} else {
int width = ORIGINAL_WIDTH;
int number = labelButtonList.size() / 2;
for (int i = 0; i < number - 1; i++) {
width += labelButtonList.get(i).getWidth() + 1;
int height = labelButtonList.get(i).getHeight() * 2 + 1;
g.drawLine(width, 0, width, height);
}
width += labelButtonList.get(number - 1).getWidth() + 1;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.drawRoundRect(ORIGINAL_WIDTH, 0, width - ORIGINAL_WIDTH, getHeight() - 1, UIConstants.ARC, UIConstants.ARC);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
}
if (isDrawLine) {
g2d.drawLine(0, getHeight() / 2, getWidth(), getHeight() / 2);
}
}
private void paintOddNumberButtons(Graphics g, Graphics2D g2d) {
int width = ORIGINAL_WIDTH;
int buttonHeight = labelButtonList.get(0).getHeight();
int upButtonCount = labelButtonList.size() / 2 + 1;
for (int i = 0; i < upButtonCount - 1; i++) {
width += labelButtonList.get(i).getWidth() + 1;
int height = labelButtonList.get(i).getHeight() + 1;
g.drawLine(width, 0, width, height);
}
width += labelButtonList.get(upButtonCount - 1).getWidth() + 1;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.drawRoundRect(ORIGINAL_WIDTH, 0, width - ORIGINAL_WIDTH, buttonHeight + 1, UIConstants.ARC, UIConstants.ARC);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
int line2X = labelButtonList.get(upButtonCount).getX();
int line2Y = labelButtonList.get(upButtonCount).getY();
width = line2X;
width += labelButtonList.get(upButtonCount).getWidth();
int height = labelButtonList.get(upButtonCount).getHeight() + 1;
g.drawLine(width, line2Y, width, line2Y + height);
for (int i = upButtonCount + 1; i < labelButtonList.size() - 1; i++) {
width += labelButtonList.get(i).getWidth() + 1;
height = labelButtonList.get(i).getHeight() + 1;
g.drawLine(width, line2Y, width, line2Y + height);
}
width += labelButtonList.get(upButtonCount).getWidth() + 1;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.drawRoundRect(line2X - 1, line2Y, width - line2X + 1, buttonHeight, UIConstants.ARC, UIConstants.ARC);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
}
protected boolean isTwoLine() {
return labelButtonList.size() >= BUTTON_NUMBER && !isOneLineTab;
}
public void setOneLineTab(boolean isOneLineTab) {
this.isOneLineTab = isOneLineTab;
}
@ -138,7 +57,7 @@ public class UITabGroup extends UIButtonGroup<Integer> {
@Override
protected Border getGroupBorder() {
if (!isDrawLine) {
return BorderFactory.createEmptyBorder(1, 1, 1, 1);
return BorderFactory.createEmptyBorder(0, 0, 0, 0);
}
return BorderFactory.createEmptyBorder(1, GAP, 1, GAP);
}

5
designer_base/src/com/fr/design/gui/ilist/UINameEdList.java

@ -312,9 +312,14 @@ public class UINameEdList extends UIList implements CellEditorListener {
String name = StringUtils.isBlank(value.toString()) ? oldName : value.toString();
setNameAt(name, editingIndex);
removeComp();
doAfterStopEditing();
}
}
protected void doAfterStopEditing() {
// default: do nothing
}
public String[] getAllNames() {
int length = this.getModel().getSize();
String[] names = new String[length];

1
designer_base/src/com/fr/design/gui/imenu/UIMenuEastAttrItem.java

@ -95,6 +95,7 @@ public class UIMenuEastAttrItem extends JMenuItem {
fm.getAscent() - 1);
}
} else {
menuItem.setForeground(isArmed() ? Color.white : Color.black);
SwingUtilities2.drawStringUnderlineCharAt(menuItem, g, text,
-1, 0, textRect.y + fm.getAscent());
}

8
designer_base/src/com/fr/design/gui/imenu/UIPopupMenuSeparatorUI.java

@ -1,8 +1,9 @@
package com.fr.design.gui.imenu;
import com.fr.design.constants.UIConstants;
import javax.swing.*;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.metal.MetalSeparatorUI;
import java.awt.*;
@ -22,10 +23,7 @@ public class UIPopupMenuSeparatorUI extends MetalSeparatorUI {
public void paint(Graphics g, JComponent c) {
Dimension s = c.getSize();
g.setColor(new ColorUIResource(255, 255, 255));
g.fillRect(0, 0, s.width, s.height);
g.setColor(new ColorUIResource(173, 170, 153));
g.setColor(UIConstants.FONT_COLOR);
g.drawLine(2, 1, s.width - 3, 1);
}
}

47
designer_base/src/com/fr/design/gui/ipasswordfield/UIPassWordField.java

@ -1,8 +1,13 @@
package com.fr.design.gui.ipasswordfield;
import com.fr.design.constants.UIConstants;
import javax.swing.*;
import javax.swing.text.Document;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
/**
* Created with IntelliJ IDEA.
@ -12,24 +17,56 @@ import javax.swing.text.Document;
* To change this template use File | Settings | File Templates.
*/
public class UIPassWordField extends JPasswordField {
private boolean isRollOver;
public UIPassWordField () {
public UIPassWordField() {
super();
addRollOverListener();
}
public UIPassWordField (String text) {
public UIPassWordField(String text) {
super(text);
addRollOverListener();
}
public UIPassWordField (int columns) {
public UIPassWordField(int columns) {
super(columns);
addRollOverListener();
}
public UIPassWordField (String text, int columns) {
public UIPassWordField(String text, int columns) {
super(text, columns);
addRollOverListener();
}
public UIPassWordField (Document doc, String txt, int columns) {
public UIPassWordField(Document doc, String txt, int columns) {
super(doc, txt, columns);
addRollOverListener();
}
private void addRollOverListener() {
this.addMouseListener(new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent e) {
isRollOver = true;
UIPassWordField.this.repaint();
}
@Override
public void mouseExited(MouseEvent e) {
isRollOver = false;
UIPassWordField.this.repaint();
}
});
}
@Override
protected void paintBorder(Graphics g) {
if (isRollOver && this.isEnabled()) {
g.setColor(UIConstants.TEXT_FILED_BORDER_SELECTED);
g.drawRect(0, 0, getWidth() - 1, getHeight() - 1);
} else {
super.paintBorder(g);
}
}
}

512
designer_base/src/com/fr/design/gui/ispinner/UISpinner.java

@ -1,17 +1,5 @@
package com.fr.design.gui.ispinner;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.RoundRectangle2D;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.text.JTextComponent;
import com.fr.design.constants.UIConstants;
import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver;
@ -19,185 +7,195 @@ import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UITextFieldUI;
import com.fr.stable.Constants;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.GUIPaintUtils;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import java.awt.*;
import java.awt.event.*;
public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver {
protected double value;
private static final int SIZE = 20;
private static final int LEN = 13;
private UINumberField textField;
private UIButton preButton;
private UIButton nextButton;
private double minValue;
private double maxValue;
private double dierta;
private String spinnerName = "";
private UIObserverListener uiObserverListener;
private GlobalNameListener globalNameListener = null;
public UISpinner(double minValue, double maxValue, double dierta) {
this.minValue = minValue;
this.maxValue = maxValue;
this.dierta = dierta;
initComponents();
iniListener();
}
public UISpinner(double minValue, double maxValue, double dierta, double defaultValue) {
this(minValue, maxValue, dierta);
textField.setValue(defaultValue);
}
private void iniListener() {
if (shouldResponseChangeListener()) {
this.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
if (uiObserverListener == null) {
return;
}
uiObserverListener.doChange();
}
});
}
}
/**
* 给组件分别加上FocusListener
* @param focusListener 监听事件
*/
public void addUISpinnerFocusListenner(FocusListener focusListener) {
this.addFocusListener(focusListener);
this.textField.addFocusListener(focusListener);
this.preButton.addFocusListener(focusListener);
this.nextButton.addFocusListener(focusListener);
}
public double getValue() {
return value;
}
public void setGlobalName(String name) {
spinnerName = name;
}
public UINumberField getTextField() {
return textField;
}
public void setValue(double value) {
if (globalNameListener != null && shouldResponseNameListener()) {
globalNameListener.setGlobalName(spinnerName);
}
value = value < minValue ? minValue : value;
value = value > maxValue ? maxValue : value;
if (value == this.value) {
return;
}
this.value = value;
textField.getDocument().removeDocumentListener(docListener);
textField.setValue(value);
textField.getDocument().addDocumentListener(docListener);
fireStateChanged();
}
public void setTextFieldValue(double value) {
if (globalNameListener != null && shouldResponseNameListener()) {
globalNameListener.setGlobalName(spinnerName);
}
value = value < minValue ? minValue : value;
value = value > maxValue ? maxValue : value;
if (value == this.value) {
return;
}
this.value = value;
fireStateChanged();
}
public void setEnabled(boolean flag) {
super.setEnabled(flag);
this.textField.setEnabled(flag);
this.preButton.setEnabled(flag);
this.nextButton.setEnabled(flag);
}
@Override
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.height = SIZE;
return dim;
}
/**
*增加 a <code>ChangeListener</code> to the listener list.
* @param l 监听事件
*/
public void addChangeListener(ChangeListener l) {
this.listenerList.add(ChangeListener.class, l);
}
/**
*移除 a <code>ChangeListener</code> from the listener list.
* @param l 监听事件
*/
public void removeChangeListener(ChangeListener l) {
this.listenerList.remove(ChangeListener.class, l);
}
// august: Process the listeners last to first
protected void fireStateChanged() {
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == ChangeListener.class) {
((ChangeListener) listeners[i + 1]).stateChanged(new ChangeEvent(this));
}
}
}
private void initComponents() {
textField = initNumberField();
textField.setMaxValue(maxValue);
textField.setMinValue(minValue);
setValue(value);
textField.setUI(new SpinnerTextFieldUI(textField));
preButton = new UIButton(UIConstants.ARROW_UP_ICON){
protected double value;
private static final int SIZE = 20;
private static final int LEN = 13;
private static final int WIDTH = 13;
private static final int HEIGHT = 10;
private UINumberField textField;
private UIButton preButton;
private UIButton nextButton;
private double minValue;
private double maxValue;
private double dierta;
private String spinnerName = StringUtils.EMPTY;
private UIObserverListener uiObserverListener;
private GlobalNameListener globalNameListener = null;
public UISpinner(double minValue, double maxValue, double dierta) {
this.minValue = minValue;
this.maxValue = maxValue;
this.dierta = dierta;
initComponents();
iniListener();
}
public UISpinner(double minValue, double maxValue, double dierta, double defaultValue) {
this(minValue, maxValue, dierta);
textField.setValue(defaultValue);
}
private void iniListener() {
if (shouldResponseChangeListener()) {
this.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
if (uiObserverListener == null) {
return;
}
uiObserverListener.doChange();
}
});
}
}
/**
* 给组件分别加上FocusListener
*
* @param focusListener 监听事件
*/
public void addUISpinnerFocusListenner(FocusListener focusListener) {
this.addFocusListener(focusListener);
this.textField.addFocusListener(focusListener);
this.preButton.addFocusListener(focusListener);
this.nextButton.addFocusListener(focusListener);
}
public double getValue() {
return value;
}
public void setGlobalName(String name) {
spinnerName = name;
}
public UINumberField getTextField() {
return textField;
}
public void setValue(double value) {
if (globalNameListener != null && shouldResponseNameListener()) {
globalNameListener.setGlobalName(spinnerName);
}
value = value < minValue ? minValue : value;
value = value > maxValue ? maxValue : value;
if (value == this.value) {
return;
}
this.value = value;
textField.getDocument().removeDocumentListener(docListener);
textField.setValue(value);
textField.getDocument().addDocumentListener(docListener);
fireStateChanged();
}
public void setTextFieldValue(double value) {
if (globalNameListener != null && shouldResponseNameListener()) {
globalNameListener.setGlobalName(spinnerName);
}
value = value < minValue ? minValue : value;
value = value > maxValue ? maxValue : value;
if (value == this.value) {
return;
}
this.value = value;
fireStateChanged();
}
public void setEnabled(boolean flag) {
super.setEnabled(flag);
this.textField.setEnabled(flag);
this.preButton.setEnabled(flag);
this.nextButton.setEnabled(flag);
}
@Override
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.height = SIZE;
return dim;
}
/**
* 增加 a <code>ChangeListener</code> to the listener list.
*
* @param l 监听事件
*/
public void addChangeListener(ChangeListener l) {
this.listenerList.add(ChangeListener.class, l);
}
/**
* 移除 a <code>ChangeListener</code> from the listener list.
*
* @param l 监听事件
*/
public void removeChangeListener(ChangeListener l) {
this.listenerList.remove(ChangeListener.class, l);
}
// august: Process the listeners last to first
protected void fireStateChanged() {
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == ChangeListener.class) {
((ChangeListener) listeners[i + 1]).stateChanged(new ChangeEvent(this));
}
}
}
private void initComponents() {
textField = initNumberField();
textField.setMaxValue(maxValue);
textField.setMinValue(minValue);
setValue(value);
preButton = new UIButton(UIConstants.ARROW_UP_ICON) {
public boolean shouldResponseChangeListener() {
return false;
}
};
preButton.setRoundBorder(true, Constants.LEFT);
nextButton = new UIButton(UIConstants.ARROW_DOWN_ICON) {
preButton.setRoundBorder(true, Constants.LEFT);
nextButton = new UIButton(UIConstants.ARROW_DOWN_ICON) {
public boolean shouldResponseChangeListener() {
return false;
}
};
nextButton.setRoundBorder(true, Constants.LEFT);
setLayout(new BorderLayout());
add(textField, BorderLayout.CENTER);
JPanel arrowPane = new JPanel();
arrowPane.setPreferredSize(new Dimension(LEN, SIZE));
arrowPane.setLayout(new GridLayout(2, 1));
preButton.setBounds(0, 1, 13, 10);
nextButton.setBounds(0, 10, 13, 10);
arrowPane.add(preButton);
arrowPane.add(nextButton);
add(arrowPane, BorderLayout.EAST);
nextButton.setRoundBorder(true, Constants.LEFT);
setLayout(new BorderLayout());
add(textField, BorderLayout.CENTER);
JPanel arrowPane = new JPanel();
arrowPane.setPreferredSize(new Dimension(LEN, SIZE));
arrowPane.setLayout(new GridLayout(2, 1));
preButton.setBounds(0, 1, WIDTH, HEIGHT);
nextButton.setBounds(0, HEIGHT, WIDTH, HEIGHT);
arrowPane.add(preButton);
arrowPane.add(nextButton);
add(arrowPane, BorderLayout.EAST);
componentInitListeners();
}
}
private void componentInitListeners(){
private void componentInitListeners() {
preButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -219,7 +217,7 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver
}
}
});
textField.getDocument().removeDocumentListener(docListener);
textField.getDocument().removeDocumentListener(docListener);
textField.getDocument().addDocumentListener(docListener);
textField.addFocusListener(new FocusAdapter() {
@Override
@ -229,123 +227,85 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver
});
}
protected UINumberField initNumberField() {
return new UINumberField(2) {
public boolean shouldResponseChangeListener() {
return false;
}
};
}
private DocumentListener docListener = new DocumentListener() {
@Override
public void removeUpdate(DocumentEvent e) {
setTextFieldValue(textField.getValue());
}
@Override
public void insertUpdate(DocumentEvent e) {
setTextFieldValue(textField.getValue());
}
@Override
public void changedUpdate(DocumentEvent e) {
setTextFieldValue(textField.getValue());
}
};
/**
* 给组件登记一个观察者监听事件
* @param listener 观察者监听事件
*/
public void registerChangeListener(UIObserverListener listener) {
uiObserverListener = listener;
}
protected UINumberField initNumberField() {
return new UINumberField(2) {
public boolean shouldResponseChangeListener() {
return false;
}
};
}
private DocumentListener docListener = new DocumentListener() {
@Override
public void removeUpdate(DocumentEvent e) {
setTextFieldValue(textField.getValue());
}
@Override
public void insertUpdate(DocumentEvent e) {
setTextFieldValue(textField.getValue());
}
@Override
public void changedUpdate(DocumentEvent e) {
setTextFieldValue(textField.getValue());
}
};
/**
* 给组件登记一个观察者监听事件
*
* @param listener 观察者监听事件
*/
public void registerChangeListener(UIObserverListener listener) {
uiObserverListener = listener;
}
/**
* 组件是否需要响应添加的观察者事件
*
* @return 如果需要响应观察者事件则返回true否则返回false
*/
public boolean shouldResponseChangeListener() {
return true;
}
public boolean shouldResponseChangeListener() {
return true;
}
/**
* 给组件登记一个全局名字观察者监听事件
*
* @param listener 观察者监听事件
*/
public void registerNameListener(GlobalNameListener listener) {
globalNameListener = listener;
}
public void registerNameListener(GlobalNameListener listener) {
globalNameListener = listener;
}
/**
* 组件是否需要响应添加的观察者事件
*
* @return 如果需要响应观察者事件则返回true否则返回false
*/
public boolean shouldResponseNameListener() {
return true;
}
private class SpinnerTextFieldUI extends UITextFieldUI {
public SpinnerTextFieldUI(UITextField textField) {
super(textField);
}
@Override
public void paintBorder(Graphics2D g2d, int width, int height,
boolean isRound, int rectDirection) {
// do nothing
}
protected void paintBackground(Graphics g) {
JTextComponent editor = getComponent();
int width = editor.getWidth();
int height = editor.getHeight();
Shape oldClip = g.getClip();
Shape roundShape = new RoundRectangle2D.Double(0, 0, width, height, UIConstants.ARC, UIConstants.ARC);
Graphics2D g2d = (Graphics2D) g;
g2d.clearRect(0, 0, width, height);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.clip(roundShape);
g2d.setColor(Color.WHITE);
g2d.fillRoundRect(1, 1, width - 2, height - 2, UIConstants.ARC, UIConstants.ARC);
if (isRollOver && isEnabled()) {
Shape shape = new RoundRectangle2D.Double(1, 1, width - 3, height - 3, UIConstants.ARC, UIConstants.ARC);
GUIPaintUtils.paintBorderShadow(g2d, 3, shape, UIConstants.HOVER_BLUE, Color.WHITE);
} else {
g2d.setColor(UIConstants.LINE_COLOR);
g2d.drawRoundRect(1, 1, width - 2, height - 2, UIConstants.ARC, UIConstants.ARC);
g2d.clearRect(width - 2, 0, 2, height);
g2d.setClip(oldClip);
g2d.drawLine(width - 2, 1, width, 1);
g2d.drawLine(width - 2, height - 1, width, height - 1);
}
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
}
}
public boolean shouldResponseNameListener() {
return true;
}
/**
* 程序入口 测试
* @param args 参数
* 程序入口 测试
*
* @param args 参数
*/
public static void main(String... args) {
LayoutManager layoutManager = null;
JFrame jf = new JFrame("test");
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel content = (JPanel) jf.getContentPane();
content.setLayout(layoutManager);
UISpinner bb = new UISpinner(0, 9, 1);
bb.setValue(4);
bb.setBounds(20, 20, bb.getPreferredSize().width, bb.getPreferredSize().height);
content.add(bb);
GUICoreUtils.centerWindow(jf);
jf.setSize(400, 400);
jf.setVisible(true);
}
public static void main(String... args) {
// LayoutManager layoutManager = null;
// JFrame jf = new JFrame("test");
// jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// JPanel content = (JPanel) jf.getContentPane();
// content.setLayout(layoutManager);
//
// UISpinner bb = new UISpinner(0, 9, 1);
// bb.setValue(4);
// bb.setBounds(20, 20, bb.getPreferredSize().width, bb.getPreferredSize().height);
// content.add(bb);
// GUICoreUtils.centerWindow(jf);
// jf.setSize(400, 400);
// jf.setVisible(true);
}
}

22
designer_base/src/com/fr/design/gui/itextarea/UITextArea.java

@ -4,6 +4,7 @@ import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.Constants;
import javax.swing.*;
import javax.swing.event.DocumentEvent;
@ -99,10 +100,9 @@ public class UITextArea extends JTextArea implements UIObserver {
@Override
protected void paintBorder(Graphics g) {
getUI().paintBorder((Graphics2D) g, getWidth(), getHeight(), true, Constants.NULL);
}
@Override
/**
*
@ -122,14 +122,14 @@ public class UITextArea extends JTextArea implements UIObserver {
* @param args
*/
public static void main(String... args) {
JFrame jf = new JFrame("test");
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel content = (JPanel) jf.getContentPane();
content.setLayout(new BorderLayout());
UITextArea bb = new UITextArea("123455weoijweio reiwj kewl jfejkfljds kl jfldk jfk jdskfjkdsfklj dkl jfsdjf");
content.add(bb, BorderLayout.CENTER);
GUICoreUtils.centerWindow(jf);
jf.setSize(400, 400);
jf.setVisible(true);
// JFrame jf = new JFrame("test");
// jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// JPanel content = (JPanel) jf.getContentPane();
// content.setLayout(new BorderLayout());
// UITextArea bb = new UITextArea("123455weoijweio reiwj kewl jfejkfljds kl jfldk jfk jdskfjkdsfklj dkl jfsdjf");
// content.add(bb, BorderLayout.CENTER);
// GUICoreUtils.centerWindow(jf);
// jf.setSize(400, 400);
// jf.setVisible(true);
}
}

83
designer_base/src/com/fr/design/gui/itextarea/UITextAreaUI.java

@ -1,56 +1,43 @@
package com.fr.design.gui.itextarea;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Shape;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.geom.RoundRectangle2D;
import javax.swing.JComponent;
import javax.swing.plaf.basic.BasicTextAreaUI;
import javax.swing.text.JTextComponent;
import com.fr.design.constants.UIConstants;
import com.fr.design.utils.gui.GUIPaintUtils;
public class UITextAreaUI extends BasicTextAreaUI {
protected boolean isRollOver;
private JComponent textField;
public UITextAreaUI(final JComponent textField) {
super();
this.textField = textField;
this.textField.addMouseListener(new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent e) {
isRollOver = true;
textField.repaint();
}
@Override
public void mouseExited(MouseEvent e) {
isRollOver = false;
textField.repaint();
}
});
}
import javax.swing.*;
import javax.swing.plaf.basic.BasicTextAreaUI;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
@Override
protected void paintBackground(Graphics g) {
JTextComponent editor = getComponent();
int width = editor.getWidth();
int height = editor.getHeight();
Graphics2D g2d = (Graphics2D)g;
g2d.clearRect(0, 0, width, height);
if(isRollOver && textField.isEnabled() && ((UITextArea)textField).isEditable()) {
Shape shape = new RoundRectangle2D.Double(1, 1, width - 3, height - 3, UIConstants.ARC, UIConstants.ARC);
GUIPaintUtils.paintBorderShadow(g2d, 3, shape, UIConstants.HOVER_BLUE, Color.WHITE);
} else {
g2d.setColor(UIConstants.LINE_COLOR);
g2d.drawRoundRect(1, 1, width - 2, height - 2, UIConstants.ARC, UIConstants.ARC);
}
}
public class UITextAreaUI extends BasicTextAreaUI {
protected boolean isRollOver;
private JComponent textField;
public UITextAreaUI(final JComponent textField) {
super();
this.textField = textField;
this.textField.addMouseListener(new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent e) {
isRollOver = true;
textField.repaint();
}
@Override
public void mouseExited(MouseEvent e) {
isRollOver = false;
textField.repaint();
}
});
}
public void paintBorder(Graphics2D g2d, int width, int height, boolean isRound, int rectDirection) {
if (isRollOver && textField.isEnabled()) {
g2d.setColor(UIConstants.TEXT_FILED_BORDER_SELECTED);
g2d.drawRect(0, 0, width - 1, height - 1);
} else {
GUIPaintUtils.drawBorder(g2d, 0, 0, width, height, isRound, rectDirection);
}
}
}

403
designer_base/src/com/fr/design/gui/itextfield/UINumberField.java

@ -16,92 +16,95 @@ import java.awt.*;
* Number Field.
*/
public class UINumberField extends UITextField {
public static final double ERROR_VALUE = Double.MAX_VALUE + 4.44; // peter:错误的值.
/**
* 整数部分的长度
*/
private int maxIntegerLength = 24;
/**
* 小数部分的长度
*/
public static final double ERROR_VALUE = Double.MAX_VALUE + 4.44; // peter:错误的值.
public static final int MAX_INTEGERLENGTH = 24;
public static final int MAX_INTEGERLENGTH_32 = 32;
public static final int MAX_DECIMALLENGTH = 16;
/**
* 整数部分的长度
*/
private int maxIntegerLength = MAX_INTEGERLENGTH;
/**
* 小数部分的长度
*/
private static final int DEFAULTMAXDECIMALLENTH = 16;
private static final int TESTMAXVALUE = 100;
private static final int TESTMINVALUE = -10;
private int maxDecimalLength = 16;
private double minValue = -Double.MAX_VALUE;
private double maxValue = Double.MAX_VALUE;
private boolean isContentChanged = false;
public UINumberField() {
this(32, 16);
}
public UINumberField(int columns) {
this();
setColumns(columns);
}
public UINumberField(int maxIntegerLength, int maxDecimalLength) {
this(maxIntegerLength, maxDecimalLength, -Double.MAX_VALUE, Double.MAX_VALUE);
}
public UINumberField(int maxIntegerLength, int maxDecimalLength, double minValue, double maxValue) {
this.maxIntegerLength = maxIntegerLength;
this.maxDecimalLength = maxDecimalLength;
this.minValue = minValue;
this.maxValue = maxValue;
setFieldDocument();
}
public void setFieldDocument(){
private static final int TESTMAXVALUE = 100;
private static final int TESTMINVALUE = -10;
private int maxDecimalLength = MAX_DECIMALLENGTH;
private double minValue = -Double.MAX_VALUE;
private double maxValue = Double.MAX_VALUE;
private boolean isContentChanged = false;
public UINumberField() {
this(MAX_INTEGERLENGTH_32, MAX_DECIMALLENGTH);
}
public UINumberField(int columns) {
this();
setColumns(columns);
}
public UINumberField(int maxIntegerLength, int maxDecimalLength) {
this(maxIntegerLength, maxDecimalLength, -Double.MAX_VALUE, Double.MAX_VALUE);
}
public UINumberField(int maxIntegerLength, int maxDecimalLength, double minValue, double maxValue) {
this.maxIntegerLength = maxIntegerLength;
this.maxDecimalLength = maxDecimalLength;
this.minValue = minValue;
this.maxValue = maxValue;
setFieldDocument();
}
public void setFieldDocument() {
setDocument(new NumberDocument());
initListener();
}
public int getMaxIntegerLength() {
return maxIntegerLength;
}
public void setMaxIntegerLength(int maxIntegerLength) {
this.maxIntegerLength = maxIntegerLength;
}
public int getMaxDecimalLength() {
return maxDecimalLength;
}
public void setMaxDecimalLength(int maxDecimalLength) {
this.maxDecimalLength = maxDecimalLength;
}
public double getMinValue() {
return minValue;
}
public void setMinValue(double minValue) {
this.minValue = minValue;
}
public double getMaxValue() {
return maxValue;
}
public void setMaxValue(double maxValue) {
this.maxValue = maxValue;
}
/**
* Set the value.
*/
public void setValue(double value) {
this.setText(Utils.doubleToString(value));
}
/**
* Return the value.
*/
public double getValue() throws NumberFormatException {
public int getMaxIntegerLength() {
return maxIntegerLength;
}
public void setMaxIntegerLength(int maxIntegerLength) {
this.maxIntegerLength = maxIntegerLength;
}
public int getMaxDecimalLength() {
return maxDecimalLength;
}
public void setMaxDecimalLength(int maxDecimalLength) {
this.maxDecimalLength = maxDecimalLength;
}
public double getMinValue() {
return minValue;
}
public void setMinValue(double minValue) {
this.minValue = minValue;
}
public double getMaxValue() {
return maxValue;
}
public void setMaxValue(double maxValue) {
this.maxValue = maxValue;
}
/**
* Set the value.
*/
public void setValue(double value) {
this.setText(Utils.doubleToString(value));
}
/**
* Return the value.
*/
public double getValue() throws NumberFormatException {
try {
if (this.getText().length() == 0) {
return 0;
@ -113,134 +116,132 @@ public class UINumberField extends UITextField {
}
}
/**
* Retusn text value.
*/
public String getTextValue() {
return this.getText();
}
/**
* Set property integer.
*
* @param integer
* New value of property integer.
*/
public void setInteger(boolean integer) {
if (integer) {
this.maxDecimalLength = 0;
} else {
this.maxDecimalLength = DEFAULTMAXDECIMALLENTH;
}
}
/**
* Check whether the content changed.
*/
public boolean isContentChanged() {
return isContentChanged;
}
public void setisContentChanged(boolean isContentChanged){
/**
* Retusn text value.
*/
public String getTextValue() {
return this.getText();
}
/**
* Set property integer.
*
* @param integer New value of property integer.
*/
public void setInteger(boolean integer) {
if (integer) {
this.maxDecimalLength = 0;
} else {
this.maxDecimalLength = DEFAULTMAXDECIMALLENTH;
}
}
/**
* Check whether the content changed.
*/
public boolean isContentChanged() {
return isContentChanged;
}
public void setisContentChanged(boolean isContentChanged) {
this.isContentChanged = isContentChanged;
}
@Override
public Dimension getPreferredSize() {
return new Dimension(super.getPreferredSize().width, 20);
}
class NumberDocument extends PlainDocument {
public NumberDocument() {
}
@Override
public Dimension getPreferredSize() {
return new Dimension(super.getPreferredSize().width, 20);
}
class NumberDocument extends PlainDocument {
public boolean checkString(int offset, String s, String str) {
return (ComparatorUtils.equals(s,"F")
|| ComparatorUtils.equals(s,"f")
|| ComparatorUtils.equals(s,"D")
|| ComparatorUtils.equals(s,"d")
||(ComparatorUtils.equals(str.trim(),"0") && !ComparatorUtils.equals(s.substring(0, 1),".") && offset != 0)// 第一位是0时,第二位只能为小数点
||(ComparatorUtils.equals(s,".") && maxDecimalLength == 0));
return (ComparatorUtils.equals(s, "F")
|| ComparatorUtils.equals(s, "f")
|| ComparatorUtils.equals(s, "D")
|| ComparatorUtils.equals(s, "d")
|| (ComparatorUtils.equals(str.trim(), "0") && !ComparatorUtils.equals(s.substring(0, 1), ".") && offset != 0)// 第一位是0时,第二位只能为小数点
|| (ComparatorUtils.equals(s, ".") && maxDecimalLength == 0));
}
public void insertString(int offset, String s, AttributeSet a) throws BadLocationException {
String str = getText(0, getLength());
// 不能为f,F,d,D
if (checkString(offset,s, str) ) {
Toolkit.getDefaultToolkit().beep();
return;
}
String strNew = str.substring(0, offset) + s + str.substring(offset, getLength());
if(notChange(strNew)) {
return;
}
setisContentChanged(true);
super.insertString(offset, s, a);
}
// kunsnat: 这种限制输入 有个不好的地方, 比如删除时: 10.1 最大值限定100, 那么就删除中间的小数点之后变为101, 超出了100.
// 但是直接限制不能删除中间类似小数点, 那么也可能遇到: 最小值10 , 从100变化到其中的19, 就很难..
private boolean notChange(String strNew) {
boolean noChange = false;
strNew = strNew.replaceFirst("-", StringUtils.EMPTY); // 控制能输入负数
boolean isMinus = strNew.startsWith("-");
String strIntPart;
String strDecPart = StringUtils.EMPTY;
int decPos = strNew.indexOf(CoreConstants.DOT);
if (decPos > -1) {
strIntPart = strNew.substring(0, decPos);
strDecPart = strNew.substring(decPos + 1);
} else {
strIntPart = strNew;
}
if (isOverMaxOrMinValue(strIntPart, strDecPart, strNew)) {
Toolkit.getDefaultToolkit().beep();
noChange = true;
}
try {
if (!ComparatorUtils.equals(strNew, StringUtils.EMPTY) && !ComparatorUtils.equals(strNew, "-")) {// 控制能输入负数
double d = Double.parseDouble(strNew) * (isMinus ? -1 : 1);
if (d < minValue || d > maxValue) {
throw new Exception();
}
}
} catch (Exception e) {
Toolkit.getDefaultToolkit().beep();
noChange = true;
}
return noChange;
}
private boolean isOverMaxOrMinValue(String strIntPart, String strDecPart, String strNew) {
return strIntPart.length() > maxIntegerLength
|| strDecPart.length() > maxDecimalLength
|| (strNew.length() > 1 && ComparatorUtils.equals(strNew.substring(0, 1), "0") && !ComparatorUtils.equals(strNew.substring(1, 2),"."));
}
}
public void insertString(int offset, String s, AttributeSet a) throws BadLocationException {
String str = getText(0, getLength());
// 不能为f,F,d,D
if (checkString(offset, s, str)) {
Toolkit.getDefaultToolkit().beep();
return;
}
String strNew = str.substring(0, offset) + s + str.substring(offset, getLength());
if (notChange(strNew)) {
return;
}
setisContentChanged(true);
super.insertString(offset, s, a);
}
// kunsnat: 这种限制输入 有个不好的地方, 比如删除时: 10.1 最大值限定100, 那么就删除中间的小数点之后变为101, 超出了100.
// 但是直接限制不能删除中间类似小数点, 那么也可能遇到: 最小值10 , 从100变化到其中的19, 就很难..
private boolean notChange(String strNew) {
boolean noChange = false;
strNew = strNew.replaceFirst("-", StringUtils.EMPTY); // 控制能输入负数
boolean isMinus = strNew.startsWith("-");
String strIntPart;
String strDecPart = StringUtils.EMPTY;
int decPos = strNew.indexOf(CoreConstants.DOT);
if (decPos > -1) {
strIntPart = strNew.substring(0, decPos);
strDecPart = strNew.substring(decPos + 1);
} else {
strIntPart = strNew;
}
if (isOverMaxOrMinValue(strIntPart, strDecPart, strNew)) {
Toolkit.getDefaultToolkit().beep();
noChange = true;
}
try {
if (!ComparatorUtils.equals(strNew, StringUtils.EMPTY) && !ComparatorUtils.equals(strNew, "-")) {// 控制能输入负数
double d = Double.parseDouble(strNew) * (isMinus ? -1 : 1);
if (d < minValue || d > maxValue) {
throw new Exception();
}
}
} catch (Exception e) {
Toolkit.getDefaultToolkit().beep();
noChange = true;
}
return noChange;
}
private boolean isOverMaxOrMinValue(String strIntPart, String strDecPart, String strNew) {
boolean checkLength = strIntPart.length() > maxIntegerLength
|| strDecPart.length() > maxDecimalLength;
return checkLength || (strNew.length() > 1 && ComparatorUtils.equals(strNew.substring(0, 1), "0") && !ComparatorUtils.equals(strNew.substring(1, 2), "."));
}
}
/**
* 测试程序
*/
public static void main(String[] args) {
JFrame frame = new JFrame("");
frame.setSize(400, 320);
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
frame.setLocation((d.width - frame.getSize().width) / 2, (d.height - frame.getSize().height) / 2);
UINumberField tt = new UINumberField();
tt.setMinValue(0.0);
tt.setMaxValue(100.0);
frame.getContentPane().setLayout(new GridLayout(10, 2));
frame.getContentPane().add(new UILabel("New JNumberField()"));
frame.getContentPane().add(tt);
frame.getContentPane().add(new UILabel("New JNumberField(2)"));
frame.getContentPane().add(new UILabel("New JNumberField(8,2)"));
frame.getContentPane().add(new UINumberField(8, 2));
frame.getContentPane().add(new UILabel("New JNumberField(5,2,-10,100)"));
frame.getContentPane().add(new UINumberField(5, 2, TESTMINVALUE, TESTMAXVALUE));
frame.setVisible(true);
}
public static void main(String[] args) {
// JFrame frame = new JFrame("");
// frame.setSize(400, 320);
// Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
// frame.setLocation((d.width - frame.getSize().width) / 2, (d.height - frame.getSize().height) / 2);
// UINumberField tt = new UINumberField();
// tt.setMinValue(0.0);
// tt.setMaxValue(100.0);
// frame.getContentPane().setLayout(new GridLayout(10, 2));
// frame.getContentPane().add(new UILabel("New JNumberField()"));
// frame.getContentPane().add(tt);
// frame.getContentPane().add(new UILabel("New JNumberField(2)"));
// frame.getContentPane().add(new UILabel("New JNumberField(8,2)"));
// frame.getContentPane().add(new UINumberField(8, 2));
// frame.getContentPane().add(new UILabel("New JNumberField(5,2,-10,100)"));
// frame.getContentPane().add(new UINumberField(5, 2, TESTMINVALUE, TESTMAXVALUE));
// frame.setVisible(true);
}
}

2
designer_base/src/com/fr/design/gui/style/FRFontPane.java

@ -180,6 +180,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse
if (superPane.isSelected() && !isSuper) {
frFont = frFont.applySuperscript(true);
frFont = frFont.applySubscript(false);
this.subPane.setSelected(false);
} else if (!superPane.isSelected() && isSuper) {
frFont = frFont.applySuperscript(false);
}
@ -188,6 +189,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse
if (subPane.isSelected() && !isSub) {
frFont = frFont.applySubscript(true);
frFont = frFont.applySuperscript(false);
this.superPane.setSelected(false);
} else if (!subPane.isSelected() && isSub) {
frFont = frFont.applySubscript(false);
}

14
designer_base/src/com/fr/design/locale/designer.properties

@ -2013,7 +2013,6 @@ FR-Designer_Parameter=
FR-Designer-Plugin_Plugin=Plugin
FR-Designer_Background=Background
Template=Template
FR-Designer_Parent_Marked_Field=Parent Marked Field
FR-Designer_Original_Marked_Filed=Original Marked Filed
FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=Build Tree according parent's marked filed
@ -2135,4 +2134,15 @@ FR-Designer_Widgetname=Widget Name
FR-Designer_Insert_Cell_Element=Insert Cell Element
FR-Designer_Add_Condition=Add Condition
FR-Designer_Use_Params_Template=use parameter template
FR-Designer_Label_Name=label name
FR-Designer_Label_Name=label name
FR-Designer_Widget_Visible=
FR-Designer_Widget_Enabled=
FR-Designer_Cell_Visible=
FR-Designer_Show=
FR-Designer_Float_Visible=
FR-Designer_Cell_Value=
FR-Designer_Export_Background=
FR-Designer_Print_Background=
FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All=
FR-Designer_Decimal_Places=

20
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -1134,7 +1134,6 @@ FRFont-bold=Bold
FR-Designer_Set_Submit_Condition=Submit Condition
Form-Change_Widget_Name=Change Control Name
ReportColumns-Report_Columns=Multi-columns/lines display
FR-Designer_Can_not_use_FormatBursh=Can't use format painter in multiple selections
CellElement-Property_Table=Cell Attribute Table
Dictionary-Dynamic_SQL=Dynamic SQL
FR-Designer_Form-CheckBoxGroup=CheckBoxGroup
@ -2015,7 +2014,6 @@ FR-Designer_Parameter=Parameter
FR-Designer-Plugin_Plugin=Plugin
FR-Designer_Background=BG
Template=Template
FR-Designer_Original_Marked_Filed=Original Tag Field
FR-Designer_Build_Tree_Accord_Marked_Filed_Length=Build tree according to tag field's length
FR-Designer_Can_not_use_FormatBursh=Can't use format painter in multiple selections
@ -2131,4 +2129,20 @@ FR-Designer_Widgetname=Widget Name
FR-Designer_Insert_Cell_Element=Insert Cell Element
FR-Designer_Add_Condition=Add Condition
FR-Designer_Use_Params_Template=use parameter template
FR-Designer_Label_Name=label name
FR-Designer_Label_Name=label name
FR-Designer_Widget_Visible=
FR-Designer_Widget_Display_Report_Tool=
FR-Designer_Cell_Value=
FR-Designer_Cell_Visible=
FR-Designer_Widget_Formula=
FR-Designer_Show=
FR-Designer_Widget_Position=
FR-Designer_Float_Visible=
FR-Designer_Widget_String=
FR-Designer_Widget_Field=
FR-Designer_Widget_Enabled=
FR-Designer_Export_Background=
FR-Designer_Print_Background=
FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All=
FR-Designer_Decimal_Places=

66
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -229,16 +229,16 @@ FR-Designer-Collect_Information_free=\u7121\u6599
FR-Designer-Collect_Information_Description=\u8A18\u8FF0
FR-Designer-Collect_Information_Successfully=\u53CE\u96C6\u6210\u529F
FR-Designer_Event_Set=\u30A4\u30D9\u30F3\u30C8\u8A2D\u5B9A
FR-Designer_Blow_set=\u4EE5\u4E0B\u8A2D\u5B9A
FR-Designer_I_Want_To_Set_Single=\u5F53\u8A72\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u5358\u72EC\u8A2D\u5B9A
FR-Designer_Using_Server_Report_View_Settings=\u30B5\u30FC\u30D0\u30FC\u8A2D\u5B9A\u63A1\u7528
FR-Designer_ErrorHandlerTemplate=\u51FA\u9519\u6A21\u677F\u5B9A\u4E49
FR-Designer_Save_Path=\u4FDD\u5B58\u8DEF\u5F84
FR-Designer_Chart_Acc_Set=\u7CBE\u78BA\u8A2D\u5B9A
FR-Designer_Gradient-Color=\u8272\u3092\u5F90\u3005\u306B\u5909\u5316
FR-Designer_DEFAULT=\u30C7\u30D5\u30A9\u30EB\u30C8
FR-Designer_chart-PreStyle=\u30C1\u30E3\u30FC\u30C8\u306E\u5B9A\u7FA9\u3055\u308C\u305F\u30AB\u30E9\u30FC
FR-Designer_Chart-PreStyle=\u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u305F\u30AB\u30E9\u30FC\u30C1\u30E3\u30FC\u30C8
FR-Designer_Blow_set=\u6B21\u306E\u8A2D\u5B9A
FR-Designer_I_Want_To_Set_Single=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u500B\u5225\u8A2D\u5B9A
FR-Designer_Using_Server_Report_View_Settings=\u30B5\u30FC\u30D0\u8A2D\u5B9A
FR-Designer_ErrorHandlerTemplate=\u30A8\u30E9\u30FC\u60C5\u5831\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u5B9A\u7FA9
FR-Designer_Save_Path=\u4FDD\u5B58\u30D1\u30B9
FR-Designer_Chart_Acc_Set=\u500B\u5225\u8A2D\u5B9A
FR-Designer_Gradient-Color=\u30B0\u30E9\u30C7\u30FC\u30B7\u30E7\u30F3
FR-Designer_DEFAULT=\u65E2\u5B9A
FR-Designer_chart-PreStyle=\u30B0\u30E9\u30D5\u4E8B\u524D\u5B9A\u7FA9\u914D\u8272
FR-Designer_Chart-PreStyle=\u30B0\u30E9\u30D5\u4E8B\u524D\u5B9A\u7FA9\u914D\u8272
FR-Designer_Already_exist=\u73FE\u5728\u306E\u74B0\u5883\u306B\u306F\u5B58\u5728\u3057\u3066\u3044\u307E\u3059\:
FR-Designer_Database=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9
FR-Designer_Model=\u30E2\u30C7\u30EB
@ -507,8 +507,8 @@ FR-Designer_Edit_panel=\u7DE8\u96C6
FR-Designer_Property_panel=\u5C5E\u6027
FR-Designer_Select_panel=\u9078\u629E
FR-Designer_LayoutTable_Column_Width=160
FR-Designer_Set_BG_Of_Current_Row=\u5831\u544A\u30AB\u30EC\u30F3\u30C8\u7DE8\u96C6\u884C\u80CC\u666F\u8A2D\u5B9A
FR-Designer_Unload_Check=\u63D0\u51FA\u305B\u305A\u306B\u30D2\u30F3\u30C8
FR-Designer_Set_BG_Of_Current_Row=\u7DE8\u96C6\u884C\u80CC\u666F\u8A2D\u5B9A
FR-Designer_Unload_Check=\u672A\u30B3\u30DF\u30C3\u30C8\u30D2\u30F3\u30C8
FR-Designer_ReportColumns_Columns_Optional=\u6BB5\u7D44\u307F
FR-Designer_Row_Icon_File_Name=row.png
FR-Designer_Center_Display=\u4E2D\u592E\u63C3\u3048\u8868\u793A
@ -1132,7 +1132,6 @@ FRFont-bold=\u592A\u5B57
FR-Designer_Set_Submit_Condition=\u63D0\u51FA\u6761\u4EF6\u3092\u8A2D\u5B9A
Form-Change_Widget_Name=\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u540D\u5909\u66F4
ReportColumns-Report_Columns=\u5E33\u7968\u30B3\u30E9\u30E0
FR-Designer_Can_not_use_FormatBursh=\u8907\u6570\u9078\u629E\u3057\u305F\u30A8\u30EA\u30A2\u3067\u306F\u66F8\u5F0F\u30D6\u30E9\u30B7\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\!
CellElement-Property_Table=\u30BB\u30EB\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u00B7\u30B7\u30FC\u30C8
Dictionary-Dynamic_SQL=\u52D5\u614BSQL
FR-Designer_Form-CheckBoxGroup=\u30D5\u30EC\u30FC\u30E0\u30BB\u30C3\u30C8\u3092\u8907\u6570\u9078\u629E
@ -1338,14 +1337,16 @@ Utils-File_name=\u30D5\u30A1\u30A4\u30EB\u540D
NOT_NULL_Des=\u3053\u3053\u306F\u7A7A\u6B04\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093
Right_Border_Line=\u53F3\u30D5\u30EC\u30FC\u30E0\u30E9\u30A4\u30F3
EditRC-Entire_column=\u5217(C)
PageSetup-Top_to_bottom=\u4E0A\u304B\u3089\u4E0B\u3078
Click-Get_Default_URL=\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30C7\u30D5\u30A9\u30EB\u30C8\u306EURL\u3092\u53D6\u5F97
StyleAlignment-Wrap_Text=\u81EA\u52D5\u6298\u308A\u8FD4\u3057
Remove_All_Button=\u5168\u3066\u306E\u30DC\u30BF\u30F3\u3092\u30AF\u30EA\u30A2
FR-Designer_Component_Interval=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u9593\u9694
ReportColumns-Columns_vertically=\u5782\u76F4\u65B9\u5411\u5217
ReportGUI-Print_Background=\u5370\u5237\u80CC\u666F
Export-CSV=CSV (\u30AB\u30F3\u30DE\u533A\u5207\u308A)
PageSetup-Top_to_bottom=\u5DE6\u304B\u3089\u53F3
Click-Get_Default_URL=\u3053\u306E\u30DC\u30BF\u30F3\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u65E2\u5B9A\u306EURL\u3092\u53D6\u5F97
StyleAlignment-Wrap_Text=\u81EA\u52D5\u6539\u884C
Remove_All_Button=\u3059\u3079\u3066\u306E\u30DC\u30BF\u30F3\u3092\u30AF\u30EA\u30A2
FR-Designer_Component_Interval=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u9593\u9694
ReportColumns-Columns_vertically=\u5217\u306E\u6BB5\u7D44\u307F
ReportGUI-Print_Background=\u5E33\u7968\u80CC\u666F\u306E\u5370\u5237/\u51FA\u529B
FR-Designer_Print_Background=\u5E33\u7968\u80CC\u666F\u306E\u5370\u5237
FR-Designer_Export_Background=\u5E33\u7968\u80CC\u666F\u306E\u51FA\u529B
Export-CSV=CSV(\u30AB\u30F3\u30DE\u533A\u5207\u308A)
M_Edit-Paste=\u8CBC\u308A\u4ED8\u3051(P)
FR-Designer-Basic_Restart_Designer=\u30C7\u30B6\u30A4\u30CA\u30FC\u3092\u518D\u8D77\u52D5\u3059\u308B
ReportServerP-PDF2-INFO=LINUX/UNIX\u306B\u4E2D\u56FD\u8A9E\u30D5\u30A9\u30F3\u30C8\u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u305F\u6642\u306E\u307F\u4F7F\u7528
@ -1370,7 +1371,7 @@ Not_Exsit=\u5E33\u7968\u306B\u5B58\u5728\u3057\u307E\u305B\u3093
Utils-Insert_Row=\u884C\u633F\u5165
Utils-Delete_Row=\u884C\u524A\u9664
not_support_authority_edit=\u8BE5\u5143\u7D20\u4E0D\u652F\u6301\u6743\u9650\u63A7\u5236
Formula_Tips=\u5F0F\u306F "\
Formula_Tips=\u5F0F\u306F "
FR-Action_Copy=\u30B3\u30D4\u30FC
Compile_Success=\u7DE8\u96C6\u7FFB\u8A33\u306B\u6210\u529F\u3057\u307E\u3057\u305F
BackgroundTexture-RecycledPaper=\u518D\u751F\u7D19
@ -2002,7 +2003,6 @@ FR-Product_Demo=\u88FD\u54C1\u30C7\u30E2
FR-Designer_Data_Filter=\u30C7\u30FC\u30BF\u30D5\u30A3\u30EB\u30BF
FR-Designer_Can_not_use_FormatBursh=\u9023\u7D9A\u3057\u306A\u3044\u8907\u6570\u9818\u57DF\u3067\u306F\u66F8\u5F0F\u30B3\u30D4\u30FC\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
Default=\u65E2\u5B9A
FR-Base-Load_Resource_File=\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u30ED\u30FC\u30C9
FR-Designer_Cell_Element=\u30BB\u30EB\u8981\u7D20
FR-Designer_Cell_Attributes=\u30BB\u30EB\u5C5E\u6027
FR-Designer_Float_Element=\u30D5\u30ED\u30FC\u30C8\u8981\u7D20
@ -2127,4 +2127,22 @@ FR-Designer-Basic_Dynamic_Parameter_Injection=
FR-Designer_Label=\u30E9\u30D9\u30EBa
FR-Designer_Widgetname=\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u540D
FR-Designer_Insert_Cell_Element=
FR-Designer_Add_Condition=
FR-Designer_Add_Condition=
FR-Designer_Widget_Visible=
FR-Designer_Widget_Display_Report_Tool=
FR-Designer_Cell_Value=
FR-Designer_Cell_Visible=
FR-Designer_Widget_Formula=
M-New_WorkBook=
FR-Designer_Show=
FR-Designer-AlphaFine_NO_Result=
FR-Designer_Widget_Position=
FR-Designer_Float_Visible=
FR-Designer_Widget_String=
FR-Designer_Widget_Field=
FR-Designer_Add_Event=
FR-Designer_Widget_Enabled=
FR-Designer_Sheet_Label_Page_Display_Position=Sheet\u30E9\u30D9\u30EB\u30DA\u30FC\u30B8\u306E\u8868\u793A\u4F4D\u7F6E
FR-Designer_Provide_Choose_All=\u5168\u9078\u629E\u53EF\u80FD
FR-Designer_Decimal_Places=\u5C0F\u6570\u67A0\u6570:
FR-Base-Load_Resource_File=\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u30ED\u30FC\u30C9

21
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -2002,7 +2002,6 @@ FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=\uC120\uD0DD\uD55C\uB370\uC774
FR-Product_Demo=\uC81C\uD488\uC2DC\uC5F0
FR-Designer_Data_Filter=\uB370\uC774\uD130\uC120\uBCC4
Default=\uAE30\uBCF8
FR-Base-Load_Resource_File=\uB85C\uB529\uAD6C\uC131\uD30C\uC77C
FR-Designer_Cell_Element=\uC140\uC694\uC18C
FR-Designer_Cell_Attributes=\uC140\uC18D\uC131
FR-Designer_Float_Element=\uD638\uBC84\uC694\uC18C
@ -2128,4 +2127,22 @@ FR-Designer-Basic_Dynamic_Parameter_Injection=
FR-Designer_Label=\uB808\uC774\uBE14
FR-Designer_Widgetname=\uC18C\uD504\uD2B8\uC6E8\uC5B4\uC81C\uC5B4\uC774\uB984
FR-Designer_Insert_Cell_Element=
FR-Designer_Add_Condition=
FR-Designer_Add_Condition=
FR-Designer_Widget_Visible=
FR-Designer_Widget_Display_Report_Tool=
FR-Designer_Cell_Value=
FR-Designer_Cell_Visible=
FR-Designer_Widget_Formula=
FR-Designer_Show=
FR-Designer-AlphaFine_NO_Result=
FR-Designer_Widget_Position=
FR-Designer_Float_Visible=
FR-Designer_Widget_String=
FR-Designer_Widget_Field=
FR-Designer_Widget_Enabled=
FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All=\uC81C\uACF5\uBAA8\uB450\uC120\uD0DD
FR-Designer_Decimal_Places=\uC18C\uC218\uC218\uB7C9:
FR-Base-Load_Resource_File=\uB85C\uB529\uAD6C\uC131\uD30C\uC77C
FR-Designer_Export_Background=
FR-Designer_Print_Background=

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

@ -2015,7 +2015,6 @@ FR-Designer_Parameter=\u53C2\u6570
FR-Designer-Plugin_Plugin=\u63D2\u4EF6
FR-Designer_Background=\u80CC\u666F
Template=\u6A21\u7248
FR-Designer_Original_Marked_Filed=\u539F\u59CB\u6807\u8BB0\u5B57\u6BB5
FR-Designer_Build_Tree_Accord_Marked_Filed_Length=\u4F9D\u8D56\u6240\u9009\u6570\u636E\u96C6\u7684\u6807\u8BB0\u5B57\u6BB5\u7684\u957F\u5EA6\u6784\u5EFA\u6811
FR-Designer_Tree_Data_Field=\u6811\u6570\u636E\u5B57\u6BB5
@ -2025,7 +2024,6 @@ FR-Product_Demo=\u4EA7\u54C1\u6F14\u793A
FR-Designer_Data_Filter=\u6570\u636E\u7B5B\u9009
Default=\u9ED8\u8BA4
FR-Base-Load_Resource_File=\u52A0\u8F7D\u914D\u7F6E\u6587\u4EF6
FR-Designer_Cell_Element=\u5355\u5143\u683C\u5143\u7D20
FR-Designer_Cell_Attributes=\u5355\u5143\u683C\u5C5E\u6027
FR-Designer_Float_Element=\u60AC\u6D6E\u5143\u7D20
@ -2140,4 +2138,11 @@ FR-Designer_Select_Color=\u9009\u62E9\u989C\u8272
FR-Designer-Basic_Dynamic_Parameter_Injection=\u6CE8\u5165
FR-Designer_Label=\u6807\u7B7E
FR-Designer_Widgetname=\u63A7\u4EF6\u540D
FR-Designer_Insert_Cell_Element=\u63D2\u5165\u5143\u7D20
FR-Designer_Insert_Cell_Element=\u63D2\u5165\u5143\u7D20
FR-Designer-Plugin_Has_Been_Actived=
FR-Designer-Plugin_Has_Been_Disabled=
FR-Designer_Export_Background=
FR-Designer_Print_Background=
FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All=
FR-Designer_Decimal_Places=

21
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -1134,7 +1134,6 @@ FRFont-bold=\u7C97\u9AD4
FR-Designer_Set_Submit_Condition=\u8A2D\u5B9A\u63D0\u4EA4\u689D\u4EF6
Form-Change_Widget_Name=\u66F4\u6539\u63A7\u5236\u9805\u540D
ReportColumns-Report_Columns=\u5831\u8868\u5206\u6B04
FR-Designer_Can_not_use_FormatBursh=\u7121\u6CD5\u4F7F\u7528\u8907\u88FD\u683C\u5F0F
CellElement-Property_Table=\u5132\u5B58\u683C\u5C6C\u6027\u8868
Dictionary-Dynamic_SQL=\u52D5\u614BSQL
FR-Designer_Form-CheckBoxGroup=\u5FA9\u9078\u6846\u7D44
@ -2014,7 +2013,6 @@ FR-Designer_Parameter=\u53C3\u6578
FR-Designer-Plugin_Plugin=\u63D2\u4EF6
FR-Designer_Background=\u586B\u6EFF\u8272\u5F69
Template=\u7BC4\u672C
FR-Designer_Original_Marked_Filed=\u539F\u59CB\u6A19\u8A18\u6B04\u4F4D
FR-Designer_Build_Tree_Accord_Marked_Filed_Length=\u4F9D\u8CF4\u6240\u9078\u8CC7\u6599\u96C6\u7684\u6A19\u8A18\u6B04\u4F4D\u7684\u9577\u5EA6\u69CB\u5EFA\u6A39\u72C0
FR-Designer_Can_not_use_FormatBursh=\u7121\u6CD5\u4F7F\u7528\u8907\u88FD\u683C\u5F0F
@ -2025,7 +2023,6 @@ FR-Product_Demo=\u529F\u80FD\u5C55\u793A
FR-Designer_Data_Filter=\u8CC7\u6599\u7BE9\u9078
Default=\u9810\u8A2D
FR-Base-Load_Resource_File=\u52A0\u8F09\u914D\u7F6E\u6A94\u6848
FR-Designer_Cell_Element=\u5132\u5B58\u683C\u5143\u7D20
FR-Designer_Cell_Attributes=\u5132\u5B58\u683C\u5C6C\u6027
FR-Designer_Float_Element=\u61F8\u6D6E\u5143\u7D20
@ -2132,4 +2129,20 @@ FR-Designer-Basic_Dynamic_Parameter_Injection=\u6CE8\u5165
FR-Designer_Label=\u6A19\u7C3D
FR-Designer_Widgetname=\u63A7\u5236\u9805\u540D
FR-Designer_Insert_Cell_Element=\u63D2\u5165\u5143\u7D20
FR-Designer_Add_Condition=
FR-Designer_Add_Condition=
FR-Designer_Widget_Visible=
FR-Designer_Widget_Display_Report_Tool=
FR-Designer_Cell_Value=
FR-Designer_Cell_Visible=
FR-Designer_Widget_Formula=
FR-Designer_Show=
FR-Designer_Widget_Position=
FR-Designer_Float_Visible=
FR-Designer_Widget_String=
FR-Designer_Widget_Field=
FR-Designer_Widget_Enabled=
FR-Designer_Export_Background=
FR-Designer_Print_Background=
FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All=
FR-Designer_Decimal_Places=

4
designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java

@ -77,15 +77,13 @@ public class LogHandlerBar extends JPanel implements ItemSelectable {
public void errorAdd() {
ERRORNUM++;
timerPaint();
}
public void serverAdd() {
SERVERNUM++;
timerPaint();
}
private AtomicBoolean painting = new AtomicBoolean(false);
public void timerPaint() {

6
designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -150,8 +150,10 @@ public abstract class ToolBarMenuDock {
// 添加帮助菜单
menuList.add(createHelpMenuDef());
// 添加社区菜单
addCommunityMenuDef(menuList);
if (FRContext.getLocale() == Locale.CHINA || FRContext.getLocale() == Locale.TAIWAN) {
// 添加社区菜单
addCommunityMenuDef(menuList);
}
// 添加全部UpdateAction到actionmanager中
addAllUpdateActionsToList(menuList);

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

@ -184,7 +184,7 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo
}
private void initbuttonGroup() {
isSupportFS = VT4FR.isLicAvailable(FRCoreContext.getBytes()) && VT4FR.FS_BI.support();
isSupportFS = supportFineDecision();
Icon[] iconArray = null;
String[] textArray = null;
if (isSupportFS) {
@ -212,6 +212,11 @@ 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;
}
@ -543,5 +548,4 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo
tree.collapsePath(parent);
}
}
}
}

17
designer_base/src/com/fr/start/StartServer.java

@ -154,8 +154,7 @@ public class StartServer {
Desktop.getDesktop().browse(new URI(uri));
} catch (IOException e) {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer_Set_default_browser"));
FRContext.getLogger().errorWithServerLevel(e.getMessage(), e);
startBrowserFromCommand(uri, e);
} catch (URISyntaxException e) {
FRContext.getLogger().errorWithServerLevel(e.getMessage(), e);
} catch (Exception e) {
@ -164,6 +163,20 @@ public class StartServer {
}
}
private static void startBrowserFromCommand(String uri, IOException e) {
if (OperatingSystem.isWindows()) {
try {
// win10 内存用到到80%左右的时候, Desktop.browser经常提示"存储空间不足, 无法处理改命令", 用rundll32可以打开.
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + uri);
} catch (IOException ee) {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer_Set_default_browser"));
FRContext.getLogger().errorWithServerLevel(e.getMessage(), e);
}
} else {
FRContext.getLogger().errorWithServerLevel(e.getMessage(), e);
}
}
private static class InformationPane extends BasicPane {
private static final long serialVersionUID = 1L;

4
designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

@ -81,12 +81,12 @@ import com.fr.plugin.chart.treemap.VanChartTreeMapPlot;
import com.fr.plugin.chart.vanchart.imgevent.design.DesignImageEvent;
import com.fr.plugin.chart.wordcloud.VanChartWordCloudPlot;
import com.fr.plugin.chart.wordcloud.designer.WordCloudIndependentVanChartInterface;
import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.injectable.PluginSingleInjection;
import com.fr.plugin.solution.closeable.CloseableContainedMap;
import com.fr.stable.ArrayUtils;
import com.fr.stable.EnvChangedListener;
import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider;
import javax.swing.*;
@ -115,7 +115,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
static {
readDefault();
readVanChart();
StableFactory.registerMarkedObject(XML_TAG, classManager);
PluginModule.registerAgent(PluginModule.ExtraChartDesign, classManager);
}
static {

13
designer_chart/src/com/fr/design/chart/ChartTypePane.java

@ -7,7 +7,11 @@ package com.fr.design.chart;
import com.fr.base.FRContext;
import com.fr.base.FRCoreContext;
import com.fr.chart.base.ChartInternationalNameContentBean;
import com.fr.chart.chartattr.*;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.ChartIcon;
import com.fr.chart.chartattr.MapPlot;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
@ -150,7 +154,7 @@ public class ChartTypePane extends ChartCommonWizardPane {
String plotID = typeName[mainTypeList.getSelectedIndex()].getPlotID();
Chart chart = ChartTypeManager.getInstance().getChartTypes(plotID)[iconViewList.getSelectedIndex()];
if(chart.getPlot() != null){
if(chart.getPlot() instanceof MapPlot && !(VT4FR.isLicAvailable(FRCoreContext.getBytes()) && VT4FR.CHART_MAP.support())){
if(chart.getPlot() instanceof MapPlot && !supportMap()){
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Chart-Map_Not_Supported"));
throw new RegistEditionException(VT4FR.CHART_MAP);
}
@ -165,6 +169,11 @@ public class ChartTypePane extends ChartCommonWizardPane {
}
}
private boolean supportMap() {
byte[] bytes = FRCoreContext.getBytes();
return VT4FR.isLicAvailable(bytes) && VT4FR.CHART_MAP.support();
}
public void update(ChartCollection cc) {
if (cc == null) {
return;

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

@ -1,9 +1,5 @@
package com.fr.design.chart.javascript;
import javax.swing.JComponent;
import javax.swing.JScrollPane;
import javax.swing.SwingConstants;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
@ -14,6 +10,9 @@ import com.fr.design.mainframe.JTemplate;
import com.fr.general.Inter;
import com.fr.js.EmailJavaScript;
import javax.swing.*;
import java.awt.*;
/**
*
* @author jim
@ -30,11 +29,11 @@ public class ChartEmailPane extends EmailPane{
JTemplate jTemplate = DesignerContext.getDesignerFrame().getSelectedJTemplate();
// 是否支持导出控制图表的超链邮件是否显示showTplContent
boolean supportExport = jTemplate.isJWorkBook();
JPanel contentPane;
if (supportExport) {
double[] rSizes = { preferred, preferred, preferred, preferred, preferred, preferred, fill, preferred, preferred};
double[] rSizes = { preferred, preferred, preferred, preferred, preferred, fill, preferred, preferred};
showTplContent = new UICheckBox(Inter.getLocText("Email-Can_Preview_Report_Content"));
centerPane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{
{new UILabel(Inter.getLocText("Name") + ":", SwingConstants.RIGHT), itemNameTextField},
contentPane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{
{new UILabel(), tipsPane1},
createLinePane(Inter.getLocText("HJS-Mail_to"), maitoEditor = new UITextField()),
createLinePane(Inter.getLocText("HJS-CC_to"), ccEditor = new UITextField()),
@ -44,8 +43,8 @@ public class ChartEmailPane extends EmailPane{
{new UILabel(), showTplContent},
{new UILabel(), tipsPane2}},rSizes, columnSize, 6);
} else {
double[] rSizes = { preferred, preferred, preferred, preferred, preferred, preferred, fill, preferred};
centerPane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{
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()),
@ -55,6 +54,17 @@ public class ChartEmailPane extends EmailPane{
{mainTextLabel, scrollPane},
{new UILabel(), tipsPane2}},rSizes, columnSize, 8);
}
centerPane = new JPanel(new BorderLayout());
if (needRenamePane()) {
JPanel namePane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{{new UILabel(Inter.getLocText("Name") + ":", SwingConstants.RIGHT), itemNameTextField},},
new double[] {preferred}, columnSize, 6);
centerPane.add(namePane, BorderLayout.NORTH);
}
centerPane.add(contentPane, BorderLayout.CENTER);
}
protected boolean needRenamePane() {
return true;
}
protected void checkEmailConfig(boolean valid) {

489
designer_chart/src/com/fr/design/chart/series/PlotSeries/MapGroupExtensionPane.java

File diff suppressed because one or more lines are too long

2
designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPopAttrPane.java

@ -147,7 +147,7 @@ public class ChartHyperPopAttrPane extends AbstractChartAttrPane {
* @return 标题
*/
public String title4PopupWindow() {
return Inter.getLocText("FR-Hyperlink_ChartHyperlink");
return Inter.getLocText("Plugin-ChartF_Hyperlink");
}
}

2
designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java

@ -45,7 +45,7 @@ public class ChartHyperPoplinkPane extends BasicBeanPane<ChartHyperPoplink> {
ChartCollection cc = createChartCollection();
chartComponent = new ChartComponent();
chartComponent.setPreferredSize(new Dimension(200, 170));// 在单元格弹出时 需要调整保证属性表的大小.
chartComponent.setPreferredSize(new Dimension(300, 170));// 在单元格弹出时 需要调整保证属性表的大小.
chartComponent.setSupportEdit(false);
chartComponent.populate(cc);

10
designer_chart/src/com/fr/design/mainframe/chart/gui/UIEditLabel.java

@ -16,7 +16,11 @@ import javax.swing.*;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import java.awt.*;
import java.awt.event.*;
import java.awt.event.AWTEventListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
/**
* Created by IntelliJ IDEA.
@ -126,7 +130,7 @@ public class UIEditLabel extends JPanel implements UIObserver{
*/
public void mouseExited(MouseEvent e) {
showLabel.setToolTipText(getTooltip());
UIEditLabel.this.setBackground(UIConstants.NORMAL_BACKGROUND);
UIEditLabel.this.setBackground(UIConstants.SELECT_TAB);
}
});
@ -149,7 +153,7 @@ public class UIEditLabel extends JPanel implements UIObserver{
* 设置成正常的背景
*/
public void resetNomalrBackground(){
UIEditLabel.this.setBackground(UIConstants.NORMAL_BACKGROUND);
UIEditLabel.this.setBackground(UIConstants.SELECT_TAB);
}
private String getTooltip(){

155
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java

@ -5,6 +5,7 @@ import com.fr.base.Utils;
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.NormalReportDataDefinition;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
@ -21,6 +22,7 @@ import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
/**
@ -30,130 +32,138 @@ import java.util.ArrayList;
*/
public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotReportDataContentPane implements UIObserver{
private static final long serialVersionUID = -1122313353777460534L;
private JPanel boxPane;
private UIButton addButton;
private ArrayList<TinyFormulaPane> formualList = new ArrayList<TinyFormulaPane>();
private UIObserverListener uiobListener = null;
public List<TinyFormulaPane> getFormualList() {
return formualList;
}
public CategoryPlotMoreCateReportDataContentPane() {
}
public CategoryPlotMoreCateReportDataContentPane(ChartDataPane parent) {
initEveryPane();
categoryName = initCategoryBox(Inter.getLocText("FR-Chart-Category_Name"));
JPanel catePane = new JPanel();
catePane.setLayout(new BorderLayout(2, 2));
catePane.add(categoryName);
addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
addButton.setPreferredSize(new Dimension(20, 20));
catePane.add(addButton, BorderLayout.EAST);
boxPane = new JPanel();
boxPane.setLayout(new BoxLayout(boxPane, BoxLayout.Y_AXIS));
boxPane.setBackground(Color.red);
catePane.add(boxPane, BorderLayout.SOUTH);
initEveryPane();
categoryName = initCategoryBox(Inter.getLocText("FR-Chart-Category_Name"));
JPanel catePane = new JPanel();
catePane.setLayout(new BorderLayout(2, 2));
catePane.add(categoryName);
addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
addButton.setPreferredSize(new Dimension(20, 20));
catePane.add(addButton, BorderLayout.EAST);
boxPane = new JPanel();
boxPane.setLayout(new BoxLayout(boxPane, BoxLayout.Y_AXIS));
boxPane.setBackground(Color.red);
catePane.add(boxPane, BorderLayout.SOUTH);
catePane.setBorder(BorderFactory.createEmptyBorder(0,24,10,15));
this.add(catePane, "0,0,2,0");
this.add(catePane, "0,0,2,0");
filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent);
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),filterPane);
panel.setBorder(getSidesBorder());
filterPane.setBorder(getFilterPaneBorder());
this.add(panel, "0,6,2,4");
addButton.addActionListener(new ActionListener() {
addButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
addNewCatePane();
}
});
}
/**
* 检查box 是否应该可用状态.
*/
public void checkBoxUse() {
super.checkBoxUse();
String text = categoryName.getUITextField().getText();
addButton.setEnabled(StringUtils.isNotEmpty(text));
}
/**
* 检查box 是否应该可用状态.
*/
public void checkBoxUse() {
super.checkBoxUse();
String text = categoryName.getUITextField().getText();
addButton.setEnabled(StringUtils.isNotEmpty(text));
}
private TinyFormulaPane addNewCatePane() {
final TinyFormulaPane pane = initCategoryBox(StringUtils.EMPTY);
pane.setPreferredSize(new Dimension(106, 16));
pane.registerChangeListener(uiobListener);
formualList.add(pane);
final JPanel newButtonPane = new JPanel();
newButtonPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0));
newButtonPane.add(pane);
UIButton delButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/toolbarbtn/close.png"));
newButtonPane.add(delButton);
boxPane.add(newButtonPane);
delButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
boxPane.remove(newButtonPane);
formualList.remove(pane);
checkAddButton();
checkComponent();
relayoutPane();
}
});
delButton.registerChangeListener(uiobListener);
checkAddButton();
checkComponent();
relayoutPane();
return pane;
}
private void checkAddButton() {
int size = formualList.size();
addButton.setEnabled(size < 2);
}
protected void checkComponent() {
checkAddButton();
}
private void relayoutPane() {
this.revalidate();
}
/**
* 给组件登记一个观察者监听事件
*
* @param listener 观察者监听事件
*/
/**
* 给组件登记一个观察者监听事件
*
* @param listener 观察者监听事件
*/
public void registerChangeListener(UIObserverListener listener) {
uiobListener = listener;
}
/**
* 组件是否需要响应添加的观察者事件
*
* @return 如果需要响应观察者事件则返回true否则返回false
*/
/**
* 组件是否需要响应添加的观察者事件
*
* @return 如果需要响应观察者事件则返回true否则返回false
*/
public boolean shouldResponseChangeListener() {
return true;
}
public void populateBean(ChartCollection collection) {
super.populateBean(collection);
formualList.clear();
TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition();
if (definition instanceof NormalReportDataDefinition) {
NormalReportDataDefinition reportDefinition = (NormalReportDataDefinition) definition;
@ -165,23 +175,28 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
}
}
}
checkAddButton();
}
public void updateBean(ChartCollection collection) {
super.updateBean(collection);
TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition();
Plot plot = collection.getSelectedChart().getPlot();
if (definition instanceof NormalReportDataDefinition) {
NormalReportDataDefinition reportDefinition = (NormalReportDataDefinition) definition;
reportDefinition.clearMoreCate();
for(int i = 0, size = formualList.size(); i < size; i++) {
TinyFormulaPane pane = formualList.get(i);
reportDefinition.addMoreCate(canBeFormula(pane.updateBean()));
}
updateMoreCate(reportDefinition, plot);
}
}
protected void updateMoreCate(NormalReportDataDefinition reportDefinition, Plot plot) {
for (int i = 0, size = formualList.size(); i < size; i++) {
TinyFormulaPane pane = formualList.get(i);
reportDefinition.addMoreCate(canBeFormula(pane.updateBean()));
}
}
}

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

@ -6,7 +6,16 @@ import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.base.AttrContents;
import com.fr.chart.base.ChartConstants;
import com.fr.chart.base.TimeSwitchAttr;
import com.fr.chart.chartattr.*;
import com.fr.chart.chartattr.BubblePlot;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.GanttPlot;
import com.fr.chart.chartattr.GisMapPlot;
import com.fr.chart.chartattr.MapPlot;
import com.fr.chart.chartattr.MeterPlot;
import com.fr.chart.chartattr.PiePlot;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartattr.StockPlot;
import com.fr.chart.chartattr.XYScatterPlot;
import com.fr.chart.chartdata.GisMapReportDefinition;
import com.fr.chart.chartdata.GisMapTableDefinition;
import com.fr.chart.web.ChartHyperPoplink;
@ -39,7 +48,16 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartOtherPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.js.*;
import com.fr.js.EmailJavaScript;
import com.fr.js.FormHyperlinkProvider;
import com.fr.js.JavaScript;
import com.fr.js.JavaScriptImpl;
import com.fr.js.NameJavaScript;
import com.fr.js.NameJavaScriptGroup;
import com.fr.js.ParameterJavaScript;
import com.fr.js.ReportletHyperlink;
import com.fr.js.WebHyperlink;
import com.fr.plugin.chart.designer.component.format.FormatPaneWithOutFont;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory;
@ -48,7 +66,12 @@ import com.fr.third.org.hsqldb.lib.Iterator;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.text.DecimalFormat;
import java.text.Format;
import java.util.ArrayList;
@ -215,7 +238,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
@Override
public void mouseClicked(MouseEvent e) {
if (percentFormatPane == null) {
percentFormatPane = new FormatPane();
percentFormatPane = new FormatPaneWithOutFont();
}
DecimalFormat defaultFormat = new CoreDecimalFormat(new DecimalFormat(), "#.##%");

16
designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartDatapointLabelPane.java

@ -9,6 +9,7 @@ import com.fr.chart.base.ChartConstants;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.chartattr.Plot;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.frpane.UIBubbleFloatPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
@ -18,15 +19,20 @@ import com.fr.design.gui.style.FormatPane;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.dialog.BasicPane;
import com.fr.general.FRFont;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.component.format.FormatPaneWithOutFont;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.text.DecimalFormat;
import java.text.Format;
import java.util.HashMap;
@ -226,7 +232,7 @@ public class ChartDatapointLabelPane extends BasicPane{
}
if(valueFormatPane == null) {
valueFormatPane = new FormatPane();
valueFormatPane = new FormatPaneWithOutFont();
}
Point comPoint = valueFormatButton.getLocationOnScreen();
Point arrowPoint = new Point(comPoint.x + valueFormatButton.getWidth(), comPoint.y + valueFormatButton.getHeight());
@ -255,7 +261,7 @@ public class ChartDatapointLabelPane extends BasicPane{
}
if(percentFormatPane == null) {
percentFormatPane = new FormatPane();
percentFormatPane = new FormatPaneWithOutFont();
}
Point comPoint = valuePercentFormatButton.getLocationOnScreen();
Point arrowPoint = new Point(comPoint.x + valuePercentFormatButton.getWidth(), comPoint.y + valuePercentFormatButton.getHeight());
@ -429,7 +435,7 @@ public class ChartDatapointLabelPane extends BasicPane{
protected void updatePercentFormatpane(){
if(isValuePercent!= null && isValuePercent.isSelected()){
if(this.percentFormatPane == null){
this.percentFormatPane = new FormatPane();
this.percentFormatPane = new FormatPaneWithOutFont();
}
if(this.percentFormat == null){
DecimalFormat defaultFormat = new CoreDecimalFormat(new DecimalFormat("#.##%"), "#.##%");

42
designer_chart/src/com/fr/design/mainframe/chart/gui/type/UserDefinedChartTypePane.java

@ -0,0 +1,42 @@
package com.fr.design.mainframe.chart.gui.type;
import com.fr.chart.chartattr.Chart;
/**
* Created by mengao on 2017/8/30.
* 不能删掉这个类echarts插件中用到
*/
public abstract class UserDefinedChartTypePane extends AbstractChartTypePane {
protected String[] getTypeLayoutPath() {
return new String[0];
}
protected String[] getTypeLayoutTipName(){
return new String[0];
}
protected String[] getTypeIconPath(){
return new String[]{"/com/fr/design/images/chart/default.png"};
}
protected String[] getTypeTipName() {
return new String[]{title4PopupWindow()};
}
public void updateBean(Chart chart) {
}
public void populateBean(Chart chart){
typeDemo.get(0).isPressing = true;
checkDemosBackground();
}
/**
* 弹出界面的标题
* @return 标题
*/
public String title4PopupWindow(){
return "";
}
}

5
designer_chart/src/com/fr/plugin/chart/area/VanChartAreaSeriesPane.java

@ -40,11 +40,6 @@ public class VanChartAreaSeriesPane extends VanChartLineSeriesPane{
return contentPane;
}
//设置色彩面板内容
protected void setColorPaneContent (JPanel panel) {
panel.add(createStylePane(), BorderLayout.CENTER);
}
protected Class<? extends BasicBeanPane> getStackAndAxisPaneClass() {
return VanChartCustomStackAndAxisConditionPane.class;
}

111
designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java

@ -6,18 +6,12 @@ import com.fr.chart.web.ChartHyperRelateCellLink;
import com.fr.chart.web.ChartHyperRelateFloatLink;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chart.javascript.ChartEmailPane;
import com.fr.design.designer.TargetComponent;
import com.fr.design.fun.HyperlinkProvider;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.imenutable.UIMenuNameableCreator;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.module.DesignModuleFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.js.EmailJavaScript;
@ -29,16 +23,12 @@ import com.fr.js.NameJavaScriptGroup;
import com.fr.js.ParameterJavaScript;
import com.fr.js.ReportletHyperlink;
import com.fr.js.WebHyperlink;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.designer.component.VanChartUIListControlPane;
import com.fr.plugin.chart.designer.other.HyperlinkMapFactory;
import com.fr.stable.ListMap;
import com.fr.stable.Nameable;
import com.fr.stable.bridge.StableFactory;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
@ -47,7 +37,7 @@ import java.util.Set;
/**
* Created by Fangjie on 2016/4/28.
*/
public class VanChartHyperLinkPane extends UIListControlPane {
public class VanChartHyperLinkPane extends VanChartUIListControlPane {
public VanChartHyperLinkPane() {
super();
@ -115,19 +105,7 @@ public class VanChartHyperLinkPane extends UIListControlPane {
return new NameJavaScriptGroup(res_array);
}
@Override
public void saveSettings() {
if (isPopulating) {
return;
}
update((VanChartPlot) plot);
}
public void populate(Plot plot) {
//特殊处理,使用instanceof判断,处理连续弹窗问题
if (SwingUtilities.getWindowAncestor(this) instanceof JDialog) {
popupEditDialog = new HyperDialog(cardPane);
}
this.plot = plot;
HashMap paneMap = getHyperlinkMap(plot);
@ -207,7 +185,7 @@ public class VanChartHyperLinkPane extends UIListControlPane {
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Reportlet"),
new ReportletHyperlink(), getUseMap(map, ReportletHyperlink.class)));
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Mail"), new EmailJavaScript(), ChartEmailPane.class));
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Mail"), new EmailJavaScript(), HyperlinkMapFactory.VanChartEmailPane.class));
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Web"),
new WebHyperlink(), getUseMap(map, WebHyperlink.class)));
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Dynamic_Parameters"),
@ -240,87 +218,4 @@ public class VanChartHyperLinkPane extends UIListControlPane {
}
return null;
}
protected void popupEditDialog(Point mousePos) {
//特殊处理,处理连续弹窗情况
if (SwingUtilities.getWindowAncestor(this) instanceof JDialog) {
GUICoreUtils.centerWindow(popupEditDialog);
popupEditDialog.setVisible(true);
return;
}
super.popupEditDialog(mousePos);
}
// 点击"编辑"按钮,弹出面板
protected class HyperDialog extends JDialog {
private JComponent editPane;
private static final int WIDTH = 570;
private static final int HEIGHT = 490;
private UIButton okButton, cancelButton;
HyperDialog(JComponent pane) {
super(DesignerContext.getDesignerFrame(), true);
pane.setBorder(BorderFactory.createEmptyBorder(20, 10, 10, 10));
this.editPane = pane;
JPanel editPaneWrapper = new JPanel(new BorderLayout());
editPaneWrapper.add(editPane, BorderLayout.CENTER);
this.getContentPane().add(editPaneWrapper, BorderLayout.CENTER);
this.getContentPane().add(createControlButtonPane(), BorderLayout.SOUTH);
setSize(WIDTH, HEIGHT);
this.setVisible(false);
}
private JPanel createControlButtonPane() {
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 10, 0));
controlPane.add(buttonsPane, BorderLayout.EAST);
//确定
addOkButton(buttonsPane);
//取消
addCancelButton(buttonsPane);
controlPane.setBorder(BorderFactory.createEmptyBorder(10,0,10,0));
return controlPane;
}
private void addCancelButton(JPanel buttonsPane) {
cancelButton = new UIButton(Inter.getLocText("Cancel"));
buttonsPane.add(cancelButton);
cancelButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
doCancel();
}
});
}
private void addOkButton(JPanel buttonsPane) {
okButton = new UIButton(Inter.getLocText("OK"));
buttonsPane.add(okButton);
okButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
doOK();
}
});
}
public void doOK() {
saveSettings();
setVisible(false);
}
public void doCancel() {
setVisible(false);
}
}
}

5
designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomSeriesPane.java

@ -6,10 +6,8 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.style.ChartFillStylePane;
import com.fr.design.mainframe.chart.gui.style.series.ChartSeriesPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.custom.VanChartCustomPlot;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartBeautyPane;
import com.fr.plugin.chart.designer.component.VanChartFillStylePane;
@ -81,9 +79,8 @@ public class VanChartCustomSeriesPane extends ChartSeriesPane {
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);
JPanel colorPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Color"),panel);
panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15));
return colorPane;
return panel;
}
/**

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

@ -27,6 +27,7 @@ public abstract class AbstractVanChartScrollPane<T> extends BasicScrollPane<T> {
} else {
leftcontentPane.setBounds(0, 0, width, height);
leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 5, 0, 10, original));
}
}
public void reloaPane(JPanel pane){

133
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartUIListControlPane.java

@ -0,0 +1,133 @@
package com.fr.plugin.chart.designer.component;
import com.fr.base.chart.BasePlot;
import com.fr.chart.chartattr.Plot;
import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.stable.Nameable;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* Created by mengao on 2017/9/8.
* 新图表UIListControlPane基础面板
*/
public abstract class VanChartUIListControlPane extends UIListControlPane {
public VanChartUIListControlPane() {
super();
}
public VanChartUIListControlPane(BasePlot plot) {
super(plot);
}
@Override
public void saveSettings() {
if (isPopulating) {
return;
}
update((Plot) plot);
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
}
protected abstract void update(Plot plot);
//-------------------连续弹窗问题 start-------------------//
public void populate (Nameable[] nameableArray) {
//特殊处理,使用instanceof判断,弹出不同的面板
if (SwingUtilities.getWindowAncestor(this) instanceof JDialog) {
popupEditDialog = new HyperDialog(cardPane);
}
super.populate(nameableArray);
}
protected void popupEditDialog(Point mousePos) {
//特殊处理,处理连续弹窗情况,弹出面板定为方式不同
if (SwingUtilities.getWindowAncestor(this) instanceof JDialog) {
GUICoreUtils.centerWindow(popupEditDialog);
popupEditDialog.setVisible(true);
return;
}
super.popupEditDialog(mousePos);
}
// 点击"编辑"按钮,弹出面板(这个面板是弹窗里面的弹窗)
protected class HyperDialog extends JDialog {
private JComponent editPane;
private static final int WIDTH = 570;
private static final int HEIGHT = 490;
private UIButton okButton, cancelButton;
HyperDialog(JComponent pane) {
super(DesignerContext.getDesignerFrame(), true);
pane.setBorder(BorderFactory.createEmptyBorder(20, 10, 10, 10));
this.editPane = pane;
JPanel editPaneWrapper = new JPanel(new BorderLayout());
editPaneWrapper.add(editPane, BorderLayout.CENTER);
this.getContentPane().add(editPaneWrapper, BorderLayout.CENTER);
this.getContentPane().add(createControlButtonPane(), BorderLayout.SOUTH);
setSize(WIDTH, HEIGHT);
this.setVisible(false);
}
private JPanel createControlButtonPane() {
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 10, 0));
controlPane.add(buttonsPane, BorderLayout.EAST);
//确定
addOkButton(buttonsPane);
//取消
addCancelButton(buttonsPane);
controlPane.setBorder(BorderFactory.createEmptyBorder(10,0,10,0));
return controlPane;
}
private void addCancelButton(JPanel buttonsPane) {
cancelButton = new UIButton(Inter.getLocText("Cancel"));
buttonsPane.add(cancelButton);
cancelButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
doCancel();
}
});
}
private void addOkButton(JPanel buttonsPane) {
okButton = new UIButton(Inter.getLocText("OK"));
buttonsPane.add(okButton);
okButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
doOK();
}
});
}
public void doOK() {
saveSettings();
setVisible(false);
}
public void doCancel() {
setVisible(false);
}
}
}

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

@ -92,7 +92,7 @@ public abstract class VanChartFormatPaneWithCheckBox extends JPanel{
formatPane = createFormatPane();
}
Point comPoint = formatButton.getLocationOnScreen();
Point arrowPoint = new Point(comPoint.x + formatButton.getWidth(), comPoint.y + formatButton.getHeight());
Point arrowPoint = new Point(comPoint.x, comPoint.y + formatButton.getHeight());
UIBubbleFloatPane<Style> pane = new UIBubbleFloatPane(Constants.LEFT, arrowPoint, formatPane, 258, 209) {
@Override

22
designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPane.java

@ -10,7 +10,6 @@ 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;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.RefreshMoreLabel;
@ -86,11 +85,19 @@ public class AutoRefreshPane extends BasicBeanPane<RefreshMoreLabel> {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f, 20};
double[] rowSize = {p, p};
double[] column = {f, 20};
double[] rowSize = {p};
Component[][] components = initComponent(jPanel);
contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
contentPane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0));
JPanel panel1 = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
contentPane = new JPanel(new BorderLayout());
contentPane.add(panel1, BorderLayout.CENTER);
Component[][] AutoTooltipComponent = initAutoTooltipComponent();
JPanel panel2 = TableLayout4VanChartHelper.createGapTableLayoutPane(AutoTooltipComponent, rowSize, column);
panel2.setBorder(BorderFactory.createEmptyBorder(10, 0,0,0));
contentPane.add(panel2, BorderLayout.SOUTH);
contentPane.setBorder(BorderFactory.createEmptyBorder(0, 72,0,0));
content.add(moreLabelPane, BorderLayout.NORTH);
content.add(contentPane, BorderLayout.CENTER);
return content;
@ -105,6 +112,13 @@ public class AutoRefreshPane extends BasicBeanPane<RefreshMoreLabel> {
}
protected Component[][] initAutoTooltipComponent () {
return new Component[][]{
new Component[]{autoTooltip, tooltipSet},
};
}
private void initTooltipSet() {
tooltipSet = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/config.png"));
tooltipSet.setPreferredSize(new Dimension(20, 20));

7
designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPaneWithoutTooltip.java

@ -1,11 +1,8 @@
package com.fr.plugin.chart.designer.other;
import com.fr.design.gui.ilable.UILabel;
import com.fr.general.Inter;
import com.fr.plugin.chart.base.RefreshMoreLabel;
import com.fr.plugin.chart.vanchart.VanChart;
import javax.swing.*;
import java.awt.*;
/**
@ -17,9 +14,9 @@ public class AutoRefreshPaneWithoutTooltip extends AutoRefreshPane {
super(chart, isLargeModel);
}
protected Component[][] initComponent(JPanel autoTooltipPane){
protected Component[][] initAutoTooltipComponent () {
return new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), getAutoRefreshTime(),new UILabel(Inter.getLocText("Chart-Time_Seconds"))}
new Component[]{null, null},
};
}

339
designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java

@ -116,28 +116,28 @@ public class HyperlinkMapFactory {
public static HashMap getHyperlinkMap(Plot plot) {
String plotType = plotTypeMap.get(plot.getClass().getName() + plot.getDetailType());
if(plotType == null){
if (plotType == null) {
plotType = plotTypeMap.get(plot.getClass().getName());
if(plotType == null) {
if (plotType == null) {
plotType = NORMAL;
}
}
return getHyperlinkMapWithType(plotType);
}
public static HashMap getDrillUpLinkMap(){
public static HashMap getDrillUpLinkMap() {
return getHyperlinkMapWithType(DIRLLMAPCATALOG);
}
public static HashMap getLineMapHyperLinkMap(){
public static HashMap getLineMapHyperLinkMap() {
return getHyperlinkMapWithType(LINEMAP);
}
private static HashMap getHyperlinkMapWithType(String plotType){
private static HashMap getHyperlinkMapWithType(String plotType) {
HashMap<Class, Class> map = new HashMap<Class, Class>();
map.put(ReportletHyperlink.class, getClassWithPrefix(HyperlinkMapFactory.Report.class, plotType));
map.put(EmailJavaScript.class, ChartEmailPane.class);
map.put(EmailJavaScript.class, VanChartEmailPane.class);
map.put(WebHyperlink.class, getClassWithPrefix(HyperlinkMapFactory.Web.class, plotType));
map.put(ParameterJavaScript.class, getClassWithPrefix(HyperlinkMapFactory.Para.class, plotType));
@ -150,9 +150,9 @@ public class HyperlinkMapFactory {
return map;
}
private static Class getClassWithPrefix(Class superClass, String plotType){
private static Class getClassWithPrefix(Class superClass, String plotType) {
String wholeClassString = superClass.getName() + plotType;
try{
try {
return Class.forName(wholeClassString);
} catch (Exception e) {
return superClass;
@ -386,78 +386,90 @@ public class HyperlinkMapFactory {
return ValueEditorPaneFactory.createValueEditorPane(addBasicEditors(list));
}
//网络报表
public static class Report{
public static class VAN_CHART extends ReportletHyperlinkPane.CHART{
public static class Report {
public static class VAN_CHART extends ReportletHyperlinkPane.CHART {
@Override
protected boolean needRenamePane() {
return false;
}
}
public static class VAN_CHART_MULTICATEGORY extends ReportletHyperlinkPane.CHART{
public static class VAN_CHART_MULTICATEGORY extends Report.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMultiCategoryEditorPane();
}
}
public static class VAN_CHART_SCATTER extends ReportletHyperlinkPane.CHART{
public static class VAN_CHART_SCATTER extends Report.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getScatterValueEditorPane();
return getScatterValueEditorPane();
}
}
public static class VAN_CHART_GANNT extends ReportletHyperlinkPane.CHART{
public static class VAN_CHART_GANNT extends Report.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane(){
protected ValueEditorPane getValueEditorPane() {
return getGanntValueEditorPane();
}
}
public static class VAN_CHART_MULTIPIE extends ReportletHyperlinkPane.CHART{
public static class VAN_CHART_MULTIPIE extends Report.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMultiPieValueEditorPane();
}
}
public static class VAN_CHART_GAUGE extends ReportletHyperlinkPane.CHART_METER{
public static class VAN_CHART_GAUGE extends ReportletHyperlinkPane.CHART_METER {
@Override
protected boolean needRenamePane() {
return false;
}
}
public static class VAN_CHART_MAP extends ReportletHyperlinkPane.CHART{
public static class VAN_CHART_MAP extends Report.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMapValueEditorPane();
}
}
public static class VAN_CHART_LINE_MAP extends ReportletHyperlinkPane.CHART{
public static class VAN_CHART_LINE_MAP extends Report.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getLineMapValueEditorPane();
}
}
public static class VAN_CHART_DRILLMAPCATALOG extends ReportletHyperlinkPane.CHART{
public static class VAN_CHART_DRILLMAPCATALOG extends Report.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getDrillMapCatalogValueEditorPane();
}
}
public static class VAN_CHART_FUNNEL extends ReportletHyperlinkPane.CHART{
public static class VAN_CHART_FUNNEL extends Report.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getFunnelValueEditorPane();
}
}
public static class VAN_CHART_WORDCLOUD extends ReportletHyperlinkPane.CHART{
public static class VAN_CHART_WORDCLOUD extends Report.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getWordCloudValueEditorPane();
}
}
public static class VAN_CHART_STRUCTURE extends ReportletHyperlinkPane.CHART{
public static class VAN_CHART_STRUCTURE extends Report.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getStructureValueEditorPane();
@ -465,42 +477,61 @@ public class HyperlinkMapFactory {
}
}
//邮箱
public static class VanChartEmailPane extends ChartEmailPane {
@Override
protected boolean needRenamePane() {
return false;
}
}
//网页链接
public static class Web{
public static class VAN_CHART extends WebHyperlinkPane.CHART{
public static class Web {
public static class VAN_CHART extends WebHyperlinkPane.CHART {
@Override
protected boolean needRenamePane() {
return false;
}
}
public static class VAN_CHART_MULTICATEGORY extends WebHyperlinkPane.CHART{
public static class VAN_CHART_MULTICATEGORY extends Web.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMultiCategoryEditorPane();
}
}
public static class VAN_CHART_SCATTER extends WebHyperlinkPane.CHART{
public static class VAN_CHART_SCATTER extends Web.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getScatterValueEditorPane();
}
}
public static class VAN_CHART_GANNT extends WebHyperlinkPane.CHART{
public static class VAN_CHART_GANNT extends Web.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane(){
protected ValueEditorPane getValueEditorPane() {
return getGanntValueEditorPane();
}
}
public static class VAN_CHART_GAUGE extends WebHyperlinkPane.CHART_METER{
public static class VAN_CHART_GAUGE extends WebHyperlinkPane.CHART_METER {
@Override
protected boolean needRenamePane() {
return false;
}
}
public static class VAN_CHART_MAP extends WebHyperlinkPane.CHART{
public static class VAN_CHART_MAP extends Web.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMapValueEditorPane();
}
}
public static class VAN_CHART_LINE_MAP extends WebHyperlinkPane.CHART{
public static class VAN_CHART_LINE_MAP extends Web.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getLineMapValueEditorPane();
@ -508,34 +539,34 @@ public class HyperlinkMapFactory {
}
public static class VAN_CHART_DRILLMAPCATALOG extends WebHyperlinkPane.CHART{
public static class VAN_CHART_DRILLMAPCATALOG extends Web.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane(){
protected ValueEditorPane getValueEditorPane() {
return getDrillMapCatalogValueEditorPane();
}
}
public static class VAN_CHART_MULTIPIE extends WebHyperlinkPane.CHART{
public static class VAN_CHART_MULTIPIE extends Web.VAN_CHART {
protected ValueEditorPane getValueEditorPane() {
return getMultiPieValueEditorPane();
}
}
public static class VAN_CHART_FUNNEL extends WebHyperlinkPane.CHART{
public static class VAN_CHART_FUNNEL extends Web.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getFunnelValueEditorPane();
}
}
public static class VAN_CHART_WORDCLOUD extends WebHyperlinkPane.CHART{
public static class VAN_CHART_WORDCLOUD extends Web.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getWordCloudValueEditorPane();
}
}
public static class VAN_CHART_STRUCTURE extends WebHyperlinkPane.CHART{
public static class VAN_CHART_STRUCTURE extends Web.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getStructureValueEditorPane();
@ -544,42 +575,52 @@ public class HyperlinkMapFactory {
}
//动态参数
public static class Para{
public static class VAN_CHART extends ParameterJavaScriptPane.CHART{
public static class Para {
public static class VAN_CHART extends ParameterJavaScriptPane.CHART {
@Override
protected boolean needRenamePane() {
return false;
}
}
public static class VAN_CHART_MULTICATEGORY extends ParameterJavaScriptPane.CHART{
public static class VAN_CHART_MULTICATEGORY extends Para.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMultiCategoryEditorPane();
}
}
public static class VAN_CHART_SCATTER extends ParameterJavaScriptPane.CHART{
public static class VAN_CHART_SCATTER extends Para.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getScatterValueEditorPane();
}
}
public static class VAN_CHART_GANNT extends ParameterJavaScriptPane.CHART{
public static class VAN_CHART_GANNT extends Para.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane(){
protected ValueEditorPane getValueEditorPane() {
return getGanntValueEditorPane();
}
}
public static class VAN_CHART_GAUGE extends ParameterJavaScriptPane.CHART_METER{
public static class VAN_CHART_GAUGE extends ParameterJavaScriptPane.CHART_METER {
@Override
protected boolean needRenamePane() {
return false;
}
}
public static class VAN_CHART_MAP extends ParameterJavaScriptPane.CHART{
public static class VAN_CHART_MAP extends Para.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMapValueEditorPane();
}
}
public static class VAN_CHART_LINE_MAP extends ParameterJavaScriptPane.CHART{
public static class VAN_CHART_LINE_MAP extends Para.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getLineMapValueEditorPane();
@ -587,34 +628,34 @@ public class HyperlinkMapFactory {
}
public static class VAN_CHART_DRILLMAPCATALOG extends ParameterJavaScriptPane.CHART{
public static class VAN_CHART_DRILLMAPCATALOG extends Para.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane(){
protected ValueEditorPane getValueEditorPane() {
return getDrillMapCatalogValueEditorPane();
}
}
public static class VAN_CHART_MULTIPIE extends ParameterJavaScriptPane.CHART{
public static class VAN_CHART_MULTIPIE extends Para.VAN_CHART {
protected ValueEditorPane getValueEditorPane() {
return getMultiPieValueEditorPane();
}
}
public static class VAN_CHART_FUNNEL extends ParameterJavaScriptPane.CHART{
public static class VAN_CHART_FUNNEL extends Para.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getFunnelValueEditorPane();
}
}
public static class VAN_CHART_WORDCLOUD extends ParameterJavaScriptPane.CHART{
public static class VAN_CHART_WORDCLOUD extends Para.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getWordCloudValueEditorPane();
}
}
public static class VAN_CHART_STRUCTURE extends ParameterJavaScriptPane.CHART{
public static class VAN_CHART_STRUCTURE extends Para.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getStructureValueEditorPane();
@ -623,76 +664,86 @@ public class HyperlinkMapFactory {
}
//js超链
public static class Js{
public static class VAN_CHART extends JavaScriptImplPane.CHART{
public static class Js {
public static class VAN_CHART extends JavaScriptImplPane.CHART {
@Override
protected boolean needRenamePane() {
return false;
}
}
public static class VAN_CHART_MULTICATEGORY extends JavaScriptImplPane.CHART{
public static class VAN_CHART_MULTICATEGORY extends Js.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMultiCategoryEditorPane();
}
}
public static class VAN_CHART_SCATTER extends JavaScriptImplPane.CHART{
public static class VAN_CHART_SCATTER extends Js.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getScatterValueEditorPane();
}
}
public static class VAN_CHART_GANNT extends JavaScriptImplPane.CHART{
public static class VAN_CHART_GANNT extends Js.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane(){
protected ValueEditorPane getValueEditorPane() {
return getGanntValueEditorPane();
}
}
public static class VAN_CHART_GAUGE extends JavaScriptImplPane.CHART_METER{
public static class VAN_CHART_GAUGE extends Js.VAN_CHART {
@Override
protected boolean needRenamePane() {
return false;
}
}
public static class VAN_CHART_MAP extends JavaScriptImplPane.CHART{
public static class VAN_CHART_MAP extends Js.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMapValueEditorPane();
}
}
public static class VAN_CHART_LINE_MAP extends JavaScriptImplPane.CHART{
public static class VAN_CHART_LINE_MAP extends Js.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getLineMapValueEditorPane();
}
}
public static class VAN_CHART_DRILLMAPCATALOG extends JavaScriptImplPane.CHART{
public static class VAN_CHART_DRILLMAPCATALOG extends Js.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane(){
protected ValueEditorPane getValueEditorPane() {
return getDrillMapCatalogValueEditorPane();
}
}
public static class VAN_CHART_MULTIPIE extends JavaScriptImplPane.CHART{
public static class VAN_CHART_MULTIPIE extends Js.VAN_CHART {
protected ValueEditorPane getValueEditorPane() {
return getMultiPieValueEditorPane();
}
}
public static class VAN_CHART_FUNNEL extends JavaScriptImplPane.CHART{
public static class VAN_CHART_FUNNEL extends Js.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getFunnelValueEditorPane();
}
}
public static class VAN_CHART_WORDCLOUD extends JavaScriptImplPane.CHART{
public static class VAN_CHART_WORDCLOUD extends Js.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getWordCloudValueEditorPane();
}
}
public static class VAN_CHART_STRUCTURE extends JavaScriptImplPane.CHART{
public static class VAN_CHART_STRUCTURE extends Js.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getStructureValueEditorPane();
@ -701,76 +752,84 @@ public class HyperlinkMapFactory {
}
//图表超链-悬浮窗图表
public static class Chart_Chart{
public static class VAN_CHART extends ChartHyperPoplinkPane{
public static class Chart_Chart {
public static class VAN_CHART extends ChartHyperPoplinkPane {
@Override
protected boolean needRenamePane() {
return false;
}
}
public static class VAN_CHART_MULTICATEGORY extends ChartHyperPoplinkPane{
public static class VAN_CHART_MULTICATEGORY extends Chart_Chart.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMultiCategoryEditorPane();
}
}
public static class VAN_CHART_SCATTER extends ChartHyperPoplinkPane{
public static class VAN_CHART_SCATTER extends Chart_Chart.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getScatterValueEditorPane();
}
}
public static class VAN_CHART_GANNT extends ChartHyperPoplinkPane{
public static class VAN_CHART_GANNT extends Chart_Chart.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane(){
protected ValueEditorPane getValueEditorPane() {
return getGanntValueEditorPane();
}
}
public static class VAN_CHART_GAUGE extends ChartHyperPoplinkPane.CHART_METER{
public static class VAN_CHART_GAUGE extends ChartHyperPoplinkPane.CHART_METER {
@Override
protected boolean needRenamePane() {
return false;
}
}
public static class VAN_CHART_MAP extends ChartHyperPoplinkPane{
public static class VAN_CHART_MAP extends Chart_Chart.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMapValueEditorPane();
}
}
public static class VAN_CHART_LINE_MAP extends ChartHyperPoplinkPane{
public static class VAN_CHART_LINE_MAP extends Chart_Chart.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getLineMapValueEditorPane();
}
}
public static class VAN_CHART_DRILLMAPCATALOG extends ChartHyperPoplinkPane{
public static class VAN_CHART_DRILLMAPCATALOG extends Chart_Chart.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane(){
protected ValueEditorPane getValueEditorPane() {
return getDrillMapCatalogValueEditorPane();
}
}
public static class VAN_CHART_MULTIPIE extends ChartHyperPoplinkPane{
public static class VAN_CHART_MULTIPIE extends Chart_Chart.VAN_CHART {
protected ValueEditorPane getValueEditorPane() {
return getMultiPieValueEditorPane();
}
}
public static class VAN_CHART_FUNNEL extends ChartHyperPoplinkPane{
public static class VAN_CHART_FUNNEL extends Chart_Chart.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getFunnelValueEditorPane();
}
}
public static class VAN_CHART_WORDCLOUD extends ChartHyperPoplinkPane{
public static class VAN_CHART_WORDCLOUD extends Chart_Chart.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getWordCloudValueEditorPane();
}
}
public static class VAN_CHART_STRUCTURE extends ChartHyperPoplinkPane{
public static class VAN_CHART_STRUCTURE extends Chart_Chart.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getStructureValueEditorPane();
@ -779,76 +838,84 @@ public class HyperlinkMapFactory {
}
//图表超链-联动单元格
public static class Chart_Cell{
public static class VAN_CHART extends ChartHyperRelateCellLinkPane{
public static class Chart_Cell {
public static class VAN_CHART extends ChartHyperRelateCellLinkPane {
@Override
protected boolean needRenamePane() {
return false;
}
}
public static class VAN_CHART_MULTICATEGORY extends ChartHyperRelateCellLinkPane{
public static class VAN_CHART_MULTICATEGORY extends Chart_Cell.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMultiCategoryEditorPane();
}
}
public static class VAN_CHART_SCATTER extends ChartHyperRelateCellLinkPane{
public static class VAN_CHART_SCATTER extends Chart_Cell.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getScatterValueEditorPane();
}
}
public static class VAN_CHART_GANNT extends ChartHyperRelateCellLinkPane{
public static class VAN_CHART_GANNT extends Chart_Cell.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane(){
protected ValueEditorPane getValueEditorPane() {
return getGanntValueEditorPane();
}
}
public static class VAN_CHART_GAUGE extends ChartHyperRelateCellLinkPane.CHART_METER{
public static class VAN_CHART_GAUGE extends ChartHyperRelateCellLinkPane.CHART_METER {
@Override
protected boolean needRenamePane() {
return false;
}
}
public static class VAN_CHART_MAP extends ChartHyperRelateCellLinkPane{
public static class VAN_CHART_MAP extends Chart_Cell.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMapValueEditorPane();
}
}
public static class VAN_CHART_LINE_MAP extends ChartHyperRelateCellLinkPane{
public static class VAN_CHART_LINE_MAP extends Chart_Cell.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getLineMapValueEditorPane();
}
}
public static class VAN_CHART_DRILLMAPCATALOG extends ChartHyperRelateCellLinkPane{
public static class VAN_CHART_DRILLMAPCATALOG extends Chart_Cell.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane(){
protected ValueEditorPane getValueEditorPane() {
return getDrillMapCatalogValueEditorPane();
}
}
public static class VAN_CHART_MULTIPIE extends ChartHyperRelateCellLinkPane{
public static class VAN_CHART_MULTIPIE extends Chart_Cell.VAN_CHART {
protected ValueEditorPane getValueEditorPane() {
return getMultiPieValueEditorPane();
}
}
public static class VAN_CHART_FUNNEL extends ChartHyperRelateCellLinkPane{
public static class VAN_CHART_FUNNEL extends Chart_Cell.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getFunnelValueEditorPane();
}
}
public static class VAN_CHART_WORDCLOUD extends ChartHyperRelateCellLinkPane{
public static class VAN_CHART_WORDCLOUD extends Chart_Cell.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getWordCloudValueEditorPane();
}
}
public static class VAN_CHART_STRUCTURE extends ChartHyperRelateCellLinkPane{
public static class VAN_CHART_STRUCTURE extends Chart_Cell.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getStructureValueEditorPane();
@ -857,76 +924,84 @@ public class HyperlinkMapFactory {
}
//图表超链-悬浮元素
public static class Chart_Float{
public static class VAN_CHART extends ChartHyperRelateFloatLinkPane{
public static class Chart_Float {
public static class VAN_CHART extends ChartHyperRelateFloatLinkPane {
@Override
protected boolean needRenamePane() {
return false;
}
}
public static class VAN_CHART_MULTICATEGORY extends ChartHyperRelateFloatLinkPane{
public static class VAN_CHART_MULTICATEGORY extends Chart_Float.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMultiCategoryEditorPane();
}
}
public static class VAN_CHART_SCATTER extends ChartHyperRelateFloatLinkPane{
public static class VAN_CHART_SCATTER extends Chart_Float.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getScatterValueEditorPane();
}
}
public static class VAN_CHART_GANNT extends ChartHyperRelateFloatLinkPane{
public static class VAN_CHART_GANNT extends Chart_Float.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane(){
protected ValueEditorPane getValueEditorPane() {
return getGanntValueEditorPane();
}
}
public static class VAN_CHART_GAUGE extends ChartHyperRelateFloatLinkPane.CHART_METER{
public static class VAN_CHART_GAUGE extends ChartHyperRelateFloatLinkPane.CHART_METER {
@Override
protected boolean needRenamePane() {
return false;
}
}
public static class VAN_CHART_MAP extends ChartHyperRelateFloatLinkPane{
public static class VAN_CHART_MAP extends Chart_Float.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMapValueEditorPane();
}
}
public static class VAN_CHART_LINE_MAP extends ChartHyperRelateFloatLinkPane{
public static class VAN_CHART_LINE_MAP extends Chart_Float.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getLineMapValueEditorPane();
}
}
public static class VAN_CHART_DRILLMAPCATALOG extends ChartHyperRelateFloatLinkPane{
public static class VAN_CHART_DRILLMAPCATALOG extends Chart_Float.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane(){
protected ValueEditorPane getValueEditorPane() {
return getDrillMapCatalogValueEditorPane();
}
}
public static class VAN_CHART_MULTIPIE extends ChartHyperRelateFloatLinkPane{
public static class VAN_CHART_MULTIPIE extends Chart_Float.VAN_CHART {
protected ValueEditorPane getValueEditorPane() {
return getMultiPieValueEditorPane();
}
}
public static class VAN_CHART_FUNNEL extends ChartHyperRelateFloatLinkPane{
public static class VAN_CHART_FUNNEL extends Chart_Float.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getFunnelValueEditorPane();
}
}
public static class VAN_CHART_WORDCLOUD extends ChartHyperRelateFloatLinkPane{
public static class VAN_CHART_WORDCLOUD extends Chart_Float.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getWordCloudValueEditorPane();
}
}
public static class VAN_CHART_STRUCTURE extends ChartHyperRelateFloatLinkPane{
public static class VAN_CHART_STRUCTURE extends Chart_Float.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getStructureValueEditorPane();
@ -935,42 +1010,50 @@ public class HyperlinkMapFactory {
}
//当前表单对象
public static class Form{
public static class VAN_CHART extends FormHyperlinkPane.CHART{
public static class Form {
public static class VAN_CHART extends FormHyperlinkPane.CHART {
@Override
protected boolean needRenamePane() {
return false;
}
}
public static class VAN_CHART_MULTICATEGORY extends FormHyperlinkPane.CHART{
public static class VAN_CHART_MULTICATEGORY extends Form.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMultiCategoryEditorPane();
}
}
public static class VAN_CHART_SCATTER extends FormHyperlinkPane.CHART{
public static class VAN_CHART_SCATTER extends Form.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getScatterValueEditorPane();
}
}
public static class VAN_CHART_GANNT extends FormHyperlinkPane.CHART{
public static class VAN_CHART_GANNT extends Form.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane(){
protected ValueEditorPane getValueEditorPane() {
return getGanntValueEditorPane();
}
}
public static class VAN_CHART_GAUGE extends FormHyperlinkPane.CHART_METER{
public static class VAN_CHART_GAUGE extends FormHyperlinkPane.CHART_METER {
@Override
protected boolean needRenamePane() {
return false;
}
}
public static class VAN_CHART_MAP extends FormHyperlinkPane.CHART{
public static class VAN_CHART_MAP extends Form.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getMapValueEditorPane();
}
}
public static class VAN_CHART_LINE_MAP extends FormHyperlinkPane.CHART{
public static class VAN_CHART_LINE_MAP extends Form.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getLineMapValueEditorPane();
@ -978,34 +1061,34 @@ public class HyperlinkMapFactory {
}
public static class VAN_CHART_DRILLMAPCATALOG extends FormHyperlinkPane.CHART{
public static class VAN_CHART_DRILLMAPCATALOG extends Form.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane(){
protected ValueEditorPane getValueEditorPane() {
return getDrillMapCatalogValueEditorPane();
}
}
public static class VAN_CHART_MULTIPIE extends FormHyperlinkPane.CHART{
public static class VAN_CHART_MULTIPIE extends Form.VAN_CHART {
protected ValueEditorPane getValueEditorPane() {
return getMultiPieValueEditorPane();
}
}
public static class VAN_CHART_FUNNEL extends FormHyperlinkPane.CHART{
public static class VAN_CHART_FUNNEL extends Form.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getFunnelValueEditorPane();
}
}
public static class VAN_CHART_WORDCLOUD extends FormHyperlinkPane.CHART{
public static class VAN_CHART_WORDCLOUD extends Form.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getWordCloudValueEditorPane();
}
}
public static class VAN_CHART_STRUCTURE extends FormHyperlinkPane.CHART{
public static class VAN_CHART_STRUCTURE extends Form.VAN_CHART {
@Override
protected ValueEditorPane getValueEditorPane() {
return getStructureValueEditorPane();

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

@ -30,7 +30,7 @@ public class VanChartConditionAttrContentPane extends AbstractConditionAttrConte
public void populateBean(Plot plot, ConditionCollection collection, Class<? extends ConditionAttributesPane> showPane){
if (conditionPane == null) {
conditionPane = new VanChartListControlPane(plot);
conditionPane = new VanChartConditionListControlPane(plot);
}
this.setLayout(new BorderLayout());

20
designer_chart/src/com/fr/plugin/chart/designer/other/VanChartListControlPane.java → designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionListControlPane.java

@ -8,11 +8,9 @@ import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.mainframe.DesignerContext;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.designer.component.VanChartUIListControlPane;
import com.fr.stable.Nameable;
import java.lang.reflect.Constructor;
@ -20,10 +18,11 @@ import java.lang.reflect.InvocationTargetException;
/**
* Created by mengao on 2017/8/18.
* 条件属性ListControlPane弹出条件属性设置面板
*/
public class VanChartListControlPane extends UIListControlPane {
public class VanChartConditionListControlPane extends VanChartUIListControlPane {
public VanChartListControlPane(BasePlot plot) {
public VanChartConditionListControlPane(BasePlot plot) {
super(plot);
}
@ -57,14 +56,6 @@ public class VanChartListControlPane extends UIListControlPane {
return null;
}
@Override
public void saveSettings() {
if (isPopulating) {
return;
}
updateConditionCollection(((VanChartPlot) plot).getConditionCollection());
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
}
@Override
public String getAddItemText() {
@ -80,7 +71,8 @@ public class VanChartListControlPane extends UIListControlPane {
/**
* Update.
*/
public void updateConditionCollection(ConditionCollection cc) {
protected void update(Plot plot) {
ConditionCollection cc = plot.getConditionCollection();
Nameable[] nameables = this.update();
cc.clearConditionAttr();

17
designer_chart/src/com/fr/plugin/chart/designer/style/background/AlertLineListControlPane.java

@ -3,16 +3,14 @@ package com.fr.plugin.chart.designer.style.background;
import com.fr.chart.chartattr.Plot;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.ShortCut4JControlPane;
import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.mainframe.DesignerContext;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.plugin.chart.attr.DefaultAxisHelper;
import com.fr.plugin.chart.attr.axis.VanChartAlertValue;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.designer.component.VanChartUIListControlPane;
import com.fr.stable.Nameable;
import java.util.ArrayList;
@ -20,18 +18,9 @@ import java.util.List;
/**
* Created by mengao on 2017/8/22.
* 自定义警戒线列表面板
*/
public class AlertLineListControlPane extends UIListControlPane {
@Override
public void saveSettings() {
if (isPopulating) {
return;
}
update((VanChartPlot) plot);
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
}
public class AlertLineListControlPane extends VanChartUIListControlPane {
@Override
public NameableCreator[] createNameableCreators() {

22
designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java

@ -3,8 +3,6 @@ package com.fr.plugin.chart.designer.style.background;
import com.fr.chart.chartattr.Plot;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.ShortCut4JControlPane;
import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.mainframe.DesignerContext;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.general.NameObject;
@ -12,8 +10,8 @@ import com.fr.plugin.chart.attr.DefaultAxisHelper;
import com.fr.plugin.chart.attr.axis.VanChartAlertValue;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.axis.VanChartCustomIntervalBackground;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.designer.component.VanChartUIListControlPane;
import com.fr.stable.Nameable;
import java.util.ArrayList;
@ -21,17 +19,9 @@ import java.util.List;
/**
* Created by mengao on 2017/8/22.
* 自定义间隔背景列表面板
*/
public class BackgroundListControlPane extends UIListControlPane {
@Override
public void saveSettings() {
if (isPopulating) {
return;
}
update((VanChartPlot) plot, false);
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
}
public class BackgroundListControlPane extends VanChartUIListControlPane {
@Override
public NameableCreator[] createNameableCreators() {
@ -92,6 +82,12 @@ public class BackgroundListControlPane extends UIListControlPane {
doLayout();
}
@Override
protected void update(Plot plot) {
update(plot, false);
}
public void update(Plot plot, boolean isDefaultIntervalBackground) {
Nameable[] nameables = this.update();

6
designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java

@ -81,7 +81,7 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
}
protected JPanel createIntervalPane(double[] row, double[] col) {
isDefaultIntervalBackground = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_IntervalBackground"), Inter.getLocText("Plugin-ChartF_CustomIntervalBackground")});
isDefaultIntervalBackground = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Default_Interval"), Inter.getLocText("Plugin-ChartF_CustomIntervalBackground")});
horizontalColorBackground = new ColorSelectBox(100);
verticalColorBackground = new ColorSelectBox(100);
Component[][] components = getIntervalPaneComponents();
@ -90,7 +90,7 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
cardLayout = new CardLayout();
centerPane = new JPanel(cardLayout);
centerPane.add(defaultPane, Inter.getLocText("Plugin-ChartF_IntervalBackground"));
centerPane.add(defaultPane, Inter.getLocText("Plugin-ChartF_Default_Interval"));
centerPane.add(customIntervalBackground, Inter.getLocText("Plugin-ChartF_CustomIntervalBackground"));
isDefaultIntervalBackground.addActionListener(new ActionListener() {
@Override
@ -117,7 +117,7 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
private void checkCardPane() {
if (isDefaultIntervalBackground.getSelectedIndex() == 0) {
cardLayout.show(centerPane, Inter.getLocText("Plugin-ChartF_IntervalBackground"));
cardLayout.show(centerPane, Inter.getLocText("Plugin-ChartF_Default_Interval"));
} else {
cardLayout.show(centerPane, Inter.getLocText("Plugin-ChartF_CustomIntervalBackground"));
}

1
designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartCustomIntervalBackgroundPane.java

@ -38,6 +38,7 @@ public class VanChartCustomIntervalBackgroundPane extends BasicBeanPane<VanChart
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
//
JPanel top = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.removeAll();
this.add(top);
top.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Plugin-ChartF_CustomIntervalBackground") + ":", null));
top.add(createContentPane());

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

@ -29,7 +29,6 @@ import com.fr.plugin.chart.custom.style.VanChartCustomStylePane;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartAreaSeriesFillColorPane;
import com.fr.plugin.chart.designer.component.VanChartBeautyPane;
import com.fr.plugin.chart.designer.component.VanChartFillStylePane;
import com.fr.plugin.chart.designer.component.VanChartLineTypePane;
import com.fr.plugin.chart.designer.component.VanChartMarkerPane;
import com.fr.plugin.chart.designer.component.VanChartTrendLinePane;
@ -96,31 +95,30 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
* 返回 填充界面.
*/
protected ChartFillStylePane getFillStylePane() {
return new VanChartFillStylePane();
//如果是自定義組合圖,則不創建填充界面
return parentPane instanceof VanChartCustomStylePane ? null : new ChartFillStylePane();
}
//风格
protected VanChartBeautyPane createStylePane() {
stylePane = new VanChartBeautyPane();
return stylePane;
return parentPane instanceof VanChartCustomStylePane ? null : new VanChartBeautyPane();
}
//获取色面板
//获取色面板
protected JPanel getColorPane () {
//如果是自定義組合圖,則不創建色彩界面
if (parentPane instanceof VanChartCustomStylePane) {
return null;
}
JPanel panel = new JPanel(new BorderLayout());
stylePane = createStylePane();
setColorPaneContent(panel);
JPanel colorPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Color"), panel);
panel.setBorder(BorderFactory.createEmptyBorder(10,5,0,0));
return colorPane;
return panel.getComponentCount() == 0 ? null : colorPane;
}
//设置色彩面板内容
protected void setColorPaneContent (JPanel panel) {
panel.add(createStylePane(), BorderLayout.CENTER);
if (stylePane != null) {
panel.add(stylePane, BorderLayout.CENTER);
}
}
//趋势线

4
designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java

@ -42,7 +42,9 @@ public class VanChartFunnelSeriesPane extends VanChartAbstractPlotSeriesPane {
//设置色彩面板内容
protected void setColorPaneContent (JPanel panel) {
panel.add(createStylePane(), BorderLayout.CENTER);
if (stylePane != null) {
panel.add(createStylePane(), BorderLayout.CENTER);
}
panel.add(createAlphaPane(), BorderLayout.SOUTH);
}

Loading…
Cancel
Save