Browse Source
Merge in DESIGN/design from ~VITO/c-design:newui to newui * commit '127fe12d5ba9eb7ec508b0143f2d0db34df12bf4': 无jira任务 漏提交 REPORT-99485 RadioButtonStoryBoardnewui
vito-刘恒霖
11 months ago
5 changed files with 66 additions and 8 deletions
@ -1,16 +1,16 @@
|
||||
package com.fr.design.gui.storybook; |
||||
package com.fr.design.gui.storybook.components; |
||||
|
||||
import com.fine.theme.icon.LazyIcon; |
||||
import com.fr.design.gui.ibutton.UIButtonGroup; |
||||
import com.fr.design.gui.ibutton.UITabGroup; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.mainframe.theme.edit.ui.TabbedPane; |
||||
import com.fr.design.gui.storybook.StoryBoard; |
||||
import com.fr.stable.ArrayUtils; |
||||
|
||||
import javax.swing.Icon; |
||||
|
||||
import javax.swing.*; |
||||
|
||||
import static com.fine.swing.ui.layout.Layouts.*; |
||||
import static com.fine.swing.ui.layout.Layouts.cell; |
||||
import static com.fine.swing.ui.layout.Layouts.flex; |
||||
|
||||
/** |
||||
* Tab按钮组 |
@ -1,8 +1,9 @@
|
||||
package com.fr.design.gui.storybook; |
||||
package com.fr.design.gui.storybook.components; |
||||
|
||||
|
||||
import com.fr.design.gui.icheckbox.UICheckBox; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.storybook.StoryBoard; |
||||
|
||||
import java.awt.*; |
||||
|
@ -1,7 +1,8 @@
|
||||
package com.fr.design.gui.storybook; |
||||
package com.fr.design.gui.storybook.components; |
||||
|
||||
import com.fr.design.gui.icombobox.UIComboBox; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.storybook.StoryBoard; |
||||
import com.fr.stable.ArrayUtils; |
||||
|
||||
import java.awt.*; |
@ -0,0 +1,50 @@
|
||||
package com.fr.design.gui.storybook.components; |
||||
|
||||
import com.fr.design.gui.ibutton.UIRadioButton; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.storybook.StoryBoard; |
||||
|
||||
import javax.swing.ButtonGroup; |
||||
|
||||
import static com.fine.swing.ui.layout.Layouts.cell; |
||||
import static com.fine.swing.ui.layout.Layouts.row; |
||||
|
||||
/** |
||||
* RadioButton |
||||
* |
||||
* @author vito |
||||
* @since 11.0 |
||||
* Created on 2023/12/14 |
||||
*/ |
||||
public class RadioButtonStoryBoard extends StoryBoard { |
||||
|
||||
ButtonGroup buttonGroup = new ButtonGroup(); |
||||
ButtonGroup buttonGroup1 = new ButtonGroup(); |
||||
|
||||
public RadioButtonStoryBoard() { |
||||
super("单选按钮"); |
||||
add( |
||||
cell(new UILabel("普通")).with(it -> it.setFont(labelFont.deriveFont(14f))), |
||||
row(10, |
||||
cell(new UIRadioButton("选项一")).with(it -> { |
||||
buttonGroup.add(it); |
||||
buttonGroup.setSelected(it.getModel(), true); |
||||
}), |
||||
cell(new UIRadioButton("选项二")).with(it -> buttonGroup.add(it)), |
||||
cell(new UIRadioButton("选项三")).with(it -> buttonGroup.add(it)) |
||||
), |
||||
cell(new UILabel("禁用状态")).with(it -> it.setFont(labelFont.deriveFont(14f))), |
||||
row(10, |
||||
cell(new UIRadioButton("选项一")).with(it -> { |
||||
buttonGroup1.add(it); |
||||
buttonGroup1.setSelected(it.getModel(), true); |
||||
}), |
||||
cell(new UIRadioButton("选项二")).with(it -> buttonGroup1.add(it)), |
||||
cell(new UIRadioButton("选项三")).with(it -> { |
||||
buttonGroup1.add(it); |
||||
it.setEnabled(false); |
||||
}) |
||||
) |
||||
); |
||||
} |
||||
} |
Loading…
Reference in new issue