Exemplo n.º 1
0
  /** Sets the selection status of the node. */
  public void setSelected(boolean selected) {
    boolean oldSelected = this.selected;
    this.selected = selected;
    firePropertyChange("selected", oldSelected, selected);

    if (displayComp != null) {
      displayComp.setSelected(selected);
    }

    repaint();
  }
Exemplo n.º 2
0
  /** Sets the name of the node. */
  public final void setName(String name) {
    if (name == null) {
      throw new NullPointerException("Name must not be null.");
    }

    super.setName(name);

    if (displayComp != null) {
      displayComp.setName(name);
    }

    repaint();
  }