|
|
@ -3,20 +3,19 @@ package com.fine.theme.utils; |
|
|
|
import com.fine.theme.icon.LazyIcon; |
|
|
|
import com.fine.theme.icon.LazyIcon; |
|
|
|
import com.formdev.flatlaf.util.ScaledEmptyBorder; |
|
|
|
import com.formdev.flatlaf.util.ScaledEmptyBorder; |
|
|
|
import com.fr.data.core.FormatField; |
|
|
|
import com.fr.data.core.FormatField; |
|
|
|
|
|
|
|
import com.fr.design.border.FineBorderFactory; |
|
|
|
import com.fr.design.border.UIRoundedBorder; |
|
|
|
import com.fr.design.border.UIRoundedBorder; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
|
|
|
import com.fr.design.gui.itextarea.UITextArea; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.Icon; |
|
|
|
|
|
|
|
import javax.swing.JButton; |
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
import javax.swing.border.Border; |
|
|
|
import javax.swing.border.Border; |
|
|
|
import javax.swing.border.TitledBorder; |
|
|
|
import javax.swing.border.TitledBorder; |
|
|
|
|
|
|
|
|
|
|
|
import java.awt.Color; |
|
|
|
import java.awt.*; |
|
|
|
|
|
|
|
|
|
|
|
import static com.fine.swing.ui.layout.Layouts.cell; |
|
|
|
import static com.fine.swing.ui.layout.Layouts.cell; |
|
|
|
import static com.fine.swing.ui.layout.Layouts.flex; |
|
|
|
import static com.fine.swing.ui.layout.Layouts.flex; |
|
|
@ -92,4 +91,18 @@ public class FineComponentsFactory { |
|
|
|
return sampleLabel; |
|
|
|
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; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|