Class Diagram<T extends Entity>

java.lang.Object
com.wisecoders.dbs.diagram.model.AbstractDiagram
com.wisecoders.dbs.diagram.model.Diagram<T>
Type Parameters:
T - is the type of entities

public class Diagram<T extends Entity> extends AbstractDiagram
Is a diagram of entities.
  • Field Details

    • MARKER_FK

      public static final int MARKER_FK
      See Also:
    • MARKER_REF

      public static final int MARKER_REF
      See Also:
    • MARKER_UNLINKED

      public static final int MARKER_UNLINKED
      See Also:
    • headerY

      public static int headerY
    • depicts

      public final List<Depict<T extends Entity>> depicts
      The groupFree keeps also the ordering on the screen.
    • groups

      public final List<Group<T extends Entity>> groups
    • callouts

      public final List<Callout> callouts
    • shapes

      public final List<Shape> shapes
    • json

      public final boolean json
    • canUndo

      public final javafx.beans.property.SimpleBooleanProperty canUndo
    • canRedo

      public final javafx.beans.property.SimpleBooleanProperty canRedo
  • Constructor Details

    • Diagram

      public Diagram(boolean json)
  • Method Details

    • bringToFront

      public void bringToFront(Depict<T> depict)
    • bringToFront

      public void bringToFront(Callout callout)
    • bringToFront

      public void bringToFront(Shape shape)
    • getEntity

      public Entity getEntity(String name)
    • createGroup

      public Group<T> createGroup(String name)
    • getGroup

      public Group<T> getGroup(String name)
    • addInSameGroupAs

      public Group<T> addInSameGroupAs(Depict<T> reference, Depict<T> toAdd)
    • isJoinedRouting

      public boolean isJoinedRouting()
    • setJoinedRouting

      public void setJoinedRouting(boolean joinedRouting)
    • setShowDeducedFks

      public void setShowDeducedFks(boolean showDeducedFks)
    • isShowDeducedFks

      public boolean isShowDeducedFks()
    • getMarker

      public int getMarker(Attribute attr)
    • hasMarker

      public boolean hasMarker(Attribute attr, int marker)
    • setMarker

      public void setMarker(Attribute attr, Integer marker)
    • resetChanged

      public void resetChanged()
    • isChanged

      public boolean isChanged()
    • refresh

      public void refresh()
    • refresh

      public void refresh(boolean forAutoGrouping)
    • createCallout

      public Callout createCallout(String text, Point position)
    • createShape

      public Shape createShape(String text, Point position)
    • createCallout

      public Callout createCallout(Unit owner, Point position)
      Create a callout for this unit. The unit or its entity has to be already in layout. Otherwise returns null.
      Parameters:
      owner - to create for
      position - where to place
      Returns:
      created hint or null if the unit does not belong to layout
    • getCalloutFor

      public Callout getCalloutFor(Unit owner)
    • isShowPageBorders

      public boolean isShowPageBorders()
    • setShowPageBorders

      public void setShowPageBorders(boolean showPageBorders)
    • isShowSchemaName

      public boolean isShowSchemaName()
    • setShowSchemaName

      public void setShowSchemaName(boolean showSchemaName)
    • isShowDataType

      public boolean isShowDataType()
    • setShowDataType

      public void setShowDataType(boolean showDataType)
    • setLineTextType

      public void setLineTextType(LineTextType lineTextType)
    • setDefaultLineText

      public void setDefaultLineText(LineTextType lineTextType)
    • getDefaultLineTextType

      public static LineTextType getDefaultLineTextType()
    • getLineTextType

      public LineTextType getLineTextType()
    • containsDepictFor

      public boolean containsDepictFor(Unit entity)
    • getDepictIncludingShapeFor

      public Depict getDepictIncludingShapeFor(Unit unit)
    • getDepictFor

      public Depict<T> getDepictFor(Unit unit)
    • moveUndoable

      public final Depictable moveUndoable(Depictable depict, double toX, double toY)
    • attach

      public final Depict<T> attach(T t, double x, double y)
    • dropCalloutUnduable

      public final Depictable dropCalloutUnduable(Callout callout)
    • detachUndoable

      public final Depict<T> detachUndoable(Depict<T> depict)
    • detach

      public final boolean detach(Depict<T> depict)
    • attachRecursiveAndCreateGroupForHierarchicalEntities

      public void attachRecursiveAndCreateGroupForHierarchicalEntities(T entity, Point dropPoint)
    • attachRecursive

      public List<Depict<T>> attachRecursive(T entity, Point where, boolean includeEmptyEntities)
    • recursiveFindAndAttachChildrenEntities

      public List<Depict<T>> recursiveFindAndAttachChildrenEntities(T entity, Point where, boolean includeEmptyEntities)
    • getMostReferredDepict

      public Depict<T> getMostReferredDepict()
    • getWidth

      public double getWidth()
    • getHeight

      public double getHeight()
    • hideFunctionalColumns

      public void hideFunctionalColumns()
    • hideColumnsOnLargeDepicts

      public void hideColumnsOnLargeDepicts()
    • hideAllColumns

      public void hideAllColumns()
    • showAllColumns

      public void showAllColumns()
    • autoArrange

      public void autoArrange(Group group)
    • autoArrange

      public void autoArrange(ArrangerMode mode)
    • hideRelation

      public void hideRelation(Relation rel)
    • showAllForeignKeys

      public void showAllForeignKeys()
    • showAllEntityForeignKeys

      public void showAllEntityForeignKeys(Entity entity)
    • setHideRelations

      public void setHideRelations(String hideRelationNames)
    • getHiddenRelationNames

      public String getHiddenRelationNames()
    • colorGroups

      public void colorGroups(boolean overrideTableColor)
    • findRelationsWithEntity

      public static List<Relation> findRelationsWithEntity(Entity fromEntity, Entity toEntity)
    • getFreePlacePoint

      public Point getFreePlacePoint()
    • undo

      public void undo()
    • redo

      public void redo()
    • isShowPhysicalName

      public boolean isShowPhysicalName()
    • setShowPhysicalName

      public void setShowPhysicalName(boolean showPhysicalName)
    • isShowPhysicalDictionaryName

      public boolean isShowPhysicalDictionaryName()
    • setShowPhysicalDictionaryName

      public void setShowPhysicalDictionaryName(boolean showPhysicalDictionaryName)
    • getTargetTerminatorCardinality

      public RelationCardinality getTargetTerminatorCardinality(com.wisecoders.dbs.diagram.fx.notation.Notation notation, Relation<T> relation)