Me n My Programming

If Only I Have TIme

Marama Code 124 ~ Hide Your Custome Event Handler

While reading marama WriteEventHandler codes, I found this method that helps to hide the event handlers until a specific icon is selected. Just beware that this method is only applicable for event handlers that were created in working workspace.

public boolean isRunnable() {
  final MaramaShape s = this.getSelectedShape();
    if (s == null) { return false; }

    if (isEventHandlerShapeType(s.getShapeType())) { return true; }
   else { return false; }
}

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 November 21, 2011 by in Uncategorized.
%d bloggers like this: