|
|
|
@ -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; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|