Me n My Programming

If Only I Have TIme

Marama Code 112 ~ How to get selected shape

Ever think that you need to capture shape that is selected? Don’t know how? Here is the code:

EventPropertyUpdateInfo info = this.propertyUpdated(notification); // get the update info

if (info == null) { return; } // ignore if no update

MaramaShape sh = info.getMaramaShape() ;// get the selected shape

if (sh == null) { return; } // ignore if no shape

if (!sh.getShapeType().equals(“YourShape”)) { return; } // ignore if not the shape you want

Simple 😀

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Information

This entry was posted on September 15, 2010 by in Life on Marama.
%d bloggers like this: