Browse Source

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

master
MoMeak 7 years ago
parent
commit
6786bf2c27
  1. 12
      designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java
  2. 26
      designer/src/com/fr/design/widget/CellWidgetCardPane.java
  3. 1
      designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java
  4. 2
      designer/src/com/fr/design/widget/ui/ButtonDefinePane.java
  5. 6
      designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java
  6. 12
      designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java
  7. 6
      designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java
  8. 8
      designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java
  9. 2
      designer_base/src/com/fr/design/extra/PluginOperateUtils.java
  10. 8
      designer_base/src/com/fr/design/extra/PluginUtils.java
  11. 19
      designer_base/src/com/fr/design/extra/WebViewDlgHelper.java
  12. 47
      designer_base/src/com/fr/design/gui/itextfield/UIPropertyTextField.java
  13. 14
      designer_base/src/com/fr/design/gui/itextfield/UITextField.java
  14. 4
      designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java
  15. 31
      designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java
  16. 10
      designer_form/src/com/fr/design/widget/ui/designer/ButtonDefinePane.java
  17. 6
      designer_form/src/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java
  18. 6
      designer_form/src/com/fr/design/widget/ui/designer/ComboBoxDefinePane.java
  19. 7
      designer_form/src/com/fr/design/widget/ui/designer/ComboCheckBoxDefinePane.java
  20. 1
      designer_form/src/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java
  21. 34
      designer_form/src/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java
  22. 6
      designer_form/src/com/fr/design/widget/ui/designer/IframeEditorDefinePane.java
  23. 6
      designer_form/src/com/fr/design/widget/ui/designer/TextFieldEditorDefinePane.java
  24. 6
      designer_form/src/com/fr/design/widget/ui/designer/TreeComboBoxEditorDefinePane.java
  25. 6
      designer_form/src/com/fr/design/widget/ui/designer/WaterMarkDictPane.java
  26. 2
      designer_form/src/com/fr/design/widget/ui/designer/btn/ButtonGroupDefinePane.java
  27. 1
      designer_form/src/com/fr/design/widget/ui/designer/component/PaddingBoundPane.java

12
designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java

@ -10,7 +10,7 @@ import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.JTemplate;
@ -47,9 +47,9 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
private UIComboBox showContent;
private UITextField tooltipTextField;
private UIPropertyTextField tooltipTextField;
private UITextField fileNameTextField;
private UIPropertyTextField fileNameTextField;
// 分页
private UICheckBox pageBeforeRowCheckBox;
@ -228,8 +228,8 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
final JPanel fileNamePane = new JPanel(fileNameLayout);
JPanel fileNameCCPane = new JPanel(new BorderLayout(4, 0));
fileNameCCPane.add(new UILabel(Inter.getLocText("FR-Designer_File_Name_For_Download")), BorderLayout.WEST);
fileNameTextField = new UITextField();
tooltipTextField = new UITextField();
fileNameTextField = new UIPropertyTextField();
tooltipTextField = new UIPropertyTextField();
tooltipTextField.getUI();
fileNamePane.add(new JPanel(), "none");
fileNamePane.add(fileNameCCPane, "content");
@ -248,8 +248,6 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
}
}
});
tooltipTextField = new UITextField();
tooltipTextField.getUI();
return fileNamePane;
}

26
designer/src/com/fr/design/widget/CellWidgetCardPane.java

