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