Diagram Properties control the way the GraphElements are displayed in MagicDraw.
GraphEdge graphEdge = ... DiagramProperties.createBoolean(graphEdge, "SHOW_NAME", false); DiagramProperties.createBoolean(graphEdge, "SHOW_NAME_DESCRIPTION", false);
List<String> STEREOTYPES_DISPLAY_MODE_CHOICES = Collections.unmodifiableList(Arrays.asList( "STEREOTYPE_DISPLAY_MODE_TEXT_AND_ICON", "STEREOTYPE_DISPLAY_MODE_TEXT", "STEREOTYPE_DISPLAY_MODE_ICON", "STEREOTYPE_DISPLAY_MODE_SHAPE_IMAGE_AND_TEXT", "STEREOTYPE_DISPLAY_MODE_SHAPE_IMAGE", "STEREOTYPE_DISPLAY_MODE_DO_NOT_DISPLAY_STEREOTYPES")); GraphNode graphNode = ... DiagramProperties.createChoice(graphNode, "STEREOTYPES_DISPLAY_MODE", STEREOTYPES_DISPLAY_MODE_CHOICES, 5);or
List<String> STEREOTYPES_DISPLAY_MODE_CHOICES = Collections.unmodifiableList(Arrays.asList( "STEREOTYPE_DISPLAY_MODE_TEXT_AND_ICON", "STEREOTYPE_DISPLAY_MODE_TEXT", "STEREOTYPE_DISPLAY_MODE_ICON", "STEREOTYPE_DISPLAY_MODE_SHAPE_IMAGE_AND_TEXT", "STEREOTYPE_DISPLAY_MODE_SHAPE_IMAGE", "STEREOTYPE_DISPLAY_MODE_DO_NOT_DISPLAY_STEREOTYPES")); GraphNode graphNode = ... DiagramProperties.createChoice(graphNode, "STEREOTYPES_DISPLAY_MODE", STEREOTYPES_DISPLAY_MODE_CHOICES, "STEREOTYPE_DISPLAY_MODE_ICON");
GraphNode graphNode = ... Color color = new Color(50, 12, 78); DiagramProperties.createColor(graphNode, "FILL_COLOR", color.getRGB());
GraphNode graphNode = ... DiagramProperties.createFont(graphNode, "FONT", "Arial", 10, 0);
Managing Diagram
Reading Diagram Properties
MDAccess for UML API Reference
MDAccess for MagicDraw API Reference
DiagramProperties