Browse Source

Pull request #14693: REPORT-130724 & REPORT-130807【newUI】fix:东区单元格元素滚动条问题及视觉问题修复

Merge in DESIGN/design from ~RICHARD.FANG/design:fbp/release to fbp/release

* commit 'cdaa5528b24d431d6c76b3dafefc08a749bf57e3':
  REPORT-130724 & REPORT-130807【newUI】fix:东区单元格元素滚动条问题及视觉问题修复
  REPORT-130724 & REPORT-130807【newUI】fix:东区单元格元素滚动条问题及视觉问题修复
fbp/release
Richard.Fang-方超 3 months ago
parent
commit
e91e0a1ddc
  1. 14
      designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java
  2. 2
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  3. 1
      designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
  4. 10
      designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java
  5. 6
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java
  6. 16
      designer-chart/src/main/java/com/fr/van/chart/designer/AbstractVanChartScrollPane.java
  7. 8
      designer-realize/src/main/java/com/fr/design/sort/expressionpane/CustomSequencePane.java

14
designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java

@ -5,6 +5,7 @@ import com.fr.design.gui.iscrollbar.UIScrollBar;
import javax.swing.JPanel;
import javax.swing.JScrollBar;
import javax.swing.SwingUtilities;
import java.awt.AWTEvent;
import java.awt.Color;
import java.awt.Component;
@ -111,6 +112,15 @@ public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
doLayout();
}
/**
* 插入图表后单元格元素使用cardLayout布局,需要滚动效果获取高度在子类中重新计算
*
* @return height
*/
protected int getMaxHeight(){
return getHeight();
}
protected class BarLayout implements LayoutManager {
@Override
@ -135,7 +145,7 @@ public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
@Override
public void layoutContainer(Container parent) {
if(getHeight() >= leftcontentPane.getPreferredSize().height) {
if(getMaxHeight() >= leftcontentPane.getPreferredSize().height) {
scrollBar.setEnabled(false);
scrollBar.setVisible(false);
} else {
@ -143,7 +153,7 @@ public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
scrollBar.setEnabled(show);
scrollBar.setVisible(show);
}
maxheight = getHeight() - DET_HEIGHT;
maxheight = getMaxHeight() - DET_HEIGHT;
if ((MAXVALUE - scrollBar.getVisibleAmount()) == 0) {
beginY = 0;
} else {

2
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -836,7 +836,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
if (StringUtils.equals(KEY_WIDGET_SETTINGS, name)) {
title = currentMode.getTitle();
button.setToolTipText(title);
UILabel uiLabel = (UILabel) ((BorderLayout) popupToolPane.contentPane.getLayout()).getLayoutComponent(BorderLayout.WEST);
UILabel uiLabel = (UILabel) ((BorderLayout) popupToolPane.contentPane.getLayout()).getLayoutComponent(BorderLayout.CENTER);
uiLabel.setText(title);
}
} catch (Exception e) {

1
designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json

@ -21,6 +21,7 @@
"add": "add.svg",
"add_hover": "add_hover.svg",
"detail": "detail.svg",
"debug": "debug.svg",
"dataLink": "dataLink.svg",
"jumpHelp": "jumpHelp.svg",
"switch": "switch.svg",

10
designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java

@ -3,15 +3,12 @@
*/
package com.fr.design.mainframe;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.BaseUtils;
import com.fr.base.chart.BaseChartCollection;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.chartx.attr.ChartProvider;
import com.fr.decision.webservice.v10.map.geojson.helper.GEOJSONHelper;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.designer.TargetComponent;
import com.fr.design.gui.chart.BaseChartPropertyPane;
@ -20,10 +17,9 @@ import com.fr.design.gui.frpane.UITitlePanel;
import com.fr.design.mainframe.chart.ChartEditPane;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.SwingWorker;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Component;
public class ChartPropertyPane extends BaseChartPropertyPane {
@ -45,8 +41,6 @@ public class ChartPropertyPane extends BaseChartPropertyPane {
protected void initComponent() {
this.setLayout(new BorderLayout());
this.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
// 外部轮廓大小固定,适配滚动面板
this.setPreferredSize(new Dimension(getWidth(), FineUIScale.scale(900)));
}
@Override

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

@ -55,8 +55,8 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
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;
protected static final int UPCONTROLPANE_WIDTH = scale(218);
private static final int LAYOUR_DET = scale(6);
public static final double VALUE = 100;
@ -611,7 +611,7 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
@Override
public void layoutContainer(Container parent) {
upControlPane.setBounds(getBoundX(), getBoundY(), UPCONTROLPANE_WIDTH, upControlPane.getPreferredSize().height + MARGIN_TOP);
stagePanel.setBounds(getBoundX(), upControlPane.getPreferredSize().height + LAYOUR_DET + getBoundY(), UPCONTROLPANE_WIDTH, stagePanel.getPreferredSize().height);
stagePanel.setBounds(getBoundX(), upControlPane.getPreferredSize().height + scale(8) + getBoundY(), UPCONTROLPANE_WIDTH, stagePanel.getPreferredSize().height);
colorGroup.setBounds( getColorgroupMarginLeft (), 2 * getBoundY() + upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET, colorGroup.getPreferredSize().width, colorGroup.getPreferredSize().height + upControlPane.getPreferredSize().height);
textGroup.setBounds(colorGroup.getPreferredSize().width + getColorgroupMarginLeft (), upControlPane.getPreferredSize().height + stagePanel.getPreferredSize().height + 2 * LAYOUR_DET + getBoundY(), textGroup.getPreferredSize().width, textGroup.getPreferredSize().height);
}

16
designer-chart/src/main/java/com/fr/van/chart/designer/AbstractVanChartScrollPane.java

@ -1,11 +1,12 @@
package com.fr.van.chart.designer;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.gui.iscrollbar.UIScrollBar;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.Container;
import javax.swing.SwingUtilities;
import java.awt.Window;
/**
* Created by mengao on 2017/8/11.
@ -21,4 +22,15 @@ public abstract class AbstractVanChartScrollPane<T> extends BasicScrollPane<T> {
super.reloaPane(pane);
leftcontentPane.setBorder(BorderFactory.createEmptyBorder());
}
/**
* getHeight与最外层ChartPropertyPane获取的高度一致都是计算的面板高度而不是到设计器底部的高度
* 这里直接获取设计器高度减去单元格元素北区最大高度(格式TextFormatPaneContainer高度不固定)先让滚动效果显示起来
* @return height
*/
@Override
protected int getMaxHeight() {
Window window = SwingUtilities.getWindowAncestor(this);
return window.getHeight() - FineUIScale.scale(400);
}
}

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

@ -4,6 +4,7 @@ import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.itextfield.UITextField;
@ -42,14 +43,17 @@ public class CustomSequencePane extends JPanel {
@Override
public void mouseClicked(MouseEvent e) {
CustomSequenceEditPane customSequenceEditPane = new CustomSequenceEditPane(customSequence);
customSequenceEditPane.showWindowWithCustomSize(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
BasicDialog dialog = customSequenceEditPane.showWindowWithCustomSize(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override
public void doOk() {
customSequence = customSequenceEditPane.updateBean();
triggerOk(CustomSequenceSortExpression.customSequenceToString(customSequence, ","),
CustomSequenceSortExpression.isReferenceCustomSequence(customSequence));
}
}, new Dimension(700, 420)).setVisible(true);
}, FineUIScale.scale(new Dimension(700, 420)));
dialog.setAlwaysOnTop(true);
dialog.requestFocusInWindow();
dialog.setVisible(true);
}
};
button.addMouseListener(mouseAdapter);

Loading…
Cancel
Save