Browse Source

Merge pull request #15198 in DESIGN/design from fbp/release to fbp/feature

* commit 'b51999f0c40237f52337c8dc71c481e5e69b5192':
  无JIRA任务 改了前端bug,更新一波js
  REPORT-138445 fix: 优化文本域UI问题
  REPORT-138445 fix: 优化文本域UI问题
fbp/feature
superman 4 weeks ago
parent
commit
01373acf90
  1. 18
      designer-base/src/main/java/com/fine/theme/utils/FineComponentsFactory.java
  2. 2
      designer-base/src/main/resources/com/fr/design/data/tabledata/datacenter/web/data-choose.main.css
  3. 139
      designer-base/src/main/resources/com/fr/design/data/tabledata/datacenter/web/data-choose.main.js
  4. 9
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/TileLayerPane.java
  5. 9
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java

18
designer-base/src/main/java/com/fine/theme/utils/FineComponentsFactory.java

@ -3,9 +3,11 @@ package com.fine.theme.utils;
import com.fine.theme.icon.LazyIcon;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.data.core.FormatField;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.border.UIRoundedBorder;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.i18n.Toolkit;
import com.fr.stable.Constants;
@ -13,10 +15,12 @@ import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.border.Border;
import javax.swing.border.TitledBorder;
import java.awt.Color;
import java.awt.Dimension;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
@ -92,4 +96,18 @@ public class FineComponentsFactory {
return sampleLabel;
}
/**
* 创建一个固定高度可上下滚动的文本域面板
* @param textArea 文本域
* @param height 高度
* @return 滚动面板
*/
public static JScrollPane createFixHeightTextArea(UITextArea textArea, int height) {
JScrollPane scrollPane = new JScrollPane(textArea);
scrollPane.setPreferredSize(new Dimension(scrollPane.getPreferredSize().width, height));
scrollPane.setBorder(FineBorderFactory.createWrappedRoundBorder());
textArea.setBorder(null);
return scrollPane;
}
}

2
designer-base/src/main/resources/com/fr/design/data/tabledata/datacenter/web/data-choose.main.css

File diff suppressed because one or more lines are too long

139
designer-base/src/main/resources/com/fr/design/data/tabledata/datacenter/web/data-choose.main.js

File diff suppressed because one or more lines are too long

9
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/TileLayerPane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.map.designer.type;
import com.fine.theme.utils.FineComponentsFactory;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextarea.UITextArea;
@ -9,6 +10,8 @@ import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* @author Bjorn
* @version 10.0
@ -24,8 +27,10 @@ public class TileLayerPane extends JPanel {
customTileLayer = new UITextArea();
attribution = new UITextArea();
Component[][] comps = new Component[][]{
new Component[]{new UILabel("url"), customTileLayer},
new Component[]{new UILabel("Attribution"), attribution}
new Component[]{new UILabel("url"),
FineComponentsFactory.createFixHeightTextArea(customTileLayer, scale(36))},
new Component[]{new UILabel("Attribution"),
FineComponentsFactory.createFixHeightTextArea(attribution, scale(36))}
};
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, comps, new double[]{1.2, 3});

9
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.map.designer.type;
import com.fine.theme.utils.FineComponentsFactory;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.decision.webservice.v10.map.MapEditService;
import com.fr.design.dialog.FineJOptionPane;
@ -28,6 +29,8 @@ import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* @author Bjorn
* @version 10.0
@ -61,9 +64,11 @@ public class WMSLayerPane extends JPanel implements UIObserver {
connectButton = new UIButton(Toolkit.i18nText("Fine-Design_Chart_Connect_WMP"));
Component[][] comps = new Component[][]{
new Component[]{new UILabel("url"), wmsUrl, null, connectButton}
new Component[]{new UILabel("url"),
FineComponentsFactory.createFixHeightTextArea(wmsUrl, scale(36)),
null, connectButton}
};
JPanel northPane = FineLayoutBuilder.compatibleTableLayout(10, comps, new double[]{1.2, 1.4, 0.2, 1.4});
JPanel northPane = FineLayoutBuilder.compatibleTableLayout(10, comps, new double[]{1.2, 1.8, 0.2, 1.0});
wmsLayerPane = new JPanel(new BorderLayout());
resetWMSLayerPane(new ArrayList<>());

Loading…
Cancel
Save