A little explanatory commenting.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6031 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Mike Thomas
2010-02-04 22:30:58 +00:00
parent e206d26515
commit 493352c933
3 changed files with 15 additions and 0 deletions
@@ -55,6 +55,9 @@ import com.threerings.presents.dobj.SetListener;
public class DSetEditor<E extends DSet.Entry> extends JPanel
implements ActionListener
{
/**
* An interface for a plugin defining how the editor interacts with its underlying data.
*/
public interface Accessor<F extends DSet.Entry>
{
void added ();
@@ -134,6 +137,9 @@ public class DSetEditor<E extends DSet.Entry> extends JPanel
}
/**
* Sets the logic for how this editor interacts with its underlying data.
*/
public void setAccessor (Accessor accessor)
{
removeAll();
@@ -76,6 +76,9 @@ public abstract class FieldEditor extends JPanel
updateBorder(false);
}
/**
* Sets the plugin for how we interact with our data.
*/
public void setAccessor (Accessor accessor)
{
_accessor = accessor;
@@ -56,6 +56,9 @@ import com.threerings.presents.dobj.SetListener;
public class TabbedDSetEditor<E extends DSet.Entry> extends JPanel
implements AttributeChangeListener, SetListener<E>
{
/**
* Defines how DSetEditor data-access plugins should be created.
*/
public interface AccessorFactory
{
public DSetEditor.Accessor createAccessor (DSetEditor editor);
@@ -175,6 +178,9 @@ public class TabbedDSetEditor<E extends DSet.Entry> extends JPanel
add(_tabs);
}
/**
* Assigns the factory that creates data-access plugins for our set our DSetEditors.
*/
public void setAccessorFactory (AccessorFactory accessorFactory)
{
_accessorFactory = accessorFactory;