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