Browse Source

Merge pull request #671 in BA/design from ~PLOUGH/design:dev to dev

* commit '37b9b4fcb914b0b29418e095d90d398942e25dce':
  无JIRA任务。调整代码
  整理代码
  使用GraphHelper,修改临时代码
  REPORT-1096 取色板=>将“最近使用的颜色”面板的色块改为6个;修改取色 器按钮背景为白色
  REPORT-1096 取色板=>去掉自定义颜色选择界面取色器按钮的边框
  REPORT-1096 取色板=>调整自定义颜色选择界面的取色器按钮位置
  REPORT-1096 取色板=>1、修改无透明颜色选择框的样式;2、“更多颜色”按钮下留出空隙;3、取色器按钮大小修改为与色块相同;4、空出一个色块的位置
  REPORT-1096 取色板=>将取色板弹出框的位置改为居中
  REPORT-1178 英文国际化——8、11、13、14、15、16部分
  REPORT-1178 英文国际化——7/23
  REPORT-1178 英文国际化——4/23
  REPORT-1178 英文国际化——3/23
master
superman 8 years ago
parent
commit
5a336c1aa9
  1. 14
      designer/src/com/fr/design/report/ReportColumnsPane.java
  2. 4
      designer/src/com/fr/design/webattr/PageToolBarPane.java
  3. 14
      designer/src/com/fr/design/webattr/PageWebSettingPane.java
  4. 49
      designer/src/com/fr/design/webattr/ToolBarDragPane.java
  5. 6
      designer/src/com/fr/design/webattr/WriteToolBarPane.java
  6. 9
      designer/src/com/fr/design/webattr/WriteWebSettingPane.java
  7. 2
      designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java
  8. 34
      designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java
  9. 13
      designer_base/src/com/fr/design/actions/help/AboutPane.java
  10. 6
      designer_base/src/com/fr/design/editor/editor/DateEditor.java
  11. 3
      designer_base/src/com/fr/design/gui/date/UIDatePicker.java
  12. 3
      designer_base/src/com/fr/design/gui/ibutton/UIColorButton.java
  13. BIN
      designer_base/src/com/fr/design/images/reportcolumns/col_en.png
  14. BIN
      designer_base/src/com/fr/design/images/reportcolumns/row_en.png
  15. 15
      designer_base/src/com/fr/design/locale/designer.properties
  16. 17
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  17. 15
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  18. 23
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  19. 16
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  20. 15
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  21. 25
      designer_base/src/com/fr/design/style/color/ColorSelectPane.java
  22. 23
      designer_base/src/com/fr/design/style/color/CustomChooserPanel.java
  23. 11
      designer_base/src/com/fr/design/style/color/NewColorSelectPane.java
  24. 50
      designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java
  25. 39
      designer_base/src/com/fr/design/style/color/UsedColorPane.java
  26. 2
      designer_base/src/com/fr/design/write/submit/CustomJobPane.java
  27. 12
      designer_chart/src/com/fr/design/mainframe/chart/gui/ColorSelectPaneWithOutTransparent.java

14
designer/src/com/fr/design/report/ReportColumnsPane.java

