Browse Source

Pull request #14608: REPORT-130807 & REPORT-130703【NewUI】测试验收问题修复

Merge in DESIGN/design from ~LEVY.XIE/design:newui to newui

* commit 'c691437de14975a39d50a8f1d05aff32616571fa':
  REPORT-113994 【NewUI】视觉&测试验收问题修复
newui
Levy.Xie-解安森 4 months ago
parent
commit
4d46f5b990
  1. 2
      designer-base/src/main/java/com/fr/design/dialog/BasicPane.java
  2. 18
      designer-base/src/main/java/com/fr/design/gui/itree/filetree/JFileTree.java
  3. 51
      designer-base/src/main/java/com/fr/env/LocalEnvPane.java
  4. 2
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java
  5. 41
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java
  6. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHeatValueColorPane.java
  7. 14
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartValueColorPane.java
  8. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/radar/VanChartYAxisScrollPaneWithRadar.java
  9. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  10. 22
      designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartMultiColorSeriesPane.java
  11. 36
      designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java
  12. 117
      designer-chart/src/main/java/com/fr/van/chart/map/VanChartMapSeriesPane.java
  13. 15
      designer-chart/src/main/java/com/fr/van/chart/range/component/GradualLegendPane.java
  14. 17
      designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterSeriesPane.java
  15. 48
      designer-realize/src/main/java/com/fr/design/sort/expressionpane/CustomSequenceEditPane.java
  16. 2
      designer-realize/src/main/java/com/fr/design/sort/expressionpane/CustomSequencePane.java

2
designer-base/src/main/java/com/fr/design/dialog/BasicPane.java

