All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.massisframework.sweethome3d.plugins.components.ComponentPlugin Maven / Gradle / Ivy

There is a newer version: 0.0.7
Show newest version
package com.massisframework.sweethome3d.plugins.components;

import java.util.ArrayList;
import java.util.List;

import com.eteks.sweethome3d.SweetHome3DWithPlugins;
import com.eteks.sweethome3d.plugin.Plugin;
import com.eteks.sweethome3d.plugin.PluginAction;
import com.massisframework.sweethome3d.plugins.HomeReadyListener;

public class ComponentPlugin extends Plugin implements HomeReadyListener {

	private PluginAction[] actions;
	private boolean homeReady;

	public ComponentPlugin()
	{
		this.homeReady = false;
	}

	@Override
	public void onHomeReady()
	{
		this.homeReady = true;
		for (PluginAction pluginAction : actions)
		{
			if (pluginAction instanceof HomeReadyListener)
			{
				((HomeReadyListener) pluginAction).onHomeReady();
			}
		}
	}

	@Override
	public PluginAction[] getActions()
	{
		this.actions = new PluginAction[] { new ComponentPluginAction(this) };
		return this.actions;
	}

	public static void main(String[] args)
	{

		List> plugins = new ArrayList<>();
		plugins.add(ComponentPlugin.class);
		SweetHome3DWithPlugins.run(args, plugins);

	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy