Browse Source

无JIRA任务。调整代码

master
plough 8 years ago
parent
commit
37b9b4fcb9
  1. 10
      designer/src/com/fr/design/webattr/PageWebSettingPane.java
  2. 2
      designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java
  3. 31
      designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java
  4. 6
      designer_base/src/com/fr/design/actions/help/AboutPane.java
  5. 3
      designer_base/src/com/fr/design/gui/ibutton/UIColorButton.java
  6. 8
      designer_base/src/com/fr/design/locale/designer.properties
  7. 8
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  8. 8
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  9. 8
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  10. 8
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  11. 8
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  12. 6
      designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java
  13. 2
      designer_base/src/com/fr/design/write/submit/CustomJobPane.java

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

@ -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}
}; };

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

@ -1 +1 @@
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 javax.swing.*; import java.awt.*; /** * Author : Shockway * Date: 13-9-18 * Time: 下午2:17 */ public abstract class CustomWritableRepeatEditorPane<T extends CustomWriteAbleRepeatEditor> extends WritableRepeatEditorPane<T> { private UICheckBox customDataCheckBox; public CustomWritableRepeatEditorPane() { this.initComponents(); } @Override protected JPanel setThirdContentPane() { JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.customDataCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_CustomData"), false); this.customDataCheckBox.setPreferredSize( new Dimension(GraphHelper.getLocTextWidth("Form-Allow_CustomData") + 30, 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 javax.swing.*; import java.awt.*; /** * Author : Shockway * Date: 13-9-18 * Time: 下午2:17 */ public abstract class CustomWritableRepeatEditorPane<T extends CustomWriteAbleRepeatEditor> extends WritableRepeatEditorPane<T> { private UICheckBox customDataCheckBox; private static final int CUSTOM_DATA_CHECK_BOX_WIDTH = GraphHelper.getLocTextWidth("Form-Allow_CustomData") + 30; private static final int CUSTOM_DATA_CHECK_BOX_HEIGHT = 30; public CustomWritableRepeatEditorPane() { this.initComponents(); } @Override protected JPanel setThirdContentPane() { JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.customDataCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_CustomData"), false); this.customDataCheckBox.setPreferredSize( new Dimension(CUSTOM_DATA_CHECK_BOX_WIDTH, CUSTOM_DATA_CHECK_BOX_HEIGHT)); 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(); }

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

