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