Setting Port style

I have been using GeneralNodePort as an example for my multiported nodes. I am using the triangle style like this:

// assume an outlined light gray triangle
setStyle(StyleTriangle);
setPen(JGoPen.darkGray);
setBrush(JGoBrush.lightGray);

I would like to set the direction of the Triangle base on if the port is an input or output port but this is the only style offered. I’m I missing something, is there a simple way to flip this style to point the other direction?

dWiGhT

The “direction” of the triangle is determined by the value of JGoPort.getToSpot().
We have considered adding port styles to explicitly indicate the “direction” of the triangle instead of assuming it should be controlled by the ToSpot property.
By the way, from your other post, you can pass a JGoRoundRect as the icon in your call to GeneralNode.initialize, instead of a JGoImage, if you want the icon to be a rounded rectangle instead of an image.

First off, THANKS for the quick replies… my sanity is at stake. "; )

Setting the setToSpot() did work… thanks…

dWiGhT