<?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=How_to_Create_an_Open_Wizard</id>
	<title>How to Create an Open Wizard - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ojwiki.soldin.de/index.php?action=history&amp;feed=atom&amp;title=How_to_Create_an_Open_Wizard"/>
	<link rel="alternate" type="text/html" href="https://ojwiki.soldin.de/index.php?title=How_to_Create_an_Open_Wizard&amp;action=history"/>
	<updated>2026-04-22T06:21:41Z</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=How_to_Create_an_Open_Wizard&amp;diff=1553&amp;oldid=prev</id>
		<title>Michaudm at 08:40, 6 April 2013</title>
		<link rel="alternate" type="text/html" href="https://ojwiki.soldin.de/index.php?title=How_to_Create_an_Open_Wizard&amp;diff=1553&amp;oldid=prev"/>
		<updated>2013-04-06T08:40:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:40, 6 April 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot; &gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* 1 - Define your wizard class to implement org.openjump.core.ui.swing.wizard.WizardGroup or extend org.openjump.core.ui.swing.wizard.AbstractWizardGroup.*  &lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* 1 - Define your wizard class to implement org.openjump.core.ui.swing.wizard.WizardGroup or extend org.openjump.core.ui.swing.wizard.AbstractWizardGroup.*  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[image:WizardFramework.png|thumb|right|200px|WizardFramework diagram]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For the AbstractWizard group there are 3 arguments, the display name and icon to display in the Open Wizard and the last is the ID of the first wizard panel.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For the AbstractWizard group there are 3 arguments, the display name and icon to display in the Open Wizard and the last is the ID of the first wizard panel.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Michaudm</name></author>
	</entry>
	<entry>
		<id>https://ojwiki.soldin.de/index.php?title=How_to_Create_an_Open_Wizard&amp;diff=341&amp;oldid=prev</id>
		<title>Mentaer: Created page with &#039;Here is a HowTo for creating a new Open Wizard, excluding a File Layer which uses the Open File plug-in mechanism.   * 1 - Define your wizard class to implement org.openjump.core…&#039;</title>
		<link rel="alternate" type="text/html" href="https://ojwiki.soldin.de/index.php?title=How_to_Create_an_Open_Wizard&amp;diff=341&amp;oldid=prev"/>
		<updated>2009-10-18T22:36:34Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;Here is a HowTo for creating a new Open Wizard, excluding a File Layer which uses the Open File plug-in mechanism.   * 1 - Define your wizard class to implement org.openjump.core…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Here is a HowTo for creating a new Open Wizard, excluding a File Layer which uses the Open File plug-in mechanism.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* 1 - Define your wizard class to implement org.openjump.core.ui.swing.wizard.WizardGroup or extend org.openjump.core.ui.swing.wizard.AbstractWizardGroup.* &lt;br /&gt;
&lt;br /&gt;
For the AbstractWizard group there are 3 arguments, the display name and icon to display in the Open Wizard and the last is the ID of the first wizard panel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public class WFSWizard extends AbstractWizardGroup {&lt;br /&gt;
&lt;br /&gt;
  private static final String KEY = WFSWizard.class.getName();&lt;br /&gt;
&lt;br /&gt;
  public WFSWizard() {&lt;br /&gt;
    super(&lt;br /&gt;
      I18N.get(KEY),&lt;br /&gt;
      IconLoader.icon(&amp;quot;wfs.gif&amp;quot;),&lt;br /&gt;
      WfsWizardPanel.getClass().getName()&lt;br /&gt;
    );&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 2 - Implement the initialize method on your wizard to create the panels for each time the wizard is shown. The reason you don&amp;#039;t do this in the constructor is that the information you need may not be initialized when you construct the wizard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
private ChooseProjectPanel chooseProjectPanel;&lt;br /&gt;
&lt;br /&gt;
public void initialize(WorkbenchContext workbenchContext, WizardDialog dialog) {&lt;br /&gt;
  removeAllPanels(); // Start from a clean slate&lt;br /&gt;
&lt;br /&gt;
  // The chooseProject panel ensures that there is an open project to open the file into&lt;br /&gt;
&lt;br /&gt;
  chooseProjectPanel = new ChooseProjectPanel(workbenchContext,  urlPanel.getID());&lt;br /&gt;
  addPanel(chooseProjectPanel);&lt;br /&gt;
&lt;br /&gt;
  // Add the wizard panels for your type of data&lt;br /&gt;
  addPanel(new WfsWizardPanel();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 3 - Implement the method getFirstId to return the ID of the first wizard panel, if the first panel is always the same then this method is not required in the AbstractWizardGroup because you passed in the value in the constructor. If using the ChoosePeojectPanel you&amp;#039;ll need to implement it using the following approach.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public String getFirstId() {&lt;br /&gt;
  String firstId = super.getFirstId();&lt;br /&gt;
&lt;br /&gt;
  if (!chooseProjectPanel.hasActiveTaskFrame() &amp;amp;&amp;amp; chooseProjectPanel.hasTaskFrames()) {&lt;br /&gt;
    chooseProjectPanel.setNextID(firstId);&lt;br /&gt;
&lt;br /&gt;
    return chooseProjectPanel.getID();&lt;br /&gt;
  } else {&lt;br /&gt;
    return firstId;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* 4 - Implement the run method to actually do the loading of the data, this method is run in a separate thread so as not to block the GUI thread, so follow the standard Swing Threading rules (see SwingUtilities.invokeLater())&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public void run(WizardDialog dialog, TaskMonitor monitor) {&lt;br /&gt;
  chooseProjectPanel.activateSelectedProject();&lt;br /&gt;
&lt;br /&gt;
  // Do the code for your plugin&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* 5 - Register your wizard&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WfsWizard wfsWizard = new WfsWizard();&lt;br /&gt;
OpenWizardPlugIn.addWizard(workbenchContext, wfsWizard);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
... see also the OpenJUMPConfiguration class&lt;/div&gt;</summary>
		<author><name>Mentaer</name></author>
	</entry>
</feed>