Class Depict<T extends Entity>

java.lang.Object
com.wisecoders.dbs.diagram.model.Depict<T>
Type Parameters:
T - can be any class extending the Entity.
All Implemented Interfaces:
Depictable, Unit

public class Depict<T extends Entity> extends Object implements Unit, Depictable
The visual representation of a table or view. This class stores the position of tables, shapes, callouts in the diagram.
  • Field Details

    • DEFAULT_COLOR

      public static javafx.scene.paint.Color DEFAULT_COLOR
    • diagram

      public final Diagram<T extends Entity> diagram
    • entity

      public final T extends Entity entity
  • Constructor Details

    • Depict

      public Depict(Diagram<T> diagram, T entity)
  • Method Details

    • getEntity

      public T getEntity()
      Specified by:
      getEntity in interface Unit
    • getParentEntity

      public T getParentEntity()
      Specified by:
      getParentEntity in interface Unit
    • setLocation

      public void setLocation(double x, double y)
    • moveTo

      public void moveTo(double x, double y)
      Specified by:
      moveTo in interface Depictable
    • translate

      public void translate(double dx, double dy)
      Specified by:
      translate in interface Depictable
    • setSize

      public void setSize(int width, int height)
    • getPosition

      public Rect getPosition()
      Specified by:
      getPosition in interface Depictable
    • isGroupFree

      public boolean isGroupFree()
    • setGroupFree

      public void setGroupFree(boolean groupFree)
    • setAttributeVisible

      public void setAttributeVisible(Attribute attr, boolean visible)
    • hideAllAttributes

      public void hideAllAttributes()
    • showAllAttributes

      public void showAllAttributes()
    • getVisibleAttributes

      public List<? extends Attribute> getVisibleAttributes()
    • getHiddenAttributes

      public List<? extends Attribute> getHiddenAttributes()
    • refresh

      public void refresh()
      Specified by:
      refresh in interface Depictable
    • isMarkedForDeletion

      public boolean isMarkedForDeletion()
      Specified by:
      isMarkedForDeletion in interface Depictable
      Specified by:
      isMarkedForDeletion in interface Unit
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getNameWidth

      public int getNameWidth(boolean fullQualified)
    • hasHiddenAttributes

      public boolean hasHiddenAttributes()
    • getName

      public String getName()
      Specified by:
      getName in interface Unit
    • getSymbolicName

      public String getSymbolicName()
      Specified by:
      getSymbolicName in interface Unit
    • markForDeletion

      public void markForDeletion()
      Specified by:
      markForDeletion in interface Unit
    • setComment

      public void setComment(String comment)
      Specified by:
      setComment in interface Unit
    • getComment

      public String getComment()
      Specified by:
      getComment in interface Unit
    • setColor

      public boolean setColor(javafx.scene.paint.Color color)
    • getColor

      public javafx.scene.paint.Color getColor()
    • hideColumnsIfDepictIsLarge

      public void hideColumnsIfDepictIsLarge()
    • hideFunctionalColumns

      public void hideFunctionalColumns()
    • getGlobalCost

      public double getGlobalCost(String otherName)
      Specified by:
      getGlobalCost in interface Depictable
    • getDependencyCost

      public double getDependencyCost(Depictable other)
      Specified by:
      getDependencyCost in interface Depictable
    • is

      public Boolean is(UnitProperty unitProperty)
      Specified by:
      is in interface Unit
    • middleOf

      public static double middleOf(double left, double right)
    • ref

      public String ref()
      Specified by:
      ref in interface Unit
    • getCommentTags

      public Map<String,String> getCommentTags()
      Specified by:
      getCommentTags in interface Unit
    • setCommentTags

      public void setCommentTags(Map<String,String> tags)
      Specified by:
      setCommentTags in interface Unit
    • setCommentTag

      public void setCommentTag(String key, String value)
      Specified by:
      setCommentTag in interface Unit
    • getCommentTag

      public String getCommentTag(String key)
      Specified by:
      getCommentTag in interface Unit
    • getDisplayName

      public String getDisplayName(Diagram diagram)
      Specified by:
      getDisplayName in interface Unit