/** Attribute property changed. */ public void dbAttributeChanged(AttributeEvent e) { Entity entity = e.getEntity(); if (entity instanceof DbEntity) { ((DbEntity) entity).dbAttributeChanged(e); } }
public void dbAttributeRemoved(AttributeEvent e) { updateEntityCell(e.getEntity()); }
public void dbAttributeChanged(AttributeEvent e) { updateEntityCell(e.getEntity()); }
public void objAttributeChanged(AttributeEvent e) { updateEntityCell(e.getEntity()); }
public void objAttributeRemoved(AttributeEvent e) { updateEntityCell(e.getEntity()); }
public void objAttributeAdded(AttributeEvent e) { updateEntityCell(e.getEntity()); }
public void dbAttributeAdded(AttributeEvent e) { updateEntityCell(e.getEntity()); }
public void dbAttributeAdded(AttributeEvent e) { rebuildTable((DbEntity) e.getEntity()); table.select(e.getAttribute()); }
private void handleAttributeUpdate(AttributeEvent e) { if ((e == null) || (e.getEntity() != this)) {
public void removeDuplicateAttribute(AttributeEvent e) { Collection<ObjEntity> objEntities = ProjectUtil.getCollectionOfChildren((ObjEntity) e.getEntity()); for (ObjEntity objEntity: objEntities) { if (objEntity.getDeclaredAttribute(e.getAttribute().getName()) != null) { JOptionPane pane = new JOptionPane( String.format("'%s' and '%s' can't have attribute '%s' together. " + "Would you like to delete this attribute from the '%s' class?", objEntity.getName(), e.getEntity().getName(), e.getAttribute().getName(), objEntity.getName()), JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION); JDialog dialog = pane.createDialog(Application.getFrame(), "Confirm Remove"); dialog.setVisible(true); boolean shouldDelete; Object selectedValue = pane.getValue(); shouldDelete = selectedValue != null && selectedValue.equals(JOptionPane.YES_OPTION); if (shouldDelete) { objEntity.removeAttribute(e.getAttribute().getName()); objEntity.removeAttributeOverride(e.getAttribute().getName()); } } } }
private void handleAttributeUpdate(AttributeEvent e) { if (e == null || e.getEntity() != this) {
public void removeObjAttributes(ObjEntity entity, ObjAttribute[] attribs) { ProjectController mediator = getProjectController(); for (ObjAttribute attrib : attribs) { entity.removeAttribute(attrib.getName()); AttributeEvent e = new AttributeEvent( Application.getFrame(), attrib, entity, MapEvent.REMOVE); mediator.fireObjAttributeEvent(e); Collection<ObjEntity> objEntities = ProjectUtil.getCollectionOfChildren((ObjEntity) e.getEntity()); for (ObjEntity objEntity: objEntities) { objEntity.removeAttributeOverride(e.getAttribute().getName()); } } }