1 14 package org.wings; 15 16 17 import org.wings.plaf.DesktopPaneCG; 18 19 25 public class SDesktopPane extends SContainer { 26 public SDesktopPane() { 27 super(); 28 } 29 30 public void setLayout(SLayoutManager l) {} 31 32 36 public SComponent addComponent(SComponent component, 37 Object constraints, int index) { 38 if (constraints == null) 39 constraints = component.getLowLevelEventId(); 40 return super.addComponent(component, constraints, index); 41 } 42 43 51 public void setPosition(SComponent c, int position) { 52 getComponentList().remove(c); 53 getComponentList().add(position, c); 54 } 55 56 65 public int getIndexOf(SComponent c) { 66 int i, count; 67 68 count = getComponentCount(); 69 for (i = 0; i < count; i++) { 70 if (c == getComponent(i)) 71 return i; 72 } 73 return -1; 74 } 75 76 85 public int getPosition(SComponent c) { 86 return getIndexOf(c); 87 } 88 89 public void setCG(DesktopPaneCG cg) { 90 super.setCG(cg); 91 } 92 } 93 94 95 | Popular Tags |