Consistently have a white background in propertypanel

This commit is contained in:
Fabian Becker 2014-10-31 00:34:55 +01:00
parent 4db79c69d2
commit 802a36eb60
2 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package eva2.gui; package eva2.gui;
import javax.swing.*; import javax.swing.*;
import java.awt.*;
import java.awt.event.ItemEvent; import java.awt.event.ItemEvent;
import java.awt.event.ItemListener; import java.awt.event.ItemListener;
import java.beans.PropertyEditor; import java.beans.PropertyEditor;
@ -14,6 +15,7 @@ public class PropertyBoolSelector extends JCheckBox {
public PropertyBoolSelector(PropertyEditor pe) { public PropertyBoolSelector(PropertyEditor pe) {
super(); super();
setBackground(Color.WHITE);
propertyEditor = pe; propertyEditor = pe;
if (propertyEditor.getAsText().equals("True")) { if (propertyEditor.getAsText().equals("True")) {
setSelected(true); setSelected(true);

View File

@ -998,6 +998,7 @@ class PropertyCellRenderer implements TableCellRenderer {
component.add((PropertyPanel) value, BorderLayout.CENTER); component.add((PropertyPanel) value, BorderLayout.CENTER);
final JButton dialogButton = new JButton("..."); final JButton dialogButton = new JButton("...");
dialogButton.setMargin(new Insets(0,0,0,0)); dialogButton.setMargin(new Insets(0,0,0,0));
dialogButton.setBackground(Color.WHITE);
component.add(dialogButton, BorderLayout.LINE_END); component.add(dialogButton, BorderLayout.LINE_END);
return component; return component;
@ -1033,6 +1034,7 @@ class PropertyCellEditor extends AbstractCellEditor implements TableCellEditor {
component.add((PropertyPanel) value, BorderLayout.CENTER); component.add((PropertyPanel) value, BorderLayout.CENTER);
final JButton dialogButton = new JButton("..."); final JButton dialogButton = new JButton("...");
dialogButton.setMargin(new Insets(0,0,0,0)); dialogButton.setMargin(new Insets(0,0,0,0));
dialogButton.setBackground(Color.WHITE);
dialogButton.addActionListener(new ActionListener() { dialogButton.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(final ActionEvent event) { public void actionPerformed(final ActionEvent event) {