<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ojwiki.soldin.de/index.php?action=history&amp;feed=atom&amp;title=Beanshell%3ASetting_North_Arrow_options</id>
	<title>Beanshell:Setting North Arrow options - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ojwiki.soldin.de/index.php?action=history&amp;feed=atom&amp;title=Beanshell%3ASetting_North_Arrow_options"/>
	<link rel="alternate" type="text/html" href="https://ojwiki.soldin.de/index.php?title=Beanshell:Setting_North_Arrow_options&amp;action=history"/>
	<updated>2026-04-18T09:23:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.5</generator>
	<entry>
		<id>https://ojwiki.soldin.de/index.php?title=Beanshell:Setting_North_Arrow_options&amp;diff=619&amp;oldid=prev</id>
		<title>Beckerl: Created page with &#039;There are many options for the North Arrow Plugin, but no UI to set them.  Beanshell to the rescue!   == First we must get a reference to the NorthArrowRender ==  import org.open…&#039;</title>
		<link rel="alternate" type="text/html" href="https://ojwiki.soldin.de/index.php?title=Beanshell:Setting_North_Arrow_options&amp;diff=619&amp;oldid=prev"/>
		<updated>2010-02-05T21:56:48Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;There are many options for the North Arrow Plugin, but no UI to set them.  Beanshell to the rescue!   == First we must get a reference to the NorthArrowRender ==  import org.open…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;There are many options for the North Arrow Plugin, but no UI to set them.  Beanshell to the rescue!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== First we must get a reference to the NorthArrowRender ==&lt;br /&gt;
&lt;br /&gt;
import org.openjump.core.ui.plugin.view.NorthArrowRenderer;&lt;br /&gt;
&lt;br /&gt;
NorthArrowRenderer renderer = (NorthArrowRenderer) wc.getLayerViewPanel().getRenderingManager().getRenderer(NorthArrowRenderer.CONTENT_ID);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== To set the various styles of North Arrows: ==&lt;br /&gt;
&lt;br /&gt;
renderer.setStyle(1); //the compass rose&lt;br /&gt;
&lt;br /&gt;
renderer.setStyle(2); //the inverted V shape half filled narrower version&lt;br /&gt;
&lt;br /&gt;
renderer.setStyle(3); //the inverted V shape half filled wider version&lt;br /&gt;
&lt;br /&gt;
renderer.setStyle(0);  //shaped like a backwards 4 filled with scale bar color&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== To set the position that the North Arrow appears in the layer view ==&lt;br /&gt;
&lt;br /&gt;
renderer.setAlignment(0); //BOTTOM_RIGHT = 0, TOP_RIGHT = 1, TOP_LEFT = 2, BOTTOM_LEFT = 3&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous settings ==&lt;br /&gt;
&lt;br /&gt;
renderer.setARROW_SIZE(100); &lt;br /&gt;
&lt;br /&gt;
renderer.setTEXT_FONT_SIZE(18);&lt;br /&gt;
&lt;br /&gt;
renderer.setTEXT_BOTTOM_MARGIN(3);&lt;br /&gt;
&lt;br /&gt;
== A complete example ==&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
NorthArrowRenderer renderer = (NorthArrowRenderer) wc.getLayerViewPanel().getRenderingManager().getRenderer(NorthArrowRenderer.CONTENT_ID);&lt;br /&gt;
renderer.setStyle(2);&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Beckerl</name></author>
	</entry>
</feed>