|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.fr.quickeditor; |
|
|
|
|
|
|
|
|
|
import com.fine.swing.ui.layout.Layouts; |
|
|
|
|
import com.fine.theme.utils.FineUIScale; |
|
|
|
|
import com.formdev.flatlaf.util.ScaledEmptyBorder; |
|
|
|
|
import com.fr.base.GraphHelper; |
|
|
|
|
import com.fr.base.Style; |
|
|
|
@ -69,14 +70,13 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
|
|
|
|
|
/** |
|
|
|
|
* 滚动条相关配置 |
|
|
|
|
*/ |
|
|
|
|
private static final int MAXVALUE = 100; |
|
|
|
|
private static final int CONTENT_PANE_WIDTH_GAP = 3; |
|
|
|
|
private static final int MAXVALUE = FineUIScale.scale(100); |
|
|
|
|
private static final int SCROLLBAR_WIDTH = FineUIScale.scale(10); |
|
|
|
|
private static final int MOUSE_WHEEL_SPEED = 5; |
|
|
|
|
private static final int SCROLLBAR_WIDTH = 7; |
|
|
|
|
private UILabel cellLabel; |
|
|
|
|
|
|
|
|
|
private int maxHeight = 280; |
|
|
|
|
private static final int TITLE_HEIGHT = 50; |
|
|
|
|
private int maxHeight = FineUIScale.scale(280); |
|
|
|
|
private static final int TITLE_HEIGHT = FineUIScale.scale(50); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 面板配置 |
|
|
|
@ -142,7 +142,7 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
|
|
|
|
|
int width = parent.getWidth(); |
|
|
|
|
int height = parent.getHeight(); |
|
|
|
|
leftContentPane.setBounds(0, -beginY, width - SCROLLBAR_WIDTH, height + beginY); |
|
|
|
|
scrollBar.setBounds(width - SCROLLBAR_WIDTH - CONTENT_PANE_WIDTH_GAP, 0, SCROLLBAR_WIDTH + CONTENT_PANE_WIDTH_GAP, height); |
|
|
|
|
scrollBar.setBounds(width - SCROLLBAR_WIDTH, 0, SCROLLBAR_WIDTH, height); |
|
|
|
|
leftContentPane.validate(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
@ -333,9 +333,9 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
scrollBar.setPreferredSize(new Dimension(SCROLLBAR_WIDTH + CONTENT_PANE_WIDTH_GAP, this.getHeight())); |
|
|
|
|
scrollBar.setBlockIncrement(SCROLLBAR_WIDTH + CONTENT_PANE_WIDTH_GAP); |
|
|
|
|
scrollBar.setBorder(BorderFactory.createMatteBorder(0, CONTENT_PANE_WIDTH_GAP, 0, 0, this.getBackground())); |
|
|
|
|
scrollBar.setPreferredSize(new Dimension(SCROLLBAR_WIDTH, this.getHeight())); |
|
|
|
|
scrollBar.setBlockIncrement(SCROLLBAR_WIDTH); |
|
|
|
|
scrollBar.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, this.getBackground())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|