mirror of
https://github.com/octoleo/plantuml.git
synced 2024-12-22 02:49:06 +00:00
Remove extra logging and switch startGroup maps from HashMap to EnumMap
This commit is contained in:
parent
416325e6c8
commit
2ca7dca0e3
@ -619,7 +619,7 @@ public class SvekLine implements Moveable, Hideable, GuideLine {
|
||||
return;
|
||||
|
||||
ug.draw(link.commentForSvg());
|
||||
Map<UGroupType, String> typeIDent = new HashMap<>();
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);;
|
||||
typeIDent.put(UGroupType.CLASS, "link " + link.getEntity1().getCode() + " " + link.getEntity2().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "link_" + link.getEntity1().getCode() + "_" + link.getEntity2().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -36,8 +36,7 @@
|
||||
package net.sourceforge.plantuml.svek.image;
|
||||
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
@ -104,7 +103,7 @@ public class EntityImageBranch extends AbstractEntityImage {
|
||||
|
||||
}
|
||||
diams.setDeltaShadow(shadowing);
|
||||
Map<UGroupType, String> typeIDent = new HashMap<>();
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);
|
||||
typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -38,6 +38,7 @@ package net.sourceforge.plantuml.svek.image;
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ -138,7 +139,7 @@ public class EntityImageClass extends AbstractEntityImage implements Stencil, Wi
|
||||
if (url != null)
|
||||
ug.startUrl(url);
|
||||
|
||||
Map<UGroupType, String> typeIDent = new HashMap<>();
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);;
|
||||
typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -283,7 +283,7 @@ public class EntityImageDescription extends AbstractEntityImage {
|
||||
|
||||
final public void drawU(UGraphic ug) {
|
||||
ug.draw(new UComment("entity " + getEntity().getCodeGetName()));
|
||||
Map<UGroupType, String> typeIDent = new HashMap<>();
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);;
|
||||
typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -37,6 +37,7 @@ package net.sourceforge.plantuml.svek.image;
|
||||
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ -134,7 +135,7 @@ public class EntityImageLollipopInterface extends AbstractEntityImage {
|
||||
if (url != null)
|
||||
ug.startUrl(url);
|
||||
|
||||
Map<UGroupType, String> typeIDent = new HashMap<>();
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);;
|
||||
typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -37,6 +37,7 @@ package net.sourceforge.plantuml.svek.image;
|
||||
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ -196,7 +197,7 @@ public class EntityImageMap extends AbstractEntityImage implements Stencil, With
|
||||
if (url != null)
|
||||
ug.startUrl(url);
|
||||
|
||||
Map<UGroupType, String> typeIDent = new HashMap<>();
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);;
|
||||
typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -38,10 +38,7 @@ package net.sourceforge.plantuml.svek.image;
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Line2D;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
|
||||
import net.sourceforge.plantuml.AlignmentParam;
|
||||
import net.sourceforge.plantuml.ColorParam;
|
||||
@ -220,7 +217,7 @@ public class EntityImageNote extends AbstractEntityImage implements Stencil {
|
||||
final public void drawU(UGraphic ug) {
|
||||
final Url url = getEntity().getUrl99();
|
||||
|
||||
Map<UGroupType, String> typeIDent = new HashMap<>();
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);;
|
||||
typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -37,6 +37,7 @@ package net.sourceforge.plantuml.svek.image;
|
||||
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ -199,7 +200,7 @@ public class EntityImageObject extends AbstractEntityImage implements Stencil, W
|
||||
ug.startUrl(url);
|
||||
|
||||
|
||||
Map<UGroupType, String> typeIDent = new HashMap<>();
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);;
|
||||
typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -38,6 +38,7 @@ package net.sourceforge.plantuml.svek.image;
|
||||
import java.awt.geom.Dimension2D;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ -162,7 +163,7 @@ public class EntityImageUseCase extends AbstractEntityImage {
|
||||
ug = ug.apply(backcolor.bg());
|
||||
final UGraphic ug2 = new MyUGraphicEllipse(ug, 0, 0, ellipse.getUEllipse());
|
||||
|
||||
Map<UGroupType, String> typeIDent = new HashMap<>();
|
||||
Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);;
|
||||
typeIDent.put(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected");
|
||||
typeIDent.put(UGroupType.ID, "elem_" + getEntity().getCode());
|
||||
ug.startGroup(typeIDent);
|
||||
|
@ -992,7 +992,6 @@ public class SvgGraphics {
|
||||
// javascript: security issue
|
||||
if (SecurityUtils.ignoreThisLink(url))
|
||||
return;
|
||||
Log.info("openLink=" + title);
|
||||
|
||||
|
||||
// if (pendingAction.size() > 0)
|
||||
@ -1042,7 +1041,6 @@ public class SvgGraphics {
|
||||
}
|
||||
|
||||
public void startGroup(Map<UGroupType, String> typeIdents) {
|
||||
Log.debug("startGroup=" + typeIdents) ;
|
||||
if (!typeIdents.isEmpty())
|
||||
pendingAction.add(0, (Element) document.createElement("g"));
|
||||
for (Map.Entry<UGroupType, String> typeIdent : typeIdents.entrySet()) {
|
||||
|
Loading…
Reference in New Issue
Block a user