Browse Source

Merge remote-tracking branch 'origin/fbp/master' into fbp/master

fbp/master
Destiny.Lin 4 weeks ago
parent
commit
8d2d89e79c
  1. 18
      designer-base/src/main/java/com/fine/theme/utils/FineComponentsFactory.java
  2. 6
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java
  3. 2
      designer-base/src/main/java/com/fr/design/gui/icombobox/UIComboBox.java
  4. 2
      designer-base/src/main/resources/com/fr/design/data/tabledata/datacenter/web/data-choose.main.css
  5. 133
      designer-base/src/main/resources/com/fr/design/data/tabledata/datacenter/web/data-choose.main.js
  6. 9
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/TileLayerPane.java
  7. 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;
}
}

6
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java

@ -17,6 +17,7 @@ import com.fr.stable.StringUtils;
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.FineUIScale.scale;
public class MaxMemRowCountPanel extends UIToolbar {
@ -24,9 +25,9 @@ public class MaxMemRowCountPanel extends UIToolbar {
private static final int MAX_IN_MEMORY = 1;
private static final String[] CACHE_LIST = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save_All_Records_In_Memory"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Max_Mem_Row_Count") };
private static final int MAX_WIDTH = getMaxComBoBoxWidth() > 200 ? 350 : 280;
private static final int MAX_WIDTH = getMaxWidth();
private static final int MAX_COMPONENT_COUNT_OF_MAX_MEMORY = 4;
private static int getMaxComBoBoxWidth() {
private static int getMaxWidth() {
int maxWidth = GraphHelper.getWidth(CACHE_LIST[0]);
for (int i = 1; i < CACHE_LIST.length; i++) {
int width = GraphHelper.getWidth(CACHE_LIST[i]);
@ -34,6 +35,7 @@ public class MaxMemRowCountPanel extends UIToolbar {
maxWidth = width;
}
}
maxWidth = maxWidth > scale(200) ? scale(350) : scale(280);
return maxWidth;
}

2
designer-base/src/main/java/com/fr/design/gui/icombobox/UIComboBox.java

@ -162,7 +162,7 @@ public class UIComboBox extends JComboBox implements UIObserver, GlobalNameObser
int renderFix = FineUIScale.scale(5);
int comboHeight = FineUIUtils.getAndScaleInt("ComboBox.comboHeight", 24);
//renderFix的原因在于:render里,每一个项前面了空了一格,要多几像素
return new Dimension(FineUIScale.scale(super.getPreferredSize().width) + renderFix, comboHeight);
return new Dimension(super.getPreferredSize().width + renderFix, comboHeight);
}
public void refreshBoxItems(List list) {

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

133
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