# DIAGRAM TAB
optionsEditor.item.Diagram.view.UI = treeTableNodeUI
optionsEditor.item.Diagram.view.expandLevel = 1
optionsEditor.item.Diagram.order = 10
optionsEditor.item.Diagram.view.description = ["diagram/diagram_description"]

option.links=Direct
option.links.updateDiagram = true
optionsEditor.item.Diagram.item.Links.name = ["diagram/links"]
optionsEditor.item.Diagram.item.Links = ChoiceField(
\   {
\     values := { "Direct", "Rectilinear" }
\   }
\ )
optionsEditor.item.Diagram.item.Links.propertyName = option.links
optionsEditor.item.Diagram.item.Links.order = 30
optionsEditor.item.Diagram.item.Links.view.description = ["diagram/links_description"]

optionsEditor.item.Diagram.item.Layout.order = 40
optionsEditor.item.Diagram.item.Layout.name = ["diagram/layout"]
optionsEditor.item.Diagram.item.Layout.view.description = ["diagram/layout_description"]

# "Layout inheritance" option
option.inheritance=Vertical
optionsEditor.item.Diagram.item.Layout.item.Inheritance.name = ["diagram/layout_inheritance"]
optionsEditor.item.Diagram.item.Layout.item.Inheritance = ChoiceField(
\   {
\     values := { "Horizontal", "Vertical" }
\   }
\ )
optionsEditor.item.Diagram.item.Layout.item.Inheritance.propertyName = option.inheritance
optionsEditor.item.Diagram.item.Layout.item.Inheritance.order = 10
optionsEditor.item.Diagram.item.Layout.item.Inheritance.view.description=["diagram/layout_inheritance_description"]

# "Layout justification" option
option.justification=Top
optionsEditor.item.Diagram.item.Layout.item.Justification.name = ["diagram/layout_justification"]
optionsEditor.item.Diagram.item.Layout.item.Justification = ChoiceField(
\   {
\     values := { "Top", "Center", "Bottom" }
\   }
\ )
optionsEditor.item.Diagram.item.Layout.item.Justification.propertyName = option.justification
optionsEditor.item.Diagram.item.Layout.item.Justification.order = 20
optionsEditor.item.Diagram.item.Layout.item.Justification.view.description=["diagram/layout_justification_description"]

# "Layout quality" option (disabled by default- un-comment to restore to dialog)
;optionsEditor.item.Diagram.item.Layout.item.Quality.name = ["diagram/layout_quality"]
;optionsEditor.item.Diagram.item.Layout.item.Quality = ChoiceField(
;\   {
;\     values := { "Draft", "Medium", "High" }
;\   }
;\ )
;optionsEditor.item.Diagram.item.Layout.item.Quality.propertyName = option.quality
;optionsEditor.item.Diagram.item.Layout.item.Quality.order = 30
;optionsEditor.item.Diagram.item.Layout.item.Quality.view.description=["diagram/layout_quality_description"]

option.diagram.fontName = SansSerif
option.diagram.fontName.updateDiagram = true
optionsEditor.item.Diagram.item.FontName.name = ["diagram/fontName"]
optionsEditor.item.Diagram.item.FontName = FontNameField
optionsEditor.item.Diagram.item.FontName.propertyName = option.diagram.fontName
optionsEditor.item.Diagram.item.FontName.order = 45
optionsEditor.item.Diagram.item.FontName.view.description = ["diagram/fontName_description"]
optionsEditor.item.Diagram.item.FontName.condition = isGlobalOptions()

# "Initial Maximum Width" option
option.initialwidth = 200
option.initialwidth.updateDiagram = true
optionsEditor.item.Diagram.item.Initial Maximum Width.name = ["diagram/classes_initialMaximumWidth"]
optionsEditor.item.Diagram.item.Initial Maximum Width = IntField
optionsEditor.item.Diagram.item.Initial Maximum Width.propertyName = option.initialwidth
optionsEditor.item.Diagram.item.Initial Maximum Width.order = 50
optionsEditor.item.Diagram.item.Initial Maximum Width.view.description= ["diagram/classes_initialMaximumWidth_description"]

