1 3 package org.objectweb.fractal.swing; 4 5 import org.objectweb.fractal.api.control.BindingController; 6 7 import javax.swing.JComponent ; 8 9 public class JScrollPaneImpl 10 extends javax.swing.JScrollPane 11 implements JScrollPaneItf, JScrollPaneAttributes, BindingController 12 { 13 14 public final static String VIEW_BINDING = "view"; 15 private JComponent view; 16 17 public JScrollPaneImpl (java.awt.Component arg0, int arg1, int arg2) { 18 super(arg0,arg1,arg2); 19 } 20 public JScrollPaneImpl (java.awt.Component arg0) { 21 super(arg0); 22 } 23 public JScrollPaneImpl (int arg0, int arg1) { 24 super(arg0,arg1); 25 } 26 public JScrollPaneImpl () { 27 super(); 28 } 29 30 public String [] listFc () { 31 return new String [] { VIEW_BINDING }; 33 } 34 35 public Object lookupFc (String clientItfName) { 36 if (clientItfName.equals(VIEW_BINDING)) { 38 return view; 39 } 40 return null; 41 } 42 43 public void bindFc (String clientItfName, Object serverItf) { 44 if (clientItfName.equals(VIEW_BINDING)) { 46 this.view = (JComponent )serverItf; 47 setViewportView(view); 48 } 49 } 50 51 public void unbindFc (String clientItfName) { 52 if (clientItfName.equals(VIEW_BINDING)) { 54 this.view = null; 55 } 56 } 57 58 } 59 | Popular Tags |