Search in sources :

Example 6 with GUIPlugin

use of com.ramussoft.gui.common.GUIPlugin in project ramus by Vitaliy-Yakovchuk.

the class TableTabView method getActions.

@Override
public Action[] getActions() {
    Action[] tmp = super.getActions();
    List<Action> plugable = new ArrayList<Action>();
    for (Action action : tmp) plugable.add(action);
    for (GUIPlugin plugin : framework.getPlugins()) {
        if (plugin instanceof ElementActionPlugin) {
            Action[] actions = ((ElementActionPlugin) plugin).getActions(this);
            if (actions != null) {
                plugable.add(null);
                for (Action action : actions) {
                    plugable.add(action);
                }
            }
        }
    }
    plugable.add(6, convertElementsToQualifierAction);
    return plugable.toArray(new Action[plugable.size()]);
}
Also used : Action(javax.swing.Action) AbstractAction(javax.swing.AbstractAction) ArrayList(java.util.ArrayList) GUIPlugin(com.ramussoft.gui.common.GUIPlugin)

Aggregations

GUIPlugin (com.ramussoft.gui.common.GUIPlugin)6 ArrayList (java.util.ArrayList)4 AbstractGUIPluginFactory (com.ramussoft.gui.common.AbstractGUIPluginFactory)3 CloseMainFrameAdapter (com.ramussoft.gui.common.event.CloseMainFrameAdapter)3 List (java.util.List)3 JFrame (javax.swing.JFrame)3 UndoRedoPlugin (com.ramussoft.gui.common.UndoRedoPlugin)2 AccessRules (com.ramussoft.common.AccessRules)1 Engine (com.ramussoft.common.Engine)1 PluginFactory (com.ramussoft.common.PluginFactory)1 PluginProvider (com.ramussoft.common.PluginProvider)1 AttributePlugin (com.ramussoft.common.attribute.AttributePlugin)1 Journaled (com.ramussoft.common.journal.Journaled)1 SimpleAttributePluginSuit (com.ramussoft.core.attribute.simple.SimpleAttributePluginSuit)1 FileIEngineImpl (com.ramussoft.core.impl.FileIEngineImpl)1 FileMinimumVersionException (com.ramussoft.core.impl.FileMinimumVersionException)1 PersistentFactory (com.ramussoft.core.persistent.PersistentFactory)1 SplashScreen (com.ramussoft.gui.common.SplashScreen)1 ActionEvent (com.ramussoft.gui.common.event.ActionEvent)1 GUIPluginFactory (com.ramussoft.gui.core.GUIPluginFactory)1