コード例 #1
0
ファイル: DataContainer.java プロジェクト: rakyll/plantuml
 /**
  * Adds a {@link DataElement}. After the element has been successfully added all {@link
  * DataListener DataListeners} will be informed.
  *
  * @param element DataElement to be added.
  * @throws IllegalArgumentException if <tt>element</tt> is not of the correct type which will be
  *     checked by the method {@link #isValid}.
  */
 public void addElement(DataElement element) {
   if (isValid(element)) {
     _container.addElement(element);
     element.setContainer(this);
     notifyListeners(DataEvent.createAddEvent(this));
   } else {
     throwException(ADD, element);
   }
 }