From 27e9719c8b5d21716d903d6ae8a81977f748e6e2 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 13 Apr 2005 17:07:53 +0000 Subject: [PATCH] Include a spacer to the right of the checkbox so that errant clicks on that side don't cause the box to toggle. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3477 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/admin/client/BooleanFieldEditor.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/java/com/threerings/admin/client/BooleanFieldEditor.java b/src/java/com/threerings/admin/client/BooleanFieldEditor.java index d0040236b..9dbde95ef 100644 --- a/src/java/com/threerings/admin/client/BooleanFieldEditor.java +++ b/src/java/com/threerings/admin/client/BooleanFieldEditor.java @@ -25,6 +25,9 @@ import java.lang.reflect.Field; import javax.swing.JCheckBox; +import com.samskivert.swing.GroupLayout; +import com.samskivert.swing.Spacer; + import com.threerings.presents.dobj.DObject; import com.threerings.presents.util.PresentsContext; @@ -37,8 +40,11 @@ public class BooleanFieldEditor extends FieldEditor { super(ctx, field, object); - // and a text entry field to display the field value - add(_value = new JCheckBox()); + // add a checkbox to display the field value + 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)); _value.addActionListener(this); // we want to let the user know if they remove focus from a text