In this section, you will learn how to associate or apply a
Style to an element.
Example 5.9. Applying a user-defined style
// load style descriptor from pool
StyleDescriptor styleAppNode =
StylePool.get("AppLabelStyleDescriptor");
// apply the appropriate style to the VisualNode
visualNodeA.getBaseComposite().applyStyle(styleAppNode);
Applying a style to a visual element is similar to applying a geometry. The
BaseComposite member of any
VisualGraphObject is used to apply it via a method
call to applyStyle().
© 2004, 2005 Tensegrity Software GmbH