Browse Source
Merge in DESIGN/design from fbp/release to fbp/feature * commit '74cc3d4196eafedff14e21b2d48d0fd9e66fa2fe': REPORT-136120 fix: 本地设计器启动日志级别需要全部配置保持一致 REPORT-135874 fix: 修复无法获取远程环境脱敏规则的问题 修改拖拽条颜色 REPORT-135657 提供前端获取当前所有数据集的方式 去除html标签 REPORT-135879 【fr-fbp回归】次管保存数据中心模板,报错没权限 无JIRA任务 改了前端bug,更新一波js REPORT-135680 fix:fbp回归问题修复 无JIRA任务 改了前端bug,更新一波js REPORT-136114 fix:老图表部分面板翻新 REPORT-132266 fix: 下拉多选框数据 Windows 出现数据错乱 REPORT-132266 fix: 下拉多选框数据 Windows 出现数据错乱fbp/feature
33 changed files with 546 additions and 518 deletions
@ -0,0 +1,37 @@
|
||||
package com.fine.theme.light.ui; |
||||
|
||||
import com.formdev.flatlaf.ui.FlatComboBoxUI; |
||||
|
||||
import javax.swing.JComponent; |
||||
import javax.swing.UIManager; |
||||
import javax.swing.plaf.ComponentUI; |
||||
|
||||
|
||||
/** |
||||
* {@link com.fr.design.gui.icombocheckbox.UIComboCheckBox} 的 UI 样式 |
||||
* |
||||
* @author lemon |
||||
* @since 12.0 |
||||
* Created on 2024/09/27 |
||||
*/ |
||||
public class FineComboCheckBoxUI extends FlatComboBoxUI { |
||||
|
||||
public FineComboCheckBoxUI() { |
||||
super(); |
||||
} |
||||
|
||||
/** |
||||
* 创建UI |
||||
*/ |
||||
public static ComponentUI createUI(JComponent c) { |
||||
return new FineComboCheckBoxUI(); |
||||
} |
||||
|
||||
@Override |
||||
public void installUI(JComponent c) { |
||||
super.installUI(c); |
||||
c.setBackground(UIManager.getColor("ComboCheckBox.background")); |
||||
c.setBorder(UIManager.getBorder("ComboCheckBox.border")); |
||||
} |
||||
|
||||
} |
File diff suppressed because one or more lines are too long
@ -0,0 +1,46 @@
|
||||
package com.fr.design.gui.storybook.components; |
||||
|
||||
import com.fr.design.gui.icombocheckbox.UIComboCheckBox; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.storybook.StoryBoard; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.stable.ArrayUtils; |
||||
|
||||
import javax.swing.JPanel; |
||||
import java.awt.BorderLayout; |
||||
|
||||
import static com.fine.swing.ui.layout.Layouts.cell; |
||||
import static com.fine.swing.ui.layout.Layouts.flex; |
||||
|
||||
public class ComboCheckBoxStoryBoard extends StoryBoard { |
||||
public ComboCheckBoxStoryBoard() { |
||||
super("下拉多选框"); |
||||
|
||||
|
||||
add( |
||||
cell(new UILabel("普通状态")).with(this::h3), |
||||
cell(getComboCheckBox(ArrayUtils.toArray("测试1", "测试2", "测试3", "测试4"))), |
||||
|
||||
cell(new UILabel("长文字状态")).with(this::h3), |
||||
cell(getComboCheckBox(ArrayUtils.toArray("测试长文字1测试长文字1测试长文字1测试长文字1测试长文字1测试长文字1测试长文字1", |
||||
"测试长文字2测试长文字2测试长文字2测试长文字2测试长文字2测试长文字2测试长文字2", |
||||
"测试长文字3测试长文字3测试长文字3测试长文字3测试长文字3测试长文字3测试长文字3", |
||||
"测试长文字4测试长文字4测试长文字4测试长文字4测试长文字4测试长文字4测试长文字4"))), |
||||
|
||||
flex() |
||||
); |
||||
} |
||||
|
||||
private UIComboCheckBox getComboCheckBox(Object[] array) { |
||||
return new UIComboCheckBox(array, true) { |
||||
protected void setLayoutAndAddComponents() { |
||||
// 使用BorderLayout,否则默认使用的FlowLayout会让整个下拉选框使用最小Size,然后TableCell这边会出现空白
|
||||
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
||||
JPanel pane = getClickPane(); |
||||
pane.setOpaque(false); |
||||
this.add(pane, BorderLayout.CENTER); |
||||
} |
||||
}; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue