import java.awt.geom.*;
import java.awt.*;
import javax.swing.*;
import java.util.*;
public class LScP extends JScrollPane 
 {
  M parent;
  String name;
  Hashtable kidsh=new Hashtable();
  String[] kidsa=new String[1024];
  int nflayer=1;
  LScP() { super();} 
  LScP(M p,String n,Rec rec) 
   {
    super();
    parent=p;
    name=n;
    Te.LScPh.put(name,this);
    setPreferredSize(new Dimension(rec.wi,rec.hi));
    //getViewport().setScrollMode(JViewport.BACKINGSTORE_SCROLL_MODE);
   }
  dP getsize() { return new dP(getSize()); }
  void attach(LP lp) { getViewport().add(lp); }
  void detach(LP lp) 
   { 
    remove(lp); 
    tta("LScP.detach:"+lp.name);
   }
  void setlayer(LP lp) { setlayer(lp,nflayer++); } 
  void setlayer(LP lp,int l) 
   {
    getViewport().add(lp);
   }
  int getlayer(LP lp) { return 42; }
  public void tta(String s) { parent.tta(s); }
  public void tta1(String s) { parent.tta1(s); }
 }
