diff --git a/designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java b/designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java index 5c80e2b167..905f21dcd2 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java +++ b/designer-base/src/main/java/com/fr/design/dialog/BasicScrollPane.java @@ -111,6 +111,15 @@ public abstract class BasicScrollPane extends BasicBeanPane{ doLayout(); } + /** + * 插入图表后单元格元素使用cardLayout布局,需要滚动效果获取高度在子类中重新计算 + * + * @return height + */ + protected int getMaxHeight(){ + return getHeight(); + } + protected class BarLayout implements LayoutManager { @Override @@ -135,7 +144,7 @@ public abstract class BasicScrollPane extends BasicBeanPane{ @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 +152,7 @@ public abstract class BasicScrollPane extends BasicBeanPane{ scrollBar.setEnabled(show); scrollBar.setVisible(show); } - maxheight = getHeight() - DET_HEIGHT; + maxheight = getMaxHeight() - DET_HEIGHT; if ((MAXVALUE - scrollBar.getVisibleAmount()) == 0) { beginY = 0; } else { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java index 09ea0d2052..0ee74940d6 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/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) { diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json b/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json index d73d090802..fb26dcc0ba 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json +++ b/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", diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java index 48ba6f2d5e..52c2a0f59e 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java +++ b/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 diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java index 7a8dc38e65..862bcc9e7c 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java +++ b/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); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/AbstractVanChartScrollPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/AbstractVanChartScrollPane.java index 9949862884..c0d3de1d3f 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/AbstractVanChartScrollPane.java +++ b/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 extends BasicScrollPane { 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); + } } diff --git a/designer-realize/src/main/java/com/fr/design/sort/expressionpane/CustomSequencePane.java b/designer-realize/src/main/java/com/fr/design/sort/expressionpane/CustomSequencePane.java index c68fd09ca0..f4fcb222aa 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/expressionpane/CustomSequencePane.java +++ b/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);