mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-11 08:10:56 +00:00
Fix diagram layout not working
This commit is contained in:
parent
d4110d5ceb
commit
c91b5e2015
@ -34,34 +34,20 @@
|
|||||||
*/
|
*/
|
||||||
package net.sourceforge.plantuml.cheneer;
|
package net.sourceforge.plantuml.cheneer;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Stack;
|
import java.util.Stack;
|
||||||
|
|
||||||
import net.atmp.CucaDiagram;
|
|
||||||
import net.sourceforge.plantuml.abel.Entity;
|
import net.sourceforge.plantuml.abel.Entity;
|
||||||
import net.sourceforge.plantuml.core.DiagramDescription;
|
import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
|
||||||
import net.sourceforge.plantuml.core.UmlSource;
|
import net.sourceforge.plantuml.core.UmlSource;
|
||||||
import net.sourceforge.plantuml.skin.UmlDiagramType;
|
import net.sourceforge.plantuml.skin.UmlDiagramType;
|
||||||
|
|
||||||
public class ChenEerDiagram extends CucaDiagram {
|
public class ChenEerDiagram extends AbstractEntityDiagram {
|
||||||
|
|
||||||
public ChenEerDiagram(UmlSource source, Map<String, String> skinParam) {
|
public ChenEerDiagram(UmlSource source, Map<String, String> skinParam) {
|
||||||
super(source, UmlDiagramType.CHEN_EER, skinParam);
|
super(source, UmlDiagramType.CHEN_EER, skinParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public DiagramDescription getDescription() {
|
|
||||||
return new DiagramDescription("(Chen EER)");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected final List<String> getDotStrings() {
|
|
||||||
return Arrays.asList("nodesep=.20;", "ranksep=0.4;", "edge [fontsize=11,labelfontsize=11];",
|
|
||||||
"node [fontsize=11];");
|
|
||||||
}
|
|
||||||
|
|
||||||
private final Stack<Entity> ownerStack = new Stack<Entity>();
|
private final Stack<Entity> ownerStack = new Stack<Entity>();
|
||||||
|
|
||||||
public void pushOwner(Entity group) {
|
public void pushOwner(Entity group) {
|
||||||
|
@ -90,7 +90,8 @@ public class CommandAssociateRelationship extends SingleLineCommand2<ChenEerDiag
|
|||||||
final Link link = new Link(diagram.getEntityFactory(), diagram.getCurrentStyleBuilder(), relationship, entity,
|
final Link link = new Link(diagram.getEntityFactory(), diagram.getCurrentStyleBuilder(), relationship, entity,
|
||||||
linkType,
|
linkType,
|
||||||
// TODO: Cardinality
|
// TODO: Cardinality
|
||||||
LinkArg.build(Display.NULL, 1));
|
LinkArg.build(Display.NULL, 3));
|
||||||
|
link.setPortMembers(diagram.getPortId(relationship.getName()), diagram.getPortId(entity.getName()));
|
||||||
diagram.addLink(link);
|
diagram.addLink(link);
|
||||||
|
|
||||||
return CommandExecutionResult.ok();
|
return CommandExecutionResult.ok();
|
||||||
|
@ -116,7 +116,7 @@ public class CommandCreateAttribute extends SingleLineCommand2<ChenEerDiagram> {
|
|||||||
|
|
||||||
final LinkType linkType = new LinkType(LinkDecor.NONE, LinkDecor.NONE);
|
final LinkType linkType = new LinkType(LinkDecor.NONE, LinkDecor.NONE);
|
||||||
final Link link = new Link(diagram.getEntityFactory(), diagram.getCurrentStyleBuilder(), entity, owner, linkType,
|
final Link link = new Link(diagram.getEntityFactory(), diagram.getCurrentStyleBuilder(), entity, owner, linkType,
|
||||||
LinkArg.build(Display.NULL, 1));
|
LinkArg.build(Display.NULL, 2));
|
||||||
diagram.addLink(link);
|
diagram.addLink(link);
|
||||||
|
|
||||||
if (composite) {
|
if (composite) {
|
||||||
|
Loading…
Reference in New Issue
Block a user