Browse Source

控件管理/报表填报属性/超级链接/服务器参数

newui
renekton 6 months ago
parent
commit
1fb3b9084a
  1. 2
      designer-base/src/main/java/com/fine/theme/utils/FineUIUtils.java
  2. 3
      designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java
  3. 6
      designer-base/src/main/java/com/fr/design/gui/controlpane/NameableSelfCreator.java
  4. 20
      designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java
  5. 1
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java
  6. 3
      designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java
  7. 21
      designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java
  8. 7
      designer-base/src/main/resources/com/fine/theme/icon/function_manage.svg
  9. 3
      designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
  10. 52
      designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java
  11. 65
      designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java
  12. 33
      designer-realize/src/main/java/com/fr/design/widget/ValueWidgetPane.java
  13. 60
      designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java
  14. 40
      designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java
  15. 182
      designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java

2
designer-base/src/main/java/com/fine/theme/utils/FineUIUtils.java

@ -395,7 +395,7 @@ public class FineUIUtils {
UILabel label = new UILabel(title);
wrapBoldLabelWithUnderline(label);
return column(LayoutConstants.VERTICAL_GAP,
cell(label), cell(component)
cell(label), cell(component).weight(1.0)
).getComponent();
}

3
designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java

@ -1,5 +1,6 @@
package com.fr.design.formula;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.svg.IconUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
@ -101,7 +102,7 @@ public class FunctionManagerPane extends BasicPane {
@Override
public NameableCreator[] createNameableCreators() {
NameableCreator funcDef = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function"),
IconUtils.readIcon("com/fr/design/images/server/global_param.svg"),
new LazyIcon("function_manage"),
FunctionDef.class,
FunctionContentPane.class);
return new NameableCreator[]{funcDef};

6
designer-base/src/main/java/com/fr/design/gui/controlpane/NameableSelfCreator.java

@ -4,6 +4,8 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.stable.Nameable;
import javax.swing.Icon;
public abstract class NameableSelfCreator extends AbstractNameableCreator {
@ -15,6 +17,10 @@ public abstract class NameableSelfCreator extends AbstractNameableCreator {
super(menuName, iconPath, clazz, updatePane);
}
public NameableSelfCreator(String menuName, Icon icon, Class clazz, Class<? extends BasicBeanPane> updatePane) {
super(menuName, icon, clazz, updatePane);
}
@Override
public void saveUpdatedBean(ListModelElement wrapper, Object bean) {
wrapper.wrapper = (Nameable)bean;

20
designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java

@ -1,5 +1,8 @@
package com.fr.design.gui.frpane;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.editor.ValueEditorPane;
@ -19,6 +22,8 @@ import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.Iterator;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
public class ObjectProperiesPane extends BasicBeanPane<ListMap> {
private UIButton addButton;
@ -27,11 +32,13 @@ public class ObjectProperiesPane extends BasicBeanPane<ListMap> {
public ObjectProperiesPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
JPanel buttonPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add") + " " +com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"));
this.addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add") + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"),
new LazyIcon("add"));
buttonPane.add(this.addButton, BorderLayout.WEST);
this.add(buttonPane, BorderLayout.NORTH);
buttonPane.setPreferredSize(new Dimension(0, 24));
//this.add(buttonPane, BorderLayout.NORTH);
this.addButton.addActionListener(new ActionListener() {
@Override
@ -52,8 +59,13 @@ public class ObjectProperiesPane extends BasicBeanPane<ListMap> {
selectedItemScrollPane.setViewportView(northPane);
selectedItemScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setBorder(new FineRoundBorder());
centerPane.add(selectedItemScrollPane);
this.add(centerPane, BorderLayout.CENTER);
//this.add(centerPane, BorderLayout.CENTER);
this.add(column(4,
cell(buttonPane).weight(92),
cell(centerPane).weight(465)
).getComponent());
}
@Override

1
designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java

@ -291,7 +291,6 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
showParameterInterface = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Parameter_UI_Display"));
showParameterInterface.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
content.add(row(10,
cell(postComboBox).weight(0.75),
cell(showParameterInterface).weight(0.25)

3
designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java

@ -1,5 +1,6 @@
package com.fr.design.parameter;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.Parameter;
import com.fr.base.ParameterConfig;
import com.fr.base.svg.IconUtils;
@ -59,7 +60,7 @@ public class ParameterArrayPane extends JListControlPane {
public NameableCreator[] createNameableCreators() {
return new NameableCreator[]{
new NameableSelfCreator(Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"),
"com/fr/design/images/server/global_param.svg",
new LazyIcon("param"),
Parameter.class,
ParameterPane.class) {
public Parameter createNameable(UnrepeatedNameHelper helper) {

21
designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java

@ -27,6 +27,7 @@ import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.flex;
/**
* Author : Shockway
@ -93,19 +94,23 @@ public abstract class CustomJobPane extends BasicBeanPane {
});
reportletNamePane.setLayout(new BorderLayout());
reportletNamePane.add(row(10,
cell(classNameTextField).weight(0.8),
cell(browserButton).weight(0.1),
cell(editButton).weight(0.1)
reportletNamePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
reportletNamePane.setPreferredSize(new Dimension(0, FineUIScale.scale(24)));
reportletNamePane.add(row(4,
cell(classNameTextField).weight(222),
cell(browserButton).weight(48),
cell(editButton).weight(48),
flex(139)
).getComponent());
objectProperiesPane = new ObjectProperiesPane();
JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
dsPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
dsPane.add(area);
this.add(column(
cell(FineUIUtils.wrapComponentWithTitle(reportletNamePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Class_Name"))),
cell(FineUIUtils.wrapComponentWithTitle(objectProperiesPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"))).weight(1.0),
cell(FineUIUtils.wrapComponentWithTitle(dsPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Job_Description")))
this.add(column(20,
cell(FineUIUtils.wrapComponentWithTitle(reportletNamePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Class_Name"))).weight(55),
cell(FineUIUtils.wrapComponentWithTitle(objectProperiesPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"))).weight(227),
cell(FineUIUtils.wrapComponentWithTitle(dsPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Job_Description"))).weight(71)
).getComponent());
checkAddButtonEnable();
}

7
designer-base/src/main/resources/com/fine/theme/icon/function_manage.svg

@ -0,0 +1,7 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 6V3C3 2.44772 3.44772 2 4 2C4.55228 2 5 2.44772 5 3L5 6H26V3C26 2.44772 26.4477 2 27 2C27.5523 2 28 2.44772 28 3V6C28 7.10457 27.1046 8 26 8H5C3.89543 8 3 7.10457 3 6Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M7 16C7 15.4477 7.44772 15 8 15H17.8728C16.894 15.506 16.0199 16.1864 15.2917 17H8C7.44772 17 7 16.5523 7 16Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M26 12V14.9355C26.7281 15.2974 27.4003 15.7549 28 16.2917V12C28 10.8954 27.1046 10 26 10H5C3.89543 10 3 10.8954 3 12V29C3 29.5523 3.44772 30 4 30C4.55228 30 5 29.5523 5 29V12H26Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M13.0549 22C13.1316 21.3065 13.287 20.6368 13.5121 20H8C7.44772 20 7 20.4477 7 21C7 21.5523 7.44772 22 8 22H13.0549Z" fill="#0A1C38" fill-opacity="0.9"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M27.1584 18.0944C29.6895 20.6255 29.9662 24.5487 27.973 27.3342L29.6637 29.0249C30.0943 29.4555 30.0943 30.1536 29.6637 30.5842C29.2331 31.0147 28.535 31.0147 28.1045 30.5842L26.4263 28.906C23.6357 30.9721 19.6535 30.7175 17.0944 28.1584C14.2808 25.3448 14.2529 20.8111 17.032 18.032C19.8111 15.2529 24.3448 15.2808 27.1584 18.0944ZM25.8066 26.8066C27.7882 24.8249 27.7932 21.5576 25.7442 19.5086C23.6952 17.4596 20.4278 17.4645 18.4462 19.4462C16.4645 21.4278 16.4596 24.6952 18.5086 26.7442C20.5576 28.7932 23.8249 28.7882 25.8066 26.8066Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

3
designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json

@ -299,6 +299,7 @@
"text_field": "widget/text_field.svg",
"widget_tree": "widget/tree.svg",
"user_widget": "widget/user_widget.svg",
"advanced_editor": "param/advanced_editor.svg"
"advanced_editor": "param/advanced_editor.svg",
"function_manage": "function_manage.svg"
}
}

52
designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java

@ -18,15 +18,13 @@ import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.flex;
public class WriteShortCutsPane extends JPanel{
private static final int V_GAP = 20;
@ -54,7 +52,7 @@ public class WriteShortCutsPane extends JPanel{
JPanel contentPane = new JPanel(new BorderLayout());
contentPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
contentPane.add(column(
contentPane.add(column(20,
cell(FineUIUtils.wrapComponentWithTitle(getFeatureNamePane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Shortcut_Set"))),
cell(FineUIUtils.wrapComponentWithTitle(getHintsPane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")))
).getComponent());
@ -64,26 +62,22 @@ public class WriteShortCutsPane extends JPanel{
private JPanel getFeatureNamePane(){
JPanel featureNamePane = new JPanel(new BorderLayout());
UILabel name = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Feature_Name"), SwingConstants.CENTER);
featureNamePane.setBorder(BorderFactory.createEmptyBorder(16, 0, 0, 0));
UILabel name = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Feature_Name"), SwingConstants.RIGHT);
UILabel nextCol = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Column"), SwingConstants.CENTER);
UILabel nextRow = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Row"), SwingConstants.CENTER);
UILabel shortName = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Current_Keys"), SwingConstants.CENTER);
UILabel shortName = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Current_Keys"), SwingConstants.RIGHT);
UIComponentUtils.setLineWrap(shortName, MAX_LABEL_WIDTH);
nextColHK = new UILabel(nextColString, SwingConstants.CENTER);
JPanel switchBtnPane = getSwitchBtnPane();
nextRowHK = new UILabel(nextRowString, SwingConstants.CENTER);
JPanel centerPane = new JPanel(new GridLayout(2, 4, 0, 0));
centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
centerPane.add(name);
centerPane.add(nextCol);
centerPane.add(new JPanel());
centerPane.add(nextRow);
centerPane.add(shortName);
centerPane.add(nextColHK);
centerPane.add(switchBtnPane);
centerPane.add(nextRowHK);
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
centerPane.add(column(24,
row(10, cell(name).weight(0.13), cell(nextCol).weight(0.15), cell(new JPanel()).weight(0.12), cell(nextRow).weight(0.15), flex(0.45)),
row(10, cell(shortName).weight(0.13), cell(nextColHK).weight(0.15), cell(switchBtnPane).weight(0.12), cell(nextRowHK).weight(0.15), flex(0.45))
).getComponent());
featureNamePane.add(centerPane, BorderLayout.CENTER);
@ -105,23 +99,21 @@ public class WriteShortCutsPane extends JPanel{
private JPanel getHintsPane(){
JPanel hintsPane = new JPanel(new BorderLayout());
hintsPane.setBorder(BorderFactory.createEmptyBorder(16, 0, 0, 0));
UILabel systemDefault = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_System_Default"), SwingConstants.CENTER);
UILabel systemDefault = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_System_Default"), SwingConstants.RIGHT);
UILabel preColText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Column"), SwingConstants.CENTER);
UILabel preRowText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Row"), SwingConstants.CENTER);
preCol = new UILabel("Shift+" + nextColString, SwingConstants.CENTER);
preRow = new UILabel("Shift+" + nextRowString, SwingConstants.CENTER);
preCol = new UILabel("Shift+" + nextColString, SwingConstants.LEFT);
preRow = new UILabel("Shift+" + nextRowString, SwingConstants.LEFT);
JPanel centerPane = new JPanel(new GridLayout(2, 3, 0, V_GAP));
centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 100));
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
centerPane.add(systemDefault);
centerPane.add(preColText);
centerPane.add(preCol);
centerPane.add(new JPanel());
centerPane.add(preRowText);
centerPane.add(preRow);
centerPane.add(column(24,
row(10, cell(systemDefault).weight(0.13), cell(preColText).weight(0.24), cell(preCol).weight(0.14), flex(0.64)),
row(10, cell(new JPanel()).weight(0.13), cell(preRowText).weight(0.24), cell(preRow).weight(0.14), flex(0.64))
).getComponent());
hintsPane.add(centerPane, BorderLayout.CENTER);

65
designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java

@ -1,15 +1,12 @@
package com.fr.design.widget;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.constants.UIConstants;
import com.fr.design.data.DataCreatorUI;
import com.fr.design.dialog.AttrScrollPane;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.FineTabbedPane;
import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.widget.mobile.WidgetMobilePane;
@ -17,15 +14,12 @@ import com.fr.design.widget.ui.BasicWidgetPropertySettingPane;
import com.fr.form.event.Listener;
import com.fr.form.ui.Widget;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.util.ArrayList;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.fix;
/*
* carl :单独弄出来
*/
@ -36,7 +30,9 @@ public class CellWidgetCardPane extends BasicPane {
private WidgetMobilePane currentWidgetMobilePane;
//属性配置切换面板
private ArrayList<JPanel> paneList;
private FineTabbedPane tabsPane;
private JPanel center;
private UIHeadGroup tabsHeaderIconPane;
private CardLayout tabbedPane;
private BasicWidgetPropertySettingPane widgetPropertyPane;
//通用属性容器
@ -64,25 +60,29 @@ public class CellWidgetCardPane extends BasicPane {
this.removeAll();
this.setLayout(FRGUIPaneFactory.createBorderLayout());
final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal")};
tabbedPane = new CardLayout();
center = new JPanel(tabbedPane);
this.add(center, BorderLayout.CENTER);
// 属性
attriTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
BasicScrollPane basicScrollPane = new AttrScrollPane() {
@Override
protected JPanel createContentPane() {
return attriTabPane;
}
};
widgetPropertyPane = new BasicWidgetPropertySettingPane();
UIExpandablePane basicPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"), 280, 24, widgetPropertyPane);
UIExpandablePane uiExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"), 280, 24, widgetPropertyPane);
attriTabPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
attriTabPane.add(uiExpandablePane, BorderLayout.NORTH);
attriCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
attriTabPane.add(attriCardPane, BorderLayout.CENTER);
attriCardLayout = (CardLayout) attriCardPane.getLayout();
attriTabPane.add(column(
cell(basicPane),
fix(1).with(it -> it.setBorder(FineBorderFactory.createDefaultUnderlineBorder())),
cell(attriCardPane)
).getComponent()
);
// 事件
eventTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
eventTabPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
eventPane = initWidgetEventPane(pane);
eventTabPane.add(eventPane, BorderLayout.CENTER);
@ -91,25 +91,28 @@ public class CellWidgetCardPane extends BasicPane {
mobileCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
mobileTabPane.add(mobileCardPane, BorderLayout.CENTER);
mobileCardLayout = (CardLayout) mobileCardPane.getLayout();
tabsPane = FineTabbedPane.builder()
.addTab(tabTitles[0], new UIScrollPane(attriTabPane))
.addTab(tabTitles[1], eventTabPane)
.addTab(tabTitles[2], mobileTabPane)
.build();
JPanel wrapperPane = new JPanel(new BorderLayout());
wrapperPane.add(tabsPane, BorderLayout.CENTER);
wrapperPane.setBorder(new ScaledEmptyBorder(0, 10, 0, 10));
wrapperPane.setOpaque(false);
this.add(wrapperPane, BorderLayout.CENTER);
center.add(basicScrollPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute"));
center.add(eventTabPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event"));
center.add(mobileTabPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal"));
initPaneList();
final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal")};
tabsHeaderIconPane = new UIHeadGroup(tabTitles) {
@Override
public void tabChanged(int index) {
tabbedPane.show(center, tabTitles[index]);
}
};
tabsHeaderIconPane.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UIConstants.SHADOW_GREY));
this.add(tabsHeaderIconPane, BorderLayout.NORTH);
}
private void initPaneList() {
paneList = new ArrayList<JPanel>();
paneList.add(attriTabPane);
paneList.add(eventTabPane);
paneList.add(eventPane);
paneList.add(mobileTabPane);
}
@ -148,7 +151,7 @@ public class CellWidgetCardPane extends BasicPane {
currentWidgetMobilePane = mobilePane;
//tabsHeaderIconPane.setSelectedIndex(0);
tabsHeaderIconPane.setSelectedIndex(0);
}
public Widget update() {

33
designer-realize/src/main/java/com/fr/design/widget/ValueWidgetPane.java

@ -15,11 +15,6 @@ import com.fr.form.ui.WidgetValue;
import java.awt.*;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.flex;
public class ValueWidgetPane extends WidgetPane {
private JPanel widgetValuePane;
private WidgetValueEditor widgetValueEditor;
@ -32,24 +27,18 @@ public class ValueWidgetPane extends WidgetPane {
public JPanel initNorthPane(){
JPanel northPane = super.initNorthPane();
label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Value"));
label = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Value")+ ":");
label.setVisible(false);
widgetValuePane = new JPanel(new BorderLayout());
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setOpaque(false);
widgetValuePane.setOpaque(false);
centerPane.add(row(
cell(label).weight(68),
cell(widgetValuePane).weight(372)).getComponent()
);
JPanel jPanel = new JPanel();
jPanel.setBackground(Color.WHITE);
jPanel.setLayout(new BorderLayout());
jPanel.add(column(10, true,
cell(northPane),
cell(centerPane)
).getComponent());
widgetValuePane = new JPanel();
widgetValuePane.setLayout(FRGUIPaneFactory.createBorderLayout());
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{northPane, label,widgetValuePane},
};
JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return jPanel;
}

60
designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java

@ -1,6 +1,5 @@
package com.fr.design.widget;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.fun.WidgetDesignHandler;
import com.fr.design.gui.core.WidgetOption;
@ -10,36 +9,27 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.CellWidgetPropertyPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.widget.btn.ButtonConstants;
import com.fr.form.ui.Button;
import com.fr.form.ui.NameWidget;
import com.fr.form.ui.Widget;
import com.fr.form.ui.WidgetConfig;
import com.fr.form.ui.WidgetInfoConfig;
import com.fr.form.ui.*;
import com.fr.general.ComparatorUtils;
import com.fr.stable.ArrayUtils;
import com.fr.stable.AssistUtils;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JComponent;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.*;
import javax.swing.event.PopupMenuEvent;
import javax.swing.event.PopupMenuListener;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.Vector;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fr.design.constants.LayoutConstants.LEFT_WEIGHT;
import static com.fr.design.constants.LayoutConstants.RIGHT_WEIGHT;
/**
* CellEditorDef Pane.
*/
@ -48,7 +38,7 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
private EditorTypeComboBox editorTypeComboBox;
private CellWidgetCardPane cellEditorCardPane;
private boolean shouldFireSelectedEvent = true;
private JComponent northPane;
private JPanel northPane;
public WidgetPane() {
this(null);
@ -68,32 +58,36 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
protected void initComponents(ElementCasePane pane) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
editorTypeComboBox = new EditorTypeComboBox(pane != null);
editorTypeComboBox.setPreferredSize(new Dimension(155, 30));
editorTypeComboBox.setMaximumRowCount(16);
northPane = initNorthPane();
northPane.setBorder(new ScaledEmptyBorder(10, 10, 0, 10));
northPane.setBorder(BorderFactory.createEmptyBorder(12, 10, 10, 15));
this.add(northPane, BorderLayout.NORTH);
editorTypeComboBox.addItemListener(this);
cellEditorCardPane = initWidgetCardPane(pane);
this.add(cellEditorCardPane, BorderLayout.CENTER);
this.addAttributeChangeListener(listener);
this.add(column(
10,
cell(northPane).weight(0.17),
cell(cellEditorCardPane).weight(0.83)
).getComponent()
);
}
public JPanel initNorthPane() {
return column(
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Widget"))).weight(68),
cell(editorTypeComboBox).weight(372)
)
).getComponent();
UILabel emptyLabel = new UILabel();
emptyLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Widget")), emptyLabel, editorTypeComboBox},
};
JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return jPanel;
}
protected CellWidgetCardPane initWidgetCardPane(ElementCasePane pane) {

40
designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java

@ -1,20 +1,21 @@
package com.fr.design.widget.ui;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.dialog.BasicPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.form.ui.NoneWidget;
import com.fr.form.ui.Widget;
import java.awt.BorderLayout;
import com.fr.design.utils.gui.GUICoreUtils;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
public class BasicWidgetPropertySettingPane extends BasicPane {
@ -25,18 +26,27 @@ public class BasicWidgetPropertySettingPane extends BasicPane {
public BasicWidgetPropertySettingPane() {
this.setLayout(new BorderLayout());
this.setBorder(new ScaledEmptyBorder(0, 0, 10, 0));
enableCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enabled"), true);
enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
visibleCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Form_Widget_Visible"), true);
visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
widgetNameComboBox = new ParameterTreeComboBox();
widgetNameComboBox.refreshTree();
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name")), widgetNameComboBox},
new Component[]{enableCheckBox, null},
new Component[]{visibleCheckBox, null},
};
double[] rowSize = {p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1},{1, 1},{1, 1},{1, 1}};
JPanel pane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W2, IntervalConstants.INTERVAL_L1);
pane.setBorder(BorderFactory.createEmptyBorder(10,0,10,0));
this.add(pane, BorderLayout.CENTER);
this.add(row(LayoutConstants.HORIZONTAL_GAP,
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name"))).weight(0.2),
cell(widgetNameComboBox).weight(0.6),
cell(enableCheckBox).weight(0.1),
cell(visibleCheckBox).weight(0.1)
).getComponent());
}
@Override

182
designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java

@ -1,14 +1,19 @@
package com.fr.design.widget.ui;
import com.fine.theme.light.ui.FineRoundBorder;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.base.FRContext;
import com.fr.data.core.FormatField;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.border.UIRoundedBorder;
import com.fr.design.constants.UIConstants;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.fun.WidgetAdvancedPaneProvider;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.widget.component.DateValuePane;
import com.fr.design.widget.component.UIComboBoxNoArrow;
import com.fr.design.widget.ui.designer.date.DateFormatCheckManager;
@ -17,30 +22,28 @@ import com.fr.form.ui.DateEditor;
import com.fr.stable.ArrayUtils;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;
import javax.swing.plaf.BorderUIResource;
import javax.swing.*;
import javax.swing.border.TitledBorder;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.SimpleDateFormat;
import java.util.Date;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fr.design.constants.LayoutConstants.LEFT_WEIGHT;
import static com.fr.design.constants.LayoutConstants.RIGHT_WEIGHT;
import java.util.Set;
public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor> {
private UIButtonGroup returnTypeButtonGroup;
private UIButtonGroup returnTypeComboBox;
private DateValuePane startDv;
private DateValuePane endDv;
private UIComboBox currentFormatComboBox;
private UILabel currentSampleLabel;
private UIButtonGroup formatButtonGroup;
private UILabel currentSamplelabel;
private UIButtonGroup fomatHeadGroup;
private static final int SAMPLE_LABEL_PADDING = 4;
public DateEditorDefinePane() {
}
@ -52,22 +55,33 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
@Override
protected JPanel setSecondContentPane() {
returnTypeButtonGroup = new UIButtonGroup<>(new String[] {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date") ,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_String")});
returnTypeComboBox = new UIButtonGroup<>(new String[] {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date") , com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_String")});
JPanel formatHead = createFormatHead();
startDv = new DateValuePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_Start_Date"));
endDv = new DateValuePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_End_Date"));
UILabel returnTypeLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Date_Selector_Return_Type"));
return column(LayoutConstants.VERTICAL_GAP,
cell(formatHead),
cell(startDv),
cell(endDv),
cell(waterMarkDictPane),
row(
cell(returnTypeLabel).weight(LEFT_WEIGHT), cell(returnTypeButtonGroup).weight(1.4), flex(1.6)
)
).getComponent();
startDv = new DateValuePane();
endDv = new DateValuePane();
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
UILabel formatLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Format"));
formatLabel.setVerticalAlignment(SwingConstants.TOP);
UILabel startDateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_Start_Date"));
startDateLabel.setVerticalAlignment(SwingConstants.TOP);
UILabel endDateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_End_Date"));
endDateLabel.setVerticalAlignment(SwingConstants.TOP);
Component[][] components = new Component[][]{
new Component[]{formatLabel, formatHead},
new Component[]{startDateLabel, startDv},
new Component[]{endDateLabel, endDv},
new Component[]{waterMarkDictPane, null},
new Component[]{extraPane, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Date_Selector_Return_Type")), returnTypeComboBox }
};
double[] rowSize = {p, p, p, p, p, p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 3},{1, 1},{1, 1},{1, 1},{1, 1}, {1, 1}};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1);
return panel;
}
@Override
@ -76,20 +90,20 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
}
private JPanel createFormatPane(UIComboBox formatComboBox, UILabel sampleLabel){
JPanel previewPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
previewPane.setPreferredSize(formatComboBox.getPreferredSize());
previewPane.setBorder(new BorderUIResource.CompoundBorderUIResource(
new FineRoundBorder(),
new EmptyBorder(0, 8, 0, 0)
));
previewPane.add(sampleLabel, BorderLayout.WEST);
return column(LayoutConstants.VERTICAL_GAP, true,
cell(formatComboBox),
cell(previewPane).weight(1.0)
).getComponent();
JPanel previewPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
TitledBorder titledBorder = new TitledBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 5), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_StyleFormat_Sample"), 4, 2, this.getFont(), UIConstants.LINE_COLOR);
previewPane.setBorder(titledBorder);
JPanel sampleLabelWrapper = new JPanel(new BorderLayout());
sampleLabelWrapper.setBorder(BorderFactory.createEmptyBorder(0, SAMPLE_LABEL_PADDING, SAMPLE_LABEL_PADDING, SAMPLE_LABEL_PADDING));
sampleLabelWrapper.add(sampleLabel, BorderLayout.CENTER);
previewPane.add(sampleLabelWrapper, BorderLayout.CENTER);
JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
jPanel.add(previewPane, BorderLayout.NORTH);
jPanel.add(formatComboBox, BorderLayout.CENTER);
return jPanel;
}
private UILabel createSamplePane(){
@ -101,51 +115,58 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
}
};
sampleLabel.setHorizontalAlignment(SwingConstants.CENTER);
sampleLabel.setFont(this.getFont());
sampleLabel.setForeground(FlatUIUtils.getUIColor("Label.tipColor", Color.GRAY));
sampleLabel.setFont(FRContext.getDefaultValues().getFRFont());
return sampleLabel;
}
private JPanel createFormatHead(){
UILabel formatLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Format"));
String[] dateArray = FormatField.getInstance().getFormatArray(FormatField.FormatContents.DATE);
String[] timeArray = FormatField.getInstance().getFormatArray(FormatField.FormatContents.TIME);
final UIComboBox dateFormatComboBox = new UIComboBoxNoArrow(dateArray);
final UIComboBox timeFormatComboBox = new UIComboBoxNoArrow(timeArray);
dateFormatComboBox.addActionListener(e -> refreshPreviewLabel());
timeFormatComboBox.addActionListener(e -> refreshPreviewLabel());
dateFormatComboBox.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
refreshPreviewLabel();
}
});
timeFormatComboBox.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
refreshPreviewLabel();
}
});
final UILabel dateSampleLabel = createSamplePane();
final UILabel timeSampleLabel = createSamplePane();
JPanel fomatHeadPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
final CardLayout cardLayout = new CardLayout();
final JPanel customPane = new JPanel(cardLayout);
JPanel dateFormatPane = createFormatPane(dateFormatComboBox, dateSampleLabel);
JPanel timeFormatPane = createFormatPane(timeFormatComboBox, timeSampleLabel);
customPane.add(dateFormatPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"));
customPane.add(timeFormatPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time"));
final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")};
formatButtonGroup = new UIButtonGroup<>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")});
formatButtonGroup.addChangeListener(e -> {
int newSelectedIndex = formatButtonGroup.getSelectedIndex();
cardLayout.show(customPane, tabTitles[newSelectedIndex]);
if(newSelectedIndex == 0){
currentFormatComboBox = dateFormatComboBox;
currentSampleLabel = dateSampleLabel;
}else{
currentFormatComboBox = timeFormatComboBox;
currentSampleLabel = timeSampleLabel;
final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")};
fomatHeadGroup = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")});
fomatHeadGroup.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
int newSelectedIndex = fomatHeadGroup.getSelectedIndex();
cardLayout.show(customPane, tabTitles[newSelectedIndex]);
if(newSelectedIndex == 0){
currentFormatComboBox = dateFormatComboBox;
currentSamplelabel = dateSampleLabel;
}else{
currentFormatComboBox = timeFormatComboBox;
currentSamplelabel = timeSampleLabel;
}
refreshPreviewLabel();
}
refreshPreviewLabel();
});
return column(LayoutConstants.VERTICAL_GAP,
row(
cell(formatLabel).weight(LEFT_WEIGHT), cell(formatButtonGroup).weight(1.4), flex(1.6)
),
row(flex(LEFT_WEIGHT), cell(customPane).weight(RIGHT_WEIGHT))
).getComponent();
fomatHeadPane.add(fomatHeadGroup, BorderLayout.NORTH);
fomatHeadPane.add(customPane, BorderLayout.CENTER);
return fomatHeadPane;
}
private void refreshPreviewLabel() {
String text = (String) currentFormatComboBox.getSelectedItem();
if (text != null && text.length() > 0) {
@ -153,15 +174,14 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(text);
String sample = simpleDateFormat.format(new Date());
DateFormatCheckResult result = DateFormatCheckManager.check(sample, text);
currentSampleLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_StyleFormat_Sample") + ":" + result.getSample());
currentSampleLabel.setForeground(result.getColor());
currentSamplelabel.setText(result.getSample());
currentSamplelabel.setForeground(result.getColor());
} catch (Exception exp) {
currentSampleLabel.removeAll();
currentSampleLabel.setForeground(Color.red);
currentSampleLabel.setText(exp.getMessage());
currentSamplelabel.setForeground(Color.red);
currentSamplelabel.setText(exp.getMessage());
}
} else {
currentSampleLabel.setText(new Date().toString());
currentSamplelabel.setText(new Date().toString());
}
}
@ -181,11 +201,11 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
@Override
protected void populateSubDirectWriteEditorBean(DateEditor e) {
String formatText = e.getFormatText();
formatButtonGroup.setSelectedIndex(getDateType(e));
formatButtonGroup.populateBean();
fomatHeadGroup.setSelectedIndex(getDateType(e));
fomatHeadGroup.populateBean();
currentFormatComboBox.setSelectedItem(formatText);
returnTypeButtonGroup.setSelectedIndex(e.isReturnDate() ? 0 : 1);
returnTypeComboBox.setSelectedIndex(e.isReturnDate() ? 0 : 1);
startDv.populate(e.getStartDate());
endDv.populate(e.getEndDate());
}
@ -194,7 +214,7 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
protected DateEditor updateSubDirectWriteEditorBean() {
DateEditor ob = new DateEditor();
ob.setFormatText(this.getSimpleDateFormat().toPattern());
ob.setReturnDate(returnTypeButtonGroup.getSelectedIndex() == 0);
ob.setReturnDate(returnTypeComboBox.getSelectedIndex() == 0);
ob.setStartDate(startDv.update());
ob.setEndDate(endDv.update());

Loading…
Cancel
Save