@ -153,7 +153,7 @@ public abstract class BasicPane extends JPanel {
* 以自定义的宽高显示窗口
* @param window 窗口
* @param l 对话框监听器
* @param dimension 自定义尺寸
* @param dimension 自定义尺寸已适配缩放
* @return 对话框
*/
public BasicDialog showWindowWithCustomSize(Window window, DialogActionListener l, Dimension dimension) {

18
designer-base/src/main/java/com/fr/design/gui/itree/filetree/JFileTree.java

@ -1,8 +1,8 @@
package com.fr.design.gui.itree.filetree;
import com.fine.theme.icon.LazyIcon;
import com.fr.design.i18n.Toolkit;
import com.fr.general.ComparatorUtils;
import com.fr.general.IOUtils;
import com.fr.stable.ArrayUtils;
import com.fr.stable.project.ProjectConstants;
import org.jetbrains.annotations.Nullable;
@ -256,11 +256,7 @@ public class JFileTree extends AbstractFileTree {
FileSystemView view = FileSystemView.getFileSystemView();
// File的全部路径.
// 得到本地tree图标
Icon tmpIcon = view.getSystemIcon(currentFile);
if (currentFile.isDirectory() && fBuf.length() > 0) {
tmpIcon = IOUtils.readIcon("/com/fr/design/images/gui/folder.png");
}
this.setIcon(tmpIcon);
this.setIcon(getIcon(expanded, fBuf, currentFile, view, leaf));
this.setName(null);
Font oldFont = this.getFont();
if (ComparatorUtils.equals(currentFile.getName(), ProjectConstants.WEBINF_NAME)) {
@ -280,9 +276,19 @@ public class JFileTree extends AbstractFileTree {
treeNode = (DefaultMutableTreeNode) treeNode.getParent();
}
return this;
}
private Icon getIcon(boolean expanded, StringBuilder fBuf, File currentFile, FileSystemView view, boolean leaf) {
boolean folderFile = !leaf || (currentFile.isDirectory() && fBuf.length() > 0);
if (folderFile) {
return expanded ? new LazyIcon("folder_open") : new LazyIcon("folder");
}
return view.getSystemIcon(currentFile);
}
};
/**
* 对文件夹进行排序 先文件夹 然后各种类型文件
*

51
designer-base/src/main/java/com/fr/env/LocalEnvPane.java vendored

@ -1,23 +1,27 @@
package com.fr.env;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIStyle;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.env.LocalDesignerWorkspaceInfo;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itree.filetree.JFileTree;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.file.filter.OnlyShowDirectoryFileFilter;
import com.fr.stable.StringUtils;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import java.awt.BorderLayout;
import java.io.File;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* @author yaohwu
*/
@ -27,46 +31,37 @@ public class LocalEnvPane extends BasicBeanPane<LocalDesignerWorkspaceInfo> {
private JFileTree localEnvTree;
public LocalEnvPane() {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
// northPane
JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(northPane, BorderLayout.NORTH);
this.setLayout(new BorderLayout());
northPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Location") + ":"), BorderLayout.WEST);
pathTextField = new UITextField();
northPane.add(pathTextField, BorderLayout.CENTER);
// 删除选择文件按钮 添加JFileTree
// centerPane
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(centerPane, BorderLayout.CENTER);
// 添加JFileTree
localEnvTree = new JFileTree();
FineUIStyle.setStyle(localEnvTree, FineUIStyle.PURE_TREE);
JScrollPane localEnvPane = new JScrollPane(localEnvTree);
centerPane.add(localEnvPane, BorderLayout.CENTER);
JPanel centerPane = FineLayoutBuilder.asBorderLayoutWrapped(localEnvPane);
// 设置根路径File 和 文件过滤类型
localEnvTree.setFileFilter(new OnlyShowDirectoryFileFilter());
localEnvTree.setRootFiles(File.listRoots());
localEnvTree.addTreeSelectionListener(new TreeSelectionListener() {
@Override
public void valueChanged(TreeSelectionEvent e) {
File selectFile = localEnvTree.getSelectedFile();
if (selectFile == null) {
return;
}
pathTextField.setText(selectFile.getPath());
localEnvTree.addTreeSelectionListener(e -> {
File selectFile = localEnvTree.getSelectedFile();
if (selectFile == null) {
return;
}
pathTextField.setText(selectFile.getPath());
});
UITextArea description = new UITextArea();
centerPane.add(description, BorderLayout.SOUTH);
description.setText(Toolkit.i18nText("Fine-Design_Basic_Env_Des1"));
description.setEditable(false);
this.add(column(10,
row(5,
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Location") + ":")), cell(pathTextField).weight(1)
),
cell(centerPane).with(it -> it.setBorder(FineBorderFactory.createWrappedRoundBorder())).weight(1),
cell(description).with(it -> it.setBorder(null))
).getComponent());
}
@Override

2
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java

@ -388,7 +388,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
preDataNumPane = column(10,
row(cell(label).weight(1.2), cell(preDataNum).weight(3)),
cell(combineOther)
).getComponent();
).with(it -> it.setBorder(new ScaledEmptyBorder(0, 10, 0, 0))).getComponent();
preDataNumPane.setVisible(false);
notShowNull = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Data_Not_Show_Series"));

41
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.chart.gui.style.series;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.BaseFormula;
import com.fr.chart.base.AreaColor;
import com.fr.chart.base.ChartBaseUtils;
@ -15,7 +16,6 @@ import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ipoppane.PopupHider;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.ColorControlWindow;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
@ -44,17 +44,20 @@ import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.List;
import static com.fine.theme.utils.FineUIScale.scale;
public class UIColorPickerPane extends BasicPane implements UIObserver {
private static final int MARGIN_TOP = 7;
private static final int MARGIN_LEFT = 5;
private static final int COLORGROUP_MARGIN_LEFT = 20;
private static final int OFF_HEIGHT = 6;
private static final int COLOR_REC_HEIGHT = 40;
private static final int COLOR_REC_WIDTH = 30;
protected static final int TEXTFIELD_HEIGHT = 20;
protected static final int TEXTFIELD_WIDTH = 130;
protected static final int UPCONTROLPANE_WIDTH = 230;
private static final int MARGIN_TOP = scale(7);
private static final int MARGIN_LEFT = scale(5);
private static final int COLORGROUP_MARGIN_LEFT = scale(20);
private static final int OFF_HEIGHT = scale(6);
private static final int COLOR_REC_HEIGHT = scale(40);
private static final int COLOR_REC_WIDTH = scale(30);
protected static final int TEXTFIELD_HEIGHT = scale(20);
protected static final int TEXTFIELD_WIDTH = scale(130);
protected static final int UPCONTROLPANE_WIDTH = scale(230);
private static final int LAYOUR_DET = 6;
public static final double VALUE = 100;
protected ArrayList<JComponent> textFieldList;
@ -128,11 +131,7 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
}
protected JPanel getUpControlPane (Component[][] components) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
return TableLayoutHelper.createTableLayoutPane(components, getRowSIze (), columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
@ -202,19 +201,15 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
}
};
double p = TableLayout.PREFERRED;
double e = getEditAreaWidth();
double d = getDescriptionWidth();
double[] columnSize = {d, e};
double[] rowSize = {p};
Component[][] tmpComp = new Component[][]{new Component[]{new BoldFontTextLabel(Toolkit.i18nText("Fine-Design_Chart_Value_Divided_Stage")), regionNumPane}};
Component[][] tmpComp = new Component[][]{new Component[]{
new BoldFontTextLabel(Toolkit.i18nText("Fine-Design_Chart_Value_Divided_Stage")), regionNumPane}};
stagePanel = TableLayout4VanChartHelper.createGapTableLayoutPane(tmpComp, rowSize, columnSize);
stagePanel = FineLayoutBuilder.compatibleTableLayout(0, tmpComp, new double[]{1.2, 3});
Component[][] components = new Component[][]{
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Value_Tick_And_Color")), designTypeButtonGroup},
};
upControlPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
upControlPane = FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1.2, 3});
this.textGroup = new TextFieldGroupPane();
this.colorGroup = new ColorGroupPane();

3
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHeatValueColorPane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.component;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.ilable.BoldFontTextLabel;
@ -50,7 +51,7 @@ public class VanChartHeatValueColorPane extends VanChartValueColorPane {
@Override
protected MapColorPickerPaneWithFormula createSectionIntervalConfigPane(AbstractAttrNoScrollPane parent) {
return new SectionIntervalConfigPaneWithOutNum(parent) {
private static final int WIDTH = 227;
private final int WIDTH = FineUIScale.scale(227);
@Override
protected int getBoundX() {

14
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartValueColorPane.java

@ -1,21 +1,18 @@
package com.fr.van.chart.designer.component;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.plugin.chart.range.VanChartRangeLegend;
import com.fr.plugin.chart.type.LegendType;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.range.component.GradualLegendPane;
import com.fr.van.chart.range.component.SectionLegendPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
@ -65,8 +62,7 @@ public class VanChartValueColorPane extends BasicPane {
Component[][] labelComponent = new Component[][]{
new Component[]{label, valueColorTypeButton},
};
JPanel legendTypeButtonWithTilePane = TableLayout4VanChartHelper.createGapTableLayoutPane(labelComponent);
legendTypeButtonWithTilePane.setBorder(BorderFactory.createEmptyBorder(10,0,0,0));
JPanel legendTypeButtonWithTilePane = FineLayoutBuilder.compatibleTableLayout(0, labelComponent, new double[]{1.2, 3});
//渐变色图例面板
gradualLegendPane = createGradualLegendPane();
//区域段图例面板
@ -86,15 +82,11 @@ public class VanChartValueColorPane extends BasicPane {
rangeLegendPane.add(gradualLegendPane, LegendType.GRADUAL.getStringType());
rangeLegendPane.add(sectionLegendPane, LegendType.SECTION.getStringType());
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] col = {f};
double[] row = {p, p};
Component[][] components = new Component[][]{
new Component[]{legendTypeButtonWithTilePane},
new Component[]{rangeLegendPane}
};
JPanel tableLayoutPane = TableLayoutHelper.createTableLayoutPane(components, row, col);
JPanel tableLayoutPane = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1});
this.setLayout(new BorderLayout());
this.add(tableLayoutPane, BorderLayout.CENTER);

2
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/radar/VanChartYAxisScrollPaneWithRadar.java

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.style.axis.radar;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.van.chart.designer.style.axis.VanChartAxisScrollPaneWithOutTypeSelect;
/**
@ -10,5 +11,6 @@ public class VanChartYAxisScrollPaneWithRadar extends VanChartAxisScrollPaneWith
protected void initAxisPane() {
axisPane = new VanChartRadarYAxisPane();
axisPane.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
}
}

5
designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java

@ -32,7 +32,6 @@ import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.base.VanChartAttrTrendLine;
import com.fr.plugin.chart.type.GradientType;
import com.fr.van.chart.custom.style.VanChartCustomStylePane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartAreaSeriesFillColorPane;
import com.fr.van.chart.designer.component.VanChartBeautyPane;
import com.fr.van.chart.designer.component.VanChartFillStylePane;
@ -153,7 +152,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//趋势线
protected JPanel createTrendLinePane() {
trendLinePane = new VanChartTrendLinePane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_TrendLine"), trendLinePane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_TrendLine"), trendLinePane, true);
}
//线
@ -169,7 +168,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//标记点类型
protected JPanel createMarkerPane() {
markerPane = new VanChartMarkerPane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Marker"), markerPane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Marker"), markerPane, true);
}
//填充颜色

22
designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartMultiColorSeriesPane.java

@ -1,16 +1,15 @@
package com.fr.van.chart.designer.style.series;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.chart.chartattr.Plot;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
@ -38,7 +37,7 @@ public abstract class VanChartMultiColorSeriesPane extends VanChartAbstractPlotS
//获取颜色面板
protected JPanel getColorPane() {
JPanel panel = new JPanel(new BorderLayout());
JPanel panel = new JPanel(new BorderLayout(0, FineUIScale.scale(10)));
JPanel colorChoosePane = createColorChoosePane();
if (colorChoosePane != null) {
panel.add(colorChoosePane, BorderLayout.CENTER);
@ -46,8 +45,7 @@ public abstract class VanChartMultiColorSeriesPane extends VanChartAbstractPlotS
stylePane = createStylePane();
setColorPaneContent(panel);
JPanel colorPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Color"), panel);
panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 0));
JPanel colorPane = new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Color"), panel, true);
return panel.getComponentCount() == 0 ? null : colorPane;
}
@ -55,15 +53,11 @@ public abstract class VanChartMultiColorSeriesPane extends VanChartAbstractPlotS
JPanel divideButtonPane = initDivideButtonPane();
colorDividePane = createColorDividePane();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] col = {f};
double[] row = {p, p, p, p};
Component[][] components = new Component[][]{
new Component[]{divideButtonPane},
new Component[]{colorDividePane}
};
return TableLayoutHelper.createCommonTableLayoutPane(components, row, col, 0);
return FineLayoutBuilder.compatibleTableLayout(10, components,new double[1]);
}
private JPanel initDivideButtonPane() {
@ -74,9 +68,7 @@ public abstract class VanChartMultiColorSeriesPane extends VanChartAbstractPlotS
Component[][] labelComponent = new Component[][]{
new Component[]{label, colorDivideButton},
};
JPanel gapTableLayoutPane = TableLayout4VanChartHelper.createGapTableLayoutPane(labelComponent);
gapTableLayoutPane.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
return gapTableLayoutPane;
return FineLayoutBuilder.compatibleTableLayout(10, labelComponent, new double[]{1.2, 3});
}
protected abstract UIButtonGroup<String> createDivideButton();

36
designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java

@ -1,9 +1,12 @@
package com.fr.van.chart.gauge;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.chart.base.AttrFillStyle;
import com.fr.chart.base.GradientStyle;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.frpane.UINumberDragPaneWithPercent;
import com.fr.design.gui.ibutton.UIButtonGroup;
@ -11,8 +14,6 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.ispinner.chart.UISpinnerWithPx;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.style.series.ColorPickerPaneWithMaxMin;
import com.fr.design.mainframe.chart.gui.style.series.UIColorPickerPane;
@ -75,18 +76,13 @@ public class VanChartGaugeSeriesPane extends VanChartMultiColorSeriesPane {
}
protected JPanel getContentInPlotType() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f};
double[] rowSize = {p, p, p, p, p, p, p, p, p, p};
Component[][] components = new Component[][]{
new Component[]{createGaugeLayoutPane()},
new Component[]{createGaugeStylePane(rowSize, new double[]{f, e})},
new Component[]{createGaugeStylePane()},
new Component[]{createGaugeBandsPane()}
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1});
}
protected JPanel createColorChoosePane() {
@ -183,7 +179,7 @@ public class VanChartGaugeSeriesPane extends VanChartMultiColorSeriesPane {
changeLabelPosition();
}
});
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Layout"), panel);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Layout"), panel, true);
}
private void changeLabelPosition() {
@ -213,15 +209,16 @@ public class VanChartGaugeSeriesPane extends VanChartMultiColorSeriesPane {
}
}
private JPanel createGaugeStylePane(double[] row, double[] col) {
JPanel panel = new JPanel(new BorderLayout(0, 6));
JPanel centerPanel = TableLayoutHelper.createTableLayoutPane(getDiffComponentsWithGaugeStyle(), row, col);
private JPanel createGaugeStylePane() {
JPanel panel = new JPanel(new BorderLayout(0, FineUIScale.scale(10)));
JPanel centerPanel = FineLayoutBuilder.compatibleTableLayout(10, getDiffComponentsWithGaugeStyle(), new double[]{1.2, 3});
panel.add(centerPanel, BorderLayout.CENTER);
if (rotate != null) {
JPanel panel1 = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Rotation_Direction"), rotate);
JPanel panel1 = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Rotation_Direction")), rotate);
panel.add(panel1, BorderLayout.NORTH);
}
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Widget_Style"), panel);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Widget_Style"), panel, true);
}
private Component[][] getDiffComponentsWithGaugeStyle() {
@ -230,7 +227,6 @@ public class VanChartGaugeSeriesPane extends VanChartMultiColorSeriesPane {
case RING:
initRotate();
return new Component[][]{
new Component[]{null, null},
getPaneBackgroundColorAuto(),
new Component[]{null, paneBackgroundColor},
getInnerPaneBackgroundColor(),
@ -239,7 +235,6 @@ public class VanChartGaugeSeriesPane extends VanChartMultiColorSeriesPane {
};
case SLOT:
return new Component[][]{
new Component[]{null, null},
getNeedleColor(),
getSlotBackgroundColorAuto(),
new Component[]{null, slotBackgroundColor},
@ -248,7 +243,6 @@ public class VanChartGaugeSeriesPane extends VanChartMultiColorSeriesPane {
};
case THERMOMETER:
return new Component[][]{
new Component[]{null, null},
getNeedleColor(),
getSlotBackgroundColorAuto(),
new Component[]{null, slotBackgroundColor},
@ -257,7 +251,6 @@ public class VanChartGaugeSeriesPane extends VanChartMultiColorSeriesPane {
};
default:
return new Component[][]{
new Component[]{null, null},
getHingeColorAuto(),
new Component[]{null, hingeColor},
getHingeBackgroundColor(),
@ -354,24 +347,21 @@ public class VanChartGaugeSeriesPane extends VanChartMultiColorSeriesPane {
GaugeStyle gaugeStyle = getGaugeStyle();
if (gaugeStyle == GaugeStyle.POINTER || gaugeStyle == GaugeStyle.POINTER_SEMI) {
colorPickerPane = new ColorPickerPaneWithMaxMin(parentPane, "meterString");
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Range"), colorPickerPane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Range"), colorPickerPane);
}
return null;
}
private void checkHingeColorAutoButton() {
hingeColor.setVisible(hingeColorAuto.getSelectedIndex() == 1);
hingeColor.setPreferredSize(hingeColorAuto.getSelectedIndex() == 1 ? new Dimension(0, 20) : new Dimension(0, 0));
}
private void checkSlotBackgroundColorAutoButton() {
slotBackgroundColor.setVisible(slotBackgroundColorAuto.getSelectedIndex() == 1);
slotBackgroundColor.setPreferredSize(slotBackgroundColorAuto.getSelectedIndex() == 1 ? new Dimension(0, 20) : new Dimension(0, 0));
}
private void checkPaneBackgroundColorAutoButton() {
paneBackgroundColor.setVisible(paneBackgroundColorAuto.getSelectedIndex() == 1);
paneBackgroundColor.setPreferredSize(paneBackgroundColorAuto.getSelectedIndex() == 1 ? new Dimension(0, 20) : new Dimension(0, 0));
}
public void populateBean(Plot plot) {

117
designer-chart/src/main/java/com/fr/van/chart/map/VanChartMapSeriesPane.java

@ -1,17 +1,16 @@
package com.fr.van.chart.map;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.chart.chartdata.model.DataProcessor;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.frpane.UINumberDragPaneWithPercent;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
@ -45,7 +44,6 @@ import com.fr.van.chart.map.designer.style.series.VanChartMapScatterMarkerPane;
import com.fr.van.chart.map.line.VanChartCurvePane;
import com.fr.van.chart.map.line.VanChartLineMapEffectPane;
import javax.swing.BorderFactory;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
@ -57,8 +55,10 @@ import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created by Mitisky on 16/5/4.
@ -165,7 +165,8 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
checkLineMapLarge();
}
});
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Large_Model"), lineMapLargeDataModelGroup);
JPanel panel = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Large_Model")), lineMapLargeDataModelGroup);
return createLargeDataModelPane(panel);
}
@ -264,7 +265,6 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
mapType = ((VanChartMapPlot) plot).getAllLayersMapType();
if (mapType == MapType.CUSTOM || mapType == MapType.DRILL_CUSTOM) {
JPanel pane = createColorChoosePane();
pane.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
panel.add(pane, BorderLayout.NORTH);
}
panel.add(getContentInPlotType(), BorderLayout.CENTER);
@ -283,8 +283,7 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
}
}
setColorPaneContent(panel, paneType);
JPanel colorPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Color"), panel);
panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 0));
JPanel colorPane = new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Color"), panel, true);
return panel.getComponentCount() == 0 ? null : colorPane;
}
@ -323,33 +322,22 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
//不透明度
protected JPanel createAlphaPane() {
setTransparent(new UINumberDragPaneWithPercent(0, 100));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, TableLayout4VanChartHelper.EDIT_AREA_WIDTH};
double[] rowSize = {p, p};
UILabel label = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Report_Alpha"));
label.setVerticalAlignment(SwingConstants.TOP);
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{label, UIComponentUtils.wrapWithBorderLayoutPane(getTransparent())},
};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, TableLayout4VanChartHelper.COMPONENT_INTERVAL, LayoutConstants.VGAP_LARGE);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
protected JPanel createAreaPane() {
borderWithAlphaPane = new VanChartBorderWithAlphaPane(true);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p, p, p, p, p};
double[] col = {f};
Component[][] components = new Component[][]{
new Component[]{getColorPane(MapType.AREA)},
new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Border"), borderWithAlphaPane)},
new Component[]{new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Border"), borderWithAlphaPane)},
};
return TableLayoutHelper.createTableLayoutPane(components, row, col);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1});
}
protected JPanel createNullValueColorPane() {
@ -358,19 +346,12 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
initNullValueListener();
nullValueColorBox = new ColorSelectBox(80);
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p};
UILabel text = new UILabel(Toolkit.i18nText("Fine-Design_Chart_NULL_Value_Color"), SwingConstants.LEFT);
Component[][] components = {
new Component[]{null, null},
new Component[]{text, nullValueAuto},
new Component[]{null, nullValueColorBox},
};
return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
@ -385,16 +366,10 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
private void checkNullValueButton() {
nullValueColorBox.setVisible(nullValueAuto.getSelectedIndex() == 1);
nullValueColorBox.setPreferredSize(nullValueAuto.getSelectedIndex() == 1 ? new Dimension(0, 20) : new Dimension(0, 0));
}
private JPanel createPointPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p, p, p, p, p, p, p};
double[] col = {f};
Component[][] components = new Component[][]{
new Component[]{getColorPane(MapType.POINT)},
new Component[]{createMarkerComPane()},
@ -403,15 +378,10 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
new Component[]{createPointEffectPane()},
};
return TableLayoutHelper.createTableLayoutPane(components, row, col);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1});
}
private JPanel createLinePane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p, p, p, p, p};
double[] col = {f};
curvePane = new VanChartCurvePane();
Component[][] components = new Component[][]{
@ -422,28 +392,29 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
new Component[]{createAnimationPane()}
};
return TableLayoutHelper.createTableLayoutPane(components, row, col);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1});
}
private Component createCurvePane() {
curvePane = new VanChartCurvePane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Curve"), curvePane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Curve"), curvePane, true);
}
private Component createAnimationPane() {
lineMapEffectPane = new VanChartLineMapEffectPane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Animation"), lineMapEffectPane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Animation"), lineMapEffectPane, true);
}
//不透明度
private JPanel createPointAlphaPane() {
pointAlphaPane = new UINumberDragPaneWithPercent(0, 100);
return TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Report_Alpha"), pointAlphaPane);
return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Report_Alpha")), pointAlphaPane);
}
private JPanel createPointEffectPane() {
pointEffectPane = new VanChartEffectPane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Animation"), pointEffectPane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Animation"), pointEffectPane, true);
}
private JPanel createMarkerComPane() {
@ -454,15 +425,7 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
commonMarkerPane.setBorder(TableLayout4VanChartHelper.SECOND_EDIT_AREA_BORDER);
bubblePane = new VanChartBubblePane() {
protected JPanel getContentPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] row = {p, p, p, p, p};
double[] col = {f, e};
JPanel panel = TableLayoutHelper.createTableLayoutPane(getComponent(), row, col);
panel.setBorder(TableLayout4VanChartHelper.SECOND_EDIT_AREA_BORDER);
return panel;
return FineLayoutBuilder.compatibleTableLayout(10, getComponent(), new double[]{1.2, 3});
}
};
imageMarkerPane = new VanChartImageMarkerPane();
@ -483,19 +446,19 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
markerContentPane.add(panes[i], COMPATIBLE_MARKER_TYPES[i]);
}
markerTypeCom.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
markerTypeLayout.show(markerContentPane, (String) markerTypeCom.getSelectedItem());
checkPointEffectPane(plot);
}
markerTypeCom.addItemListener(e -> {
markerTypeLayout.show(markerContentPane, (String) markerTypeCom.getSelectedItem());
checkPointEffectPane(plot);
});
JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Point_Style"), markerTypeCom);
JPanel markerPane = new JPanel(new BorderLayout(0, 6));
markerPane.add(northPane, BorderLayout.NORTH);
markerPane.add(markerContentPane, BorderLayout.CENTER);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Marker"), markerPane);
JPanel markerPane = column(10,
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Point_Style"))).weight(1.2),
cell(markerTypeCom).weight(3)
),
cell(markerContentPane)
).getComponent();
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Marker"), markerPane, true);
}
private JPanel createCustomPane(Plot plot) {
@ -503,9 +466,7 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
JPanel pointPane = createPointPane();
JPanel linePane = createLinePane();
JPanel panel = createGroupPane(plot, areaPane, pointPane, linePane);
return panel;
return createGroupPane(plot, areaPane, pointPane, linePane);
}
private JPanel createGroupPane(Plot plot, JPanel areaPane, JPanel pointPane, JPanel linePane) {
@ -515,7 +476,6 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
} else {
panel = createMapCustomGroupPane(areaPane, pointPane, linePane);
}
panel.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
return panel;
}
@ -542,10 +502,7 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
}
});
JPanel panel = new JPanel(new BorderLayout(0, 4));
panel.add(areaPointAndLineGroup, BorderLayout.NORTH);
panel.add(centerPane, BorderLayout.CENTER);
return panel;
return column(10,cell(areaPointAndLineGroup), cell(centerPane)).getComponent();
}
private JPanel createDrillMapCustomGroupPane(JPanel areaPane, JPanel pointPane) {
@ -567,11 +524,7 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane {
}
}
});
JPanel panel = new JPanel(new BorderLayout(0, 4));
panel.add(areaAndPointGroup, BorderLayout.NORTH);
panel.add(centerPane, BorderLayout.CENTER);
return panel;
return column(10,cell(areaAndPointGroup), cell(centerPane)).getComponent();
}
public void populateBean(Plot plot) {

15
designer-chart/src/main/java/com/fr/van/chart/range/component/GradualLegendPane.java

@ -1,12 +1,9 @@
package com.fr.van.chart.range.component;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.plugin.chart.range.GradualLegend;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
public class GradualLegendPane extends JPanel {
private static final long serialVersionUID = 1614283200308877353L;
@ -20,18 +17,8 @@ public class GradualLegendPane extends JPanel {
private void initComponents() {
intervalConfigPane = createGradualIntervalConfigPane();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] col = {f};
double[] row = {p};
Component[][] components = new Component[][]{
new Component[]{intervalConfigPane},
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);
this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER);
this.add(intervalConfigPane, BorderLayout.CENTER);
}
protected GradualIntervalConfigPane createGradualIntervalConfigPane() {

17
designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterSeriesPane.java

@ -1,15 +1,14 @@
package com.fr.van.chart.scatter;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.Marker;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.plugin.chart.marker.type.MarkerType;
import com.fr.van.chart.custom.component.VanChartCustomAxisConditionPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartLineTypePane;
import com.fr.van.chart.designer.component.VanChartMarkerPane;
import com.fr.van.chart.designer.component.marker.VanChartCommonMarkerPane;
@ -33,12 +32,6 @@ public class VanChartScatterSeriesPane extends VanChartColorValueSeriesPane {
protected JPanel getContentInPlotType() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p, p, p, p, p, p, p, p, p, p};
double[] col = {f};
Component[][] components = new Component[][]{
new Component[]{createLineTypePane()},
new Component[]{createMarkerPane()},
@ -48,7 +41,7 @@ public class VanChartScatterSeriesPane extends VanChartColorValueSeriesPane {
new Component[]{createTrendLinePane()},
};
contentPane = TableLayoutHelper.createTableLayoutPane(components, row, col);
contentPane = FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1});
return contentPane;
}
@ -71,7 +64,7 @@ public class VanChartScatterSeriesPane extends VanChartColorValueSeriesPane {
return Toolkit.i18nText("Fine-Design_Chart_Custom_Axis");
}
};
stackAndAxisEditExpandablePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(stackAndAxisEditPane.getPaneTitle(), stackAndAxisEditPane);
stackAndAxisEditExpandablePane = new UIExpandablePane(stackAndAxisEditPane.getPaneTitle(), stackAndAxisEditPane, true);
return stackAndAxisEditExpandablePane;
}
@ -99,6 +92,6 @@ public class VanChartScatterSeriesPane extends VanChartColorValueSeriesPane {
}
};
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Marker"), markerPane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Marker"), markerPane, true);
}
}

48
designer-realize/src/main/java/com/fr/design/sort/expressionpane/CustomSequenceEditPane.java

@ -1,5 +1,10 @@
package com.fr.design.sort.expressionpane;
import com.fine.swing.ui.layout.Column;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
@ -28,11 +33,13 @@ import java.awt.dnd.DropTargetDropEvent;
import java.util.ArrayList;
import java.util.List;
import static com.fine.theme.utils.FineUIScale.scale;
public class CustomSequenceEditPane extends BasicPane {
java.util.List<String> customSequence;
JSplitPane jSplitPane;
JPanel referenceSequencePanel;
JPanel editSequencePanel;
Column referenceSequencePanel;
Column editSequencePanel;
JTextArea jTextArea;
CustomSequenceEditPane(java.util.List<String> customSequence) {
@ -60,21 +67,21 @@ public class CustomSequenceEditPane extends BasicPane {
}
void initReferenceSequencePanel() {
referenceSequencePanel = new JPanel();
referenceSequencePanel.setLayout(new BoxLayout(referenceSequencePanel, BoxLayout.Y_AXIS));
JPanel titlePane = new JPanel(new FlowLayout(FlowLayout.LEFT));
UILabel uiLabel = new UILabel(Toolkit.i18nText("Fine-Design_Sort_Reference_Sequence"));
titlePane.add(uiLabel);
referenceSequencePanel.add(titlePane);
referenceSequencePanel = new Column();
UILabel titleLabel = new UILabel(Toolkit.i18nText("Fine-Design_Sort_Reference_Sequence"));
UIScrollPane uiScrollPane = new UIScrollPane(getReferenceSequenceList());
uiScrollPane.setPreferredSize(new Dimension(200, 300));
uiScrollPane.setPreferredSize(scale(new Dimension(200, 320)));
uiScrollPane.setBorder(FineBorderFactory.createWrappedRoundBorder());
referenceSequencePanel.add(titleLabel);
referenceSequencePanel.add(uiScrollPane);
referenceSequencePanel.setSize(new Dimension(200, 400));
referenceSequencePanel.setSize(scale(new Dimension(200, 400)));
}
private UIList getReferenceSequenceList() {
UIList uiList = new UIList(getReferenceSequenceModel());
new CustomSequenceEditDragSource(uiList, DnDConstants.ACTION_MOVE);
FineUIStyle.setStyle(uiList, FineUIStyle.PURE_LIST);
return uiList;
}
@ -88,20 +95,19 @@ public class CustomSequenceEditPane extends BasicPane {
}
void initEditSequencePanel() {
editSequencePanel = new JPanel();
editSequencePanel.setLayout(new BoxLayout(editSequencePanel, BoxLayout.Y_AXIS));
JPanel titlePane = new JPanel(new FlowLayout(FlowLayout.LEFT));
UILabel uiLabel = new UILabel(Toolkit.i18nText("Fine-Design_Sort_Input_Sequence"));
titlePane.add(uiLabel);
UILabel uiLabel2 = new UILabel(Toolkit.i18nText("Fine-Design_Sort_Please_Interlace_Sequence_Elements"));
uiLabel2.setForeground(Color.lightGray);
titlePane.add(uiLabel2);
editSequencePanel.add(titlePane);
editSequencePanel = new Column();
UILabel inputLabel = new UILabel(Toolkit.i18nText("Fine-Design_Sort_Input_Sequence"));
UILabel hintLabel = new UILabel(Toolkit.i18nText("Fine-Design_Sort_Please_Interlace_Sequence_Elements"));
FineUIStyle.setStyle(hintLabel, FineUIStyle.LABEL_TIP);
JPanel titlePane = FineLayoutBuilder.createHorizontalLayout(5, inputLabel, hintLabel);
jTextArea = getTextArea();
UIScrollPane uiScrollPane = new UIScrollPane(jTextArea);
uiScrollPane.setPreferredSize(new Dimension(475, 300));
uiScrollPane.setPreferredSize(scale(new Dimension(475, 320)));
editSequencePanel.add(titlePane);
editSequencePanel.add(uiScrollPane);
editSequencePanel.setSize(new Dimension(475, 300));
editSequencePanel.setSize(scale(new Dimension(475, 320)));
}

2
designer-realize/src/main/java/com/fr/design/sort/expressionpane/CustomSequencePane.java

@ -49,7 +49,7 @@ public class CustomSequencePane extends JPanel {
triggerOk(CustomSequenceSortExpression.customSequenceToString(customSequence, ","),
CustomSequenceSortExpression.isReferenceCustomSequence(customSequence));
}
}, FineUIScale.scale(new Dimension(700, 400))).setVisible(true);
}, new Dimension(700, 420)).setVisible(true);
}
};
button.addMouseListener(mouseAdapter);

Loading…
Cancel
Save