Beispiel #1
0
 private void installUI(LComponent comp) {
   comp.setUIRenderer(this.uiConfig.createUIFactory(comp.getUIName()));
   if (comp.isContainer()) {
     LComponent[] childs = ((LContainer) comp).getComponents();
     for (int i = 0; i < childs.length; i++) {
       this.installUI(childs[i]);
     }
   }
 }
Beispiel #2
0
 void setDesktop(LComponent comp) {
   if (comp.isContainer()) {
     LComponent[] child = ((LContainer) comp).getComponents();
     for (int i = 0; i < child.length; i++) {
       this.setDesktop(child[i]);
     }
   }
   comp.setDesktop(this);
 }
Beispiel #3
0
  void setComponentStat(LComponent comp, boolean active) {
    if (this == Desktop.EMPTY_DESKTOP) {
      return;
    }

    if (active == false) {
      if (this.hoverComponent == comp) {
        this.processMouseMotionEvent();
      }

      if (this.selectedComponent == comp) {
        this.deselectComponent();
      }

      for (int i = 0; i < this.clickComponent.length; i++) {
        if (this.clickComponent[i] == comp) {
          this.clickComponent[i] = null;
          break;
        }
      }

      if (this.modal == comp) {
        this.modal = null;
      }

    } else {
      this.processMouseMotionEvent();
    }

    if (comp.isContainer()) {
      LComponent[] components = ((LContainer) comp).getComponents();
      int size = ((LContainer) comp).getComponentCount();
      for (int i = 0; i < size; i++) {
        this.setComponentStat(components[i], active);
      }
    }
  }