Browse Source

Merge branch 'fbp/release' of ssh://code.fineres.com:7999/~vito/c-design into fbp/release

fbp/merge
vito 5 months ago
parent
commit
3a2d37222c
  1. 26
      designer-base/src/main/java/com/fr/design/condition/SingleConditionPane.java
  2. 44
      designer-base/src/main/java/com/fr/design/style/FRFontPane.java
  3. 2
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  4. 12
      designer-realize/src/main/java/com/fr/design/condition/BackPane.java
  5. 7
      designer-realize/src/main/java/com/fr/design/condition/BorderHighlightPane.java
  6. 10
      designer-realize/src/main/java/com/fr/design/condition/FontPane.java
  7. 9
      designer-realize/src/main/java/com/fr/design/condition/ForeGroundPane.java
  8. 9
      designer-realize/src/main/java/com/fr/design/condition/HyperlinkPane.java
  9. 9
      designer-realize/src/main/java/com/fr/design/condition/NewRealValuePane.java
  10. 11
      designer-realize/src/main/java/com/fr/design/condition/PaddingPane.java
  11. 9
      designer-realize/src/main/java/com/fr/design/condition/PagePane.java
  12. 9
      designer-realize/src/main/java/com/fr/design/condition/PresentHighlightPane.java
  13. 9
      designer-realize/src/main/java/com/fr/design/condition/WHPane.java
  14. 9
      designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java

26
designer-base/src/main/java/com/fr/design/condition/SingleConditionPane.java

