Exemplo n.º 1
0
  /**
   * 查找指定坐标点成员
   *
   * @param x
   * @param y
   * @return
   */
  private LComponent findComponent(int x, int y) {
    if (this.modal != null && !this.modal.isContainer()) {
      return null;
    }
    // 返回子容器
    LContainer panel = (this.modal == null) ? this.contentPane : ((LContainer) this.modal);
    LComponent comp = panel.findComponent(x, y);

    return comp;
  }
Exemplo n.º 2
0
  private int removeComponent(LContainer container, LComponent comp) {
    int removed = container.remove(comp);
    LComponent[] components = container.getComponents();
    int i = 0;
    while (removed == -1 && i < components.length - 1) {
      if (components[i].isContainer()) {
        removed = this.removeComponent((LContainer) components[i], comp);
      }
      i++;
    }

    return removed;
  }
Exemplo n.º 3
0
  final void validateContainer(LContainer container) {
    if (container.getUIResource().size() > 0) {
      container.createUI();
    }

    LComponent[] components = container.getComponents();
    int size = container.getComponentCount();
    for (int i = 0; i < size; i++) {
      if (components[i].getUIResource().size() > 0) {
        components[i].createUI();
      }
      if (components[i].isContainer()) {
        this.validateContainer((LContainer) components[i]);
      }
    }
  }
Exemplo n.º 4
0
  public void setContentPane(LContainer pane) {
    pane.setBounds(0, 0, this.getWidth(), this.getHeight());

    this.contentPane = pane;
    this.setDesktop(this.contentPane);
  }