Example #1
0
 /** Enables or disables tree mode. */
 public void setTreeModeEnabled(boolean enabled) {
   BaseEditorPanel opanel = _panel;
   remove(opanel);
   add(
       _panel =
           enabled
               ? new TreeEditorPanel(_ctx, opanel.getAncestors(), opanel.getOmitColumns())
               : new EditorPanel(
                   _ctx,
                   EditorPanel.CategoryMode.PANELS,
                   opanel.getAncestors(),
                   opanel.getOmitColumns()));
   _panel.addChangeListener(this);
   _panel.setObject(opanel.getObject());
   revalidate();
 }