@ -6,31 +6,37 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import com.fine.theme.icon.LazyIcon; import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIStyle;
import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
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.flex;
public abstract class SingleConditionPane<T> extends BasicPane { public abstract class SingleConditionPane<T> extends BasicPane {
private static final long serialVersionUID = -4274960170813368817L; private static final long serialVersionUID = -4274960170813368817L;
protected UIButton cancel; protected UIButton cancel;
public SingleConditionPane(){ public SingleConditionPane(){
this(true); this(true);
} }
public SingleConditionPane(boolean isRemove) { public SingleConditionPane(boolean isRemove) {
this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(10, 0)); this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(10, 0));
this.setBorder(new ScaledEmptyBorder(4, 8, 4, 8));
if (isRemove) { if (isRemove) {
if(cancel == null) { if(cancel == null) {
cancel = new UIButton(new LazyIcon("remove")); cancel = new UIButton(new LazyIcon("remove"));
cancel.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Remove")); cancel.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Remove"));
cancel.addActionListener(cancleListener); cancel.addActionListener(cancleListener);
cancel.setBackground(FlatUIUtils.getUIColor("default.background", new Color(246, 248, 250, 255))); FineUIStyle.setStyle(cancel, FineUIStyle.ORIGINAL_BUTTON);
cancel.setBorder(null);
} }
addCancel(); addCancel();
} }
@ -40,9 +46,9 @@ public abstract class SingleConditionPane<T> extends BasicPane {
* 添加删除按钮 * 添加删除按钮
*/ */
public void addCancel() { public void addCancel() {
this.add(cancel, BorderLayout.EAST); this.add(column(flex(), cell(cancel), flex()).getComponent(), BorderLayout.EAST);
} }
ActionListener cancleListener = new ActionListener() { ActionListener cancleListener = new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
doCancel(); doCancel();
@ -55,8 +61,8 @@ public abstract class SingleConditionPane<T> extends BasicPane {
public abstract void doCancel(); public abstract void doCancel();
public abstract void setDefault(); public abstract void setDefault();
public abstract void populate(T condition); public abstract void populate(T condition);
public abstract T update(); public abstract T update();
} }

44
designer-base/src/main/java/com/fr/design/style/FRFontPane.java

@ -61,20 +61,20 @@ public class FRFontPane extends BasicPane {
private UICheckBox isSubscriptCheckBox; private UICheckBox isSubscriptCheckBox;
private FRFontPreviewArea preview; private FRFontPreviewArea preview;
private EventListenerList eventChangeList = new EventListenerList(); private EventListenerList eventChangeList = new EventListenerList();
public static Integer[] Font_Sizes = {new Integer(6), new Integer(8), new Integer(9), public static Integer[] Font_Sizes = {new Integer(6), new Integer(8), new Integer(9),
new Integer(10), new Integer(11), new Integer(12), new Integer(10), new Integer(11), new Integer(12),
new Integer(14), new Integer(16), new Integer(18), new Integer(14), new Integer(16), new Integer(18),
new Integer(20), new Integer(22), new Integer(24), new Integer(20), new Integer(22), new Integer(24),
new Integer(26), new Integer(28), new Integer(36), new Integer(26), new Integer(28), new Integer(36),
new Integer(48), new Integer(72)}; new Integer(48), new Integer(72)};
public FRFontPane() { public FRFontPane() {
this.initComponents(); this.initComponents();
} }
protected void initComponents() { protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); this.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
@ -82,18 +82,18 @@ public class FRFontPane extends BasicPane {
// 名字 // 名字
fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report()); fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
this.fontNameComboBox.addActionListener(actionListener); this.fontNameComboBox.addActionListener(actionListener);
// 字形和大小 // 字形和大小
fontSizeStylePane = new FontSizeStylePane(); fontSizeStylePane = new FontSizeStylePane();
// 下划线 和 颜色 // 下划线 和 颜色
this.underlineCombo = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY); this.underlineCombo = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY);
this.underlineCombo.addActionListener(actionListener); this.underlineCombo.addActionListener(actionListener);
foregroundColorPane = new ColorSelectBox(140); foregroundColorPane = new ColorSelectBox(140);
foregroundColorPane.addSelectChangeListener(new ChangeListener() { foregroundColorPane.addSelectChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
fireStateChanged(); fireStateChanged();
} }
}); });
initCheckbox(); initCheckbox();
@ -166,11 +166,11 @@ public class FRFontPane extends BasicPane {
column(5, cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview"))), cell(preview).weight(1)).weight(1) column(5, cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview"))), cell(preview).weight(1)).weight(1)
).getComponent()); ).getComponent());
} }
public void addChangeListener(ChangeListener changeListener) { public void addChangeListener(ChangeListener changeListener) {
eventChangeList.add(ChangeListener.class, changeListener); eventChangeList.add(ChangeListener.class, changeListener);
} }
/** /**
*/ */
public void fireStateChanged() { public void fireStateChanged() {
@ -186,19 +186,19 @@ public class FRFontPane extends BasicPane {
} }
} }
} }
ActionListener actionListener = new ActionListener() { ActionListener actionListener = new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
fireStateChanged(); fireStateChanged();
} }
}; };
ChangeListener changeListener = new ChangeListener() { ChangeListener changeListener = new ChangeListener() {
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
fireStateChanged(); fireStateChanged();
} }
}; };
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sytle_FRFont"); return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sytle_FRFont");
@ -217,6 +217,16 @@ public class FRFontPane extends BasicPane {
updatePreviewLabel(); updatePreviewLabel();
} }
}; };
ItemListener updatePreviewItemListener = new ItemListener() {
public void itemStateChanged(ItemEvent e) {
updatePreviewLabel();
}
};
this.fontNameComboBox.addItemListener(updatePreviewItemListener);
this.fontSizeStylePane.fontComboBox.addItemListener(updatePreviewItemListener);
this.fontSizeStylePane.fontSizeComboBox.addItemListener(updatePreviewItemListener);
this.isStrikethroughCheckBox.addActionListener(updatePreviewActionListener); this.isStrikethroughCheckBox.addActionListener(updatePreviewActionListener);
this.isShadowCheckBox.addActionListener(updatePreviewActionListener); this.isShadowCheckBox.addActionListener(updatePreviewActionListener);
this.isSuperscriptCheckBox.addActionListener(updatePreviewActionListener); this.isSuperscriptCheckBox.addActionListener(updatePreviewActionListener);

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