@ -2,6 +2,7 @@ package com.fr.design.widget;
import com.fr.design.data.DataCreatorUI;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.layout.FRGUIPaneFactory;
@ -48,10 +49,30 @@ public class CellWidgetCardPane extends BasicPane {
this.removeAll();
this.setLayout(FRGUIPaneFactory.createBorderLayout());
final JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
BasicScrollPane basicScrollPane = new BasicScrollPane() {
@Override
protected JPanel createContentPane() {
return jPanel;
}
@Override
public void populateBean(Object ob) {
}
@Override
protected String title4PopupWindow() {
return null;
}
};
this.add(basicScrollPane, BorderLayout.CENTER);
//k
tabbedPane = new CardLayout();
center = new JPanel(tabbedPane);
this.add(center, BorderLayout.CENTER);
jPanel.add(center, BorderLayout.CENTER);
attriTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
eventTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
@ -70,7 +91,7 @@ public class CellWidgetCardPane extends BasicPane {
}
};
tabsHeaderIconPane.setNeedLeftRightOutLine(false);
this.add(tabsHeaderIconPane, BorderLayout.NORTH);
jPanel.add(tabsHeaderIconPane, BorderLayout.NORTH);
widgetPropertyPane = new BasicWidgetPropertySettingPane();
@ -82,7 +103,6 @@ public class CellWidgetCardPane extends BasicPane {
attriCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
attriTabPane.add(attriCardPane, BorderLayout.CENTER);
attriCardLayout = (CardLayout) attriCardPane.getLayout();
this.setPreferredSize(new Dimension(600, 450));
}
private void initPaneList() {

1
designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java

@ -3,7 +3,6 @@ package com.fr.design.widget.ui;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;

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

@ -5,8 +5,6 @@ import com.fr.design.widget.ui.btn.ButtonDetailPaneFactory;
import com.fr.form.ui.Button;
import com.fr.form.ui.FreeButton;
import com.fr.design.widget.btn.ButtonDetailPane;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;

6
designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java

@ -3,7 +3,7 @@ package com.fr.design.widget.ui;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -14,7 +14,7 @@ import javax.swing.*;
import java.awt.*;
public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
private UITextField text;
private UIPropertyTextField text;
public CheckBoxDefinePane() {
this.iniComoponents();
@ -22,7 +22,7 @@ public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
private void iniComoponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
text = new UITextField(8);
text = new UIPropertyTextField();
JPanel panel = new JPanel(new BorderLayout());
panel.add(text, BorderLayout.CENTER);
panel.setBorder(BorderFactory.createEmptyBorder(0, 35, 0, 0));

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

@ -5,7 +5,7 @@ import com.fr.design.constants.LayoutConstants;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -24,7 +24,7 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
private static final int ALLOW_BLANK_CHECK_BOX_HEIGHT = 30;
protected UICheckBox allowBlankCheckBox;
// richer:错误信息,是所有控件共有的属性,所以放到这里来
protected UITextField errorMsgTextField;
protected UIPropertyTextField errorMsgTextField;
protected JPanel validatePane;
public FieldEditorDefinePane() {
@ -33,7 +33,6 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
initErrorMsgPane();
JPanel contentPane = this.setFirstContentPane();
if (contentPane != null) {
UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 24, contentPane);
@ -45,9 +44,8 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
protected void initErrorMsgPane() {
// 错误信息
errorMsgTextField = new UITextField(10);
// richer:主要为了方便查看比较长的错误信息
errorMsgTextField = new UIPropertyTextField();
// // richer:主要为了方便查看比较长的错误信息
errorMsgTextField.getDocument().addDocumentListener(new DocumentListener() {
public void changedUpdate(DocumentEvent e) {
@ -98,7 +96,7 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
protected void addValidatePane() {
validatePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
final UILabel uiLabel = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Error", "FR-Designer_Tooltips"}));
errorMsgTextField = new UITextField(10);
initErrorMsgPane();
allowBlankCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Null"));
allowBlankCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
allowBlankCheckBox.setPreferredSize(new Dimension(ALLOW_BLANK_CHECK_BOX_WIDTH, ALLOW_BLANK_CHECK_BOX_HEIGHT));

6
designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java

@ -9,7 +9,7 @@ import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -28,7 +28,7 @@ public class IframeEditorDefinePane extends AbstractDataModify<IframeEditor> {
private static final int P_W = 610;
private static final int P_H = 580;
private UITextField srcTextField;
private UIPropertyTextField srcTextField;
private ReportletParameterViewPane parameterViewPane;
private UICheckBox horizontalCheck;
private UICheckBox verticalCheck;
@ -61,7 +61,7 @@ public class IframeEditorDefinePane extends AbstractDataModify<IframeEditor> {
java.awt.Component[][] coms = {
{horizontalCheck, null},
{verticalCheck, null},
{new UILabel(Inter.getLocText("Form-Url")), srcTextField = new UITextField()},
{new UILabel(Inter.getLocText("Form-Url")), srcTextField = new UIPropertyTextField()},
{new UILabel(Inter.getLocText("FR-Designer_Parameters")), parameterViewPaneButton}};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(coms, rowSize, columnSize, rowCount, 45, LayoutConstants.VGAP_LARGE);

8
designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java

@ -1,7 +1,7 @@
package com.fr.design.widget.ui;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.form.ui.WaterMark;
@ -13,14 +13,12 @@ import java.awt.event.KeyListener;
public class WaterMarkDictPane extends JPanel {
private UITextField waterMarkTextField;
private UIPropertyTextField waterMarkTextField;
public WaterMarkDictPane() {
this.setLayout(new BorderLayout());
// this.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
// this.add(new UILabel(Inter.getLocText("WaterMark") + ":"));
waterMarkTextField = new UITextField(13);
waterMarkTextField = new UIPropertyTextField();
UILabel emptyLabel = new UILabel();
emptyLabel.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0));

2
designer_base/src/com/fr/design/extra/PluginOperateUtils.java

@ -292,7 +292,7 @@ public class PluginOperateUtils {
pluginInfo.append(PluginUtils.getMessageByErrorCode(pluginTaskResult.errorCode()));
continue;
}
PluginMarker pluginMarker = pluginTask.getMarker();
PluginMarker pluginMarker = pluginTask.getToMarker();
PluginContext pluginContext = PluginManager.getContext(pluginMarker);
if (pluginContext != null) {
pluginInfo.append(pluginContext.getName()).append(PluginUtils.getMessageByErrorCode(pluginTaskResult.errorCode()));

8
designer_base/src/com/fr/design/extra/PluginUtils.java

@ -78,8 +78,8 @@ public class PluginUtils {
return jsonArray.toString();
}
public static void downloadShopScripts(String id, String username, String password, Process<Double> p) throws Exception {
HttpClient httpClient = new HttpClient(getDownloadPath(id, username, password));
public static void downloadShopScripts(String id, Process<Double> p) throws Exception {
HttpClient httpClient = new HttpClient(getDownloadPath(id));
if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) {
int totalSize = httpClient.getContentLength();
InputStream reader = httpClient.getResponseStream();
@ -104,11 +104,9 @@ public class PluginUtils {
}
}
private static String getDownloadPath(String id, String username, String password) throws Exception {
private static String getDownloadPath(String id) throws Exception {
HashMap<String, String> map = new HashMap<String, String>();
map.put("id", id);
map.put("username", username);
map.put("password", password);
HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("shop.plugin.scripts"));
httpClient.asGet();
String resText = httpClient.getResponseText();

19
designer_base/src/com/fr/design/extra/WebViewDlgHelper.java

@ -1,7 +1,6 @@
package com.fr.design.extra;
import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.RestartHelper;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.UIDialog;
@ -171,10 +170,8 @@ public class WebViewDlgHelper {
new SwingWorker<Boolean, Void>() {
@Override
protected Boolean doInBackground() throws Exception {
String username = DesignerEnvManager.getEnvManager().getBBSName();
String password = DesignerEnvManager.getEnvManager().getBBSPassword();
try {
PluginUtils.downloadShopScripts(scriptsId, username, password, new Process<Double>() {
PluginUtils.downloadShopScripts(scriptsId, new Process<Double>() {
@Override
public void process(Double integer) {
}
@ -198,19 +195,7 @@ public class WebViewDlgHelper {
IOUtils.unzip(new File(StableUtils.pathJoin(PluginConstants.DOWNLOAD_PATH, PluginConstants.TEMP_FILE)), installHome);
copyMainFile(StableUtils.pathJoin(installHome, "index.html"), StableUtils.pathJoin(installHome, relativePath));
// TODO: 2017/4/17 删除之前存放在安装目录下的script
int rv = JOptionPane.showOptionDialog(
null,
Inter.getLocText("FR-Designer-Plugin_Shop_Installed"),
Inter.getLocText("FR-Designer-Plugin_Warning"),
JOptionPane.YES_NO_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
new String[]{Inter.getLocText("FR-Designer-Basic_Restart_Designer"), Inter.getLocText("FR-Designer-Basic_Restart_Designer_Later")},
null
);
if (rv == JOptionPane.OK_OPTION) {
RestartHelper.restart();
}
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Plugin_Shop_Installed"), Inter.getLocText("FR-Designer_Tooltips"), JOptionPane.INFORMATION_MESSAGE);
}
} catch (InterruptedException | ExecutionException e) {
FRContext.getLogger().error(e.getMessage(), e);

47
designer_base/src/com/fr/design/gui/itextfield/UIPropertyTextField.java

@ -0,0 +1,47 @@
package com.fr.design.gui.itextfield;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import javax.swing.text.Document;
/**
* Created by ibm on 2017/8/16.
*/
public class UIPropertyTextField extends UITextField{
public UIPropertyTextField() {
super();
}
public UIPropertyTextField(int columns) {
super(columns);
}
public UIPropertyTextField(String text, int columns) {
super(text, columns);
}
public UIPropertyTextField(String text) {
super(text);
}
public UIPropertyTextField(Document doc, String text, int columns) {
super(doc, text, columns);
}
protected void initListener() {
if (shouldResponseChangeListener()) {
addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent e) {
}
@Override
public void focusLost(FocusEvent e) {
attributeChange();
}
});
}
}
}

14
designer_base/src/com/fr/design/gui/itextfield/UITextField.java

@ -13,8 +13,6 @@ import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.text.Document;
import java.awt.*;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
/**
* @author Jerry
@ -61,13 +59,19 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs
protected void initListener() {
if (shouldResponseChangeListener()) {
addFocusListener(new FocusListener() {
getDocument().addDocumentListener(new DocumentListener() {
@Override
public void focusGained(FocusEvent e) {
public void insertUpdate(DocumentEvent e) {
attributeChange();
}
@Override
public void removeUpdate(DocumentEvent e) {
attributeChange();
}
@Override
public void focusLost(FocusEvent e) {
public void changedUpdate(DocumentEvent e) {
attributeChange();
}
});

4
designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

@ -326,9 +326,11 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
public void fireCreatorModified(DesignerEvent evt) {
if (evt.getCreatorEventID() == DesignerEvent.CREATOR_EDITED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_DELETED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_RESIZED) {
formWidgetCardPane.populate();
}else if(evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED){
formWidgetCardPane = new FormWidgetCardPane(designer);
formWidgetCardPane.populate();
}
}

31
designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.widget.ui;
import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.creator.*;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
@ -17,6 +18,7 @@ import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WScaleLayout;
import com.fr.form.ui.container.WTitleLayout;
import com.fr.form.ui.widget.CRBoundsWidget;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
@ -46,7 +48,6 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
if (widgetBoundPane != null) {
attriCardPane.add(widgetBoundPane, BorderLayout.CENTER);
}
}
public XLayoutContainer getParent(XCreator source) {
@ -102,22 +103,40 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
}
private void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
final JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
BasicScrollPane basicScrollPane = new BasicScrollPane() {
@Override
protected JPanel createContentPane() {
return jPanel;
}
@Override
public void populateBean(Object ob) {
}
@Override
protected String title4PopupWindow() {
return null;
}
};
this.add(basicScrollPane, BorderLayout.CENTER);
if (xCreator.supportSetVisibleOrEnable()) {
widgetPropertyPane = new FormBasicWidgetPropertyPane();
} else {
widgetPropertyPane = new FormBasicPropertyPane();
}
UIExpandablePane uiExpandablePane = new UIExpandablePane("基本", 280, 20, widgetPropertyPane);
UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Basic"), 280, 20, widgetPropertyPane);
this.add(uiExpandablePane, BorderLayout.NORTH);
jPanel.add(uiExpandablePane, BorderLayout.NORTH);
attriCardPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(attriCardPane, BorderLayout.CENTER);
jPanel.add(attriCardPane, BorderLayout.CENTER);
this.listener2 = new AttributeChangeListener() {
@Override

10
designer_form/src/com/fr/design/widget/ui/designer/ButtonDefinePane.java

@ -3,7 +3,7 @@ package com.fr.design.widget.ui.designer;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -17,8 +17,8 @@ import javax.swing.*;
import java.awt.*;
public abstract class ButtonDefinePane<T extends Button> extends AbstractDataModify<T> {
private UITextField hotkeysTextField;
private UITextField buttonNameTextField;
private UIPropertyTextField hotkeysTextField;
private UIPropertyTextField buttonNameTextField;
private AccessibleIconEditor iconPane;
@ -35,8 +35,8 @@ public abstract class ButtonDefinePane<T extends Button> extends AbstractDataMod
double columnSize[] = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
iconPane = new AccessibleIconEditor();
hotkeysTextField = new UITextField();
buttonNameTextField = new UITextField();
hotkeysTextField = new UIPropertyTextField();
buttonNameTextField = new UIPropertyTextField();
Component[] backgroundCompPane = createBackgroundComp();
Component[] frFont = createFontPane();
UILabel backgroundLabel = new UILabel(Inter.getLocText("FR-Designer_Background"));

6
designer_form/src/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java

@ -4,7 +4,7 @@ import com.fr.design.designer.creator.XCreator;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -16,7 +16,7 @@ import javax.swing.*;
import java.awt.*;
public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
private UITextField text;
private UIPropertyTextField text;
private UISpinner fontSizePane;
private FormWidgetValuePane formWidgetValuePane;
@ -27,7 +27,7 @@ public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
private void iniComoponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
text = new UITextField();
text = new UIPropertyTextField();
fontSizePane = new UISpinner(0, 20, 1, 0);
formWidgetValuePane = new FormWidgetValuePane(creator.toData(), false);
double f = TableLayout.FILL;

6
designer_form/src/com/fr/design/widget/ui/designer/ComboBoxDefinePane.java

@ -4,7 +4,7 @@ import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.form.ui.ComboBox;
import com.fr.general.Inter;
@ -13,7 +13,7 @@ import java.awt.*;
public class ComboBoxDefinePane extends DictEditorDefinePane<ComboBox> {
private UICheckBox removeRepeatCheckBox;
private UITextField waterMarkField;
private UIPropertyTextField waterMarkField;
public ComboBoxDefinePane(XCreator xCreator) {
super(xCreator);
@ -26,7 +26,7 @@ public class ComboBoxDefinePane extends DictEditorDefinePane<ComboBox> {
}
public Component[] createWaterMarkPane() {
waterMarkField = new UITextField();
waterMarkField = new UIPropertyTextField();
return new Component[]{new UILabel(Inter.getLocText("FR-Designer_WaterMark")), waterMarkField};
}

7
designer_form/src/com/fr/design/widget/ui/designer/ComboCheckBoxDefinePane.java

@ -3,10 +3,9 @@ package com.fr.design.widget.ui.designer;
import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.form.ui.ComboCheckBox;
@ -18,7 +17,7 @@ import java.awt.*;
public class ComboCheckBoxDefinePane extends DictEditorDefinePane<ComboCheckBox> {
private UICheckBox supportTagCheckBox;
private UIButtonGroup returnType;
private UITextField waterMarkDictPane;
private UIPropertyTextField waterMarkDictPane;
private UICheckBox removeRepeatCheckBox;
public ComboCheckBoxDefinePane(XCreator xCreator) {
@ -32,7 +31,7 @@ public class ComboCheckBoxDefinePane extends DictEditorDefinePane<ComboCheckBox>
}
public Component[] createWaterMarkPane() {
waterMarkDictPane = new UITextField();
waterMarkDictPane = new UIPropertyTextField();
return new Component[]{new UILabel(Inter.getLocText("FR-Designer_WaterMark")), waterMarkDictPane};
}

1
designer_form/src/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java

@ -3,7 +3,6 @@ package com.fr.design.widget.ui.designer;
import com.fr.base.GraphHelper;
import com.fr.design.designer.creator.XCreator;
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;

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

@ -1,12 +1,11 @@
package com.fr.design.widget.ui.designer;
import com.fr.base.GraphHelper;
import com.fr.design.designer.creator.*;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -14,16 +13,16 @@ import com.fr.form.ui.FieldEditor;
import com.fr.general.Inter;
import javax.swing.*;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
public abstract class FieldEditorDefinePane<T extends FieldEditor> extends AbstractDataModify<T> {
private static final int ALLOW_BLANK_CHECK_BOX_WIDTH = GraphHelper.getLocTextWidth("FR-Designer_Allow_Null") + 30;
private static final int ALLOW_BLANK_CHECK_BOX_HEIGHT = 30;
protected UICheckBox allowBlankCheckBox;
// richer:错误信息,是所有控件共有的属性,所以放到这里来
protected UITextField errorMsgTextField;
protected UIPropertyTextField errorMsgTextField;
protected JPanel validatePane;
protected UISpinner fontSizePane;
@ -40,9 +39,8 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
this.setLayout(FRGUIPaneFactory.createBorderLayout());
allowBlankCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Null"));
allowBlankCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
// allowBlankCheckBox.setPreferredSize(new Dimension(ALLOW_BLANK_CHECK_BOX_WIDTH, ALLOW_BLANK_CHECK_BOX_HEIGHT));
fontSizePane = new UISpinner(0, 20, 1, 0);
errorMsgTextField = new UITextField();
errorMsgTextField = new UIPropertyTextField();
JPanel contentPane = this.setFirstContentPane();
if (contentPane != null) {
UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 20, contentPane);
@ -71,6 +69,27 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
return e;
}
protected void initErrorMsgPane() {
// 错误信息
errorMsgTextField = new UIPropertyTextField();
// // richer:主要为了方便查看比较长的错误信息
errorMsgTextField.getDocument().addDocumentListener(new DocumentListener() {
public void changedUpdate(DocumentEvent e) {
errorMsgTextField.setToolTipText(errorMsgTextField.getText());
}
public void insertUpdate(DocumentEvent e) {
errorMsgTextField.setToolTipText(errorMsgTextField.getText());
}
public void removeUpdate(DocumentEvent e) {
errorMsgTextField.setToolTipText(errorMsgTextField.getText());
}
});
}
protected abstract T updateSubFieldEditorBean();
@ -83,6 +102,7 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
}
protected void addValidatePane() {
initErrorMsgPane();
validatePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
final UILabel uiLabel = new UILabel(Inter.getLocText("FR-Designer_Widget_Error_Tip"));

6
designer_form/src/com/fr/design/widget/ui/designer/IframeEditorDefinePane.java

@ -5,7 +5,7 @@ import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -18,7 +18,7 @@ import java.awt.*;
import java.util.List;
public class IframeEditorDefinePane extends AbstractDataModify<IframeEditor> {
private UITextField srcTextField;
private UIPropertyTextField srcTextField;
private ReportletParameterViewPane parameterViewPane;
private UICheckBox horizontalCheck;
private UICheckBox verticalCheck;
@ -44,7 +44,7 @@ public class IframeEditorDefinePane extends AbstractDataModify<IframeEditor> {
Component[][] coms = {
{ horizontalCheck, null },
{ verticalCheck, null },
{ new UILabel(Inter.getLocText("Form-Url") + ":"), srcTextField = new UITextField() },
{ new UILabel(Inter.getLocText("Form-Url") + ":"), srcTextField = new UIPropertyTextField() },
{ new UILabel(Inter.getLocText("Parameter") + ":"), parameterViewPane = new ReportletParameterViewPane() } };
int[][] rowCount = {{1, 1},{1, 1},{1, 1}, {1, 1}};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(coms, rowSize, columnSize, rowCount, LayoutConstants.VGAP_SMALL, 5);

6
designer_form/src/com/fr/design/widget/ui/designer/TextFieldEditorDefinePane.java

@ -3,7 +3,7 @@ package com.fr.design.widget.ui.designer;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.gui.frpane.RegPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -18,7 +18,7 @@ import java.awt.event.KeyEvent;
public class TextFieldEditorDefinePane extends FieldEditorDefinePane<TextEditor> {
protected RegPane regPane;
private UITextField waterMarkDictPane;
private UIPropertyTextField waterMarkDictPane;
FormWidgetValuePane formWidgetValuePane;
public TextFieldEditorDefinePane(XCreator xCreator) {
@ -47,7 +47,7 @@ public class TextFieldEditorDefinePane extends FieldEditorDefinePane<TextEditor>
}
};
regPane.addPhoneRegListener(pl);
waterMarkDictPane = new UITextField(13);
waterMarkDictPane = new UIPropertyTextField();
waterMarkDictPane.addKeyListener(new KeyAdapter() {
public void keyTyped(KeyEvent e) {
regPane.removePhoneRegListener(pl);

6
designer_form/src/com/fr/design/widget/ui/designer/TreeComboBoxEditorDefinePane.java

@ -3,7 +3,7 @@ package com.fr.design.widget.ui.designer;
import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.form.ui.TreeEditor;
import com.fr.general.Inter;
@ -11,14 +11,14 @@ import java.awt.*;
public class TreeComboBoxEditorDefinePane extends TreeEditorDefinePane {
protected UITextField waterMarkDictPane;
protected UIPropertyTextField waterMarkDictPane;
public TreeComboBoxEditorDefinePane(XCreator xCreator) {
super(xCreator);
}
public Component[] createWaterMarkPane(){
waterMarkDictPane = new UITextField();
waterMarkDictPane = new UIPropertyTextField();
return new Component[]{new UILabel(Inter.getLocText("FR-Designer_WaterMark")), waterMarkDictPane};
}

6
designer_form/src/com/fr/design/widget/ui/designer/WaterMarkDictPane.java

@ -1,6 +1,6 @@
package com.fr.design.widget.ui.designer;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.ui.WaterMark;
@ -8,12 +8,12 @@ import javax.swing.*;
public class WaterMarkDictPane extends JPanel{
private UITextField waterMarkTextField;
private UIPropertyTextField waterMarkTextField;
public WaterMarkDictPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
waterMarkTextField = new UITextField();
waterMarkTextField = new UIPropertyTextField();
this.add(waterMarkTextField);
}

2
designer_form/src/com/fr/design/widget/ui/designer/btn/ButtonGroupDefinePane.java

@ -39,7 +39,7 @@ public abstract class ButtonGroupDefinePane<T extends ButtonGroup> extends Field
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("FR-Designer-Estate_Widget_Value")), formWidgetValuePane},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_DS-Dictionary")), new UITextField()},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_DS-Dictionary")), dictionaryEditor},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_FRFont")), fontSizePane},
new Component[]{buttonGroupDictPane, null}
};

1
designer_form/src/com/fr/design/widget/ui/designer/component/PaddingBoundPane.java

@ -3,7 +3,6 @@ package com.fr.design.widget.ui.designer.component;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;

Loading…
Cancel
Save