@ -19,6 +19,7 @@ import javax.swing.SpinnerNumberModel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.GraphHelper;
import com.fr.design.border.UIRoundedBorder; import com.fr.design.border.UIRoundedBorder;
import com.fr.design.border.UITitledBorder; import com.fr.design.border.UITitledBorder;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
@ -109,9 +110,12 @@ public class ReportColumnsPane extends BasicPane{
onOffButtonGroup.addActionListener(onOffListener); onOffButtonGroup.addActionListener(onOffListener);
UILabel uiLabel = new UILabel(Inter.getLocText("FR-Designer_ReportColumns-Columns")); UILabel uiLabel = new UILabel(Inter.getLocText("FR-Designer_ReportColumns-Columns"));
uiLabel.setFont(FRFont.getInstance(FONT_NAME, Font.PLAIN, FONT_SIZE)); FRFont uiLableFont = FRFont.getInstance(FONT_NAME, Font.PLAIN, FONT_SIZE);
uiLabel.setFont(uiLableFont);
uiLabel.setHorizontalAlignment(SwingConstants.CENTER); uiLabel.setHorizontalAlignment(SwingConstants.CENTER);
uiLabel.setPreferredSize(new Dimension(100,20)); int uiLabelWidth = GraphHelper.getLocTextWidth("FR-Designer_ReportColumns-Columns", uiLableFont);
uiLabel.setPreferredSize(new Dimension(uiLabelWidth, 20));
north.add(uiLabel,BorderLayout.WEST); north.add(uiLabel,BorderLayout.WEST);
JPanel buttonGroupPane = new JPanel(new FlowLayout(FlowLayout.CENTER, 23,11)); JPanel buttonGroupPane = new JPanel(new FlowLayout(FlowLayout.CENTER, 23,11));
buttonGroupPane.add(onOffButtonGroup); buttonGroupPane.add(onOffButtonGroup);
@ -200,7 +204,7 @@ public class ReportColumnsPane extends BasicPane{
JPanel sampleLablePane = new JPanel(new GridLayout(1,2)); JPanel sampleLablePane = new JPanel(new GridLayout(1,2));
sampleLablePane.setPreferredSize(new Dimension(524, 130)); sampleLablePane.setPreferredSize(new Dimension(524, 130));
JPanel rPane = new JPanel(); JPanel rPane = new JPanel();
UILabel rLabel = new UILabel(BaseUtils.readIcon("/com/fr/design/images/reportcolumns/row.png")); UILabel rLabel = new UILabel(BaseUtils.readIcon("/com/fr/design/images/reportcolumns/" + Inter.getLocText("FR-Designer_Row_Icon_File_Name")));
rLabel.setBorder(BorderFactory.createEmptyBorder(5,45,0,49)); rLabel.setBorder(BorderFactory.createEmptyBorder(5,45,0,49));
rPane.add(rLabel); rPane.add(rLabel);
rowButton = new UIRadioButton(Inter.getLocText("ReportColumns-Columns_horizontally")); rowButton = new UIRadioButton(Inter.getLocText("ReportColumns-Columns_horizontally"));
@ -260,7 +264,7 @@ public class ReportColumnsPane extends BasicPane{
GUICoreUtils.setColumnForSpinner(maxNumberSpinner, 6); GUICoreUtils.setColumnForSpinner(maxNumberSpinner, 6);
maxRadioButton.addActionListener(maxBtnListener); maxRadioButton.addActionListener(maxBtnListener);
maxUILabel = new UILabel(COLUMN_ROW_TEXTS[rowOrColumn] ); maxUILabel = new UILabel(COLUMN_ROW_TEXTS[rowOrColumn] );
JPanel maxRowRadioPane = GUICoreUtils.createFlowPane(new JComponent[]{maxRadioButton, maxNumberSpinner, maxUILabel, new UILabel(Inter.getLocText("FR-Designer_ReportColumns-Columns"))}, FlowLayout.CENTER); JPanel maxRowRadioPane = GUICoreUtils.createFlowPane(new JComponent[]{maxRadioButton, maxNumberSpinner, maxUILabel, new UILabel(Inter.getLocText("FR-Designer_ReportColumns_Columns_Optional"))}, FlowLayout.CENTER);
RowMaxOrSetPane.add(maxRowRadioPane); RowMaxOrSetPane.add(maxRowRadioPane);
//marks:分成多少行 //marks:分成多少行
toXRadioButton = new UIRadioButton(Inter.getLocText("ReportColumns-Columns_to")); toXRadioButton = new UIRadioButton(Inter.getLocText("ReportColumns-Columns_to"));
@ -308,7 +312,7 @@ public class ReportColumnsPane extends BasicPane{
rowPane.setBorder(explainBorder); rowPane.setBorder(explainBorder);
rowPane.setLayout(new FlowLayout(FlowLayout.LEFT, 5,13)); rowPane.setLayout(new FlowLayout(FlowLayout.LEFT, 5,13));
rowPane.setPreferredSize(new Dimension(500,80)); rowPane.setPreferredSize(new Dimension(500,80));
rowPane.add(new UILabel(Inter.getLocText(new String[]{"ReportColumns-Columns","Data"}) + ":")); rowPane.add(new UILabel(Inter.getLocText(new String[]{"FR-Designer_ReportColumns_Columns_Optional","Data"}) + ":"));
repeatColDataTextField = new UITextField(); repeatColDataTextField = new UITextField();
repeatColDataTextField.setPreferredSize(new Dimension(107,24)); repeatColDataTextField.setPreferredSize(new Dimension(107,24));
rowPane.add(repeatColDataTextField); rowPane.add(repeatColDataTextField);

4
designer/src/com/fr/design/webattr/PageToolBarPane.java

@ -27,8 +27,8 @@ import java.util.List;
public class PageToolBarPane extends AbstractEditToolBarPane { public class PageToolBarPane extends AbstractEditToolBarPane {
private UIRadioButton centerRadioButton = new UIRadioButton(Inter.getLocText(new String[]{"Center", "Display"})); private UIRadioButton centerRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Center_Display"));
private UIRadioButton leftRadioButton = new UIRadioButton(Inter.getLocText(new String[]{"Left", "Display"})); private UIRadioButton leftRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Left_Display"));
private UICheckBox isUseToolBarCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Use_ToolBar")); private UICheckBox isUseToolBarCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Use_ToolBar"));
private UICheckBox isShowAsImageBox; private UICheckBox isShowAsImageBox;

14
designer/src/com/fr/design/webattr/PageWebSettingPane.java

@ -36,8 +36,8 @@ public class PageWebSettingPane extends WebSettingPane<WebPage> {
@Override @Override
protected JPanel createOtherSetPane() { protected JPanel createOtherSetPane() {
centerRadioButton = new UIRadioButton(Inter.getLocText(new String[]{"Center", "Display"})); centerRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Center_Display"));
leftRadioButton = new UIRadioButton(Inter.getLocText(new String[]{"Left", "Display"})); leftRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Left_Display"));
ButtonGroup buttonGroup = new ButtonGroup(); ButtonGroup buttonGroup = new ButtonGroup();
leftRadioButton.setSelected(true); leftRadioButton.setSelected(true);
buttonGroup.add(centerRadioButton); buttonGroup.add(centerRadioButton);
@ -45,15 +45,15 @@ public class PageWebSettingPane extends WebSettingPane<WebPage> {
JPanel buttonpane = new JPanel(FRGUIPaneFactory.createBoxFlowLayout()); JPanel buttonpane = new JPanel(FRGUIPaneFactory.createBoxFlowLayout());
buttonpane.add(centerRadioButton); buttonpane.add(centerRadioButton);
buttonpane.add(leftRadioButton); buttonpane.add(leftRadioButton);
isShowAsImageBox = new UICheckBox(Inter.getLocText("Is_Paint_Page")); isShowAsImageBox = new UICheckBox(Inter.getLocText("FR-Designer_Is_Paint_Page"));
isAutoScaleBox = new UICheckBox(Inter.getLocText("IS_Auto_Scale")); isAutoScaleBox = new UICheckBox(Inter.getLocText("FR-Designer_IS_Auto_Scale"));
isTDHeavyBox = new UICheckBox(Inter.getLocText("IS_TD_HEAVY_EXPORT"), false); isTDHeavyBox = new UICheckBox(Inter.getLocText("FR-Designer_IS_TD_HEAVY_EXPORT"), false);
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] columnSize = { p,p,p}; double[] columnSize = { p,p,p};
double[] rowSize = { p, p,p,p }; double[] rowSize = { p, p,p,p };
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Report_Show_Location") + ":", UILabel.RIGHT), buttonpane,null}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_Report_Show_Location") + ":", UILabel.RIGHT), buttonpane,null},
new Component[]{new UILabel(Inter.getLocText("PageSetup-Page") + ":", UILabel.RIGHT), isShowAsImageBox, isAutoScaleBox}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_PageSetup_Page") + ":", UILabel.RIGHT), isShowAsImageBox, isAutoScaleBox},
new Component[]{null, isTDHeavyBox, null} new Component[]{null, isTDHeavyBox, null}
}; };

49
designer/src/com/fr/design/webattr/ToolBarDragPane.java

@ -126,25 +126,9 @@ public class ToolBarDragPane extends WidgetToolBarPane {
} }
} }
}); });
layoutTable = new JTable(toolbarButtonTableModel);
layoutTable.setDefaultRenderer(Object.class, tableRenderer); initLayoutTable();
layoutTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
layoutTable.setColumnSelectionAllowed(false);
layoutTable.setRowSelectionAllowed(false);
layoutTable.setBackground(Color.white);
layoutTable.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() > 1 && !(SwingUtilities.isRightMouseButton(e)) && isEnabled) {
WidgetOption no = (WidgetOption)layoutTable.getValueAt(layoutTable.getSelectedRow(), layoutTable.getSelectedColumn());
Widget widget = no.createWidget();
ToolBarButton tb = new ToolBarButton(no.optionIcon(), widget);
tb.setNameOption(no);
northToolBar.add(tb);
northToolBar.validate();
northToolBar.repaint();
}
}
});
JPanel center = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel center = FRGUIPaneFactory.createBorderLayout_S_Pane();
center.setBackground(Color.white); center.setBackground(Color.white);
center.add(topButton, BorderLayout.NORTH); center.add(topButton, BorderLayout.NORTH);
@ -178,6 +162,33 @@ public class ToolBarDragPane extends WidgetToolBarPane {
isUseToolBarCheckBox.setSelected(true); isUseToolBarCheckBox.setSelected(true);
} }
private void initLayoutTable() {
layoutTable = new JTable(toolbarButtonTableModel);
layoutTable.setDefaultRenderer(Object.class, tableRenderer);
layoutTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
layoutTable.setColumnSelectionAllowed(false);
layoutTable.setRowSelectionAllowed(false);
layoutTable.setBackground(Color.white);
int columnWidth = Integer.parseInt(Inter.getLocText("FR-Designer_LayoutTable_Column_Width"));
for (int i = 0; i < layoutTable.getColumnModel().getColumnCount(); i++) {
layoutTable.getColumnModel().getColumn(i).setPreferredWidth(columnWidth);
}
layoutTable.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() > 1 && !(SwingUtilities.isRightMouseButton(e)) && isEnabled) {
WidgetOption no = (WidgetOption)layoutTable.getValueAt(layoutTable.getSelectedRow(), layoutTable.getSelectedColumn());
Widget widget = no.createWidget();
ToolBarButton tb = new ToolBarButton(no.optionIcon(), widget);
tb.setNameOption(no);
northToolBar.add(tb);
northToolBar.validate();
northToolBar.repaint();
}
}
});
}
private boolean isSelectedtable() { private boolean isSelectedtable() {
for (int i = 0; i < layoutTable.getColumnCount(); i++) { for (int i = 0; i < layoutTable.getColumnCount(); i++) {
if (layoutTable.isColumnSelected(i)) { if (layoutTable.isColumnSelected(i)) {

6
designer/src/com/fr/design/webattr/WriteToolBarPane.java

@ -39,8 +39,8 @@ public class WriteToolBarPane extends AbstractEditToolBarPane {
private UIRadioButton topRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Top")); private UIRadioButton topRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Top"));
private UIRadioButton bottomRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Bottom")); private UIRadioButton bottomRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Bottom"));
private UILabel sheetShowLocationLabel = new UILabel("sheet" + Inter.getLocText(new String[]{"Label", "Page_Number", "Display position"}) + ":"); private UILabel sheetShowLocationLabel = new UILabel("sheet" + Inter.getLocText(new String[]{"Label", "Page_Number", "Display position"}) + ":");
private UIRadioButton centerRadioButton = new UIRadioButton(Inter.getLocText(new String[]{"Center", "Display"})); private UIRadioButton centerRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Center_Display"));
private UIRadioButton leftRadioButton = new UIRadioButton(Inter.getLocText(new String[]{"Left", "Display"})); private UIRadioButton leftRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Left_Display"));
private UILabel rptShowLocationLabel = new UILabel(Inter.getLocText("FR-Designer_Report_Show_Location") + ":", UILabel.LEFT); private UILabel rptShowLocationLabel = new UILabel(Inter.getLocText("FR-Designer_Report_Show_Location") + ":", UILabel.LEFT);
private UICheckBox isUseToolBarCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Use_ToolBar")); private UICheckBox isUseToolBarCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Use_ToolBar"));
private UIButton editToolBarButton = new UIButton(Inter.getLocText("FR-Designer_Edit")); private UIButton editToolBarButton = new UIButton(Inter.getLocText("FR-Designer_Edit"));
@ -76,7 +76,7 @@ public class WriteToolBarPane extends AbstractEditToolBarPane {
colorButton = new UIColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/background.png")); colorButton = new UIColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/background.png"));
northPane.add(GUICoreUtils.createFlowPane(new Component[]{colorBox, colorButton}, FlowLayout.LEFT)); northPane.add(GUICoreUtils.createFlowPane(new Component[]{colorBox, colorButton}, FlowLayout.LEFT));
unloadCheck = new UICheckBox(Inter.getLocText(new String[]{"Event-unloadcheck", "Tooltips"})); unloadCheck = new UICheckBox(Inter.getLocText("FR-Designer_Unload_Check"));
unloadCheck.setSelected(true); unloadCheck.setSelected(true);
showWidgets = new UICheckBox(Inter.getLocText("FR-Designer_Event_ShowWidgets")); showWidgets = new UICheckBox(Inter.getLocText("FR-Designer_Event_ShowWidgets"));

9
designer/src/com/fr/design/webattr/WriteWebSettingPane.java