optionsEditor.item.Diagram.item.Associations.order = 70
optionsEditor.item.Diagram.item.Associations.name = ["diagram/associations"]
optionsEditor.item.Diagram.item.Associations.view.description = ["diagram/associations_description"]

option.associationLinks.directed = Automatic
option.associationLinks.directed.updateDiagram = true
optionsEditor.item.Diagram.item.Associations.item.Draw Directed.name = ["diagram/drawDirected"]
optionsEditor.item.Diagram.item.Associations.item.Draw Directed = ChoiceField(
\   {
\     values := { "Automatic", "All", "No" }
\   }
\ )
optionsEditor.item.Diagram.item.Associations.item.Draw Directed.propertyName = option.associationLinks.directed
optionsEditor.item.Diagram.item.Associations.item.Draw Directed.order = 10
optionsEditor.item.Diagram.item.Associations.item.Draw Directed.view.description= ["diagram/drawDirected_description"]

option.associationLinks.showAttribute = Automatic
option.associationLinks.showAttribute.updateDiagram = true
optionsEditor.item.Diagram.item.Associations.item.Show Attributes.name = ["diagram/showAttributes"]
optionsEditor.item.Diagram.item.Associations.item.Show Attributes = ChoiceField(
\   {
\     values := { "Automatic", "All", "No" }
\   }
\ )
optionsEditor.item.Diagram.item.Associations.item.Show Attributes.propertyName = option.associationLinks.showAttribute
optionsEditor.item.Diagram.item.Associations.item.Show Attributes.order = 20
optionsEditor.item.Diagram.item.Associations.item.Show Attributes.view.description= ["diagram/showAttributes_description"]

option.associationLinks.showDistantLinkAsAttribute=true
option.associationLinks.showDistantLinkAsAttribute.updateDiagram = true
#optionsEditor.item.Diagram.item.Associations.item.Show Distant Link As Attribute.name = ["diagram/showDistantLinkAsAttribute"]
#optionsEditor.item.Diagram.item.Associations.item.Show Distant Link As Attribute = BooleanField
#optionsEditor.item.Diagram.item.Associations.item.Show Distant Link As Attribute.propertyName = option.associationLinks.showDistantLinkAsAttribute
#optionsEditor.item.Diagram.item.Associations.item.Show Distant Link As Attribute.order = 30
#optionsEditor.item.Diagram.item.Associations.item.Show Distant Link As Attribute.view.description= ["diagram/showDistantLinkAsAttribute_description"]

application.generate_metafiles = true
optionsEditor.item.Diagram.item.Generate metafiles when saving diagrams.name = ["diagram/generateMetafilesWhenSavingDiagrams"]
optionsEditor.item.Diagram.item.Generate metafiles when saving diagrams = BooleanField
optionsEditor.item.Diagram.item.Generate metafiles when saving diagrams.propertyName = application.generate_metafiles
optionsEditor.item.Diagram.item.Generate metafiles when saving diagrams.condition = isGlobalOptions()
optionsEditor.item.Diagram.item.Generate metafiles when saving diagrams.order = 100
optionsEditor.item.Diagram.item.Generate metafiles when saving diagrams.view.description=["diagram/generateMetafilesWhenSavingDiagrams_description"]

option.showprintgrid = false
option.showprintgrid.updateDiagram = true
optionsEditor.item.Diagram.item.Show Print Grid.name = ["print/optionsShowPrintGrid"]
optionsEditor.item.Diagram.item.Show Print Grid = BooleanField
optionsEditor.item.Diagram.item.Show Print Grid.propertyName = option.showprintgrid
optionsEditor.item.Diagram.item.Show Print Grid.order = 110
optionsEditor.item.Diagram.item.Show Print Grid.view.description=["print/optionsShowPrintGrid_description"]

