|
|
|
@ -7,6 +7,7 @@ import com.fine.swing.ui.layout.Column;
|
|
|
|
|
import com.fine.theme.utils.FineLayoutBuilder; |
|
|
|
|
import com.fine.theme.utils.FineUIStyle; |
|
|
|
|
import com.fine.theme.utils.FineUIUtils; |
|
|
|
|
import com.formdev.flatlaf.ui.FlatUIUtils; |
|
|
|
|
import com.formdev.flatlaf.util.ScaledEmptyBorder; |
|
|
|
|
import com.fr.base.chart.chartdata.CallbackEvent; |
|
|
|
|
import com.fr.chart.chartattr.ChartCollection; |
|
|
|
@ -24,7 +25,6 @@ import com.fr.log.FineLoggerFactory;
|
|
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
|
import com.fr.van.chart.config.DefaultStyleHelper4Van; |
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.DefaultListCellRenderer; |
|
|
|
|
import javax.swing.DefaultListModel; |
|
|
|
|
import javax.swing.JLayer; |
|
|
|
@ -74,6 +74,7 @@ public class ChartTypePane extends ChartCommonWizardPane implements CallbackEven
|
|
|
|
|
JLayer<UIScrollPane> typeScrollPane = FineUIUtils.createCollapsibleScrollBarLayer(mainTypeList); |
|
|
|
|
|
|
|
|
|
iconViewList = new JList(); |
|
|
|
|
iconViewList.setBorder(null); |
|
|
|
|
|
|
|
|
|
iconListModel = new DefaultListModel(); |
|
|
|
|
iconViewList.setModel(iconListModel); |
|
|
|
@ -104,20 +105,20 @@ public class ChartTypePane extends ChartCommonWizardPane implements CallbackEven
|
|
|
|
|
ChartIcon chartIcon = (ChartIcon) value; |
|
|
|
|
UILabel centerImg = new UILabel(chartIcon); |
|
|
|
|
UILabel text = new UILabel(getChartName(chartIcon), SwingConstants.CENTER); |
|
|
|
|
|
|
|
|
|
Column component = column( |
|
|
|
|
fix(5), |
|
|
|
|
cell(centerImg), cell(text), |
|
|
|
|
fix(5) |
|
|
|
|
).getComponent(); |
|
|
|
|
Color borderColor = isSelected ? FineUIUtils.getUIColor("defaultHighlightBorderColor", "Component.focusedBorderColor") |
|
|
|
|
: FineUIUtils.getUIColor("defaultBorderColor", "Component.borderColor"); |
|
|
|
|
Color borderColor = isSelected ? FineUIUtils.getUIColor("defaultHighlightBorderColor", "Component.focusedBorderColor") : |
|
|
|
|
FineUIUtils.getUIColor("defaultBorderColor", "Component.borderColor"); |
|
|
|
|
Color fillColor = FlatUIUtils.getUIColor("fill.normal", Color.WHITE); |
|
|
|
|
UIRoundedBorder roundedBorder = new UIRoundedBorder(borderColor, 1, 5); |
|
|
|
|
component.setBorder(BorderFactory.createCompoundBorder( |
|
|
|
|
new ScaledEmptyBorder(0, 10, 10, 0), roundedBorder)); |
|
|
|
|
component.setBackground(Color.WHITE); |
|
|
|
|
return component; |
|
|
|
|
|
|
|
|
|
Column component = column( |
|
|
|
|
fix(5), cell(centerImg), cell(text), fix(5) |
|
|
|
|
).with(it -> { |
|
|
|
|
it.setOpaque(true); |
|
|
|
|
it.setBorder(roundedBorder); |
|
|
|
|
it.setBackground(fillColor); |
|
|
|
|
}).getComponent(); |
|
|
|
|
JPanel pane = FineLayoutBuilder.asBorderLayoutWrapped(component); |
|
|
|
|
pane.setBorder(new ScaledEmptyBorder(0, 10, 10, 0)); |
|
|
|
|
return pane; |
|
|
|
|
} |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|