@ -42,8 +42,7 @@ public class WriteWebSettingPane extends WebSettingPane<WebWrite> {
@Override @Override
protected JPanel createOtherSetPane() { protected JPanel createOtherSetPane() {
colorBox = new UICheckBox(Inter.getLocText(new String[]{"Face_Write", "Current", "Edit", "Row", colorBox = new UICheckBox(Inter.getLocText("FR-Designer_Set_BG_Of_Current_Row") + ":");
"Background", "Set"}) + ":");
colorBox.setSelected(true); colorBox.setSelected(true);
colorButton = new UIColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/background.png")); colorButton = new UIColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/background.png"));
colorBox.addActionListener(new ActionListener() { colorBox.addActionListener(new ActionListener() {
@ -66,15 +65,15 @@ public class WriteWebSettingPane extends WebSettingPane<WebWrite> {
//Sean: 报表显示位置since 706 //Sean: 报表显示位置since 706
rptShowLocationLabel = new UILabel(Inter.getLocText("FR-Designer_Report_Show_Location") + ":", UILabel.LEFT); rptShowLocationLabel = new UILabel(Inter.getLocText("FR-Designer_Report_Show_Location") + ":", UILabel.LEFT);
centerRadioButton = new UIRadioButton(Inter.getLocText(new String[]{"Center", "Display"})); centerRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Center_Display"));
leftRadioButton = new UIRadioButton(Inter.getLocText(new String[]{"Left", "Display"})); leftRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Left_Display"));
ButtonGroup rptShowButtonGroup = new ButtonGroup(); ButtonGroup rptShowButtonGroup = new ButtonGroup();
leftRadioButton.setSelected(true); leftRadioButton.setSelected(true);
rptShowButtonGroup.add(centerRadioButton); rptShowButtonGroup.add(centerRadioButton);
rptShowButtonGroup.add(leftRadioButton); rptShowButtonGroup.add(leftRadioButton);
JPanel showLocPane = GUICoreUtils.createFlowPane(new Component[]{rptShowLocationLabel, centerRadioButton, leftRadioButton}, FlowLayout.LEFT); JPanel showLocPane = GUICoreUtils.createFlowPane(new Component[]{rptShowLocationLabel, centerRadioButton, leftRadioButton}, FlowLayout.LEFT);
unloadCheck = new UICheckBox(Inter.getLocText(new String[]{"Event-unloadcheck", "Tooltips"})); unloadCheck = new UICheckBox(Inter.getLocText("FR-Designer_Unload_Check"));
unloadCheck.setSelected(true); unloadCheck.setSelected(true);
showWidgets = new UICheckBox(Inter.getLocText(new String[]{"Event-showWidgets"})); showWidgets = new UICheckBox(Inter.getLocText(new String[]{"Event-showWidgets"}));

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

@ -1 +1 @@
package com.fr.design.widget.ui; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.general.Inter; import javax.swing.*; import java.awt.*; /** design.gui.icheckbox.UICheckBox; design.gui.icheckbox.UICheckBox; design.gui.icheckbox.UICheckBox; design.gui.icheckbox.UICheckBox; import com.fr.design.layout.FRGUIPaneFactory; design.gui.icheckbox.UICheckBox; import com.fr.design.utils.gui.GUICoreUtils; design.gui.icheckbox.UICheckBox; import com.fr.form.ui.CustomWriteAbleRepeatEditor; design.gui.icheckbox.UICheckBox; import com.fr.general.Inter; design.gui.icheckbox.UICheckBox; design.gui.icheckbox.UICheckBox; import javax.swing.*; design.gui.icheckbox.UICheckBox; import java.awt.*; design.gui.icheckbox.UICheckBox; /** import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory; design.gui.icheckbox.UICheckBox; contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; this.customDataCheckBox.setPreferredSize(new Dimension(100, 30)); getValidatePane().add(GUICoreUtils.createFlowPane(new JComponent[]{this.customDataCheckBox}, FlowLayout.LEFT, 5)); JPanel otherContentPane = this.setForthContentPane(); if (otherContentPane != null) { contentPane.add(otherContentPane,BorderLayout.CENTER); } return contentPane; } protected abstract JPanel setForthContentPane(); protected void populateSubWritableRepeatEditorBean(T e) { this.customDataCheckBox.setSelected(e.isCustomData()); populateSubCustomWritableRepeatEditorBean(e); } protected abstract void populateSubCustomWritableRepeatEditorBean(T e); protected T updateSubWritableRepeatEditorBean() { T e = updateSubCustomWritableRepeatEditorBean(); e.setCustomData(this.customDataCheckBox.isSelected()); return e; } protected abstract T updateSubCustomWritableRepeatEditorBean(); } package com.fr.design.widget.ui; import com.fr.base.GraphHelper; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.general.Inter; import com.fr.design.utils.gui.GUICoreUtils; design.gui.icheckbox.UICheckBox; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.*; import com.fr.design.utils.gui.GUICoreUtils; import java.awt.*; import com.fr.design.utils.gui.GUICoreUtils; /** import com.fr.design.utils.gui.GUICoreUtils; design.gui.icheckbox.UICheckBox; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.form.ui.CustomWriteAbleRepeatEditor; design.gui.icheckbox.UICheckBox; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; design.gui.icheckbox.UICheckBox; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.general.Inter; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import javax.swing.*; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import java.awt.*; import com.fr.form.ui.CustomWriteAbleRepeatEditor; /** import com.fr.general.Inter; import com.fr.general.Inter; design.gui.icheckbox.UICheckBox; import com.fr.general.Inter; import com.fr.design.layout.FRGUIPaneFactory; )); getValidatePane().add(GUICoreUtils.createFlowPane(new JComponent[]{this.customDataCheckBox}, FlowLayout.LEFT, 5)); JPanel otherContentPane = this.setForthContentPane(); if (otherContentPane != null) { contentPane.add(otherContentPane,BorderLayout.CENTER); } return contentPane; } protected abstract JPanel setForthContentPane(); protected void populateSubWritableRepeatEditorBean(T e) { this.customDataCheckBox.setSelected(e.isCustomData()); populateSubCustomWritableRepeatEditorBean(e); } protected abstract void populateSubCustomWritableRepeatEditorBean(T e); protected T updateSubWritableRepeatEditorBean() { T e = updateSubCustomWritableRepeatEditorBean(); e.setCustomData(this.customDataCheckBox.isSelected()); return e; } protected abstract T updateSubCustomWritableRepeatEditorBean(); }

34
designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java

@ -6,6 +6,7 @@ import java.awt.event.ItemListener;
import javax.swing.*; import javax.swing.*;
import com.fr.base.GraphHelper;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
@ -19,6 +20,8 @@ import com.fr.form.ui.FieldEditor;
import com.fr.general.Inter; import com.fr.general.Inter;
public abstract class FieldEditorDefinePane<T extends FieldEditor> extends AbstractDataModify<T> { public abstract class FieldEditorDefinePane<T extends FieldEditor> extends AbstractDataModify<T> {
private static final int ALLOW_BLANK_CHECK_BOX_WIDTH = GraphHelper.getLocTextWidth("FR-Designer_Allow_Blank") + 30;
private static final int ALLOW_BLANK_CHECK_BOX_HEIGHT = 30;
private UICheckBox allowBlankCheckBox; private UICheckBox allowBlankCheckBox;
// richer:错误信息,是所有控件共有的属性,所以放到这里来 // richer:错误信息,是所有控件共有的属性,所以放到这里来
private UITextField errorMsgTextField; private UITextField errorMsgTextField;
@ -32,6 +35,24 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
protected void initComponents() { protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 8)); this.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 8));
initRegErrorMsgTextField();
//JPanel firstPanel = FRGUIPaneFactory.createBorderLayout_M_Pane();
allowBlankCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Blank"));
allowBlankCheckBox.setPreferredSize(new Dimension(ALLOW_BLANK_CHECK_BOX_WIDTH, ALLOW_BLANK_CHECK_BOX_HEIGHT));
allowBlankCheckBox.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
errorMsgTextField.setEnabled(!allowBlankCheckBox.isSelected());
}
});
initErrorMsgPane();
}
protected void initRegErrorMsgTextField() {
regErrorMsgTextField = new UITextField(16); regErrorMsgTextField = new UITextField(16);
regErrorMsgTextField.getDocument().addDocumentListener(new DocumentListener() { regErrorMsgTextField.getDocument().addDocumentListener(new DocumentListener() {
public void changedUpdate(DocumentEvent e) { public void changedUpdate(DocumentEvent e) {
@ -46,18 +67,9 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
regErrorMsgTextField.setToolTipText(regErrorMsgTextField.getText()); regErrorMsgTextField.setToolTipText(regErrorMsgTextField.getText());
} }
}); });
//JPanel firstPanel = FRGUIPaneFactory.createBorderLayout_M_Pane();
allowBlankCheckBox = new UICheckBox(Inter.getLocText("Allow_Blank"));
allowBlankCheckBox.setPreferredSize(new Dimension(75, 30));
allowBlankCheckBox.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
errorMsgTextField.setEnabled(!allowBlankCheckBox.isSelected());
} }
});
protected void initErrorMsgPane() {
// 错误信息 // 错误信息
JPanel errorMsgPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); JPanel errorMsgPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane();
errorMsgPane.add(new UILabel(Inter.getLocText(new String[]{"Error", "Tooltips"}) + ":")); errorMsgPane.add(new UILabel(Inter.getLocText(new String[]{"Error", "Tooltips"}) + ":"));
@ -128,7 +140,7 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
JPanel firstPane = GUICoreUtils.createFlowPane(new JComponent[]{allowBlankCheckBox}, FlowLayout.LEFT, 5); JPanel firstPane = GUICoreUtils.createFlowPane(new JComponent[]{allowBlankCheckBox}, FlowLayout.LEFT, 5);
validatePane.add(firstPane); validatePane.add(firstPane);
JPanel secondPane = GUICoreUtils.createFlowPane(new JComponent[]{new UILabel(Inter.getLocText(new String[]{"Error", "Tooltips"}) + ":"), errorMsgTextField}, FlowLayout.LEFT, 24); JPanel secondPane = GUICoreUtils.createFlowPane(new JComponent[]{new UILabel(Inter.getLocText(new String[]{"Error", "Tooltips"}) + ":"), errorMsgTextField}, FlowLayout.LEFT, 24);
secondPane.setPreferredSize(new Dimension(310, 23)); secondPane.setPreferredSize(new Dimension(400, 23));
validatePane.add(secondPane); validatePane.add(secondPane);
} }

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

@ -3,6 +3,7 @@
*/ */
package com.fr.design.actions.help; package com.fr.design.actions.help;
import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.gui.ilable.ActionLabel; import com.fr.design.gui.ilable.ActionLabel;
import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.BoldFontTextLabel;
@ -26,6 +27,7 @@ import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.net.URI; import java.net.URI;
import java.util.Locale;
public class AboutPane extends JPanel { public class AboutPane extends JPanel {
private static final String FINEREPORT = "FineReport"; private static final String FINEREPORT = "FineReport";
@ -66,12 +68,17 @@ public class AboutPane extends JPanel {
Inter.getLocText("FR-Designer-Basic_Activation_Key_Copy_OK") Inter.getLocText("FR-Designer-Basic_Activation_Key_Copy_OK")
})); }));
// 英文去掉服务电话和 QQ
if (FRContext.getLocale() == Locale.ENGLISH || FRContext.getLocale() == Locale.US || FRContext.getLocale() == Locale.UK){
// do nothing
} else {
if(ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)){ if(ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)){
boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("Service_Phone") + ProductConstants.COMPARE_TELEPHONE); boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("FR-Designer_Service_Phone") + ProductConstants.COMPARE_TELEPHONE);
contentPane.add(boxCenterAlignmentPane); contentPane.add(boxCenterAlignmentPane);
} }
boxCenterAlignmentPane = new BoxCenterAligmentPane("QQ:" + SiteCenter.getInstance().acquireUrlByKind("help.qq")); boxCenterAlignmentPane = new BoxCenterAligmentPane("QQ:" + SiteCenter.getInstance().acquireUrlByKind("help.qq"));
contentPane.add(boxCenterAlignmentPane); contentPane.add(boxCenterAlignmentPane);
}
BoxCenterAligmentPane actionLabel = getURLActionLabel(ProductConstants.WEBSITE_URL); BoxCenterAligmentPane actionLabel = getURLActionLabel(ProductConstants.WEBSITE_URL);
BoxCenterAligmentPane emailLabel = getEmailActionLabel(ProductConstants.SUPPORT_EMAIL); BoxCenterAligmentPane emailLabel = getEmailActionLabel(ProductConstants.SUPPORT_EMAIL);
@ -103,12 +110,12 @@ public class AboutPane extends JPanel {
} }
private String getCopyRight(){ private String getCopyRight(){
return append(Inter.getLocText("About-CopyRight"), COPYRIGHT_LABEL, return append(Inter.getLocText("FR-Designer_About_CopyRight"), COPYRIGHT_LABEL,
ProductConstants.HISTORY, StringUtils.BLANK, ProductConstants.COMPANY_NAME); ProductConstants.HISTORY, StringUtils.BLANK, ProductConstants.COMPANY_NAME);
} }
private String getBuildTitle() { private String getBuildTitle() {
return append(ProductConstants.APP_NAME, Inter.getLocText("About-Version"), return append(ProductConstants.APP_NAME, Inter.getLocText("FR-Designer_About_Version"),
StringUtils.BLANK, ProductConstants.RELEASE_VERSION, BUILD_PREFIX); StringUtils.BLANK, ProductConstants.RELEASE_VERSION, BUILD_PREFIX);
} }

