Browse Source

REPORT-127437 fix: 图表条件属性翻新,视觉问题调整

newui
lemon 6 months ago
parent
commit
be4d84a174
  1. 10
      designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java
  2. 15
      designer-base/src/main/java/com/fr/design/condition/SingleConditionPane.java
  3. 22
      designer-base/src/main/java/com/fr/design/dialog/NotificationDialog.java
  4. 1
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java
  5. 10
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java
  6. 11
      designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java
  7. 4
      designer-base/src/main/java/com/fr/design/style/BorderPane.java
  8. 9
      designer-base/src/main/java/com/fr/design/style/color/ColorChooserPreview.java
  9. 4
      designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java
  10. 10
      designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java
  11. 3
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  12. 9
      designer-base/src/main/java/com/fr/env/VersionCheckMessageDialog.java
  13. 1
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  14. 2
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  15. 20
      designer-chart/src/main/java/com/fr/design/chart/comp/BorderAttriPane.java
  16. 5
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java
  17. 12
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java
  18. 12
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/LabelBorderAttrPane.java
  19. 7
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/LabelContentsPane.java
  20. 30
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/AbstractNormalMultiLineConditionPane.java
  21. 10
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartFloatColorConditionPane.java
  22. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLabelConditionPane.java
  23. 13
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartSeriesColorConditionPane.java
  24. 2
      designer-realize/src/main/java/com/fr/design/condition/BackPane.java
  25. 2
      designer-realize/src/main/java/com/fr/design/condition/BorderHighlightPane.java
  26. 2
      designer-realize/src/main/java/com/fr/design/condition/FontPane.java
  27. 2
      designer-realize/src/main/java/com/fr/design/condition/ForeGroundPane.java
  28. 2
      designer-realize/src/main/java/com/fr/design/condition/HyperlinkPane.java
  29. 2
      designer-realize/src/main/java/com/fr/design/condition/NewRealValuePane.java
  30. 6
      designer-realize/src/main/java/com/fr/design/condition/PaddingPane.java
  31. 2
      designer-realize/src/main/java/com/fr/design/condition/PagePane.java
  32. 2
      designer-realize/src/main/java/com/fr/design/condition/PresentHighlightPane.java
  33. 2
      designer-realize/src/main/java/com/fr/design/condition/WHPane.java
  34. 2
      designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java

10
designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java

