src/authoring/views/EntityTab.java
public void addNewEntity(String type, Map<Class, Object[]> componentAttributes) {
		EntityBox eb = new EntityBox(type, componentAttributes);
		eb.setOnMouseClicked(mouseEvent -> {
			if(mouseEvent.getButton().equals(MouseButton.SECONDARY)) {
				ContextMenu cMenu = new ContextMenu();
				try {
					MenuItem delete = (MenuItem) eFactory.buildClickElement(ClickElementType.MenuItem, "Delete", e->{removeEntity(eb);});
					MenuItem edit = (MenuItem) eFactory.buildClickElement(ClickElementType.MenuItem, "Edit", e->{editEntity(componentAttributes);});
					cMenu.getItems().addAll(edit, delete);

					cMenu.setAutoHide(true);
				} catch (Exception e1) {
					LOGGER.log(java.util.logging.Level.SEVERE, e1.toString(), e1);
				}
				cMenu.show(pane, mouseEvent.getScreenX(), mouseEvent.getScreenY());
			}
		});
		pane.getChildren().add(eb);
	}
/**
	 * Adds a new entity to the entityView
	 * @param type the type of entity being created
	 * @param componentAttributes the attributes of a component
	 */
Adds a new entity to the entityView
@param type the type of entity being created
@param componentAttributes the attributes of a component
Adds a new entity to the entityView @param type the type of entity being created @param componentAttributes the attributes of a component
public void addNewEntity(String type, Map<Class, Object[]> componentAttributes) {
		EntityBox eb = new EntityBox(type, componentAttributes);
		eb.setOnMouseClicked(mouseEvent -> {
			if(mouseEvent.getButton().equals(MouseButton.SECONDARY)) {
				ContextMenu cMenu = new ContextMenu();
				try {
					MenuItem delete = (MenuItem) eFactory.buildClickElement(ClickElementType.MenuItem, "Delete", e->{removeEntity(eb);});
					MenuItem edit = (MenuItem) eFactory.buildClickElement(ClickElementType.MenuItem, "Edit", e->{editEntity(componentAttributes);});
					cMenu.getItems().addAll(edit, delete);
					cMenu.setAutoHide(true);
				} catch (Exception e1) {
					LOGGER.log(java.util.logging.Level.SEVERE, e1.toString(), e1);
				}
				cMenu.show(pane, mouseEvent.getScreenX(), mouseEvent.getScreenY());
			}
		});
		pane.getChildren().add(eb);
	}
public void addNewEntity ( String type , Map < Class , Object [ ] > componentAttributes ) { EntityBox eb = new EntityBox ( type , componentAttributes ) ; eb . setOnMouseClicked ( mouseEvent -> { if ( mouseEvent . getButton ( ) . equals ( MouseButton . SECONDARY ) ) { ContextMenu cMenu = new ContextMenu ( ) ; try { MenuItem delete = ( MenuItem ) eFactory . buildClickElement ( ClickElementType . MenuItem , "Delete" , e -> { removeEntity ( eb ) ; } ) ; MenuItem edit = ( MenuItem ) eFactory . buildClickElement ( ClickElementType . MenuItem , "Edit" , e -> { editEntity ( componentAttributes ) ; } ) ; cMenu . getItems ( ) . addAll ( edit , delete ) ; cMenu . setAutoHide ( true ) ; } catch ( Exception e1 ) { LOGGER . log ( java . util . logging . Level . SEVERE , e1 . toString ( ) , e1 ) ; } cMenu . show ( pane , mouseEvent . getScreenX ( ) , mouseEvent . getScreenY ( ) ) ; } } ) ; pane . getChildren ( ) . add ( eb ) ; }
Adds a new entity to the entityView
 @param type the type of entity being created
 @param componentAttributes the attributes of a component
Adds a new entity to the entityView @param type the type of entity being created @param componentAttributes the attributes of a component