@ -1410,7 +1410,7 @@ chart.selectedBorderColor = #2576EF
[style]Button.originalButton = \ [style]Button.originalButton = \
borderColor: null; \ borderColor: null; \
background: $fill.normal; \ background: null; \
hoverBorderColor: null; hoverBorderColor: null;
[style]Button.grayButton = \ [style]Button.grayButton = \

12
designer-realize/src/main/java/com/fr/design/condition/BackPane.java

@ -23,6 +23,7 @@ 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.row;
import static com.fine.theme.utils.FineClientProperties.ADAPTIVE_COMBO_BOX; import static com.fine.theme.utils.FineClientProperties.ADAPTIVE_COMBO_BOX;
import static com.fine.theme.utils.FineClientProperties.COMBO_BOX_TYPE; import static com.fine.theme.utils.FineClientProperties.COMBO_BOX_TYPE;
import static com.fine.theme.utils.FineUIScale.scale;
/** /**
* @author richie * @author richie
@ -36,9 +37,9 @@ public class BackPane extends ConditionAttrSingleConditionPane<HighlightAction>
public BackPane(final ConditionAttributesPane conditionAttributesPane) { public BackPane(final ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane); super(conditionAttributesPane);
backgroundLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Background") + ":"); backgroundLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Background"));
this.backgroundPreviewPane = new BackgroundPreviewLabel(); this.backgroundPreviewPane = new BackgroundPreviewLabel();
this.backgroundPreviewPane.setPreferredSize(FineUIScale.scale(new Dimension(80, 20))); this.backgroundPreviewPane.setPreferredSize(new Dimension(scale(100), backgroundPreviewPane.getPreferredSize().height));
UIButton editBackgroundButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit")); UIButton editBackgroundButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"));
editBackgroundButton.addActionListener(new ActionListener() { editBackgroundButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -62,12 +63,11 @@ public class BackPane extends ConditionAttrSingleConditionPane<HighlightAction>
this.backScopeComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX); this.backScopeComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.backgroundPreviewPane.setBackgroundObject(ColorBackground.getInstance(Color.WHITE)); this.backgroundPreviewPane.setBackgroundObject(ColorBackground.getInstance(Color.WHITE));
this.add(row(10, cell(backgroundLabel).weight(0.2), row( this.add(row(4, cell(backgroundLabel),
10,
cell(backgroundPreviewPane), cell(backgroundPreviewPane),
cell(editBackgroundButton), cell(editBackgroundButton),
cell(backScopeComboBox)).weight(0.8) cell(backScopeComboBox)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER); ).getComponent(), BorderLayout.CENTER);
} }
@Override @Override

7
designer-realize/src/main/java/com/fr/design/condition/BorderHighlightPane.java

@ -79,10 +79,9 @@ public class BorderHighlightPane extends ConditionAttrSingleConditionPane<Highli
UILabel borderLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Border")); UILabel borderLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Border"));
this.add(row(10, cell(borderLabel).weight(0.2), row( this.add(row(4, cell(borderLabel),
10, cell(borderButton)
cell(borderButton)).weight(0.8) ).getComponent(), BorderLayout.CENTER);
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
} }
@Override @Override

10
designer-realize/src/main/java/com/fr/design/condition/FontPane.java

@ -37,10 +37,9 @@ public class FontPane extends ConditionAttrSingleConditionPane<HighlightAction>
public FontPane(final ConditionAttributesPane conditionAttributesPane) { public FontPane(final ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane); super(conditionAttributesPane);
fontLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sytle_FRFont") + ":"); fontLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sytle_FRFont"));
frFontPreviewPane = new FRFontPreviewArea(); frFontPreviewPane = new FRFontPreviewArea();
frFontPreviewPane.setBorder(BorderFactory.createTitledBorder("")); frFontPreviewPane.setBorder(BorderFactory.createTitledBorder(""));
frFontPreviewPane.setPreferredSize(FineUIScale.scale(new Dimension(80, 20)));
UIButton editFRFontButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit")); UIButton editFRFontButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"));
editFRFontButton.addActionListener(new ActionListener() { editFRFontButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -66,12 +65,11 @@ public class FontPane extends ConditionAttrSingleConditionPane<HighlightAction>
this.fontScopeComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX); this.fontScopeComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.frFontPreviewPane.setFontObject(DesignUtils.getDefaultGUIFont()); this.frFontPreviewPane.setFontObject(DesignUtils.getDefaultGUIFont());
this.add(row(10, cell(fontLabel).weight(0.2), row( this.add(row(4, cell(fontLabel),
10,
cell(frFontPreviewPane), cell(frFontPreviewPane),
cell(editFRFontButton), cell(editFRFontButton),
cell(fontScopeComboBox)).weight(0.8) cell(fontScopeComboBox)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER); ).getComponent(), BorderLayout.CENTER);
} }
@Override @Override

9
designer-realize/src/main/java/com/fr/design/condition/ForeGroundPane.java

@ -29,7 +29,7 @@ public class ForeGroundPane extends ConditionAttrSingleConditionPane<HighlightAc
public ForeGroundPane(ConditionAttributesPane conditionAttributesPane) { public ForeGroundPane(ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane); super(conditionAttributesPane);
foregroundLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Foreground") + ":"); foregroundLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Foreground"));
this.foregroundColorPane = new ColorSelectBox(80); this.foregroundColorPane = new ColorSelectBox(80);
foregroundColorPane.setPreferredSize(new Dimension(FineUIScale.scale(100), foregroundColorPane.getHeight())); foregroundColorPane.setPreferredSize(new Dimension(FineUIScale.scale(100), foregroundColorPane.getHeight()));
this.foreScopeComboBox = new UIComboBox(new String[] { this.foreScopeComboBox = new UIComboBox(new String[] {
@ -39,11 +39,10 @@ public class ForeGroundPane extends ConditionAttrSingleConditionPane<HighlightAc
this.foreScopeComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX); this.foreScopeComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.foregroundColorPane.setSelectObject(Color.black); this.foregroundColorPane.setSelectObject(Color.black);
this.add(row(10, cell(foregroundLabel).weight(0.2), row( this.add(row(4, cell(foregroundLabel),
10,
cell(foregroundColorPane), cell(foregroundColorPane),
cell(foreScopeComboBox)).weight(0.8) cell(foreScopeComboBox)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER); ).getComponent(), BorderLayout.CENTER);
} }
@Override @Override

9
designer-realize/src/main/java/com/fr/design/condition/HyperlinkPane.java

@ -61,19 +61,18 @@ public class HyperlinkPane extends ConditionAttrSingleConditionPane<HighlightAct
} }
}); });
hyperlinkButton.setEnabled(false); hyperlinkButton.setEnabled(false);
UILabel hyperlinkLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Hyperlink_Type") + ":"); UILabel hyperlinkLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Hyperlink_Type"));
typeField = new UITextField(12); typeField = new UITextField(12);
typeField.setEditable(false); typeField.setEditable(false);
useHyperlink = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Use_Links")); useHyperlink = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Use_Links"));
useHyperlink.addActionListener(l); useHyperlink.addActionListener(l);
this.add(row(10, cell(hyperlinkLabel).weight(0.2), row( this.add(row(4, cell(hyperlinkLabel),
10,
cell(typeField), cell(typeField),
cell(hyperlinkButton), cell(hyperlinkButton),
cell(useHyperlink)).weight(0.8) cell(useHyperlink)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER); ).getComponent(), BorderLayout.CENTER);
} }
@Override @Override

9
designer-realize/src/main/java/com/fr/design/condition/NewRealValuePane.java

@ -23,13 +23,12 @@ public class NewRealValuePane extends ConditionAttrSingleConditionPane<Highlight
public NewRealValuePane(ConditionAttributesPane conditionAttributesPane) { public NewRealValuePane(ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane); super(conditionAttributesPane);
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Value") + ":"); UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Value"));
valueEditor = ValueEditorPaneFactory.createBasicValueEditorPane(); valueEditor = ValueEditorPaneFactory.createBasicValueEditorPane();
this.add(row(10, cell(label).weight(0.2), row( this.add(row(10, cell(label),
10, cell(valueEditor)
cell(valueEditor)).weight(0.8) ).getComponent(), BorderLayout.CENTER);
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
} }
@Override @Override

11
designer-realize/src/main/java/com/fr/design/condition/PaddingPane.java

@ -42,10 +42,10 @@ public class PaddingPane extends ConditionAttrSingleConditionPane<HighlightActio
public PaddingPane(ConditionAttributesPane conditionAttributesPane) { public PaddingPane(ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane); super(conditionAttributesPane);
paddingLeft = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Style_Left_Indent") + ":"); paddingLeft = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Style_Left_Indent"));
paddingLeftSpinner = new UIBasicSpinner(new SpinnerNumberModel(2, 0, Integer.MAX_VALUE, 1)); paddingLeftSpinner = new UIBasicSpinner(new SpinnerNumberModel(2, 0, Integer.MAX_VALUE, 1));
GUICoreUtils.setColumnForSpinner(paddingLeftSpinner, 5); GUICoreUtils.setColumnForSpinner(paddingLeftSpinner, 5);
paddingRight = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Style_Right_Indent") + ":"); paddingRight = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Style_Right_Indent"));
paddingRightSpinner = new UIBasicSpinner(new SpinnerNumberModel(2, 0, Integer.MAX_VALUE, 1)); paddingRightSpinner = new UIBasicSpinner(new SpinnerNumberModel(2, 0, Integer.MAX_VALUE, 1));
GUICoreUtils.setColumnForSpinner(paddingRightSpinner, 5); GUICoreUtils.setColumnForSpinner(paddingRightSpinner, 5);
this.paddingScopeComboBox = new UIComboBox(new String[] { this.paddingScopeComboBox = new UIComboBox(new String[] {
@ -71,13 +71,10 @@ public class PaddingPane extends ConditionAttrSingleConditionPane<HighlightActio
refreshIndentationUnit(); refreshIndentationUnit();
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sytle_Indentation")); UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sytle_Indentation"));
this.add(row(10, column(5, cell(label).weight(0.5), flex(0.5)).weight(0.2) this.add(row(4, column(4, cell(label).weight(0.5), flex(0.5)),
.with(it -> it.setPreferredSize(new Dimension(-1, FineUIScale.scale(53)))), row(
10,
column(5, cell(paddingLeftSpinner).weight(0.5),cell(paddingLeft).weight(0.5)), column(5, cell(paddingLeftSpinner).weight(0.5),cell(paddingLeft).weight(0.5)),
column(5, cell(paddingRightSpinner).weight(0.5),cell(paddingRight).weight(0.5)), column(5, cell(paddingRightSpinner).weight(0.5),cell(paddingRight).weight(0.5)),
column(5, cell(paddingScopeComboBox).weight(0.5), flex(0.5))).weight(0.8) column(5, cell(paddingScopeComboBox).weight(0.5), flex(0.5))).getComponent());
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent());
} }
/** /**

9
designer-realize/src/main/java/com/fr/design/condition/PagePane.java

@ -25,7 +25,7 @@ public class PagePane extends ConditionAttrSingleConditionPane<HighlightAction>
public PagePane(ConditionAttributesPane conditionAttributesPane) { public PagePane(ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane); super(conditionAttributesPane);
pageLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Pagination") + ":"); pageLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Pagination"));
this.pageComboBox = new UIComboBox(new String[] { this.pageComboBox = new UIComboBox(new String[] {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_No_Pagination"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_No_Pagination"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cell_Write_Page_After_Row"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cell_Write_Page_After_Row"),
@ -35,10 +35,9 @@ public class PagePane extends ConditionAttrSingleConditionPane<HighlightAction>
this.pageComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX); this.pageComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.pageComboBox.setSelectedIndex(0); this.pageComboBox.setSelectedIndex(0);
this.add(row(10, cell(pageLabel).weight(0.2), row( this.add(row(4, cell(pageLabel),
10, cell(pageComboBox)
cell(pageComboBox)).weight(0.8) ).getComponent(), BorderLayout.CENTER);
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
} }
@Override @Override

9
designer-realize/src/main/java/com/fr/design/condition/PresentHighlightPane.java

@ -40,7 +40,7 @@ public class PresentHighlightPane extends ConditionAttrSingleConditionPane<Highl
public PresentHighlightPane(final ConditionAttributesPane conditionAttributesPane) { public PresentHighlightPane(final ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane); super(conditionAttributesPane);
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Present") + ":"); UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Present"));
String[] typeArray = {PresentConstants.NORMAL, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Other_Present")}; String[] typeArray = {PresentConstants.NORMAL, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Other_Present")};
presentComboBox = new UIComboBox(typeArray); presentComboBox = new UIComboBox(typeArray);
@ -92,11 +92,10 @@ public class PresentHighlightPane extends ConditionAttrSingleConditionPane<Highl
}); });
presentComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX); presentComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.add(row(10, cell(label).weight(0.2), row( this.add(row(4, cell(label),
10,
cell(presentComboBox), cell(presentComboBox),
cell(type)).weight(0.8) cell(type)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER); ).getComponent(), BorderLayout.CENTER);
} }
@Override @Override

9
designer-realize/src/main/java/com/fr/design/condition/WHPane.java

@ -31,18 +31,17 @@ public abstract class WHPane extends ConditionAttrSingleConditionPane<HighlightA
protected WHPane(ConditionAttributesPane conditionAttributesPane, String locString) { protected WHPane(ConditionAttributesPane conditionAttributesPane, String locString) {
super(conditionAttributesPane); super(conditionAttributesPane);
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText(locString) + ":"); UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText(locString));
spinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0,Integer.MAX_VALUE, 1)); spinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0,Integer.MAX_VALUE, 1));
this.unitLabel = new UILabel(getUnitString()); this.unitLabel = new UILabel(getUnitString());
GUICoreUtils.setColumnForSpinner(spinner, 5); GUICoreUtils.setColumnForSpinner(spinner, 5);
this.spinner.setValue(new Integer(0)); this.spinner.setValue(new Integer(0));
this.locString = locString; this.locString = locString;
this.add(row(10, cell(label).weight(0.2), row( this.add(row(4, cell(label),
10,
cell(spinner), cell(spinner),
cell(unitLabel)).weight(0.8) cell(unitLabel)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER); ).getComponent(), BorderLayout.CENTER);
} }
@Override @Override

9
designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java

@ -63,7 +63,7 @@ public class WidgetHighlightPane extends ConditionAttrSingleConditionPane<Highli
} }
}); });
UILabel widgetLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget") + ":"); UILabel widgetLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget"));
String[] editorTypes = new String[] { String[] editorTypes = new String[] {
"", "",
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"),
@ -100,12 +100,11 @@ public class WidgetHighlightPane extends ConditionAttrSingleConditionPane<Highli
}); });
this.add(row(10, cell(widgetLabel).weight(0.2), row( this.add(row(4, cell(widgetLabel),
10,
cell(box), cell(box),
cell(widgetButton), cell(widgetButton),
cell(useWidget)).weight(0.8) cell(useWidget)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER); ).getComponent(), BorderLayout.CENTER);
} }
@Override @Override

Loading…
Cancel
Save