Complexity++!
Turns out when I went to use TabbedDSetEditor in my scary real-world application instead of nice small test cases, I wanted to do fancier stuff where I hide certain fields for some groups, etc. Break things up into chunks so it's possible to override the various exciting bits of functionality and do things like that. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5781 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -95,7 +95,7 @@ public class DSetEditor<E extends DSet.Entry> extends JPanel
|
||||
DObject setter, String setName, Class<?> entryClass, String[] editableFields,
|
||||
ObjectEditorTable.FieldInterpreter interp)
|
||||
{
|
||||
this(setter, setName, entryClass, editableFields, interp, null);
|
||||
this(setter, setName, entryClass, editableFields, interp, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -106,11 +106,12 @@ public class DSetEditor<E extends DSet.Entry> extends JPanel
|
||||
* @param entryClass The Class of the DSet.Entry elements contained in the set.
|
||||
* @param editableFields The names of the fields in the entryClass that should be editable.
|
||||
* @param interp The FieldInterpreter to use.
|
||||
* @param displayFields The fields to display, or null for all.
|
||||
* @param entryFilter The Predicate to use.
|
||||
*/
|
||||
public DSetEditor (
|
||||
DObject setter, String setName, Class<?> entryClass, String[] editableFields,
|
||||
ObjectEditorTable.FieldInterpreter interp, Predicate<E> entryFilter)
|
||||
ObjectEditorTable.FieldInterpreter interp, String[] displayFields, Predicate<E> entryFilter)
|
||||
{
|
||||
super(new BorderLayout());
|
||||
|
||||
@@ -119,7 +120,7 @@ public class DSetEditor<E extends DSet.Entry> extends JPanel
|
||||
_set = _setter.getSet(setName);
|
||||
_entryFilter = entryFilter;
|
||||
|
||||
_table = new ObjectEditorTable(entryClass, editableFields, interp);
|
||||
_table = new ObjectEditorTable(entryClass, editableFields, interp, displayFields);
|
||||
|
||||
add(new JScrollPane(_table), BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user