/** Setting names that are used in YController and YModel. */
 private void setMVCNames() {
   // FarmMode has a collection named "farms"
   treeFarms.getYProperty().put(YIComponent.MVC_NAME, "farms");
 }
 /** @return the selected node in the tree */
 public Object getSelectedNode() {
   return treeFarms.getLastSelectedPathComponent();
 }
 /** Setting initial state of components. */
 private void initComponents() {
   treeFarms.setFormatter(TREE_FORMATTER);
   // unsaved changes are checked when user clicks something in the tree:
   treeFarms.getYProperty().put(YIComponent.CHECK_CHANGES, new Boolean(true));
 }