@ -15,6 +15,7 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.UIResource;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.JTableHeader;
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
@ -26,6 +27,7 @@ import java.awt.Graphics;
* Created on
*/
public class FineTableHeaderUI extends FlatTableHeaderUI {
protected static Color selectionBackground = UIManager.getColor("Table.background");
@Override
public void installUI(JComponent c) {
@ -83,6 +85,7 @@ public class FineTableHeaderUI extends FlatTableHeaderUI {
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
Class<?> columnClass = table.getColumnClass(0);
Border border;
if (column == table.getColumnCount() - 1) {
border = BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIManager.getColor("defaultBorderColor")),
@ -91,7 +94,12 @@ public class FineTableHeaderUI extends FlatTableHeaderUI {
border = BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(0, 0, 1, 1, UIManager.getColor("defaultBorderColor")),
UIManager.getBorder("Table.cellNoFocusBorder"));
}
setBackground(UIManager.getColor("Table.background"));
if (isSelected && columnClass != Boolean.class) {
selectionBackground = UIManager.getColor( "Table.selectionBackground");
} else {
selectionBackground = UIManager.getColor("Table.background");
}
setBackground(selectionBackground);
setText(value == null ? StringUtils.BLANK : String.valueOf(value));
setBorder(border);
return this;

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

@ -1,8 +1,7 @@
package com.fr.design.condition;
import java.awt.Color;
import java.awt.Insets;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -25,7 +24,7 @@ public abstract class SingleConditionPane<T> extends BasicPane {
}
public SingleConditionPane(boolean isRemove) {
this.setLayout(FRGUIPaneFactory.createLabelFlowLayout());
this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(10, 0));
if (isRemove) {
if(cancel == null) {
@ -33,11 +32,19 @@ public abstract class SingleConditionPane<T> extends BasicPane {
cancel.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Remove"));
cancel.addActionListener(cancleListener);
cancel.setMargin(new Insets(0, 0, 0, 0));
cancel.setBorder(new ScaledEmptyBorder(0, 0, 0, 20));
cancel.setBorder(new ScaledEmptyBorder(0, 0, 0, 10));
cancel.setBackground(FlatUIUtils.getUIColor("default.background", new Color(246, 248, 250, 255)));
}
addCancel();
}
}
/**
* 添加删除按钮
*/
public void addCancel() {
this.add(cancel, BorderLayout.EAST);
}
ActionListener cancleListener = new ActionListener() {
public void actionPerformed(ActionEvent e) {

22
designer-base/src/main/java/com/fr/design/dialog/NotificationDialog.java

@ -1,9 +1,11 @@
package com.fr.design.dialog;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
@ -42,7 +44,7 @@ public class NotificationDialog extends JDialog {
private UILabel messageText;
private NotificationDialogAction notificationDialogAction;
private ScheduledExecutorService TIMER;
private Dimension dialogSize = new Dimension(230, 95);
private Dimension dialogSize = FineUIScale.scale(new Dimension(230, 95));
public NotificationDialog(Frame owner, String title, boolean isModal, int messageType, String message, NotificationDialogAction action) {
this(owner, title, isModal, messageType, message, action, null);
@ -71,19 +73,19 @@ public class NotificationDialog extends JDialog {
setAutoRequestFocus(false);
setResizable(false);
JPanel body = FRGUIPaneFactory.createBorderLayout_L_Pane();
body.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
body.setBorder(new ScaledEmptyBorder(0, 0, 0, 0));
//消息内容
UILabel icon = new UILabel(getIconForType(messageType));
JPanel iconPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
iconPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 10, 8));
iconPanel.setBorder(new ScaledEmptyBorder(0, 10, 10, 10));
iconPanel.add(icon);
body.add(iconPanel, BorderLayout.WEST);
messageText = new UILabel(HTML_TAG_1 + message + HTML_TAG_2);
messageText.setForeground(new Color(51, 51, 52));
JPanel centerPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
centerPanel.setBorder(BorderFactory.createEmptyBorder(8, 0, 5, 20));
centerPanel.setBorder(new ScaledEmptyBorder(10, 0, 10, 10));
JScrollPane jScrollPane = new JScrollPane(messageText, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPane.setBorder(BorderFactory.createEmptyBorder());
centerPanel.add(jScrollPane, BorderLayout.CENTER);
@ -161,21 +163,21 @@ public class NotificationDialog extends JDialog {
}
protected Icon getIconForType(int messageType) {
String propertyName;
String id;
switch (messageType) {
case 0:
propertyName = "OptionPane.circularErrorIcon";
id = "error";
break;
case 1:
propertyName = "OptionPane.newMessageIcon";
id = "new_information";
break;
case 2:
propertyName = "OptionPane.circularWarningIcon";
id = "warning";
break;
default:
return null;
}
return UIManager.getIcon(propertyName);
return new LazyIcon(id, 20);
}
public static Builder Builder() {

1
designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java

@ -150,6 +150,7 @@ public abstract class UIControlPane extends JControlPane {
cell(FRWidgetFactory.createLineWrapLabel(getAddItemText())),
cell(topToolBar).with(it -> {
it.setBorderPainted(true);
it.setPreferredSize(FineUIScale.scale(new Dimension(160, 24)));
it.setBorder(FineBorderFactory.createWrappedRoundBorder());
it.setBackground(FlatUIUtils.getUIColor("fill.normal", Color.WHITE));
}).weight(1.0)

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

@ -1,5 +1,6 @@
package com.fr.design.hyperlink;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.BaseFormula;
import com.fr.design.actions.UpdateAction;
@ -41,9 +42,10 @@ import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
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;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.cell;
/**
* 热点链接部分 上方 定义特征 样式 报表 等属性的界面.
@ -152,7 +154,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
// 选择路径按钮
browserButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, 20));
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, FineUIScale.scale(20)));
browserButton.addActionListener(new ActionListener() {
@Override
@ -292,8 +294,8 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
showParameterInterface = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Parameter_UI_Display"));
content.add(row(4,
cell(postComboBox).weight(0.8),
cell(showParameterInterface).weight(0.2)
cell(postComboBox).weight(0.75),
cell(showParameterInterface).weight(0.25)
).getComponent());
return content;
}

11
designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java

@ -67,14 +67,13 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener {
super(parent,true);
//提示信息
JPanel imagePanel = new JPanel();
imageLabel = new UILabel(new LazyIcon("warning"));
imageLabel = new UILabel(new LazyIcon("warning", 20));
imagePanel.add(imageLabel);
String link = LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
JPanel messagePanel = new JPanel(new FlowLayout());
JPanel messagePanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
MessageWithLink linkMessage = new MessageWithLink(Toolkit.i18nText("Fine_Designer_Check_Font_Message"),
Toolkit.i18nText("Fine_Designer_Check_Font_Install_Font"),
link);
linkMessage.setBorder(new ScaledEmptyBorder(0, 0, 0, 10));
messagePanel.add(linkMessage);
// 查看详情按钮
@ -84,8 +83,10 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener {
detailLabel.setText(Toolkit.i18nText("Fine_Designer_Look_Detail"));
upInTopPanel = row(
column(flex(), cell(imageLabel), flex()).with(it -> it.setPreferredSize(new Dimension(FineUIScale.scale(30), it.getHeight()))),
cell(messagePanel)).getComponent();
10,
column(cell(imageLabel), flex()),
column(cell(messagePanel))).getComponent();
upInTopPanel.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
downInTopPanel = row(fix(30), row(cell(directUiLabel), cell(detailLabel), flex())).getComponent();
topPanel = column(cell(upInTopPanel), cell(downInTopPanel)).getComponent();

4
designer-base/src/main/java/com/fr/design/style/BorderPane.java

@ -333,9 +333,9 @@ public class BorderPane extends BasicPane {
private BorderButton(int border) {
this.border = border;
if (border == BorderPane.EXTERNAL_BORDERS) {
this.setIcon(BaseUtils.readIcon("com/fr/design/images/m_format/out.png"));
this.setIcon(new LazyIcon("out"));
} else if(border == BorderPane.INSIDE_BORDERS) {
this.setIcon(BaseUtils.readIcon("com/fr/design/images/m_format/in.png"));
this.setIcon(new LazyIcon("in"));
}
this.setPreferredSize(FineUIScale.scale(new Dimension(40, 24)));
this.addActionListener(this);

9
designer-base/src/main/java/com/fr/design/style/color/ColorChooserPreview.java

@ -4,6 +4,7 @@ import javax.swing.*;
import java.awt.*;
import com.fine.theme.utils.FineUIScale;
import sun.swing.SwingUtilities2;
/**
@ -11,17 +12,17 @@ import sun.swing.SwingUtilities2;
*/
public class ColorChooserPreview extends JPanel {
private static final int SQUARE_SIZE = 25;
private static final int SQUARE_GAP = 5;
private static final int SQUARE_SIZE = FineUIScale.scale(25);
private static final int SQUARE_GAP = FineUIScale.scale(5);
/**
* 方形预览框三层嵌套框之间的间隔
*/
private static final int INNER_GAP = 5;
private static final int INNER_GAP = FineUIScale.scale(5);
private static final int INNER_GAP2 = (INNER_GAP * 2);
private static final int INNER_GAP3 = (INNER_GAP * 4);
private static final int TEXT_GAP = 5;
private static final int TEXT_GAP = FineUIScale.scale(5);
private static final int PREFERSIZE_TEXT_GAP = (TEXT_GAP * 3);
private static final int PREFERSIZE_SQUARE_GAP = (SQUARE_GAP * 2);

4
designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java

@ -638,7 +638,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
private JPanel createGradientPanel() {
return new JPanel() {
public Dimension getPreferredSize() {
return new Dimension(IMG_WIDTH, IMG_HEIGHT);
return FineUIScale.scale(new Dimension(IMG_WIDTH, IMG_HEIGHT));
}
public void paint(Graphics g) {
@ -657,7 +657,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
private JPanel createTrackPanel() {
return new JPanel() {
public Dimension getPreferredSize() {
return new Dimension(TRACK_WIDTH, IMG_HEIGHT);
return FineUIScale.scale(new Dimension(TRACK_WIDTH, IMG_HEIGHT));
}
public void paint(Graphics g) {

10
designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java

@ -1,5 +1,7 @@
package com.fr.design.style.color;
import com.fine.theme.utils.FineUIScale;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
@ -68,8 +70,8 @@ public class SwatchChooserPanel extends AbstractColorChooserPanel{
int width = numCols * cellWidth + (numCols - 1) * gap;
Insets insets = getInsets();
return new Dimension(width + insets.left + insets.right,
height + insets.top + insets.bottom);
return FineUIScale.scale(new Dimension(width + insets.left + insets.right,
height + insets.top + insets.bottom));
}
/**
@ -509,8 +511,8 @@ public class SwatchChooserPanel extends AbstractColorChooserPanel{
Insets insets = parent.getInsets();
return new Dimension(insets.left + insets.right + xmax,
insets.top + insets.bottom + ymax);
return FineUIScale.scale(new Dimension(insets.left + insets.right + xmax,
insets.top + insets.bottom + ymax));
}

3
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

@ -33,6 +33,7 @@ import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.icontainer.UIVerticalScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ilist.CheckBoxList;
import com.fr.design.gui.itable.FineUITable;
@ -170,7 +171,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
JPanel editTablePane = new JPanel(new BorderLayout(FineUIScale.scale(10), 0));
editTablePane.setBounds(0, 0, FineUIScale.scale(280), FineUIScale.scale(180));
keyColumnValuesTable = new KeyColumnNameValueTable();
editTablePane.add(new UIScrollPane(keyColumnValuesTable), BorderLayout.CENTER);
editTablePane.add(new UIVerticalScrollPane(keyColumnValuesTable), BorderLayout.CENTER);
keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
keyColumnValuesTable.setPreferredScrollableViewportSize(FineUIScale.scale(new Dimension(280, 150)));
keyColumnValuesTable.setShowHorizontalLines(true);

9
designer-base/src/main/java/com/fr/env/VersionCheckMessageDialog.java vendored

@ -1,5 +1,8 @@
package com.fr.env;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.versioncheck.VersionCheckUtils;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
@ -46,7 +49,7 @@ public class VersionCheckMessageDialog extends JDialog implements ActionListener
private void init(String message) {
JPanel imagePanel = new JPanel();
imageLabel = new UILabel(IOUtils.readIcon("com/fr/design/images/warnings/warning32.png"));
imageLabel = new UILabel(new LazyIcon("warning"));
imagePanel.add(imageLabel);
JPanel messagePanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true);
UILabel messageText = new UILabel();
@ -54,7 +57,7 @@ public class VersionCheckMessageDialog extends JDialog implements ActionListener
messagePanel.add(messageText);
centerPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
centerPanel.setBorder(BorderFactory.createEmptyBorder(15, 10, 10, 10));
centerPanel.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
centerPanel.add(imagePanel, BorderLayout.WEST);
centerPanel.add(messagePanel, BorderLayout.CENTER);
@ -90,7 +93,7 @@ public class VersionCheckMessageDialog extends JDialog implements ActionListener
this.setTitle(Toolkit.i18nText("Fine-Design_Basic_Sync_Prompt"));
this.setResizable(false);
this.add(body, BorderLayout.NORTH);
this.setSize(new Dimension(GeneralContext.getLocale().equals(Locale.US) ? 300 : 280, 135));
this.setSize(FineUIScale.scale(new Dimension(GeneralContext.getLocale().equals(Locale.US) ? 300 : 280, 135)));
GUICoreUtils.centerWindow(this);
}

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

@ -911,6 +911,7 @@ Table.focusCellForeground = $Table.foreground
Table.background = $fill.normal
Table.selectionInactiveBackground = @selectionInactiveBackground
Table.selectionInactiveForeground = @selectionInactiveForeground
Table.selectionBackground = fade(#2576EF,12%)
Table.dropCellBackground = @dropCellBackground
Table.dropCellForeground = @dropCellForeground
Table.dropLineColor = @dropLineColor

2
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties

@ -2,7 +2,7 @@
com.fr.design.mainframe.check.CheckButton=250*118
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=360*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=325*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=385*280
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=360*280
com.fr.env.RemoteEnvPane.dialog=308*132
com.fr.design.version.check.dialog=230*95
com.fr.design.version.detail.label=450*30

20
designer-chart/src/main/java/com/fr/design/chart/comp/BorderAttriPane.java

@ -1,5 +1,6 @@
package com.fr.design.chart.comp;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.gui.ilable.UILabel;
import com.fr.stable.Constants;
@ -10,6 +11,9 @@ import com.fr.design.style.color.ColorSelectBox;
import java.awt.*;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
public class BorderAttriPane extends BasicPane {
private LineComboBox lineCombo;
@ -20,16 +24,14 @@ public class BorderAttriPane extends BasicPane {
}
public BorderAttriPane(String lineString, String colorSting) {
this.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 0));
this.add(new UILabel(lineString + ":"));
this.add(lineCombo = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART));
lineCombo.setPreferredSize(new Dimension(60, 18));
this.add(new UILabel(colorSting + ":"));
this.add(colorSelectBox = new ColorSelectBox(80));
colorSelectBox.setPreferredSize(new Dimension(60, 18));
this.setLayout(new BorderLayout());
lineCombo = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART);
colorSelectBox = new ColorSelectBox(80);
colorSelectBox.setPreferredSize(FineUIScale.scale(new Dimension(60, 24)));
colorSelectBox.setSelectObject(null);
this.add(row(10, row(cell(new UILabel(lineString + ":")), cell(lineCombo)),
row(cell(new UILabel(colorSting + ":"))), cell(colorSelectBox)).getComponent(), BorderLayout.WEST);
}
public void setLineColor(Color color) {

5
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java

@ -18,7 +18,6 @@ import javax.swing.JPanel;
import javax.swing.JScrollPane;
import java.util.Iterator;
import java.awt.BorderLayout;
import java.awt.Dimension;
/**
* Created by IntelliJ IDEA.
@ -68,8 +67,6 @@ public class DataSeriesConditionPane extends ConditionAttributesPane<ConditionAt
// 条件界面
pane.add(liteConditionPane = createListConditionPane(), BorderLayout.CENTER);
// kunsnat_size 加载属性之后 被遮挡, 最少的高度为300, 5个按钮
liteConditionPane.setPreferredSize(new Dimension(300, 300));
}
protected ChartConditionPane createListConditionPane() {
@ -163,6 +160,7 @@ public class DataSeriesConditionPane extends ConditionAttributesPane<ConditionAt
ConditionAttr ca = new ConditionAttr();
updateBeanInvoked(ca);
checkConditionPane();
return ca;
}
@ -170,6 +168,7 @@ public class DataSeriesConditionPane extends ConditionAttributesPane<ConditionAt
public void updateBean(ConditionAttr condition) {
condition.removeAll();
updateBeanInvoked(condition);
checkConditionPane();
}
@Override

12
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java

@ -1,5 +1,7 @@
package com.fr.design.chart.series.SeriesCondition;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.chart.base.AttrAlpha;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.design.condition.ConditionAttrSingleConditionPane;
@ -12,6 +14,9 @@ import com.fr.design.gui.ilable.UILabel;
import javax.swing.*;
import java.awt.*;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* @author richie
* @date 2015-03-26
@ -39,10 +44,11 @@ public class LabelAlphaPane extends ConditionAttrSingleConditionPane<DataSeriesC
panel.add(label, BorderLayout.WEST);
panel.add(alphaPane, BorderLayout.CENTER);
panel.setPreferredSize(new Dimension(PANEL_WIDTH, PANEL_HIGHT));
panel.setPreferredSize(FineUIScale.scale(new Dimension(PANEL_WIDTH, PANEL_HIGHT)));
this.add(row(cell(nameLabel).weight(0.2), cell(panel).weight(0.8))
.with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent());
this.add(nameLabel);
this.add(panel);
}
@Override

12
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/LabelBorderAttrPane.java

@ -1,5 +1,6 @@
package com.fr.design.chart.series.SeriesCondition;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.design.chart.comp.BorderAttriPane;
import com.fr.design.condition.ConditionAttrSingleConditionPane;
@ -7,6 +8,9 @@ import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.stable.StringUtils;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* @author richie
* @date 2015-03-26
@ -25,12 +29,16 @@ public abstract class LabelBorderAttrPane extends ConditionAttrSingleConditionPa
super(conditionAttributesPane, isRemove);
nameLabel = new UILabel(label);
linePane = initBorderAttrPane();
nameLabel.setVisible(false);
if (isRemove) {
this.add(nameLabel);
nameLabel.setVisible(true);
}
this.add(linePane);
this.labelName = label;
this.add(row(cell(nameLabel).weight(0.2), cell(linePane).weight(0.8))
.with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent());
}
protected BorderAttriPane initBorderAttrPane(){

7
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/LabelContentsPane.java

@ -54,6 +54,13 @@ public class LabelContentsPane extends ConditionAttrSingleConditionPane<DataSeri
this.add(pane);
}
/**
* 添加删除按钮
*/
public void addCancel() {
}
@Override
public String nameForPopupMenuItem() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Label_Content");

30
designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/AbstractNormalMultiLineConditionPane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.other.condition.item;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.chartattr.Plot;
import com.fr.design.condition.ConditionAttrSingleConditionPane;
@ -13,6 +14,12 @@ import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Dimension;
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;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created by Mitisky on 16/5/23.
* 标签等有多行设置的条件属性,需要重新布局,使标签位于左上方
@ -35,23 +42,18 @@ public abstract class AbstractNormalMultiLineConditionPane extends ConditionAttr
super(conditionAttributesPane, true);
this.plot = (VanChartPlot) plot;
UILabel nameLabel = new UILabel(getItemLabelString());
JPanel pane = FRGUIPaneFactory.createBorderLayout_S_Pane();
pane.add(initContentPane());
this.removeAll();
this.setLayout(FRGUIPaneFactory.createBorderLayout());
// 重新布局
JPanel northPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
northPane.setPreferredSize(new Dimension(100, 30));
this.add(northPane, BorderLayout.NORTH);
northPane.add(cancel);
northPane.add(nameLabel);
pane.setBorder(BorderFactory.createEmptyBorder(6, 50, 0, 300));
this.add(row(column(cell(nameLabel), flex()).weight(0.2),
row(cell(initContentPane()).weight(1), flex()).weight(0.8)).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent());
pane.add(initContentPane());
}
this.add(pane);
/**
* 添加删除按钮
*/
public void addCancel() {
this.add(column(fix(5), cell(cancel), flex()).getComponent(), BorderLayout.EAST);
}
}

10
designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartFloatColorConditionPane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.other.condition.item;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.design.condition.ConditionAttrSingleConditionPane;
import com.fr.design.condition.ConditionAttributesPane;
@ -8,6 +9,9 @@ import com.fr.design.style.color.ColorSelectBox;
import com.fr.plugin.chart.base.AttrFloatColor;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* 条件属性 悬浮颜色
*/
@ -26,10 +30,12 @@ public class VanChartFloatColorConditionPane extends ConditionAttrSingleConditio
UILabel nameLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Color"));
colorSelectionPane = new ColorSelectBox(80);
nameLabel.setVisible(false);
if (isRemove) {
this.add(nameLabel);
nameLabel.setVisible(true);
}
this.add(colorSelectionPane);
this.add(row(cell(nameLabel).weight(0.2), cell(colorSelectionPane).weight(0.8))
.with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent());
}
/**

4
designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLabelConditionPane.java

@ -30,10 +30,10 @@ public class VanChartLabelConditionPane extends AbstractNormalMultiLineCondition
double e = 220;
Component[][] components = new Component[][]{
new Component[]{null, dataLabelContentsPane}
new Component[]{dataLabelContentsPane}
};
return TableLayoutHelper.createTableLayoutPane(components, new double[]{p}, new double[]{f, e});
return TableLayoutHelper.createTableLayoutPane(components, new double[]{p}, new double[]{e});
}
protected VanChartPlotLabelPane createLabelPane() {

13
designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartSeriesColorConditionPane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.other.condition.item;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.background.ColorBackground;
import com.fr.chart.base.AttrBackground;
import com.fr.chart.base.DataSeriesCondition;
@ -8,6 +9,11 @@ import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.style.color.ColorSelectBox;
import java.awt.*;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* 条件属性 配色系列背景色
@ -27,11 +33,12 @@ public class VanChartSeriesColorConditionPane extends ConditionAttrSingleConditi
super(conditionAttributesPane, isRemove);
nameLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Match_Color"));
colorSelectionPane = new ColorSelectBox(80);
nameLabel.setVisible(false);
if (isRemove) {
this.add(nameLabel);
nameLabel.setVisible(true);
}
this.add(colorSelectionPane);
this.add(row(cell(nameLabel).weight(0.2), cell(colorSelectionPane).weight(0.8))
.with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent());
}

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

@ -62,14 +62,12 @@ public class BackPane extends ConditionAttrSingleConditionPane<HighlightAction>
this.backScopeComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.backgroundPreviewPane.setBackgroundObject(ColorBackground.getInstance(Color.WHITE));
this.setLayout(new BorderLayout());
this.add(row(10, cell(backgroundLabel).weight(0.2), row(
10,
cell(backgroundPreviewPane),
cell(editBackgroundButton),
cell(backScopeComboBox)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

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

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

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

@ -66,14 +66,12 @@ public class FontPane extends ConditionAttrSingleConditionPane<HighlightAction>
this.fontScopeComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.frFontPreviewPane.setFontObject(DesignUtils.getDefaultGUIFont());
this.setLayout(new BorderLayout());
this.add(row(10, cell(fontLabel).weight(0.2), row(
10,
cell(frFontPreviewPane),
cell(editFRFontButton),
cell(fontScopeComboBox)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

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

@ -39,13 +39,11 @@ public class ForeGroundPane extends ConditionAttrSingleConditionPane<HighlightAc
this.foreScopeComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.foregroundColorPane.setSelectObject(Color.black);
this.setLayout(new BorderLayout());
this.add(row(10, cell(foregroundLabel).weight(0.2), row(
10,
cell(foregroundColorPane),
cell(foreScopeComboBox)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

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

@ -68,14 +68,12 @@ public class HyperlinkPane extends ConditionAttrSingleConditionPane<HighlightAct
useHyperlink = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Use_Links"));
useHyperlink.addActionListener(l);
this.setLayout(new BorderLayout());
this.add(row(10, cell(hyperlinkLabel).weight(0.2), row(
10,
cell(typeField),
cell(hyperlinkButton),
cell(useHyperlink)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

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

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

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

@ -71,7 +71,6 @@ public class PaddingPane extends ConditionAttrSingleConditionPane<HighlightActio
refreshIndentationUnit();
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sytle_Indentation"));
this.setLayout(new BorderLayout());
this.add(row(10, column(5, cell(label).weight(0.5), flex(0.5)).weight(0.2)
.with(it -> it.setPreferredSize(new Dimension(-1, FineUIScale.scale(53)))), row(
10,
@ -79,7 +78,12 @@ public class PaddingPane extends ConditionAttrSingleConditionPane<HighlightActio
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)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent());
}
/**
* 添加删除按钮
*/
public void addCancel() {
this.add(column(5, cell(cancel).weight(0.5), flex(0.5)).getComponent(), BorderLayout.EAST);
}

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

@ -35,12 +35,10 @@ public class PagePane extends ConditionAttrSingleConditionPane<HighlightAction>
this.pageComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.pageComboBox.setSelectedIndex(0);
this.setLayout(new BorderLayout());
this.add(row(10, cell(pageLabel).weight(0.2), row(
10,
cell(pageComboBox)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

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

@ -92,13 +92,11 @@ public class PresentHighlightPane extends ConditionAttrSingleConditionPane<Highl
});
presentComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.setLayout(new BorderLayout());
this.add(row(10, cell(label).weight(0.2), row(
10,
cell(presentComboBox),
cell(type)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

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

@ -38,13 +38,11 @@ public abstract class WHPane extends ConditionAttrSingleConditionPane<HighlightA
this.spinner.setValue(new Integer(0));
this.locString = locString;
this.setLayout(new BorderLayout());
this.add(row(10, cell(label).weight(0.2), row(
10,
cell(spinner),
cell(unitLabel)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

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

@ -101,14 +101,12 @@ public class WidgetHighlightPane extends ConditionAttrSingleConditionPane<Highli
});
this.setLayout(new BorderLayout());
this.add(row(10, cell(widgetLabel).weight(0.2), row(
10,
cell(box),
cell(widgetButton),
cell(useWidget)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(cancel, BorderLayout.EAST);
}
@Override

Loading…
Cancel
Save