Destiny.Lin
4 months ago
225 changed files with 1816 additions and 1218 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); |
||||
} |
||||
} |
@ -1,10 +1,11 @@
|
||||
package com.fr.design.gui.itooltip; |
||||
|
||||
import com.fine.theme.light.ui.FineTooltipUI; |
||||
import javax.swing.JToolTip; |
||||
|
||||
public class MultiLineToolTip extends JToolTip { |
||||
|
||||
public MultiLineToolTip() { |
||||
setUI(new MultiLineToolTipUI()); |
||||
setUI(new FineTooltipUI()); |
||||
} |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue