Archive

Archive for November 15, 2011

Marama Code 123 ~ Set Custom Properties for Marama Shape

November 15, 2011 Leave a comment

Did you know that you can set the custom properties for each shape in marama, instead using the default properties. The advantages of using this method is you can load a pre-properties attribute rather than having empty space or pre-specified text.

To do this, you need to set a custom method in the event handler to load as soon as the method is invoke. Here is the code that need to be include in the event handler:

@Override
    public void setDiagram(final MaramaDiagram diagram) {
        super.setDiagram(diagram);

        for (final MaramaShapeType st : diagram.getViewType().getShapeTypes()) {
            st.setCustomProperties(new NewCustomProperties());
        }
    }

You need to create a custom properties class, for instance in this example, the NewCustomProperties class.

Categories: Uncategorized
Follow

Get every new post delivered to your Inbox.