1 56 package org.objectstyle.cayenne.modeler.editor.datanode; 57 58 import java.awt.Component ; 59 60 import org.objectstyle.cayenne.modeler.ProjectController; 61 import org.objectstyle.cayenne.swing.BindingBuilder; 62 import org.objectstyle.cayenne.swing.BindingDelegate; 63 import org.objectstyle.cayenne.swing.ObjectBinding; 64 65 68 public class CustomDataSourceEditor extends DataSourceEditor { 69 70 protected CustomDataSourceView view; 71 72 public CustomDataSourceEditor(ProjectController controller, 73 BindingDelegate nodeChangeProcessor) { 74 super(controller, nodeChangeProcessor); 75 } 76 77 protected void prepareBindings(BindingBuilder builder) { 78 this.view = new CustomDataSourceView(); 79 80 fieldAdapters = new ObjectBinding[1]; 81 fieldAdapters[0] = builder.bindToTextField( 82 view.getLocationHint(), 83 "node.dataSourceLocation"); 84 } 85 86 public Component getView() { 87 return view; 88 } 89 } | Popular Tags |