Browse Source
* commit 'f4cdd8d55ef8705c672969a241539324f72105b6': REPORT-132799 & REPORT-131838 & REPORT-132389 & REPORT-132382 & REPORT-132380 & REPORT-132375 & REPORT-132357 & REPORT-132231 & REPORT-132227【newUI】fix:国际化布局调整及Tab统一修复/fbp回归问题修复 REPORT-132799 & REPORT-131838 & REPORT-132389 & REPORT-132382 & REPORT-132380 & REPORT-132375 & REPORT-132357 & REPORT-132231 & REPORT-132227【newUI】fix:国际化布局调整及Tab统一修复/fbp回归问题修复 REPORT-133167 & REPORT-133157 fix:细节缩放问题修复 REPORT-133198 fix:List面板背景逻辑调整 模板解密对话框修改 REPORT-133037 fix:自动刷新面板修复&参数面板移动端显示效果优化 REPORT-132601 fix:图表标题面板问题修复 REPORT-132916 fix:仪表盘、气泡图漏翻新面板补充 REPORT-133106 fix:参数面板遮罩层修复 fbp回归问题 关联数据集增加国际化文本和提示fbp/feature
superman
4 months ago
53 changed files with 305 additions and 270 deletions
@ -0,0 +1,53 @@ |
|||||||
|
package com.fr.design.gui.ibutton; |
||||||
|
|
||||||
|
import com.fine.swing.ui.layout.Row; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import static com.fine.theme.utils.FineClientProperties.BUTTON_GROUP_POSITION; |
||||||
|
import static com.fine.theme.utils.FineClientProperties.BUTTON_TYPE_GROUP_FIT; |
||||||
|
import static com.formdev.flatlaf.FlatClientProperties.BUTTON_TYPE; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 自适应文案宽度的ButtonGroup |
||||||
|
* |
||||||
|
* @author Levy.Xie |
||||||
|
* @since 11.0 |
||||||
|
* Created on 2024/08/28 |
||||||
|
*/ |
||||||
|
public class FitUIButtonGroup<T> extends UIButtonGroup<T> { |
||||||
|
|
||||||
|
public FitUIButtonGroup(String[] textArray) { |
||||||
|
super(textArray); |
||||||
|
} |
||||||
|
|
||||||
|
public FitUIButtonGroup(String[] textArray, T[] objects) { |
||||||
|
super(textArray, objects); |
||||||
|
} |
||||||
|
|
||||||
|
public FitUIButtonGroup(String[] textArray, T[] objects, int[] customCols) { |
||||||
|
super(textArray, objects, customCols); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void initLayout(int[] cols, boolean inToolbar) { |
||||||
|
Row row = new Row(); |
||||||
|
List<UIToggleButton> buttonList = getLabelButtonList(); |
||||||
|
for (int i = 0; i < buttonList.size(); i++) { |
||||||
|
row.add(buttonList.get(i)); |
||||||
|
if (i != buttonList.size() - 1 && !inToolbar) { |
||||||
|
row.add(createDivider()); |
||||||
|
} |
||||||
|
} |
||||||
|
add(row); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void initButton(UIToggleButton labelButton, int index) { |
||||||
|
labelButton.setBorderPainted(false); |
||||||
|
labelButton.putClientProperty(BUTTON_TYPE, BUTTON_TYPE_GROUP_FIT); |
||||||
|
labelButton.putClientProperty(BUTTON_GROUP_POSITION, getGroupButtonPosition(index)); |
||||||
|
labelButtonList.add(labelButton); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue