Search in sources :

Example 1 with OwnerClasificators

use of com.ramussoft.pb.frames.setup.OwnerClasificators in project ramus by Vitaliy-Yakovchuk.

the class IDEF0ViewPlugin method getProjectPreferences.

@Override
public Preferences[] getProjectPreferences() {
    List<Qualifier> list = IDEF0Plugin.getBaseQualifiers(engine);
    Preferences[] res = new Preferences[((list.size() > 0) ? 1 : 0)];
    final DataPlugin dataPlugin;
    if (list.size() == 0)
        dataPlugin = null;
    else
        dataPlugin = NDataPluginFactory.getDataPlugin(list.get(0), engine, rules);
    if (res.length > 0)
        res[res.length - 1] = new AbstractPreferences() {

            private OwnerClasificators c = new OwnerClasificators(dataPlugin);

            {
                c.updateOuners();
            }

            @Override
            public JComponent createComponent() {
                return c;
            }

            @Override
            public String getTitle() {
                return ResourceLoader.getString("Owners.Clasificators");
            }

            @Override
            public boolean save(JDialog dialog) {
                c.apply();
                return true;
            }
        };
    return res;
}
Also used : AbstractPreferences(com.ramussoft.gui.common.prefrence.AbstractPreferences) Qualifier(com.ramussoft.common.Qualifier) OwnerClasificators(com.ramussoft.pb.frames.setup.OwnerClasificators) Preferences(com.ramussoft.gui.common.prefrence.Preferences) AbstractPreferences(com.ramussoft.gui.common.prefrence.AbstractPreferences) DataPlugin(com.ramussoft.pb.DataPlugin) NDataPlugin(com.ramussoft.pb.data.negine.NDataPlugin) JDialog(javax.swing.JDialog)

Aggregations

Qualifier (com.ramussoft.common.Qualifier)1 AbstractPreferences (com.ramussoft.gui.common.prefrence.AbstractPreferences)1 Preferences (com.ramussoft.gui.common.prefrence.Preferences)1 DataPlugin (com.ramussoft.pb.DataPlugin)1 NDataPlugin (com.ramussoft.pb.data.negine.NDataPlugin)1 OwnerClasificators (com.ramussoft.pb.frames.setup.OwnerClasificators)1 JDialog (javax.swing.JDialog)1