Package org.cishell.utility.datastructure.datamodel.exception

Examples of org.cishell.utility.datastructure.datamodel.exception.UniqueNameException


  public DataModelArea createArea(String name, Object componentForArea)
      throws ClassCastException, ModelStructureException, UniqueNameException {
    if (getArea(name) != null) {
      String exceptionMessage = String.format(
        "The area '%s' already exists.  All areas must have unique names.", name);
      throw new UniqueNameException(exceptionMessage);
    } else {
      DataModelArea area = new SWTModelArea(
        this,
        getParentComponentWithType(),
        name,
View Full Code Here


  public DataModelArea createArea(String name, Object componentForArea)
      throws ClassCastException, ModelStructureException, UniqueNameException {
    if (getArea(name) != null) {
      String exceptionMessage = String.format(
        "The area '%s' already exists.  All areas must have unique names.", name);
      throw new UniqueNameException(exceptionMessage);
    } else {
      DataModelArea area = new SWTModelArea(
        null,
        null,
        name,
View Full Code Here

  public DataModelArea createArea(String name) throws UniqueNameException {
    if (getArea(name) != null) {
      String exceptionMessage = String.format(
        "The area '%s' already exists.  All areas must have unique names.", name);
      throw new UniqueNameException(exceptionMessage);
    } else {
      DataModelArea area = internalCreateArea(name);
      this.areas.put(name, area);

      return area;
View Full Code Here

    String name = area.getName();

    if (getArea(name) != null) {
      String exceptionMessage = String.format(
        "The area '%s' already exists.  All areas must have unique names.", name);
      throw new UniqueNameException(exceptionMessage);
    } else if (area.getParentComponent() != getParentComponent()) {
      String exceptionMessage = String.format(
        "Tried to manually add area %s to area %s, but parent components do not match.",
        name,
        getName());
View Full Code Here

      String format =
        "The field '%s' already exists in this area (%s).  " +
        "All fields must have unique names.";
      String exceptionMessage = String.format(
        format, fieldName, this.name);
      throw new UniqueNameException(exceptionMessage);
    } else {
      this.fields.put(fieldName, field);
      field.addToContainer(this);
    }
  }
View Full Code Here

      String format =
        "The field '%s' already exists in this group (%s).  " +
        "All fields must have unique names.";
      String exceptionMessage = String.format(
        format, fieldName, this.name);
      throw new UniqueNameException(exceptionMessage);
    }

    this.fields.put(fieldName, field);
    field.addToContainer(this);
  }
View Full Code Here

  public DataModelArea createArea(String name) throws UniqueNameException {
    if (getArea(name) != null) {
      String exceptionMessage = String.format(
        "The area '%s' already exists.  All areas must have unique names.", name);
      throw new UniqueNameException(exceptionMessage);
    } else {
      DataModelArea area = createGUISpecificArea(name);
      this.areas.put(name, area);

      return area;
View Full Code Here

    String name = area.getName();

    if (getArea(name) != null) {
      String exceptionMessage = String.format(
        "The area '%s' already exists.  All areas must have unique names.", name);
      throw new UniqueNameException(exceptionMessage);
    } else {
      this.areas.put(name, area);
    }
  }
View Full Code Here

  public DataModelGroup createGroup(String name) throws UniqueNameException {
    if (getGroup(name) != null) {
      String exceptionMessage = String.format(
        "The group '%s' already exists.  All groups must have unique names.", name);
      throw new UniqueNameException(exceptionMessage);
    } else {
      DataModelGroup group = new BasicModelGroup(name);
      this.groups.put(name, group);

      return group;
View Full Code Here

TOP

Related Classes of org.cishell.utility.datastructure.datamodel.exception.UniqueNameException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.