@ -20,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;
@ -33,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) {
@ -47,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(GraphHelper.getLocTextWidth("Allow_Blank") + 30, 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"}) + ":"));

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

@ -73,7 +73,7 @@ public class AboutPane extends JPanel {
// do nothing // do nothing
} else { } 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"));
@ -110,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);
} }

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, -70, this.getSize().height); GUICoreUtils.showPopupMenu(popupWin, this, POPUP_MENU_SHIFT, this.getSize().height);
} }
/** /**

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

@ -531,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

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

@ -531,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

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

@ -510,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

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

@ -505,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

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

@ -535,4 +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

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

@ -523,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

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

@ -13,6 +13,8 @@ import java.awt.event.*;
*/ */
public class PickColorButtonFactory { public class PickColorButtonFactory {
private static int iconSize; private static int iconSize;
private static final int SIZE_16 = 16;
private static final int SIZE_18 = 18;
private static IconType iconType; private static IconType iconType;
private static Image iconImage; private static Image iconImage;
@ -26,10 +28,10 @@ public class PickColorButtonFactory {
if (iconType == IconType.ICON16) { if (iconType == IconType.ICON16) {
iconImage = BaseUtils.readImage("/com/fr/design/images/gui/colorPicker/colorPicker16.png"); iconImage = BaseUtils.readImage("/com/fr/design/images/gui/colorPicker/colorPicker16.png");
iconSize = 16; iconSize = SIZE_16;
} else { } else {
iconImage = BaseUtils.readImage("/com/fr/design/images/gui/colorPicker/colorPicker18.png"); iconImage = BaseUtils.readImage("/com/fr/design/images/gui/colorPicker/colorPicker18.png");
iconSize = 18; iconSize = SIZE_18;
pickColorButton.setBorderPainted(false); pickColorButton.setBorderPainted(false);
} }
pickColorButton.setPreferredSize(new Dimension(iconSize, iconSize)); pickColorButton.setPreferredSize(new Dimension(iconSize, iconSize));

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

@ -1 +1 @@
package com.fr.design.write.submit; import com.fr.base.GraphHelper; 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; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.general.Inter; import com.fr.stable.StringUtils; import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * 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; public CustomJobPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); classNameTextField = new UITextField(getLengthOfTextField()); reportletNamePane.add(classNameTextField); UIButton browserButton = new UIButton(Inter.getLocText("Select")); browserButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("Select") + 20, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("Edit")); editButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("Edit") + 20, classNameTextField.getPreferredSize().height)); Select")); Select")); Select")); Select")); browserButton.setPreferredSize(new Dimension( public void actionPerformed(ActionEvent evt) { Select")); classNameTextField.getPreferredSize().height)); bPane.setClassPath(classNameTextField.getText()); Select")); UIButton editButton = new UIButton(Inter.getLocText("Edit")); SwingUtilities.getWindowAncestor(getWindowAncestor()), new DialogActionAdapter() { Select")); classNameTextField.getPreferredSize().height)); 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()); browserButton.setPreferredSize(new Dimension( Select")); } }); javaEditorPane.addSaveActionListener(new ActionListener() { @Override GraphHelper.getLocTextWidth("Select") + 20, GraphHelper.getLocTextWidth("Edit") + 20, dlg.doOK(); } }); dlg.setVisible(true); } }); reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("ClassName"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Property"), null)); this.add(objectProperiesPane, BorderLayout.CENTER); UITextArea area = new UITextArea(2, 1); Select")); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); GraphHelper.getLocTextWidth("Select") + 20, dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Description"), null)); this.add(dsPane, BorderLayout.SOUTH); checkAddButtonEnable(); } GraphHelper.getLocTextWidth("Edit") + 20, return DEFAULT_LENGTH; } protected String title4PopupWindow() { UIButton editButton = new UIButton(Inter.getLocText("Edit")); Select")); } protected Component getWindowAncestor() { return this; } UIButton editButton = new UIButton(Inter.getLocText("Edit")); classNameTextField.getPreferredSize().height)); public void populateBean(Object ob) { if (ob instanceof AbstractClassJob) { AbstractClassJob cj = (AbstractClassJob) ob; UIButton editButton = new UIButton(Inter.getLocText("Edit")); GraphHelper.getLocTextWidth("Edit") + 20, UIButton editButton = new UIButton(Inter.getLocText("Edit")); classNameTextField.getPreferredSize().height)); editButton.setPreferredSize(new Dimension( editButton.setPreferredSize(new Dimension( Select")); editButton.setPreferredSize(new Dimension( editButton.setPreferredSize(new Dimension( browserButton.setPreferredSize(new Dimension( * 添加按钮可用 */ public void checkAddButtonEnable() { objectProperiesPane.enableAddButton(!StringUtils.isEmpty(classNameTextField.getText())); } /** * 重置 */ public void reset() { this.classNameTextField.setText(null); this.checkAddButtonEnable(); } } package com.fr.design.write.submit; import com.fr.base.GraphHelper; 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; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.general.Inter; import com.fr.stable.StringUtils; import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * 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; public CustomJobPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); classNameTextField = new UITextField(getLengthOfTextField()); reportletNamePane.add(classNameTextField); UIButton browserButton = new UIButton(Inter.getLocText("FR-Designer_Select")); browserButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("FR-Designer_Select") + 20, classNameTextField.getPreferredSize().height)); GraphHelper.getLocTextWidth("Edit") + 20, Select")); GraphHelper.getLocTextWidth("Edit") + 20, browserButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("Edit") + 20, GraphHelper.getLocTextWidth("Select") + 20, GraphHelper.getLocTextWidth("Edit") + 20, classNameTextField.getPreferredSize().height)); GraphHelper.getLocTextWidth("Edit") + 20, GraphHelper.getLocTextWidth("Edit") + 20, UIButton editButton = new UIButton(Inter.getLocText("Edit")); GraphHelper.getLocTextWidth("Edit") + 20, editButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("Edit") + 20, GraphHelper.getLocTextWidth("Edit") + 20, GraphHelper.getLocTextWidth("Edit") + 20, classNameTextField.getPreferredSize().height)); final ClassNameSelectPane bPane = new ClassNameSelectPane(); bPane.setClassPath(classNameTextField.getText()); bPane.showWindow( SwingUtilities.getWindowAncestor(getWindowAncestor()), new DialogActionAdapter() { classNameTextField.getPreferredSize().height)); classNameTextField.setText(bPane.getClassPath()); checkAddButtonEnable(); } }).setVisible(true); Select")); Select")); Select")); editButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { reportletNamePane.add(browserButton); Select")); UIButton editButton = new UIButton(Inter.getLocText("Edit")); new DialogActionAdapter() { public void doOk() { classNameTextField.setText(javaEditorPane.getClassText()); checkAddButtonEnable(); } }); reportletNamePane.add(editButton); browserButton.setPreferredSize(new Dimension( Select")); public void actionPerformed(ActionEvent evt) { Select")); Select")); classNameTextField.getPreferredSize().height)); Select")); bPane.setClassPath(classNameTextField.getText()); Select")); Select")); UIButton editButton = new UIButton(Inter.getLocText("Edit")); Select")); SwingUtilities.getWindowAncestor(getWindowAncestor()), Select")); new DialogActionAdapter() { Select")); Select")); classNameTextField.getPreferredSize().height)); Select")); classNameTextField.setText(bPane.getClassPath()); Select")); checkAddButtonEnable(); Select")); } Select")); }).setVisible(true); Select")); } Select")); }); Select")); editButton.addActionListener(new ActionListener() { Select")); @Override Select")); public void actionPerformed(ActionEvent e) { Select")); final JavaEditorPane javaEditorPane = new JavaEditorPane(classNameTextField.getText(), JavaEditorPane.DEFAULT_SUBMIT_JOB); Select")); final BasicDialog dlg = javaEditorPane.showMediumWindow(SwingUtilities.getWindowAncestor(CustomJobPane.this), Select")); new DialogActionAdapter() { Select")); public void doOk() { Select")); classNameTextField.setText(javaEditorPane.getClassText()); GraphHelper.getLocTextWidth("Edit") + 20, Select")); Select")); } Select")); }); } Select")); javaEditorPane.addSaveActionListener(new ActionListener() { Select")); @Override public void actionPerformed(ActionEvent evt) { GraphHelper.getLocTextWidth("Select") + 20, GraphHelper.getLocTextWidth("Edit") + 20, Select")); protected Component getWindowAncestor() { Select")); dlg.doOK(); } Select")); } Select")); }); Select")); dlg.setVisible(true); Select")); } Select")); }); Select")); reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("ClassName"), null)); Select")); this.add(reportletNamePane, BorderLayout.NORTH); Select")); objectProperiesPane = new ObjectProperiesPane(); Select")); GraphHelper.getLocTextWidth("Select") + 20, GraphHelper.getLocTextWidth("Select") + 20, GraphHelper.getLocTextWidth("Edit") + 20, Select")); Select")); classNameTextField.getPreferredSize().height)); GraphHelper.getLocTextWidth("Edit") + 20, final ClassNameSelectPane bPane = new ClassNameSelectPane(); classNameTextField.getPreferredSize().height)); bPane.setClassPath(classNameTextField.getText()); Select")); Select")); Select")); browserButton.setPreferredSize(new Dimension( Empty(classNameTextField.getText())); } /** * 重置 */ public void reset() { this.classNameTextField.setText(null); this.checkAddButtonEnable(); } }
Loading…
Cancel
Save