You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package com.fr.widgettheme.theme.panel;
|
|
|
|
|
|
|
|
|
|
|
|
import com.fr.widgettheme.theme.widget.style.ThemedWidgetStyle;
|
|
|
|
|
|
|
|
import java.awt.Color;
|
|
|
|
import java.awt.Dimension;
|
|
|
|
import java.awt.Graphics;
|
|
|
|
import java.awt.Graphics2D;
|
|
|
|
import java.awt.LayoutManager;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 主题界面预览控件单元格子,单选按钮组未被选中的样子
|
|
|
|
*
|
|
|
|
* @author John.Ying
|
|
|
|
* @since 11.0
|
|
|
|
* Created on 2023/3/18
|
|
|
|
*/
|
|
|
|
public class RoundControlPreviewCell extends ControlPreviewCell {
|
|
|
|
public RoundControlPreviewCell() {
|
|
|
|
this(DEFAULT, DEFAULT_MESSAGE);
|
|
|
|
}
|
|
|
|
|
|
|
|
public RoundControlPreviewCell(String value) {
|
|
|
|
this(DEFAULT, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public RoundControlPreviewCell(LayoutManager layoutManager, String value) {
|
|
|
|
this.setLayout(layoutManager);
|
|
|
|
this.setOpaque(false);
|
|
|
|
this.value = value;
|
|
|
|
this.setPreferredSize(new Dimension(23, 30));
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void paintComponent(Graphics g) {
|
|
|
|
super.paintComponent(g);
|
|
|
|
ThemedWidgetStyle widgetStyle = (ThemedWidgetStyle) reportTheme.getWidgetStyle();
|
|
|
|
Color borderColor = widgetStyle.getBorderStyle().getBorderColor();
|
|
|
|
Graphics2D g2d = (Graphics2D) g.create();
|
|
|
|
g2d.setColor(borderColor);
|
|
|
|
g2d.drawOval(5, 9, 15, 15);
|
|
|
|
}
|
|
|
|
}
|