Package diva.graph

Examples of diva.graph.NodeRenderer.render()


     */
    public Figure render(Object node) {
        try {
            Object o = _controller.getGraphModel().getSemanticObject(node);
            NodeRenderer r = (NodeRenderer) _typedRenderers.get(o.getClass());
            return r.render(node);
        } catch (Exception ex) {
            return _defaultRenderer.render(node);
        }
    }
}
View Full Code Here


            if (iconRoles != null) {
                GUIUtilities.addIcons(this, iconRoles);
            } else {
                // Standard toolbar icons are 25x25 pixels.
                NodeRenderer renderer = _relationController.getNodeRenderer();
                Figure figure = renderer.render(null);

                FigureIcon icon = new FigureIcon(figure, 25, 25, 1, true);
                putValue(diva.gui.GUIUtilities.LARGE_ICON, icon);
            }
            putValue("tooltip", "Control-click to create a new relation");
View Full Code Here

                if (_prototype != null) {
                    location = _prototype.getAttribute("_location");
                }

                Figure figure = renderer.render(location);

                FigureIcon icon = new FigureIcon(figure, 25, 25, 1, true);
                putValue(GUIUtilities.LARGE_ICON, icon);
            }
            putValue("tooltip", description);
View Full Code Here

            super("New State");
            putValue("tooltip", "New State");

            NodeRenderer renderer = new StateController.StateRenderer(
                    getGraphModel());
            Figure figure = renderer.render(_prototypeState);

            // Standard toolbar icons are 25x25 pixels.
            FigureIcon icon = new FigureIcon(figure, 25, 25, 1, true);
            putValue(diva.gui.GUIUtilities.LARGE_ICON, icon);
            putValue("tooltip", "New State");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.