|
|
|
@ -22,11 +22,11 @@ import javax.swing.JPanel;
|
|
|
|
|
import javax.swing.ListCellRenderer; |
|
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
|
import javax.swing.event.ListSelectionEvent; |
|
|
|
|
import javax.swing.event.ListSelectionListener; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Component; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.event.MouseAdapter; |
|
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
|
import java.io.Serializable; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
@ -44,21 +44,17 @@ public class ThemedCellStyleListPane extends FurtherBasicBeanPane<NameStyle> imp
|
|
|
|
|
styleList.setCellRenderer(new RadioButtonListCellRenderer()); |
|
|
|
|
styleList.setOpaque(false); |
|
|
|
|
styleList.setBackground(null); |
|
|
|
|
setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
add(styleList, BorderLayout.CENTER); |
|
|
|
|
setBorder(BorderFactory.createEmptyBorder(0 ,LEFT_BORDER, 0, RIGHT_BORDER)); |
|
|
|
|
|
|
|
|
|
styleList.addMouseListener(new MouseAdapter() { |
|
|
|
|
styleList.addListSelectionListener(new ListSelectionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
|
int clickedNumber = e.getClickCount(); |
|
|
|
|
if (clickedNumber == 1) { |
|
|
|
|
if (changeListener != null) { |
|
|
|
|
changeListener.stateChanged(new ChangeEvent(styleList)); |
|
|
|
|
} |
|
|
|
|
public void valueChanged(ListSelectionEvent e) { |
|
|
|
|
if (changeListener != null) { |
|
|
|
|
changeListener.stateChanged(new ChangeEvent(styleList)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
add(styleList, BorderLayout.CENTER); |
|
|
|
|
setBorder(BorderFactory.createEmptyBorder(0 ,LEFT_BORDER, 0, RIGHT_BORDER)); |
|
|
|
|
|
|
|
|
|
DesignerContext.setDesignerBean("predefinedStyle", this); |
|
|
|
|
} |
|
|
|
|