Fixed alignment of boolean configs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3585 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -24,6 +24,9 @@ package com.threerings.admin.client;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import com.samskivert.swing.HGroupLayout;
|
||||
|
||||
import com.samskivert.swing.GroupLayout;
|
||||
import com.samskivert.swing.Spacer;
|
||||
@@ -40,13 +43,17 @@ public class BooleanFieldEditor extends FieldEditor
|
||||
{
|
||||
super(ctx, field, object);
|
||||
|
||||
JPanel jpan = new JPanel(new HGroupLayout(HGroupLayout.STRETCH));
|
||||
|
||||
// add a checkbox to display the field value
|
||||
add(_value = new JCheckBox(), GroupLayout.FIXED);
|
||||
jpan.add(_value = new JCheckBox(), GroupLayout.FIXED);
|
||||
// add a spacer so that clicks to the right of the checkbox
|
||||
// don't toggle it
|
||||
add(new Spacer(1, 1));
|
||||
jpan.add(new Spacer(1, 1));
|
||||
_value.addActionListener(this);
|
||||
|
||||
add(jpan);
|
||||
|
||||
// we want to let the user know if they remove focus from a text
|
||||
// box without changing a field that it's not saved
|
||||
_value.addFocusListener(this);
|
||||
|
||||
Reference in New Issue
Block a user