6
designer_base/src/com/fr/design/editor/editor/DateEditor.java

@ -15,6 +15,7 @@ import java.awt.event.ItemListener;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.Locale;
/** /**
* CellEditor used to edit Date object. * CellEditor used to edit Date object.
@ -59,7 +60,10 @@ public class DateEditor extends Editor<Date> {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
uiDatePicker = new UIDatePicker(); uiDatePicker = new UIDatePicker();
if (format) { if (format) {
uiDatePicker.setStyle(uiDatePicker.STYLE_CN_DATE); int dateStyle = (FRContext.getLocale() == Locale.ENGLISH
|| FRContext.getLocale() == Locale.US
|| FRContext.getLocale() == Locale.UK) ? uiDatePicker.STYLE_EN_DATE : uiDatePicker.STYLE_CN_DATE;
uiDatePicker.setStyle(dateStyle);
uiDatePicker.setEditable(false); uiDatePicker.setEditable(false);
} }
uiDatePicker.addItemListener(new ItemListener() { uiDatePicker.addItemListener(new ItemListener() {

3
designer_base/src/com/fr/design/gui/date/UIDatePicker.java

@ -31,6 +31,7 @@ public class UIDatePicker extends UIComboBox implements Serializable {
public static final int STYLE_CN_DATE1 = 1; public static final int STYLE_CN_DATE1 = 1;
public static final int STYLE_CN_DATETIME = 2; public static final int STYLE_CN_DATETIME = 2;
public static final int STYLE_CN_DATETIME1 = 3; public static final int STYLE_CN_DATETIME1 = 3;
public static final int STYLE_EN_DATE = 4;
public boolean isWillHide = false; public boolean isWillHide = false;
/** /**
* 日期格式类型 * 日期格式类型
@ -113,6 +114,8 @@ public class UIDatePicker extends UIComboBox implements Serializable {
return new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); return new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
case STYLE_CN_DATETIME1: case STYLE_CN_DATETIME1:
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
case STYLE_EN_DATE:
return new SimpleDateFormat("MM/dd/yyyy");
default: default:
throw new UnsupportedOperationException( throw new UnsupportedOperationException(
"invalid formatStyle parameter!"); "invalid formatStyle parameter!");

3
designer_base/src/com/fr/design/gui/ibutton/UIColorButton.java

@ -30,6 +30,7 @@ public class UIColorButton extends UIButton implements PopupHider, UIObserver, G
private static final int SIZE_2 = 2; private static final int SIZE_2 = 2;
private static final int SIZE_4 = 4; private static final int SIZE_4 = 4;
private static final int SIZE_6 = 6; private static final int SIZE_6 = 6;
private static final int POPUP_MENU_SHIFT = -70;
private Color color = Color.BLACK; private Color color = Color.BLACK;
private ColorControlWindow popupWin; private ColorControlWindow popupWin;
private EventListenerList colorChangeListenerList = new EventListenerList(); private EventListenerList colorChangeListenerList = new EventListenerList();
@ -126,7 +127,7 @@ public class UIColorButton extends UIButton implements PopupHider, UIObserver, G
popupWin = this.getColorControlWindow(); popupWin = this.getColorControlWindow();
GUICoreUtils.showPopupMenu(popupWin, this, 0, this.getSize().height); GUICoreUtils.showPopupMenu(popupWin, this, POPUP_MENU_SHIFT, this.getSize().height);
} }
/** /**

BIN
designer_base/src/com/fr/design/images/reportcolumns/col_en.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
designer_base/src/com/fr/design/images/reportcolumns/row_en.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

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

@ -510,6 +510,13 @@ FR-Designer_Create_Tree=
FR-Designer_Set_Callback_Function= FR-Designer_Set_Callback_Function=
FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Content=
FR-Designer_ConfirmDialog_Title= FR-Designer_ConfirmDialog_Title=
FR-Designer_LayoutTable_Column_Width=160
FR-Designer_Set_BG_Of_Current_Row=Set BG of the row being edited
FR-Designer_Unload_Check=Prompt users when leave without submitting
FR-Designer_ReportColumns_Columns_Optional=
FR-Designer_Row_Icon_File_Name=row.png
FR-Designer_Center_Display=Center
FR-Designer_Left_Display=Left
FR-Designer_Background_Null= FR-Designer_Background_Null=
FR-Designer_Background_Color= FR-Designer_Background_Color=
FR-Designer_Background_Texture= FR-Designer_Background_Texture=
@ -524,3 +531,11 @@ FR-Designer_carouselInterval=
FR-Designer_Initial_Background_Tips= FR-Designer_Initial_Background_Tips=
FR-Designer_Mouse_Move_Tips= FR-Designer_Mouse_Move_Tips=
FR-Designer_Mouse_Click_Tips= FR-Designer_Mouse_Click_Tips=
FR-Designer_About_Version=Version
FR-Designer_About_CopyRight=Copy Right
FR-Designer_Service_Phone=Service Phone
FR-Designer_Allow_Blank=Allow Blank
FR-Designer_PageSetup_Page=Page
FR-Designer_Custom_Job_Description=Description
FR-Designer_Property=Property
FR-Designer_ClassName=Class Name

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

@ -181,7 +181,7 @@ FR-Designer_Support_QQ=Support online
FR-Designer_Swatch=Swatch FR-Designer_Swatch=Swatch
FR-Designer_Tab_title=Tab title FR-Designer_Tab_title=Tab title
FR-Designer_TableData=Data set FR-Designer_TableData=Data set
FR-Designer_Thank_guest=Special Thanks FR-Designer_Thank_guest=Special thanks to
FR-Designer_Thanks-To=Thanks FR-Designer_Thanks-To=Thanks
FR-Designer_Title=Title FR-Designer_Title=Title
FR-Designer_Total=Total FR-Designer_Total=Total
@ -510,6 +510,13 @@ FR-Designer_Create_Tree=Build Tree
FR-Designer_Set_Callback_Function=Set Callback Function FR-Designer_Set_Callback_Function=Set Callback Function
FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Content=
FR-Designer_ConfirmDialog_Title= FR-Designer_ConfirmDialog_Title=
FR-Designer_LayoutTable_Column_Width=250
FR-Designer_Set_BG_Of_Current_Row=Set BG of the row being edited
FR-Designer_Unload_Check=Prompt users when leave without submitting
FR-Designer_ReportColumns_Columns_Optional=\u3000
FR-Designer_Row_Icon_File_Name=row_en.png
FR-Designer_Center_Display=Center
FR-Designer_Left_Display=Left
FR-Designer_Background_Null=No Background FR-Designer_Background_Null=No Background
FR-Designer_Background_Color=Color FR-Designer_Background_Color=Color
FR-Designer_Background_Texture=Texture FR-Designer_Background_Texture=Texture
@ -524,3 +531,11 @@ FR-Designer_carouselInterval=
FR-Designer_Initial_Background_Tips=Initial background of the button FR-Designer_Initial_Background_Tips=Initial background of the button
FR-Designer_Mouse_Move_Tips=Move the mouse to the button on the background, in the absence of not changing the background FR-Designer_Mouse_Move_Tips=Move the mouse to the button on the background, in the absence of not changing the background
FR-Designer_Mouse_Click_Tips=The background of the mouse to click the button, in the absence of not changing the background FR-Designer_Mouse_Click_Tips=The background of the mouse to click the button, in the absence of not changing the background
FR-Designer_About_Version=Version
FR-Designer_About_CopyRight=Copy Right
FR-Designer_Service_Phone=Service Phone
FR-Designer_Allow_Blank=Allow Null
FR-Designer_PageSetup_Page=Page
FR-Designer_Custom_Job_Description=Description
FR-Designer_Property=Property
FR-Designer_ClassName=Class Name

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

@ -489,6 +489,13 @@ FR-Designer_Create_Tree=
FR-Designer_Set_Callback_Function= FR-Designer_Set_Callback_Function=
FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Content=
FR-Designer_ConfirmDialog_Title= FR-Designer_ConfirmDialog_Title=
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_ReportColumns_Columns_Optional=\u6BB5\u7D44\u307F
FR-Designer_Row_Icon_File_Name=row.png
FR-Designer_Center_Display=\u4E2D\u592E\u63C3\u3048\u8868\u793A
FR-Designer_Left_Display=\u5DE6\u8868\u793A
FR-Designer_Background_Null= FR-Designer_Background_Null=
FR-Designer_Background_Color= FR-Designer_Background_Color=
FR-Designer_Background_Texture= FR-Designer_Background_Texture=
@ -503,3 +510,11 @@ FR-Designer_carouselInterval=
FR-Designer_Initial_Background_Tips= FR-Designer_Initial_Background_Tips=
FR-Designer_Mouse_Move_Tips= FR-Designer_Mouse_Move_Tips=
FR-Designer_Mouse_Click_Tips= FR-Designer_Mouse_Click_Tips=
FR-Designer_About_Version=\u30D0\u30FC\u30B8\u30E7\u30F3
FR-Designer_About_CopyRight=\u8457\u4F5C\u6A29\u6240\u6709
FR-Designer_Service_Phone=\u30B5\u30FC\u30D3\u30B9\u96FB\u8A71\uFF1A
FR-Designer_Allow_Blank=\u7A7A\u6B04\u3042\u308A
FR-Designer_PageSetup_Page=\u30DA\u30FC\u30B8
FR-Designer_Custom_Job_Description=\u8A18\u8FF0
FR-Designer_Property=\u5C5E\u6027
FR-Designer_ClassName=\u985E\u540D

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

@ -459,14 +459,14 @@ FR-Designer-DS-Database_Query=\uB370\uC774\uD130\uBCA0\uC774\uC2A4\uCC3E\uC544\u
FR-Designer_Is_Share_DBTableData=\uB370\uC774\uD130\uC138\uD2B8\uACF5\uC720 FR-Designer_Is_Share_DBTableData=\uB370\uC774\uD130\uC138\uD2B8\uACF5\uC720
FR-Designer-LayerPageReport_PageQuery=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30 FR-Designer-LayerPageReport_PageQuery=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30
FR-Designer-LayerPageReport_Define_PageQuerySQL=\uC815\uC758\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30sql FR-Designer-LayerPageReport_Define_PageQuerySQL=\uC815\uC758\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30sql
FR-Designer_Event=\ FR-Designer_Event=
FR-Designer_Properties=\uFFFD FR-Designer_Properties=\uFFFD
FR-Designer_Export_failed=\uB0B4\uBCF4\uB0B4\uAE30\uC2E4\uD328 FR-Designer_Export_failed=\uB0B4\uBCF4\uB0B4\uAE30\uC2E4\uD328
FR-Designer_Exported_successfully=\uB0B4\uBCF4\uB0B4\uAE30\uC131\uACF5 FR-Designer_Exported_successfully=\uB0B4\uBCF4\uB0B4\uAE30\uC131\uACF5
FR-Designer_Exporting=\uB0B4\uBCF4\uB0B4\uAE30\uC911 FR-Designer_Exporting=\uB0B4\uBCF4\uB0B4\uAE30\uC911
FR-Designer_Export-PDF=PDF\uC11C\uC2DDFR-Designer_Properties=\uFFFD FR-Designer_Export-PDF=PDF\uC11C\uC2DD
FR-Designer_Button_OK=\uD655\uC778FR-Designer_Button_Cancel=\uCDE8\uC18C FR-Designer_Button_OK=\uD655\uC778
\uFFFD FR-Designer_Button_Cancel=\uCDE8\uC18C
FR-Designer_JavaScript= FR-Designer_JavaScript=
FR-Designer_JavaScript_Form_Submit= FR-Designer_JavaScript_Form_Submit=
FR-Designer_JavaScript_Commit_to_Database= FR-Designer_JavaScript_Commit_to_Database=
@ -484,6 +484,13 @@ FR-Designer_Create_Tree=
FR-Designer_Set_Callback_Function= FR-Designer_Set_Callback_Function=
FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Content=
FR-Designer_ConfirmDialog_Title= FR-Designer_ConfirmDialog_Title=
FR-Designer_LayoutTable_Column_Width=160
FR-Designer_Set_BG_Of_Current_Row=\uAE30\uC785\uD604\uC7AC\uD3B8\uC9D1\uD589\uBC30\uACBD\uC124\uC815
FR-Designer_Unload_Check=\uBBF8\uC81C\uCD9C\uB098\uAC14\uC74C\uC54C\uB9BC
FR-Designer_ReportColumns_Columns_Optional=\uC140\uB098\uB204\uAE30
FR-Designer_Row_Icon_File_Name=row.png
FR-Designer_Center_Display=\uAC00\uC6B4\uB370\uC815\uB82C\uBCF4\uC774\uAE30
FR-Designer_Left_Display=\uC67C\uCABD\uBCF4\uC774\uAE30
FR-Designer_Background_Null= FR-Designer_Background_Null=
FR-Designer_Background_Color= FR-Designer_Background_Color=
FR-Designer_Background_Texture= FR-Designer_Background_Texture=
@ -498,3 +505,11 @@ FR-Designer_carouselInterval=
FR-Designer_Initial_Background_Tips= FR-Designer_Initial_Background_Tips=
FR-Designer_Mouse_Move_Tips= FR-Designer_Mouse_Move_Tips=
FR-Designer_Mouse_Click_Tips= FR-Designer_Mouse_Click_Tips=
FR-Designer_About_Version=\uBC84\uC804
FR-Designer_About_CopyRight=\uD310\uAD8C\uC18C\uC720
FR-Designer_Service_Phone=\uC11C\uBE44\uC2A4\uC804\uD654\uFF1A
FR-Designer_Allow_Blank=\uBE48\uCE78\uD5C8\uC6A9
FR-Designer_PageSetup_Page=\uC6F9\uD398\uC774\uC9C0
FR-Designer_Custom_Job_Description=\uC124\uBA85
FR-Designer_Property=\uC18D\uC131
FR-Designer_ClassName=\uD074\uB798\uC2A4\uB124\uC784

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

@ -514,6 +514,13 @@ FR-Designer_Create_Tree=\u6784\u5EFA\u6811
FR-Designer_Set_Callback_Function=\u8BBE\u7F6E\u56DE\u8C03\u51FD\u6570 FR-Designer_Set_Callback_Function=\u8BBE\u7F6E\u56DE\u8C03\u51FD\u6570
FR-Designer_ConfirmDialog_Content=\u662F\u5426\u786E\u5B9A\u5220\u9664tab\u63A7\u4EF6 FR-Designer_ConfirmDialog_Content=\u662F\u5426\u786E\u5B9A\u5220\u9664tab\u63A7\u4EF6
FR-Designer_ConfirmDialog_Title=FineReport 8.0 FR-Designer_ConfirmDialog_Title=FineReport 8.0
FR-Designer_LayoutTable_Column_Width=160
FR-Designer_Set_BG_Of_Current_Row=\u586B\u62A5\u5F53\u524D\u7F16\u8F91\u884C\u80CC\u666F\u8BBE\u7F6E
FR-Designer_Unload_Check=\u672A\u63D0\u4EA4\u79BB\u5F00\u63D0\u793A
FR-Designer_ReportColumns_Columns_Optional=\u5206\u680F
FR-Designer_Row_Icon_File_Name=row.png
FR-Designer_Center_Display=\u5C45\u4E2D\u5C55\u793A
FR-Designer_Left_Display=\u5DE6\u5C55\u793A
FR-Designer_Background_Null=\u6CA1\u6709\u80CC\u666F FR-Designer_Background_Null=\u6CA1\u6709\u80CC\u666F
FR-Designer_Background_Color=\u989C\u8272 FR-Designer_Background_Color=\u989C\u8272
FR-Designer_Background_Texture=\u7EB9\u7406 FR-Designer_Background_Texture=\u7EB9\u7406
@ -528,3 +535,12 @@ FR-Designer_carouselInterval=\u8F6E\u64AD\u95F4\u9694
FR-Designer_Initial_Background_Tips=\u6309\u94AE\u7684\u521D\u59CB\u80CC\u666F FR-Designer_Initial_Background_Tips=\u6309\u94AE\u7684\u521D\u59CB\u80CC\u666F
FR-Designer_Mouse_Move_Tips=\u9F20\u6807\u79FB\u52A8\u5230\u6309\u94AE\u4E0A\u7684\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F FR-Designer_Mouse_Move_Tips=\u9F20\u6807\u79FB\u52A8\u5230\u6309\u94AE\u4E0A\u7684\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F
FR-Designer_Mouse_Click_Tips=\u9F20\u6807\u70B9\u51FB\u6309\u94AE\u65F6\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F FR-Designer_Mouse_Click_Tips=\u9F20\u6807\u70B9\u51FB\u6309\u94AE\u65F6\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F
FR-Designer_About_Version=\u7248\u672C
FR-Designer_About_CopyRight=\u7248\u6743\u6240\u6709
FR-Designer_Service_Phone=\u670D\u52A1\u7535\u8BDD\uFF1A
FR-Designer_Allow_Blank=\u5141\u8BB8\u4E3A\u7A7A
FR-Designer_PageSetup_Page=\u9875\u9762
FR-Designer_Custom_Job_Description=\u63CF\u8FF0
FR-Designer_Property=\u5C5E\u6027
FR-Designer_ClassName=\u7C7B\u540D

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

@ -502,6 +502,13 @@ FR-Designer_Create_Tree=
FR-Designer_Set_Callback_Function= FR-Designer_Set_Callback_Function=
FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Content=
FR-Designer_ConfirmDialog_Title= FR-Designer_ConfirmDialog_Title=
FR-Designer_LayoutTable_Column_Width=160
FR-Designer_Set_BG_Of_Current_Row=\u586B\u5831\u7576\u524D\u7DE8\u8F2F\u5217\u80CC\u666F\u8A2D\u5B9A
FR-Designer_Unload_Check=\u672A\u63D0\u4EA4\u96E2\u958B\u63D0\u793A
FR-Designer_ReportColumns_Columns_Optional=\u5831\u8868\u6B04\u4F4D
FR-Designer_Row_Icon_File_Name=row.png
FR-Designer_Center_Display=\u7F6E\u4E2D\u986F\u793A
FR-Designer_Left_Display=\u5DE6\u986F\u793A
FR-Designer_Background_Null= FR-Designer_Background_Null=
FR-Designer_Background_Color= FR-Designer_Background_Color=
FR-Designer_Background_Texture= FR-Designer_Background_Texture=
@ -516,3 +523,11 @@ FR-Designer_carouselInterval=
FR-Designer_Initial_Background_Tips= FR-Designer_Initial_Background_Tips=
FR-Designer_Mouse_Move_Tips= FR-Designer_Mouse_Move_Tips=
FR-Designer_Mouse_Click_Tips= FR-Designer_Mouse_Click_Tips=
FR-Designer_About_Version=\u7248\u672C
FR-Designer_About_CopyRight=\u7248\u6B0A\u6240\u6709
FR-Designer_Service_Phone=\u670D\u52D9\u96FB\u8A71\uFF1A
FR-Designer_Allow_Blank=\u5141\u8A31\u70BA\u7A7A\u767D
FR-Designer_PageSetup_Page=\u9801\u9762
FR-Designer_Custom_Job_Description=\u63CF\u8FF0
FR-Designer_Property=\u5C6C\u6027
FR-Designer_ClassName=\u985E\u540D

25
designer_base/src/com/fr/design/style/color/ColorSelectPane.java

@ -71,11 +71,8 @@ public class ColorSelectPane extends TransparentPane implements ColorSelectable
centerPane.add(getRow1Pane()); centerPane.add(getRow1Pane());
JPanel menuColorPane1 = new JPanel(); JPanel menuColorPane1 = getMenuColorPane();
centerPane.add(menuColorPane1); centerPane.add(menuColorPane1);
menuColorPane1.setLayout(new GridLayout(5, 8, 1, 1));
menuColorPane1.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 8));
Color[] colorArray = this.getColorArray(); Color[] colorArray = this.getColorArray();
for (int i = 0; i < colorArray.length; i++) { for (int i = 0; i < colorArray.length; i++) {
Color color = colorArray[i] == null ? UsedColorPane.DEFAULT_COLOR : colorArray[i]; Color color = colorArray[i] == null ? UsedColorPane.DEFAULT_COLOR : colorArray[i];
@ -94,24 +91,28 @@ public class ColorSelectPane extends TransparentPane implements ColorSelectable
}); });
customButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); customButton.setCursor(new Cursor(Cursor.HAND_CURSOR));
JPanel centerPane1 = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel centerPane1 = FRGUIPaneFactory.createBorderLayout_S_Pane();
centerPane1.setBorder(BorderFactory.createEmptyBorder(2, 8, 0, 8)); centerPane1.setBorder(BorderFactory.createEmptyBorder(2, 8, 8, 8));
centerPane1.add(customButton, BorderLayout.NORTH); centerPane1.add(customButton, BorderLayout.NORTH);
centerPane.add(centerPane1); centerPane.add(centerPane1);
} }
protected JPanel getMenuColorPane() {
JPanel menuColorPane = new JPanel();
menuColorPane.setLayout(new GridLayout(5, 8, 1, 1));
menuColorPane.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 8));
return menuColorPane;
}
// 第一行,1个取色按钮 + 7个最近使用的颜色 // 第一行,1个取色按钮 + 7个最近使用的颜色
private JPanel getRow1Pane() { protected JPanel getRow1Pane() {
JPanel row1Pane = new JPanel(FRGUIPaneFactory.createBorderLayout()); JPanel row1Pane = new JPanel(FRGUIPaneFactory.createBorderLayout());
row1Pane.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 0)); row1Pane.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 0));
row1Pane.setPreferredSize(new Dimension(135, 24)); // 宽度为 16 * 8 + 7 row1Pane.setPreferredSize(new Dimension(135, 24)); // 宽度为 16 * 8 + 7
// 取色按钮
UIButton pickColorButton = PickColorButtonFactory.getPickColorButton(this, PickColorButtonFactory.IconType.ICON16, true);
row1Pane.add(pickColorButton, BorderLayout.WEST);
// 最近使用 // 最近使用
UsedColorPane usedColorPane = new UsedColorPane(1, 7, ColorSelectConfigManager.getInstance().getColors(),this); UsedColorPane usedColorPane = new UsedColorPane(1, 8, 1, ColorSelectConfigManager.getInstance().getColors(), this, true, true);
usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 8)); usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 8));
row1Pane.add(usedColorPane.getPane()); row1Pane.add(usedColorPane.getPane());
return row1Pane; return row1Pane;
} }

23
designer_base/src/com/fr/design/style/color/CustomChooserPanel.java

@ -1,15 +1,7 @@
package com.fr.design.style.color; package com.fr.design.style.color;
import java.awt.BorderLayout; import java.awt.*;
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.Point;
import java.awt.event.*; import java.awt.event.*;
import java.awt.image.MemoryImageSource; import java.awt.image.MemoryImageSource;
import java.util.regex.Matcher; import java.util.regex.Matcher;
@ -29,6 +21,7 @@ import javax.swing.event.DocumentListener;
import javax.swing.text.BadLocationException; import javax.swing.text.BadLocationException;
import javax.swing.text.Document; import javax.swing.text.Document;
import com.fr.design.gui.ibutton.SpecialUIButton;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -709,12 +702,20 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
hexPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 8, 0)); hexPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 8, 0));
hexPanel.add(new UILabel("#")); hexPanel.add(new UILabel("#"));
hexPanel.add(field); hexPanel.add(field);
UIButton pickColorButton = PickColorButtonFactory.getPickColorButton(this, PickColorButtonFactory.IconType.ICON18, true);
hexPanel.add(pickColorButton);
mainPanel.add(hslAndRgbPanel, BorderLayout.CENTER); mainPanel.add(hslAndRgbPanel, BorderLayout.CENTER);
mainPanel.add(hexPanel, BorderLayout.SOUTH); mainPanel.add(hexPanel, BorderLayout.SOUTH);
JPanel rightPane = new JPanel(new BorderLayout());
SpecialUIButton pickColorButton = PickColorButtonFactory.getPickColorButton(this, PickColorButtonFactory.IconType.ICON18, true);
JPanel blankArea = new JPanel();
blankArea.setPreferredSize(new Dimension(100, 175));
rightPane.add(blankArea, BorderLayout.CENTER);
JPanel buttonPane = new JPanel(new BorderLayout());
buttonPane.add(pickColorButton, BorderLayout.WEST);
rightPane.add(buttonPane, BorderLayout.SOUTH);
container.add(rightPane);
return container; return container;
} }

11
designer_base/src/com/fr/design/style/color/NewColorSelectPane.java

@ -79,19 +79,14 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
JPanel centerPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); JPanel centerPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
// 第一行,1个取色按钮 + 7个最近使用的颜色 // 第一行
JPanel row1Pane = new JPanel(FRGUIPaneFactory.createBorderLayout()); JPanel row1Pane = new JPanel(FRGUIPaneFactory.createBorderLayout());
row1Pane.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 0)); row1Pane.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 0));
row1Pane.setPreferredSize(new Dimension(135, 16)); // 宽度为 16 * 8 + 7 row1Pane.setPreferredSize(new Dimension(135, 16)); // 宽度为 16 * 8 + 7
centerPane.add(row1Pane); centerPane.add(row1Pane);
// 取色按钮
UIButton pickColorButton = PickColorButtonFactory.getPickColorButton(this, PickColorButtonFactory.IconType.ICON16);
row1Pane.add(pickColorButton, BorderLayout.WEST);
// 最近使用 // 最近使用
usedColorPane = new UsedColorPane(1, 7, ColorSelectConfigManager.getInstance().getColors(),this); usedColorPane = new UsedColorPane(1, 8, 1, ColorSelectConfigManager.getInstance().getColors(), this, true, false);
usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 8)); usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 8));
row1Pane.add(usedColorPane.getPane()); row1Pane.add(usedColorPane.getPane());
JPanel menuColorPane1 = new JPanel(); JPanel menuColorPane1 = new JPanel();

50
designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java

@ -1,8 +1,10 @@
package com.fr.design.style.color; package com.fr.design.style.color;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.SpecialUIButton;
import javax.swing.*;
import javax.swing.plaf.ButtonUI;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
@ -10,21 +12,29 @@ import java.awt.event.*;
* Created by plough on 2016/12/22. * Created by plough on 2016/12/22.
*/ */
public class PickColorButtonFactory { public class PickColorButtonFactory {
private static int iconSize;
private static final int SIZE_16 = 16;
private static final int SIZE_18 = 18;
private static IconType iconType;
private static Image iconImage;
public static UIButton getPickColorButton(ColorSelectable colorSelectable, IconType iconType) { public static SpecialUIButton getPickColorButton(ColorSelectable colorSelectable, IconType iconType) {
return getPickColorButton(colorSelectable, iconType, false); return getPickColorButton(colorSelectable, iconType, false);
} }
public static UIButton getPickColorButton(final ColorSelectable colorSelectable, IconType iconType, final Boolean setColorRealTime) { public static SpecialUIButton getPickColorButton(final ColorSelectable colorSelectable, IconType iconType, final boolean setColorRealTime) {
UIButton pickColorButton = new UIButton(); SpecialUIButton pickColorButton = new SpecialUIButton(new WhiteButtonUI());
PickColorButtonFactory.iconType = iconType;
if (iconType == IconType.ICON16) { if (iconType == IconType.ICON16) {
pickColorButton.setIcon(BaseUtils.readIcon("/com/fr/design/images/gui/colorPicker/colorPicker16.png")); iconImage = BaseUtils.readImage("/com/fr/design/images/gui/colorPicker/colorPicker16.png");
pickColorButton.setPreferredSize(new Dimension(16, 16)); iconSize = SIZE_16;
} else { } else {
pickColorButton.setIcon(BaseUtils.readIcon("/com/fr/design/images/gui/colorPicker/colorPicker18.png")); iconImage = BaseUtils.readImage("/com/fr/design/images/gui/colorPicker/colorPicker18.png");
pickColorButton.setPreferredSize(new Dimension(18, 18)); iconSize = SIZE_18;
pickColorButton.setBorderPainted(false);
} }
pickColorButton.setPreferredSize(new Dimension(iconSize, iconSize));
pickColorButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); pickColorButton.setCursor(new Cursor(Cursor.HAND_CURSOR));
pickColorButton.addMouseListener(new MouseAdapter() { pickColorButton.addMouseListener(new MouseAdapter() {
@ -41,4 +51,28 @@ public class PickColorButtonFactory {
public enum IconType { public enum IconType {
ICON16, ICON18 ICON16, ICON18
} }
private static class WhiteButtonUI extends ButtonUI {
@Override
public void paint(Graphics g, JComponent c) {
super.paint(g, c);
Dimension size = c.getSize();
g.setColor(Color.white);
g.fillRoundRect(0, 0, size.width - 1, size.height - 1, 1, 1);
g.setColor(new Color(153, 153, 153)); // #999999
g.drawRoundRect(0, 0, size.width - 1, size.height - 1, 1, 1);
if (iconType == IconType.ICON16) {
g.drawImage(
iconImage,
(size.width - iconImage.getWidth(null)) / 2,
(size.height - iconImage.getHeight(null)) / 2,
iconImage.getWidth(null),
iconImage.getHeight(null),
null
);
} else {
g.drawImage(iconImage, 0, 0, iconSize, iconSize, null);
}
}
}
} }

39
designer_base/src/com/fr/design/style/color/UsedColorPane.java

@ -7,6 +7,7 @@ import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.SpecialUIButton;
public class UsedColorPane extends BasicPane{ public class UsedColorPane extends BasicPane{
@ -16,6 +17,12 @@ public class UsedColorPane extends BasicPane{
private int columns; private int columns;
// 最近使用面板行数 // 最近使用面板行数
private int rows; private int rows;
// 留白的单元格数量
private int reserveCells;
// 是否需要取色器按钮
private boolean needPickColorButton;
// 是否在取色时实时设定颜色
private boolean setColorRealTime;
// 最近使用颜色 // 最近使用颜色
private Object[] colors; private Object[] colors;
// 最近使用面板 // 最近使用面板
@ -40,16 +47,26 @@ public class UsedColorPane extends BasicPane{
* *
* @param rows * @param rows
* @param columns * @param columns
* @param reserveCells 留白的单元格个数
* @param colors 最近使用的颜色 * @param colors 最近使用的颜色
* @param needPickColorButton 是否需要加上取色器按钮
* @param setColorRealTime 取色器是否实时设定颜色
*/ */
public UsedColorPane(int rows,int columns,Object[] colors,ColorSelectable selectable){ public UsedColorPane(int rows,int columns,int reserveCells, Object[] colors, ColorSelectable selectable, boolean needPickColorButton, boolean setColorRealTime){
this.columns = columns; this.columns = columns;
this.rows = rows; this.rows = rows;
this.reserveCells = reserveCells;
this.colors = colors; this.colors = colors;
this.selectable = selectable; this.selectable = selectable;
this.needPickColorButton = needPickColorButton;
this.setColorRealTime = setColorRealTime;
initialComponents(); initialComponents();
} }
public UsedColorPane(int rows,int columns, Object[] colors,ColorSelectable selectable){
this(rows, columns, 0, colors, selectable, false, false);
}
private void initialComponents(){ private void initialComponents(){
int total = columns * rows; int total = columns * rows;
JPanel panel = new JPanel(); JPanel panel = new JPanel();
@ -57,9 +74,25 @@ public class UsedColorPane extends BasicPane{
panel.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 8)); panel.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 8));
Color[] colors = ColorSelectConfigManager.getInstance().getColors(); Color[] colors = ColorSelectConfigManager.getInstance().getColors();
int size = colors.length; int size = colors.length;
for (int i = 0; i < total; i++) {
int i = 0;
if (needPickColorButton) {
// 取色按钮
SpecialUIButton pickColorButton = PickColorButtonFactory.getPickColorButton(selectable, PickColorButtonFactory.IconType.ICON16, setColorRealTime);
panel.add(pickColorButton);
i++;
this.reserveCells += 1;
}
while (i < this.reserveCells) {
ColorCell cc = new ColorCell(DEFAULT_COLOR, selectable);
cc.setVisible(false);
panel.add(cc);
i++;
}
while (i < total) {
Color color = i < size ? colors[size-1-i]: DEFAULT_COLOR; Color color = i < size ? colors[size-1-i]: DEFAULT_COLOR;
panel.add(new ColorCell(color == null ? DEFAULT_COLOR : color, selectable)); panel.add(new ColorCell(color == null ? DEFAULT_COLOR : color, selectable));
i++;
} }
this.pane = panel; this.pane = panel;
} }
@ -72,7 +105,7 @@ public class UsedColorPane extends BasicPane{
int total = columns * rows; int total = columns * rows;
Color[] colors = ColorSelectConfigManager.getInstance().getColors(); Color[] colors = ColorSelectConfigManager.getInstance().getColors();
int size = colors.length; int size = colors.length;
for(int i=0; i<total; i++){ for(int i=this.reserveCells; i<total; i++){
ColorCell cell = (ColorCell) this.pane.getComponent(i); ColorCell cell = (ColorCell) this.pane.getComponent(i);
Color color = i < size ? colors[size-1-i]: DEFAULT_COLOR; Color color = i < size ? colors[size-1-i]: DEFAULT_COLOR;
cell.setColor(color == null ? DEFAULT_COLOR : color); cell.setColor(color == null ? DEFAULT_COLOR : color);

2
designer_base/src/com/fr/design/write/submit/CustomJobPane.java

@ -1 +1 @@
package com.fr.design.write.submit; import com.fr.data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.beans.BasicBeanPane; import com.fr.design.formula.JavaEditorPane; import com.fr.design.gui.frpane.ObjectProperiesPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; data.AbstractClassJob; import com.fr.design.dialog.DialogActionAdapter; data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.stable.StringUtils; data.AbstractClassJob; import com.fr.design.formula.JavaEditorPane; data.AbstractClassJob; import com.fr.design.gui.ibutton.UIButton; import java.awt.*; data.AbstractClassJob; import com.fr.design.gui.itextfield.UITextField; import java.awt.event.ActionListener; data.AbstractClassJob; import com.fr.design.gui.frpane.ObjectProperiesPane; /** * Author : Shockway * Date: 13-7-29 * Time: 下午6:48 */ public abstract class CustomJobPane extends BasicBeanPane { protected UITextField classNameTextField; protected ObjectProperiesPane objectProperiesPane; public static final int DEFAULT_LENGTH = 30; data.AbstractClassJob; import com.fr.design.gui.frpane.ObjectProperiesPane; public CustomJobPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); classNameTextField = new UITextField(getLengthOfTextField()); reportletNamePane.add(classNameTextField); data.AbstractClassJob; import com.fr.design.gui.frpane.ObjectProperiesPane; UIButton browserButton = new UIButton(Inter.getLocText("Select")); browserButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); data.AbstractClassJob; import com.fr.design.gui.frpane.ObjectProperiesPane; UIButton editButton = new UIButton(Inter.getLocText("Edit")); editButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); data.AbstractClassJob; import com.fr.design.gui.frpane.ObjectProperiesPane; import com.fr.design.formula.JavaEditorPane; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; reportletNamePane.add(editButton); data.AbstractClassJob; import com.fr.design.gui.frpane.ObjectProperiesPane; browserButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { final ClassNameSelectPane bPane = new ClassNameSelectPane(); bPane.setClassPath(classNameTextField.getText()); bPane.showWindow( SwingUtilities.getWindowAncestor(getWindowAncestor()), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(bPane.getClassPath()); checkAddButtonEnable(); } }).setVisible(true); } }); editButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final JavaEditorPane javaEditorPane = new JavaEditorPane(classNameTextField.getText(), JavaEditorPane.DEFAULT_SUBMIT_JOB); final BasicDialog dlg = javaEditorPane.showMediumWindow(SwingUtilities.getWindowAncestor(CustomJobPane.this), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(javaEditorPane.getClassText()); checkAddButtonEnable(); } }); javaEditorPane.addSaveActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dlg.doOK(); } }); dlg.setVisible(true); } }); data.AbstractClassJob; import com.fr.design.gui.frpane.ObjectProperiesPane; reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("ClassName"), null)); this.add(reportletNamePane, BorderLayout.NORTH); data.AbstractClassJob; import com.fr.design.gui.frpane.ObjectProperiesPane; objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Property"), null)); this.add(objectProperiesPane, BorderLayout.CENTER); data.AbstractClassJob; import com.fr.design.gui.frpane.ObjectProperiesPane; UITextArea area = new UITextArea(2, 1); area.setText(Inter.getLocText(new String[]{"Come_True", "Interface"}) + ":com.fr.data.SubmitJob"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Description"), null)); this.add(dsPane, BorderLayout.SOUTH); checkAddButtonEnable(); } data.AbstractClassJob; import com.fr.design.gui.frpane.ObjectProperiesPane; public int getLengthOfTextField() { import com.fr.design.layout.FRGUIPaneFactory; data.AbstractClassJob; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; data.AbstractClassJob; import com.fr.design.gui.frpane.ObjectProperiesPane; protected String title4PopupWindow() { return "CustomJob"; } data.AbstractClassJob; import com.fr.design.gui.frpane.ObjectProperiesPane; protected Component getWindowAncestor() { return this; } data.AbstractClassJob; import com.fr.design.gui.frpane.ObjectProperiesPane; @Override public void populateBean(Object ob) { if (ob instanceof AbstractClassJob) { AbstractClassJob cj = (AbstractClassJob) ob; data.AbstractClassJob; data.AbstractClassJob; data.AbstractClassJob; data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; data.AbstractClassJob; import com.fr.design.beans.BasicBeanPane; } data.AbstractClassJob; import com.fr.design.gui.frpane.ObjectProperiesPane; data.AbstractClassJob; import com.fr.design.formula.JavaEditorPane; data.AbstractClassJob; import com.fr.design.gui.frpane.ObjectProperiesPane; data.AbstractClassJob; import com.fr.design.gui.ibutton.UIButton; data.AbstractClassJob; import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.dialog.BasicDialog; import com.fr.design.gui.itextfield.UITextField; Empty(classNameTextField.getText())); } /** * 重置 */ public void reset() { this.classNameTextField.setText(null); this.checkAddButtonEnable(); } } package com.fr.design.write.submit; import com.fr.data.AbstractClassJob; import com.fr.design.layout.FRGUIPaneFactory; data.AbstractClassJob; data.AbstractClassJob; data.AbstractClassJob; import com.fr.design.dialog.DialogActionAdapter; data.AbstractClassJob; data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; data.AbstractClassJob; import com.fr.stable.StringUtils; data.AbstractClassJob; data.AbstractClassJob; import com.fr.design.formula.JavaEditorPane; data.AbstractClassJob; data.AbstractClassJob; data.AbstractClassJob; import com.fr.design.gui.ibutton.UIButton; data.AbstractClassJob; import java.awt.*; data.AbstractClassJob; data.AbstractClassJob; import com.fr.design.gui.itextfield.UITextField; data.AbstractClassJob; import java.awt.event.ActionListener; data.AbstractClassJob; /** data.AbstractClassJob; * Author : Shockway data.AbstractClassJob; * Date: 13-7-29 data.AbstractClassJob; * Time: 下午6:48 data.AbstractClassJob; */ data.AbstractClassJob; public abstract class CustomJobPane extends BasicBeanPane { data.AbstractClassJob; protected UITextField classNameTextField; data.AbstractClassJob; protected ObjectProperiesPane objectProperiesPane; data.AbstractClassJob; public static final int DEFAULT_LENGTH = 30; data.AbstractClassJob; */ data.AbstractClassJob; public CustomJobPane() { data.AbstractClassJob; this.setLayout(FRGUIPaneFactory.createBorderLayout()); data.AbstractClassJob; JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); data.AbstractClassJob; classNameTextField = new UITextField(getLengthOfTextField()); data.AbstractClassJob; reportletNamePane.add(classNameTextField); data.AbstractClassJob; UIButton browserButton = new UIButton(Inter.getLocText("Select")); data.AbstractClassJob; browserButton.setPreferredSize(new Dimension( data.AbstractClassJob; browserButton.getPreferredSize().width, data.AbstractClassJob; classNameTextField.getPreferredSize().height)); data.AbstractClassJob; */ data.AbstractClassJob; UIButton editButton = new UIButton(Inter.getLocText("Edit")); data.AbstractClassJob; editButton.setPreferredSize(new Dimension( data.AbstractClassJob; browserButton.getPreferredSize().width, data.AbstractClassJob; classNameTextField.getPreferredSize().height)); data.AbstractClassJob; reportletNamePane.add(browserButton); data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.formula.JavaEditorPane; data.AbstractClassJob; reportletNamePane.add(editButton); data.AbstractClassJob; browserButton.addActionListener(new ActionListener() { data.AbstractClassJob; public void actionPerformed(ActionEvent evt) { data.AbstractClassJob; final ClassNameSelectPane bPane = new ClassNameSelectPane(); data.AbstractClassJob; bPane.setClassPath(classNameTextField.getText()); data.AbstractClassJob; bPane.showWindow( data.AbstractClassJob; SwingUtilities.getWindowAncestor(getWindowAncestor()), data.AbstractClassJob; new DialogActionAdapter() { data.AbstractClassJob; public void doOk() { data.AbstractClassJob; classNameTextField.setText(bPane.getClassPath()); data.AbstractClassJob; checkAddButtonEnable(); data.AbstractClassJob; } data.AbstractClassJob; }).setVisible(true); data.AbstractClassJob; } data.AbstractClassJob; }); data.AbstractClassJob; editButton.addActionListener(new ActionListener() { data.AbstractClassJob; @Override data.AbstractClassJob; public void actionPerformed(ActionEvent e) { data.AbstractClassJob; final JavaEditorPane javaEditorPane = new JavaEditorPane(classNameTextField.getText(), JavaEditorPane.DEFAULT_SUBMIT_JOB); data.AbstractClassJob; final BasicDialog dlg = javaEditorPane.showMediumWindow(SwingUtilities.getWindowAncestor(CustomJobPane.this), data.AbstractClassJob; new DialogActionAdapter() { data.AbstractClassJob; public void doOk() { data.AbstractClassJob; classNameTextField.setText(javaEditorPane.getClassText()); data.AbstractClassJob; } data.AbstractClassJob; }); data.AbstractClassJob; javaEditorPane.addSaveActionListener(new ActionListener() { data.AbstractClassJob; @Override data.AbstractClassJob; public void actionPerformed(ActionEvent e) { data.AbstractClassJob; dlg.doOK(); data.AbstractClassJob; } data.AbstractClassJob; }); data.AbstractClassJob; dlg.setVisible(true); checkAddButtonEnable(); data.AbstractClassJob; } data.AbstractClassJob; }); data.AbstractClassJob; reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("ClassName"), null)); data.AbstractClassJob; this.add(reportletNamePane, BorderLayout.NORTH); data.AbstractClassJob; objectProperiesPane = new ObjectProperiesPane(); data.AbstractClassJob; objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Property"), null)); data.AbstractClassJob; this.add(objectProperiesPane, BorderLayout.CENTER); data.AbstractClassJob; UITextArea area = new UITextArea(2, 1); data.AbstractClassJob; area.setText(Inter.getLocText(new String[]{"Come_True", "Interface"}) + ":com.fr.data.SubmitJob"); data.AbstractClassJob; JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); data.AbstractClassJob; dsPane.add(area); data.AbstractClassJob; dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Description"), null)); data.AbstractClassJob; this.add(dsPane, BorderLayout.SOUTH); data.AbstractClassJob; checkAddButtonEnable(); data.AbstractClassJob; } data.AbstractClassJob; public int getLengthOfTextField() { data.AbstractClassJob; */ data.AbstractClassJob; import com.fr.design.layout.FRGUIPaneFactory; data.AbstractClassJob; data.AbstractClassJob; protected String title4PopupWindow() { data.AbstractClassJob; return "CustomJob"; data.AbstractClassJob; protected Component getWindowAncestor() { data.AbstractClassJob; return this; data.AbstractClassJob; @Override data.AbstractClassJob; public void populateBean(Object ob) { data.AbstractClassJob; if (ob instanceof AbstractClassJob) { data.AbstractClassJob; AbstractClassJob cj = (AbstractClassJob) ob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; data.AbstractClassJob; if (ob instanceof AbstractClassJob) { import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; data.AbstractClassJob; if (ob instanceof AbstractClassJob) { import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.beans.BasicBeanPane; return this; data.AbstractClassJob; if (ob instanceof AbstractClassJob) { data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.formula.JavaEditorPane; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.gui.frpane.ObjectProperiesPane; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.gui.itextarea.UITextArea; AbstractClassJob cj = (AbstractClassJob) ob; this.classNameTextField.setText(cj.getClassName()); import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.dialog.BasicDialog; checkAddButtonEnable(); } import java.awt.event.ActionListener; import com.fr.design.gui.itextfield.UITextField; /** * 添加按钮可用 */ public void checkAddButtonEnable() { objectProperiesPane.enableAddButton(StringUtils.isNotEmpty(classNameTextField.getText())); } /** * 重置 */ public void reset() { this.classNameTextField.setText(null); this.checkAddButtonEnable(); } }

12
designer_chart/src/com/fr/design/mainframe/chart/gui/ColorSelectPaneWithOutTransparent.java

@ -19,7 +19,7 @@ public class ColorSelectPaneWithOutTransparent extends ColorSelectPane {
public void initCenterPaneChildren(JPanel centerPane) { public void initCenterPaneChildren(JPanel centerPane) {
JPanel menuColorPane1 = new JPanel(); JPanel menuColorPane1 = new JPanel();
centerPane.add(menuColorPane1); centerPane.add(menuColorPane1);
menuColorPane1.setLayout(new GridLayout(5, 8, 5, 5)); menuColorPane1.setLayout(new GridLayout(3, 8, 5, 5));
for (int i = 0; i < ChartConstants.MAP_COLOR_ARRAY.length; i++) { for (int i = 0; i < ChartConstants.MAP_COLOR_ARRAY.length; i++) {
menuColorPane1.add(new ColorCell(ChartConstants.MAP_COLOR_ARRAY[i], this)); menuColorPane1.add(new ColorCell(ChartConstants.MAP_COLOR_ARRAY[i], this));
} }
@ -30,4 +30,14 @@ public class ColorSelectPaneWithOutTransparent extends ColorSelectPane {
protected Color[] getColorArray(){ protected Color[] getColorArray(){
return ChartConstants.MAP_COLOR_ARRAY; return ChartConstants.MAP_COLOR_ARRAY;
} }
protected JPanel getMenuColorPane() {
JPanel menuColorPane = new JPanel();
menuColorPane.setLayout(new GridLayout(0, 8, 1, 1));
menuColorPane.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 8));
menuColorPane.setPreferredSize(new Dimension(205, 62));
return menuColorPane;
}
} }

Loading…
Cancel
Save