1 ///*******************************************************************************
2 // * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3 // * in Industry THTH ry.
4 // * All rights reserved. This program and the accompanying materials
5 // * are made available under the terms of the Eclipse Public License v1.0
6 // * which accompanies this distribution, and is available at
7 // * http://www.eclipse.org/legal/epl-v10.html
10 // * VTT Technical Research Centre of Finland - initial API and implementation
11 // *******************************************************************************/
12 //package org.simantics.g2d.elementclass;
14 //import java.awt.BasicStroke;
15 //import java.awt.Color;
16 //import java.awt.Font;
17 //import java.awt.FontMetrics;
18 //import java.awt.Graphics2D;
19 //import java.awt.Rectangle;
20 //import java.awt.Shape;
21 //import java.awt.event.ActionEvent;
22 //import java.awt.event.ActionListener;
23 //import java.awt.geom.AffineTransform;
24 //import java.awt.geom.Path2D;
25 //import java.awt.geom.Point2D;
26 //import java.awt.geom.Rectangle2D;
27 //import java.util.EnumSet;
28 //import java.util.Map;
30 //import javax.vecmath.Vector2d;
32 //import org.simantics.g2d.diagram.IDiagram;
33 //import org.simantics.g2d.element.ElementClass;
34 //import org.simantics.g2d.element.ElementHints;
35 //import org.simantics.g2d.element.ElementUtils;
36 //import org.simantics.g2d.element.IElement;
37 //import org.simantics.g2d.element.SceneGraphNodeKey;
38 //import org.simantics.g2d.element.handler.ElementHandler;
39 //import org.simantics.g2d.element.handler.FillColor;
40 //import org.simantics.g2d.element.handler.InternalSize;
41 //import org.simantics.g2d.element.handler.LifeCycle;
42 //import org.simantics.g2d.element.handler.Move;
43 //import org.simantics.g2d.element.handler.Outline;
44 //import org.simantics.g2d.element.handler.Rotate;
45 //import org.simantics.g2d.element.handler.Scale;
46 //import org.simantics.g2d.element.handler.SceneGraph;
47 //import org.simantics.g2d.element.handler.StaticSymbol;
48 //import org.simantics.g2d.element.handler.Text;
49 //import org.simantics.g2d.element.handler.TextEditor;
50 //import org.simantics.g2d.element.handler.Transform;
51 //import org.simantics.g2d.element.handler.TextEditor.Modifier;
52 //import org.simantics.g2d.element.handler.impl.BorderColorImpl;
53 //import org.simantics.g2d.element.handler.impl.FillColorImpl;
54 //import org.simantics.g2d.element.handler.impl.SimpleElementLayers;
55 //import org.simantics.g2d.element.handler.impl.StaticSymbolImpl;
56 //import org.simantics.g2d.element.handler.impl.TextColorImpl;
57 //import org.simantics.g2d.element.handler.impl.TextEditorImpl;
58 //import org.simantics.g2d.element.handler.impl.TextFontImpl;
59 //import org.simantics.g2d.element.handler.impl.TextImpl;
60 //import org.simantics.g2d.image.Image;
61 //import org.simantics.g2d.image.ProviderUtils;
62 //import org.simantics.g2d.image.impl.AbstractImage;
63 //import org.simantics.g2d.utils.Alignment;
64 //import org.simantics.scenegraph.Node;
65 //import org.simantics.scenegraph.g2d.G2DParentNode;
66 //import org.simantics.scenegraph.g2d.nodes.MonitorNode;
67 //import org.simantics.utils.datastructures.cache.IFactory;
68 //import org.simantics.utils.datastructures.cache.IProvider;
69 //import org.simantics.utils.datastructures.cache.ProvisionException;
70 //import org.simantics.utils.datastructures.hints.IHintContext.Key;
71 //import org.simantics.utils.datastructures.hints.IHintContext.KeyOf;
72 //import org.simantics.utils.strings.format.MetricsFormat;
73 //import org.simantics.utils.strings.format.MetricsFormatList;
76 // * @author Tuukka Lehtonen
78 //public class MonitorClass {
80 // static final Font FONT = Font.decode("Helvetica 12");
83 // * Back-end specific object describing the monitored component.
85 // public static final Key KEY_MONITOR_COMPONENT = new KeyOf(Object.class, "MONITOR_COMPONENT");
88 // * The valuation suffix string describing the monitored variable of the
89 // * component described by {@link #KEY_MONITOR_COMPONENT}.
91 // public static final Key KEY_MONITOR_SUFFIX = new KeyOf(String.class, "MONITOR_SUFFIX");
93 // public static final Key KEY_MONITOR_SUBSTITUTIONS = new KeyOf(Map.class, "MONITOR_SUBSTITUTIONS");
94 // public static final Key KEY_MONITOR_GC = new KeyOf(Graphics2D.class, "MONITOR_GC");
95 // public static final Key KEY_MONITOR_HEIGHT = new KeyOf(Double.class, "MONITOR_HEIGHT");
96 // public static final Key KEY_NUMBER_FORMAT = new KeyOf(MetricsFormat.class, "NUMBER_FORMAT");
97 // public static final Key KEY_TOOLTIP_TEXT = new KeyOf(String.class, "TOOLTIP_TEXT");
100 // * If this hint is defined, the monitor will force its x-axis to match this
101 // * angle. If this hint doesn't exist, the monitor will not force x-axis
104 // public static final Key KEY_DIRECTION = new KeyOf(Double.class, "MONITOR_DIRECTION");
106 // public static final Key KEY_BORDER_WIDTH = new KeyOf(Double.class, "MONITOR_BORDER");
108 // public static final Key KEY_SG_NODE = new SceneGraphNodeKey(Node.class, "MONITOR_SG_NODE");
110 // final static BasicStroke STROKE = new BasicStroke(1.0f);
112 // public final static Alignment DEFAULT_HORIZONTAL_ALIGN = Alignment.CENTER;
113 // public final static Alignment DEFAULT_VERTICAL_ALIGN = Alignment.CENTER;
114 // public final static MetricsFormat DEFAULT_NUMBER_FORMAT = MetricsFormatList.METRICS_DECIMAL;
116 // public final static Color DEFAULT_FILL_COLOR = new Color(224, 224, 224);
117 // public final static Color DEFAULT_BORDER_COLOR = Color.BLACK;
119 // public final static double DEFAULT_HORIZONTAL_MARGIN = 5.0;
120 // public final static double DEFAULT_VERTICAL_MARGIN = 2.5;
122 // static Alignment getHorizontalAlignment(IElement e) {
123 // return ElementUtils.getHintOrDefault(e, ElementHints.KEY_HORIZONTAL_ALIGN, DEFAULT_HORIZONTAL_ALIGN);
126 // static Alignment getVerticalAlignment(IElement e) {
127 // return ElementUtils.getHintOrDefault(e, ElementHints.KEY_VERTICAL_ALIGN, DEFAULT_VERTICAL_ALIGN);
130 // static MetricsFormat getNumberFormat(IElement e) {
131 // return ElementUtils.getHintOrDefault(e, KEY_NUMBER_FORMAT, DEFAULT_NUMBER_FORMAT);
134 // static void setNumberFormat(IElement e, MetricsFormat f) {
135 // ElementUtils.setOrRemoveHint(e, KEY_NUMBER_FORMAT, f);
138 // static double getHorizontalMargin(IElement e) {
139 // return DEFAULT_HORIZONTAL_MARGIN;
142 // static double getVerticalMargin(IElement e) {
143 // return DEFAULT_VERTICAL_MARGIN;
146 // static Font getFont(IElement e) {
147 // return ElementUtils.getHintOrDefault(e, ElementHints.KEY_FONT, FONT);
150 // public static class MonitorHandlerImpl implements MonitorHandler {
151 // private static final long serialVersionUID = -4258875745321808416L;
152 // public static final MonitorHandler INSTANCE = new MonitorHandlerImpl();
155 // static class Initializer implements LifeCycle {
156 // private static final long serialVersionUID = 4404942036933073584L;
158 // IElement parentElement;
159 // Map<String, String> substitutions;
164 // Initializer(IElement parentElement, Map<String, String> substitutions, Object component, String suffix, boolean hack) {
165 // this.parentElement = parentElement;
166 // this.substitutions = substitutions;
167 // this.component = component;
168 // this.suffix = suffix;
173 // public void onElementActivated(IDiagram d, IElement e) {
179 // Point2D parentPos = ElementUtils.getPos(parentElement);
180 // Point2D thisPos = ElementUtils.getPos(e);
182 // Move move = e.getElementClass().getSingleItem(Move.class);
183 // move.moveTo(e, thisPos.getX() - parentPos.getX(), thisPos.getY() - parentPos.getY());
189 // public void onElementCreated(IElement e) {
190 // if(parentElement != null) e.setHint(ElementHints.KEY_PARENT_ELEMENT, parentElement);
191 // if(substitutions != null) e.setHint(KEY_MONITOR_SUBSTITUTIONS, substitutions);
192 // if(component != null) e.setHint(KEY_MONITOR_COMPONENT, component);
193 // if(suffix != null) e.setHint(KEY_MONITOR_SUFFIX, suffix);
195 // e.setHint(KEY_DIRECTION, 0.0);
196 // e.setHint(KEY_NUMBER_FORMAT, DEFAULT_NUMBER_FORMAT);
197 // //e.setHint(KEY_HORIZONTAL_ALIGN, Alignment.LEADING);
198 // //e.setHint(KEY_VERTICAL_ALIGN, Alignment.LEADING);
201 // public void onElementDeactivated(IDiagram d, IElement e) {
204 // public void onElementDestroyed(IElement e) {
208 // static String finalText(IElement e) {
209 // String text = e.getElementClass().getSingleItem(Text.class).getText(e);
212 // return substitute(text, e);
215 // public static String editText(IElement e) {
216 // return substitute("#v1", e);
219 // private static String formValue(IElement e) {
220 // // TODO: consider using substitute
221 // Map<String, String> substitutions = e.getHint(KEY_MONITOR_SUBSTITUTIONS);
222 // if (substitutions != null) {
223 // String value = substitutions.get("#v1");
224 // if (substitutions.containsKey("#u1") && substitutions.get("#u1").length() > 0) {
225 // value += " " + substitutions.get("#u1");
232 // static String substitute(String text, IElement e) {
233 // Map<String, String> substitutions = e.getHint(KEY_MONITOR_SUBSTITUTIONS);
234 // return substitute(text, substitutions);
237 // static String substitute(String text, Map<String, String> substitutions) {
238 // if (substitutions != null) {
239 // // TODO: slow as hell
240 // for(Map.Entry<String, String> entry : substitutions.entrySet()) {
241 // if (entry.getValue() != null) {
242 // text = text.replace(entry.getKey(), entry.getValue());
244 // text = text.replace(entry.getKey(), "<null>");
251 // public static void update(IElement e) {
252 // MonitorSGNode node = e.getElementClass().getSingleItem(MonitorSGNode.class);
256 // public static void cleanup(IElement e) {
257 // MonitorSGNode node = e.getElementClass().getSingleItem(MonitorSGNode.class);
261 // static final Rectangle2D DEFAULT_BOX = new Rectangle2D.Double(0, 0, 0, 0);
263 // static Shape createMonitor(IElement e) {
264 // Alignment hAlign = getHorizontalAlignment(e);
265 // Alignment vAlign = getVerticalAlignment(e);
266 // double hMargin = getHorizontalMargin(e);
267 // double vMargin = getVerticalMargin(e);
269 // String text = finalText(e);
270 // if(text == null) {
271 // return align(hMargin, vMargin, hAlign, vAlign, DEFAULT_BOX);
274 // Graphics2D g = e.getHint(KEY_MONITOR_GC);
276 // return align(hMargin, vMargin, hAlign, vAlign, DEFAULT_BOX);
279 // Font f = getFont(e);
280 // FontMetrics fm = g.getFontMetrics(f);
281 // Rectangle2D rect = fm.getStringBounds(text, g);
283 // return align(hMargin, vMargin, hAlign, vAlign, rect);
286 // static Shape align(double hMargin, double vMargin, Alignment hAlign, Alignment vAlign, Rectangle2D rect) {
287 // //System.out.println("align: " + hMargin + ", " + vMargin + ", " + hAlign + ", " + vAlign + ": " + rect);
288 // double tx = align(hMargin, hAlign, rect.getMinX(), rect.getMaxX());
289 // double ty = align(vMargin, vAlign, rect.getMinY(), rect.getMaxY());
290 // //System.out.println(" translate: " + tx + " " + ty);
291 // double nw = rect.getWidth() + 2*hMargin;
292 // double nh = rect.getHeight() + 2*vMargin;
293 // return makePath(tx + rect.getMinX(), ty + rect.getMinY(), nw, nh);
296 // static double align(double margin, Alignment align, double min, double max) {
297 // double s = max - min;
302 // return -s - 2 * margin - min;
304 // return -0.5 * s - margin - min;
310 // static Path2D makePath(double x, double y, double w, double h) {
311 // Path2D path = new Path2D.Double();
312 // path.moveTo(x, y);
313 // path.lineTo(x+w, y);
314 // path.lineTo(x+w, y+h);
315 // path.lineTo(x, y+h);
320 // public static final Shape BOX_SHAPE = new Rectangle(-1, -1, 2, 2);
322 // public static class MonitorSGNode implements SceneGraph, InternalSize, Outline {
323 // private static final long serialVersionUID = -106278359626957687L;
325 // static final MonitorSGNode INSTANCE = new MonitorSGNode();
328 // public void init(final IElement e, final G2DParentNode parent) {
329 // // Create node if it doesn't exist yet
330 // MonitorNode node = (MonitorNode)e.getHint(KEY_SG_NODE);
331 // if(node == null || node.getBounds() == null || node.getParent() != parent) {
332 // node = parent.addNode(ElementUtils.generateNodeId(e), MonitorNode.class);
333 // e.setHint(KEY_SG_NODE, node);
335 // node.setActionListener(new ActionListener() {
337 // public void actionPerformed(ActionEvent event) {
338 // TextEditor editor = e.getElementClass().getAtMostOneItemOfClass(TextEditor.class);
339 // if (editor != null) {
340 // Modifier modifier = editor.getModifier(e);
341 // if (modifier != null) {
342 // String newValue = event.getActionCommand();
343 // String error = modifier.isValid(e, newValue);
345 // if (error == null) {
346 // // Only modify if the modification was not
347 // // cancelled and the value is valid.
348 // modifier.modify(e, newValue);
350 // // TODO: show error somehow, possibly through status bar
352 // // Make sure that the monitor content gets
353 // // reset to its previous value.
354 // MonitorNode node = e.getHint(KEY_SG_NODE);
356 // node.setText(formValue(e));
361 //// final Text t = e.getElementClass().getAtMostOneItemOfClass(Text.class);
362 //// t.setText(e, event.getActionCommand()); // FIXME
364 // node.setSize(50, 22);
365 // Double border_width = (Double)e.getHint(KEY_BORDER_WIDTH);
366 // if(border_width == null) border_width = 0.1;
368 // node.setBorderWidth(border_width);
370 // Rectangle2D bounds = (Rectangle2D)e.getHint(ElementHints.KEY_BOUNDS);
371 // if(bounds != null) node.setBounds(bounds);
376 // public void update(IElement e) {
377 // String value = null;
379 // final Text t = e.getElementClass().getAtMostOneItemOfClass(Text.class);
380 // assert(t != null);
382 // value = formValue(e);
384 // MonitorNode node = (MonitorNode) e.getHint(KEY_SG_NODE);
385 // if (node != null && value != null) {
386 // node.setText(value);
387 // Object component = e.getHint(KEY_MONITOR_COMPONENT);
388 // if (component != null) {
389 // node.setEditable(true);
391 // node.setEditable(false);
394 // // FIXME: set only if changed .. (but quickfix is not to clone)
395 // Font font = ElementUtils.getTextFont(e);
396 // if (node.getFont() != font) { // Don't update if we have a same object
397 // node.setFont(font);
399 // Color color = ElementUtils.getTextColor(e);
400 // node.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha()));
401 // String tt = (String) e.getHint(KEY_TOOLTIP_TEXT);
403 // node.setToolTipText(new String(tt));
408 // public void cleanup(IElement e) {
409 // MonitorNode node = (MonitorNode)e.removeHint(KEY_SG_NODE);
415 // public Rectangle2D getBounds(IElement e, Rectangle2D size) {
416 // Rectangle2D shape = new Rectangle2D.Double(0, 0, 0, 0);
418 // MonitorNode node = (MonitorNode)e.getHint(KEY_SG_NODE);
419 // if(node != null && node.getBounds() != null) {
420 // shape = node.getBounds().getBounds2D();
423 // if(size != null) size.setRect(shape);
428 // public Shape getElementShape(IElement e) {
429 // Shape shape = new Rectangle2D.Double(0, 0, 0, 0);
431 // MonitorNode node = (MonitorNode)e.getHint(KEY_SG_NODE);
432 // if(node != null && node.getBounds() != null) {
433 // shape = node.getBounds();
441 // public static class Transformer implements Transform, Move, Rotate, Scale, LifeCycle {
443 // private static final long serialVersionUID = -3704887325602085677L;
445 // public static final Transformer INSTANCE = new Transformer(null);
447 // Double aspectRatio;
449 // public Transformer() {
453 // public Transformer(Double aspectRatio) {
454 // this.aspectRatio = aspectRatio;
458 // public Double getFixedAspectRatio(IElement e) {
459 // return aspectRatio;
463 // public Point2D getScale(IElement e) {
464 // AffineTransform at = e.getHint(ElementHints.KEY_TRANSFORM);
465 // return _getScale(at);
469 // public void setScale(IElement e, Point2D newScale) {
470 // // Doesn't work for monitors.
471 // Point2D oldScale = getScale(e);
472 // double sx = newScale.getX() / oldScale.getX();
473 // double sy = newScale.getY() / oldScale.getY();
474 // AffineTransform at = e.getHint(ElementHints.KEY_TRANSFORM);
475 // at = new AffineTransform(at);
477 // e.setHint(ElementHints.KEY_TRANSFORM, at);
481 // public Point2D getMaximumScale(IElement e) {
486 // public Point2D getMinimumScale(IElement e) {
490 // private static Point2D _getScale(AffineTransform at) {
491 // double m00 = at.getScaleX();
492 // double m11 = at.getScaleY();
493 // double m10 = at.getShearY();
494 // double m01 = at.getShearX();
495 // // Project unit vector to canvas
496 // double sx = Math.sqrt(m00 * m00 + m10 * m10);
497 // double sy = Math.sqrt(m01 * m01 + m11 * m11);
498 // return new Point2D.Double(sx, sy);
502 // public void rotate(IElement e, double theta, Point2D origin) {
503 // if (Double.isNaN(theta)) return;
504 // theta = Math.toDegrees(theta);
505 // Double angle = e.getHint(KEY_DIRECTION);
506 // double newAngle = angle != null ? angle+theta : theta;
507 // newAngle = Math.IEEEremainder(newAngle, 360.0);
508 // e.setHint(KEY_DIRECTION, newAngle);
512 // public double getAngle(IElement e) {
513 // Double angle = e.getHint(KEY_DIRECTION);
514 // return angle != null ? Math.toRadians(angle) : 0;
518 // public Point2D getPosition(IElement e) {
519 // AffineTransform at = e.getHint(ElementHints.KEY_TRANSFORM);
520 // Point2D p = new Point2D.Double(at.getTranslateX(), at.getTranslateY());
525 // public void moveTo(IElement e, double x, double y) {
526 // AffineTransform origAt = e.getHint(ElementHints.KEY_TRANSFORM);
527 // double oldX = origAt.getTranslateX();
528 // double oldY = origAt.getTranslateY();
529 // AffineTransform move = AffineTransform.getTranslateInstance(x-oldX, y-oldY);
530 // AffineTransform at2 = new AffineTransform(origAt);
531 // at2.preConcatenate(move);
532 // e.setHint(ElementHints.KEY_TRANSFORM, at2);
536 // public AffineTransform getTransform(IElement e) {
537 // AffineTransform at = e.getHint(ElementHints.KEY_TRANSFORM);
539 // IElement parentElement = e.getHint(ElementHints.KEY_PARENT_ELEMENT);
540 // if (parentElement == null)
543 // Transform parentTransform = parentElement.getElementClass().getSingleItem(Transform.class);
544 // assert(parentTransform!=null);
546 // AffineTransform result = (AffineTransform)at.clone();
547 // result.preConcatenate(parentTransform.getTransform(parentElement));
553 // public void setTransform(IElement e, AffineTransform at) {
554 // e.setHint(ElementHints.KEY_TRANSFORM, at.clone());
558 // public void onElementActivated(IDiagram d, IElement e) {
562 // public void onElementCreated(IElement e) {
563 // e.setHint(ElementHints.KEY_TRANSFORM, new AffineTransform());
567 // public void onElementDeactivated(IDiagram d, IElement e) {
571 // public void onElementDestroyed(IElement e) {
572 //// List<SceneGraph> nodeHandlers = e.getElementClass().getItemsByClass(SceneGraph.class);
573 //// for(SceneGraph n : nodeHandlers) {
574 //// System.out.println("element gone:"+e);
580 // static double getOrientationDelta(IElement e, AffineTransform tr) {
581 // Double angle = e.getHint(KEY_DIRECTION);
582 // if (angle == null || Double.isNaN(angle))
583 // return Double.NaN;
584 // double angrad = Math.toRadians(angle);
586 // Vector2d forcedAxis = new Vector2d(Math.cos(angrad), Math.sin(angrad));
587 // Vector2d x = new Vector2d(tr.getScaleX(), tr.getShearX());
588 // forcedAxis.normalize();
590 // double cosa = forcedAxis.dot(x);
591 // double delta = Math.acos(cosa);
595 // static class MonitorImageFactory implements IFactory<Image> {
596 // private double staticScaleX = 1, staticScaleY = 1;
598 // public MonitorImageFactory(double staticScaleX, double staticScaleY) {
599 // this.staticScaleX = staticScaleX;
600 // this.staticScaleY = staticScaleY;
604 // public Image get() throws ProvisionException {
605 // return new AbstractImage() {
606 // Shape path = align(DEFAULT_HORIZONTAL_MARGIN, DEFAULT_VERTICAL_MARGIN, DEFAULT_HORIZONTAL_ALIGN, DEFAULT_VERTICAL_ALIGN,
607 // new Rectangle2D.Double(0, 0, 50*staticScaleX, 22*staticScaleY));
610 // public Rectangle2D getBounds() {
611 // return path.getBounds2D();
615 // public EnumSet<Feature> getFeatures() {
616 // return EnumSet.of(Feature.Vector);
620 // public Shape getOutline() {
625 // public Node init(G2DParentNode parent) {
626 // MonitorNode node = parent.getOrCreateNode(""+hashCode(), MonitorNode.class);
628 // node.setSize(50, 22);
629 // node.setBorderWidth(1);
630 // node.setText("Drop Me");
631 // node.setTransform(AffineTransform.getScaleInstance(staticScaleX, staticScaleY));
638 // static final IProvider<Image> MONITOR_IMAGE =
639 // ProviderUtils.reference(
640 // ProviderUtils.cache(
641 // ProviderUtils.rasterize(
642 // new MonitorImageFactory(0.5, 0.5)
645 // static final StaticSymbol MONITOR_SYMBOL = new StaticSymbolImpl( MONITOR_IMAGE.get() );
647 // static final FillColor FILL_COLOR = new FillColorImpl(DEFAULT_FILL_COLOR);
649 // public static final ElementClass MONITOR_CLASS =
650 // ElementClass.compile(
651 // MonitorHandlerImpl.INSTANCE,
652 // Transformer.INSTANCE,
653 // BorderColorImpl.BLACK,
655 // MonitorSGNode.INSTANCE,
656 // TextImpl.INSTANCE,
657 // TextEditorImpl.INSTANCE,
658 // TextFontImpl.DEFAULT,
659 // TextColorImpl.BLACK,
660 // SimpleElementLayers.INSTANCE,
664 // // staticScale{X,Y} define the scale of the static monitor image
665 // public static ElementClass create(IElement parentElement, Map<String, String> substitutions, Object component, String suffix, double staticScaleX, double staticScaleY, ElementHandler... extraHandlers) {
666 // // Bit of a hack to be able to define the scale
667 // IProvider<Image> staticMonitorSymbolProvider = ProviderUtils.reference(
668 // ProviderUtils.cache(
671 // new MonitorImageFactory(staticScaleX, staticScaleY))));
672 // StaticSymbol staticMonitorSymbol = new StaticSymbolImpl( staticMonitorSymbolProvider.get() );
673 // return ElementClass.compile(
674 // new Initializer(parentElement, substitutions, component, suffix, parentElement != null ? false : true),
675 // MonitorHandlerImpl.INSTANCE,
676 // Transformer.INSTANCE,
677 // BorderColorImpl.BLACK,
679 // MonitorSGNode.INSTANCE,
680 // TextImpl.INSTANCE,
681 // TextEditorImpl.INSTANCE,
682 // TextFontImpl.DEFAULT,
683 // TextColorImpl.BLACK,
684 // SimpleElementLayers.INSTANCE,
685 // staticMonitorSymbol
686 // ).newClassWith(extraHandlers);