differentiate item hilight when a FList listbox has lost focus from when the listbox is selected

ensure the CardListViewer always appears in the center of the screen
This commit is contained in:
myk
2013-02-06 19:41:48 +00:00
parent dae7d2f110
commit f7001a17f2
2 changed files with 2 additions and 1 deletions

View File

@@ -141,6 +141,7 @@ public class CardListViewer {
this.dialog = this.optionPane.createDialog(this.optionPane.getParent(), this.title);
this.dialog.setSize(720, 360);
this.dialog.addWindowFocusListener(new CardListFocuser());
this.dialog.setLocationRelativeTo(null);
this.dialog.setVisible(true);
this.dialog.toFront();

View File

@@ -70,7 +70,7 @@ public class FList extends JList {
lst0, val0, i0, isSelected, cellHasFocus);
lblItem.setBorder(new EmptyBorder(4, 3, 4, 3));
lblItem.setBackground(FSkin.getColor(FSkin.Colors.CLR_ACTIVE));
lblItem.setBackground(FSkin.getColor(cellHasFocus ? FSkin.Colors.CLR_ACTIVE : FSkin.Colors.CLR_INACTIVE));
lblItem.setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT));
lblItem.setFont(FSkin.getFont(13));
lblItem.setOpaque(isSelected);