Browse Source

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

newui
renekton 4 months ago
parent
commit
aae3af92df
  1. 2
      designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java
  2. 27
      designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java
  3. 7
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  4. 8
      designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java
  5. 2
      designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java
  6. 70
      designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java
  7. 55
      designer-realize/src/main/java/com/fr/design/widget/EastCellWidgetCardPane.java
  8. 29
      designer-realize/src/main/java/com/fr/design/widget/ValueWidgetPane.java
  9. 9
      designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java
  10. 44
      designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java
  11. 12
      designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

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

@ -41,6 +41,8 @@ public interface FineUIStyle {
String POPUP_MENU_DROPDOWN = "dropdownPopupMenu"; String POPUP_MENU_DROPDOWN = "dropdownPopupMenu";
String TRANSPARENT_TEXT_FIELD = "transparentTextField"; String TRANSPARENT_TEXT_FIELD = "transparentTextField";
String ENV_DECTETOR_BUTTON = "envDetectorButton";
/** /**
* 添加组件的样式类类似css该方法会接在原样式后方 * 添加组件的样式类类似css该方法会接在原样式后方

27
designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java vendored

@ -146,27 +146,9 @@ public class EnvDetectorDialog extends JDialog {
JPanel headerPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel headerPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
headerPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 12, 0)); headerPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 12, 0));
this.detectButton = new UIToggleButton(buttonStatus.getDesc()) { this.detectButton = new UIButton(buttonStatus.getDesc());
@Override FineUIStyle.setStyle(detectButton, FineUIStyle.ENV_DECTETOR_BUTTON);
public ButtonUI getUI() { detectButton.setForeground(FineUIUtils.getUIColor("background.normal", "background.normal"));
return new UIButtonUI() {
@Override
protected void doExtraPainting(UIButton b, Graphics2D g2d, int w, int h, String selectedRoles) {
if (isPressed(b) && b.isPressedPainted()) {
GUIPaintUtils.fillPressed(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles),
DesignerColor.Button.Primary.PRESSED);
} else if (isRollOver(b)) {
GUIPaintUtils.fillRollOver(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted(),
DesignerColor.Button.Primary.HOVER);
} else if (b.isNormalPainted()) {
GUIPaintUtils.fillNormal(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted(),
DesignerColor.Button.Primary.NORMAL);
}
}
};
}
};
detectButton.setToolTipText(buttonStatus.getDesc()); detectButton.setToolTipText(buttonStatus.getDesc());
detectButton.addActionListener(event -> { detectButton.addActionListener(event -> {
if (buttonStatus.isNotExecuting()) { if (buttonStatus.isNotExecuting()) {
@ -175,9 +157,6 @@ public class EnvDetectorDialog extends JDialog {
stopDetecting(detectButton); stopDetecting(detectButton);
} }
}); });
detectButton.setForeground(FineUIUtils.getUIColor("background.normal", "background.normal"));
detectButton.setBackground(FineUIUtils.getUIColor("EnvDetectorButton.background", "EnvDetectorButton.background"));
headerPanel.add(detectButton, BorderLayout.WEST); headerPanel.add(detectButton, BorderLayout.WEST);
UILabel openUtilBoxLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Carton_Feedback_ToolBox")); UILabel openUtilBoxLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Carton_Feedback_ToolBox"));

7
designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties

@ -222,7 +222,6 @@ CombinationButton.background = $Button.background
CombinationButton.borderColor = $Component.borderColor CombinationButton.borderColor = $Component.borderColor
CombinationButton.arc = $Button.arc CombinationButton.arc = $Button.arc
EnvDetecorButton.background = #FF419BF9
#---- CheckBox ---- #---- CheckBox ----
CheckBox.arc = 4 CheckBox.arc = 4
@ -1322,4 +1321,8 @@ CellOtherSetPane.height=$Component.defaultHeight
pressedBackground : null pressedBackground : null
[style]ToggleButton.compactButton = \ [style]ToggleButton.compactButton = \
margin: 2,0,2,0 margin: 2,0,2,0
[style]Button.envDetectorButton = \
foreground: #FFF; \
background: #2576EF

8
designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java

@ -42,10 +42,10 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup {
FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
NameableCreator[] related4ChartHyper = { NameableCreator[] related4ChartHyper = {
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), new LazyIcon("cellHyperLinkAttr"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class), new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), new LazyIcon("cellHyperLinkAttr"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class), new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float"), new LazyIcon("cellHyperLinkAttr"), ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.ChartNoRename.class), new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float"), ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), new LazyIcon("cellHyperLinkAttr"), formHyperlink.getClass(), FormHyperlinkPane.class)}; new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), formHyperlink.getClass(), FormHyperlinkPane.class)};
return ArrayUtils.addAll(super.getHyperlinkCreators(), related4ChartHyper); return ArrayUtils.addAll(super.getHyperlinkCreators(), related4ChartHyper);
} }

2
designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java

@ -81,7 +81,7 @@ public class CellWidgetPropertyPane extends BasicPane {
public void reInit(ElementCasePane ePane) { public void reInit(ElementCasePane ePane) {
this.ePane = ePane; this.ePane = ePane;
cellEditorDefPane = new WidgetPane(ePane); cellEditorDefPane = new WidgetPane(ePane, true);
this.removeAll(); this.removeAll();
this.add(cellEditorDefPane, BorderLayout.CENTER); this.add(cellEditorDefPane, BorderLayout.CENTER);

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

@ -1,12 +1,13 @@
package com.fr.design.widget; package com.fr.design.widget;
import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fine.swing.ui.layout.BaseLayoutContainer;
import com.fr.design.border.FineBorderFactory; import com.fr.design.border.FineBorderFactory;
import com.fr.design.data.DataCreatorUI; import com.fr.design.data.DataCreatorUI;
import com.fr.design.dialog.AttrScrollPane; import com.fr.design.dialog.AttrScrollPane;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.BasicScrollPane; import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.foldablepane.UIExpandablePane; 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.ibutton.UIHeadGroup;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
@ -18,6 +19,7 @@ import com.fr.form.ui.Widget;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.CardLayout; import java.awt.CardLayout;
import java.awt.Component;
import java.util.ArrayList; import java.util.ArrayList;
import static com.fine.swing.ui.layout.Layouts.cell; import static com.fine.swing.ui.layout.Layouts.cell;
@ -34,9 +36,7 @@ public class CellWidgetCardPane extends BasicPane {
private WidgetMobilePane currentWidgetMobilePane; private WidgetMobilePane currentWidgetMobilePane;
//属性配置切换面板 //属性配置切换面板
private ArrayList<JPanel> paneList; private ArrayList<JPanel> paneList;
private JPanel center; private BaseLayoutContainer tabsHeaderIconPane;
private UIHeadGroup tabsHeaderIconPane;
private CardLayout tabbedPane;
private BasicWidgetPropertySettingPane widgetPropertyPane; private BasicWidgetPropertySettingPane widgetPropertyPane;
//通用属性容器 //通用属性容器
@ -64,23 +64,29 @@ public class CellWidgetCardPane extends BasicPane {
this.removeAll(); this.removeAll();
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
tabbedPane = new CardLayout();
center = new JPanel(tabbedPane);
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")}; 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]);
}
};
JPanel wrapperPane = new JPanel(new BorderLayout()); Component component = initTabPane();
wrapperPane.add(tabsHeaderIconPane, BorderLayout.NORTH);
wrapperPane.add(center, BorderLayout.CENTER); initTabHead(tabTitles, component);
wrapperPane.setBorder(new ScaledEmptyBorder(0, 10, 0, 10));
this.add(wrapperPane, BorderLayout.CENTER); this.add(tabsHeaderIconPane, BorderLayout.CENTER);
initPaneList();
}
private void initTabHead(String[] tabTitles, Component component) {
tabsHeaderIconPane = FineTabbedPane.builder()
.addTab(tabTitles[0], component)
.addTab(tabTitles[1], eventTabPane)
.addTab(tabTitles[2], mobileTabPane)
.withHeadRatio(1.0f)
.build();
}
protected Component initTabPane() {
// 属性 // 属性
attriTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); attriTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
BasicScrollPane basicScrollPane = new AttrScrollPane() { BasicScrollPane basicScrollPane = new AttrScrollPane() {
@ -95,9 +101,9 @@ public class CellWidgetCardPane extends BasicPane {
attriCardLayout = (CardLayout) attriCardPane.getLayout(); attriCardLayout = (CardLayout) attriCardPane.getLayout();
attriTabPane.add(column( attriTabPane.add(column(
cell(basicPane), cell(basicPane),
fix(1).with(it -> it.setBorder(FineBorderFactory.createDefaultUnderlineBorder())), fix(1).with(it -> it.setBorder(FineBorderFactory.createDefaultUnderlineBorder())),
cell(attriCardPane) cell(attriCardPane)
).getComponent() ).getComponent()
); );
@ -112,14 +118,10 @@ public class CellWidgetCardPane extends BasicPane {
mobileTabPane.add(mobileCardPane, BorderLayout.CENTER); mobileTabPane.add(mobileCardPane, BorderLayout.CENTER);
mobileCardLayout = (CardLayout) mobileCardPane.getLayout(); mobileCardLayout = (CardLayout) mobileCardPane.getLayout();
center.add(basicScrollPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute")); return basicScrollPane;
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();
} }
private void initPaneList() { protected void initPaneList() {
paneList = new ArrayList<JPanel>(); paneList = new ArrayList<JPanel>();
paneList.add(attriTabPane); paneList.add(attriTabPane);
paneList.add(eventPane); paneList.add(eventPane);
@ -137,7 +139,10 @@ public class CellWidgetCardPane extends BasicPane {
public void populate(Widget cellWidget) { public void populate(Widget cellWidget) {
initComponents(pane); initComponents(pane);
populateWidget(cellWidget);
}
protected void populateWidget(Widget cellWidget) {
WidgetDefinePaneFactory.RN rn = WidgetDefinePaneFactory.createWidgetDefinePane(cellWidget, new Operator() { WidgetDefinePaneFactory.RN rn = WidgetDefinePaneFactory.createWidgetDefinePane(cellWidget, new Operator() {
@Override @Override
public void did(DataCreatorUI ui, String cardName) { public void did(DataCreatorUI ui, String cardName) {
@ -160,8 +165,9 @@ public class CellWidgetCardPane extends BasicPane {
mobileCardLayout.show(mobileCardPane, mobilePane.getClass().toString()); mobileCardLayout.show(mobileCardPane, mobilePane.getClass().toString());
currentWidgetMobilePane = mobilePane; currentWidgetMobilePane = mobilePane;
if (tabsHeaderIconPane instanceof UIHeadGroup) {
tabsHeaderIconPane.setSelectedIndex(0); ((UIHeadGroup) tabsHeaderIconPane).setSelectedIndex(0);
}
} }
public Widget update() { public Widget update() {
@ -195,4 +201,12 @@ public class CellWidgetCardPane extends BasicPane {
eventPane.checkValid(); eventPane.checkValid();
} }
protected JPanel getEventTabPane() {
return this.eventTabPane;
}
protected JPanel getMobileTabPane() {
return this.mobileTabPane;
}
} }

55
designer-realize/src/main/java/com/fr/design/widget/EastCellWidgetCardPane.java

@ -0,0 +1,55 @@
package com.fr.design.widget;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.form.ui.Widget;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
public class EastCellWidgetCardPane extends CellWidgetCardPane {
private CardLayout tabbedPane;
private JPanel center;
private UIHeadGroup tabsHeaderIconPane;
public EastCellWidgetCardPane(ElementCasePane pane) {
super(pane);
}
private void initComponents() {
this.removeAll();
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.tabbedPane = new CardLayout();
center = new JPanel(tabbedPane);
this.add(center, BorderLayout.CENTER);
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);
Component component = initTabPane();
center.add(component, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute"));
center.add(getEventTabPane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event"));
center.add(getMobileTabPane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal"));
initPaneList();
}
public void populate(Widget cellWidget) {
initComponents();
super.populateWidget(cellWidget);
}
}

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

@ -4,16 +4,17 @@ import javax.swing.*;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.mainframe.widget.editors.WidgetValueEditor; import com.fr.design.mainframe.widget.editors.WidgetValueEditor;
import com.fr.form.ui.DataControl; import com.fr.form.ui.DataControl;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.form.ui.WidgetValue; import com.fr.form.ui.WidgetValue;
import static com.fine.swing.ui.layout.Layouts.cell;
import java.awt.*; 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;
public class ValueWidgetPane extends WidgetPane { public class ValueWidgetPane extends WidgetPane {
private JPanel widgetValuePane; private JPanel widgetValuePane;
@ -27,18 +28,20 @@ public class ValueWidgetPane extends WidgetPane {
public JPanel initNorthPane(){ public JPanel initNorthPane(){
JPanel northPane = super.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); label.setVisible(false);
widgetValuePane = new JPanel(); widgetValuePane = new JPanel();
widgetValuePane.setLayout(FRGUIPaneFactory.createBorderLayout()); widgetValuePane.setLayout(FRGUIPaneFactory.createBorderLayout());
double p = TableLayout.PREFERRED; JPanel jPanel = new JPanel(FRGUIPaneFactory.createBorderLayout());
double f = TableLayout.FILL; jPanel.add(column(10,
double[] columnSize = {p, p, f}; cell(northPane),
double[] rowSize = {p}; column(
Component[][] components = new Component[][]{ row(
new Component[]{northPane, label,widgetValuePane}, cell(label).weight(LEFT_WEIGHT),
}; cell(widgetValuePane).weight(RIGHT_WEIGHT)
JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); )
)
).getComponent());
return jPanel; return jPanel;
} }

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

@ -50,6 +50,8 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
private boolean shouldFireSelectedEvent = true; private boolean shouldFireSelectedEvent = true;
private JComponent northPane; private JComponent northPane;
private boolean eastRegion = false;
public WidgetPane() { public WidgetPane() {
this(null); this(null);
} }
@ -61,6 +63,11 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
this.initComponents(pane); this.initComponents(pane);
} }
public WidgetPane(ElementCasePane pane, boolean eastRegion) {
this.eastRegion = eastRegion;
this.initComponents(pane);
}
public boolean isShouldFireSelectedEvent(){ public boolean isShouldFireSelectedEvent(){
return shouldFireSelectedEvent; return shouldFireSelectedEvent;
@ -97,7 +104,7 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
} }
protected CellWidgetCardPane initWidgetCardPane(ElementCasePane pane) { protected CellWidgetCardPane initWidgetCardPane(ElementCasePane pane) {
return new CellWidgetCardPane(pane); return eastRegion ? new EastCellWidgetCardPane(pane) : new CellWidgetCardPane(pane);
} }
protected JPanel createContentPane() { protected JPanel createContentPane() {

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

@ -1,16 +1,14 @@
package com.fr.design.widget.ui; package com.fr.design.widget.ui;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.data.core.FormatField; import com.fr.data.core.FormatField;
import com.fr.design.border.UIRoundedBorder; import com.fr.design.border.UIRoundedBorder;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; 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.DateValuePane;
import com.fr.design.widget.component.UIComboBoxNoArrow; import com.fr.design.widget.component.UIComboBoxNoArrow;
import com.fr.design.widget.ui.designer.date.DateFormatCheckManager; import com.fr.design.widget.ui.designer.date.DateFormatCheckManager;
@ -31,6 +29,12 @@ import java.awt.event.ActionListener;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
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.cell;
import static com.fr.design.constants.LayoutConstants.LEFT_WEIGHT;
import static com.fr.design.constants.LayoutConstants.RIGHT_WEIGHT;
public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor> { public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor> {
private UIButtonGroup returnTypeComboBox; private UIButtonGroup returnTypeComboBox;
@ -57,27 +61,22 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
JPanel formatHead = createFormatHead(); JPanel formatHead = createFormatHead();
startDv = new DateValuePane(); startDv = new DateValuePane();
endDv = 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")); UILabel formatLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Format"));
formatLabel.setVerticalAlignment(SwingConstants.TOP); formatLabel.setVerticalAlignment(SwingConstants.TOP);
UILabel startDateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_Start_Date")); UILabel startDateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_Start_Date"));
startDateLabel.setVerticalAlignment(SwingConstants.TOP); startDateLabel.setVerticalAlignment(SwingConstants.TOP);
UILabel endDateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_End_Date")); UILabel endDateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_End_Date"));
endDateLabel.setVerticalAlignment(SwingConstants.TOP); endDateLabel.setVerticalAlignment(SwingConstants.TOP);
Component[][] components = new Component[][]{ UILabel returnLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Date_Selector_Return_Type"));
new Component[]{formatLabel, formatHead}, JPanel panel = new JPanel(FRGUIPaneFactory.createBorderLayout());
new Component[]{startDateLabel, startDv}, panel.add(column(10,
new Component[]{endDateLabel, endDv}, row(cell(formatLabel).weight(LEFT_WEIGHT), cell(formatHead).weight(RIGHT_WEIGHT)),
new Component[]{waterMarkDictPane, null}, row(cell(startDateLabel).weight(LEFT_WEIGHT), cell(startDv).weight(RIGHT_WEIGHT)),
new Component[]{extraPane, null}, row(cell(endDateLabel).weight(LEFT_WEIGHT), cell(endDv).weight(RIGHT_WEIGHT)),
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Date_Selector_Return_Type")), returnTypeComboBox } cell(waterMarkDictPane),
}; cell(extraPane),
double[] rowSize = {p, p, p, p, p, p, p, p}; row(cell(returnLabel).weight(LEFT_WEIGHT), cell(returnTypeComboBox).weight(RIGHT_WEIGHT))
double[] columnSize = {p, f}; ).getComponent());
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; return panel;
} }
@ -134,7 +133,8 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
}); });
final UILabel dateSampleLabel = createSamplePane(); final UILabel dateSampleLabel = createSamplePane();
final UILabel timeSampleLabel = createSamplePane(); final UILabel timeSampleLabel = createSamplePane();
JPanel fomatHeadPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel formatHeadPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
formatHeadPane.setBorder(new ScaledEmptyBorder(5, 0, 5, 0));
final CardLayout cardLayout = new CardLayout(); final CardLayout cardLayout = new CardLayout();
final JPanel customPane = new JPanel(cardLayout); final JPanel customPane = new JPanel(cardLayout);
JPanel dateFormatPane = createFormatPane(dateFormatComboBox, dateSampleLabel); JPanel dateFormatPane = createFormatPane(dateFormatComboBox, dateSampleLabel);
@ -158,9 +158,9 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
refreshPreviewLabel(); refreshPreviewLabel();
} }
}); });
fomatHeadPane.add(fomatHeadGroup, BorderLayout.NORTH); formatHeadPane.add(fomatHeadGroup, BorderLayout.NORTH);
fomatHeadPane.add(customPane, BorderLayout.CENTER); formatHeadPane.add(customPane, BorderLayout.CENTER);
return fomatHeadPane; return formatHeadPane;
} }

12
designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

@ -342,12 +342,12 @@ public class DesignerActivator extends Activator implements Prepare {
private static NameableCreator[] hyperlinkTypes() { private static NameableCreator[] hyperlinkTypes() {
return new NameableCreator[]{ return new NameableCreator[]{
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet"), new LazyIcon("cellHyperLinkAttr"), ReportletHyperlink.class, ReportletHyperlinkPane.ChartNoRename.class), new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet"), ReportletHyperlink.class, ReportletHyperlinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email"), new LazyIcon("cellHyperLinkAttr"), EmailJavaScript.class, EmailPane.class), new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email"), EmailJavaScript.class, EmailPane.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Web_Link"), new LazyIcon("cellHyperLinkAttr"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class), new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Web_Link"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_JavaScript_Dynamic_Parameters"), new LazyIcon("cellHyperLinkAttr"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class), new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_JavaScript_Dynamic_Parameters"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"), new LazyIcon("cellHyperLinkAttr"), JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class), new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"), JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup"), new LazyIcon("cellHyperLinkAttr"), MobilePopupHyperlink.class, MobilePopupPane.class), new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup"), MobilePopupHyperlink.class, MobilePopupPane.class),
}; };
} }

Loading…
Cancel
Save