Package org.apache.cayenne.pref

Examples of org.apache.cayenne.pref.PreferenceDetail


        int selected = view.getTable().getSelectedRow();
        if (selected < 0) {
            return;
        }

        PreferenceDetail selection = (PreferenceDetail) classPathEntries.remove(selected);
        editor.deleteDetail(getClassLoaderDomain(), selection.getKey());
        tableModel.fireTableRowsDeleted(selected, selected);
    }
View Full Code Here


        public int getRowCount() {
            return classPathEntries.size();
        }

        public Object getValueAt(int rowIndex, int columnIndex) {
            PreferenceDetail preference = (PreferenceDetail) classPathEntries
                    .get(rowIndex);
            return preference.getKey();
        }
View Full Code Here

        int selected = view.getTable().getSelectedRow();
        if (selected < 0) {
            return;
        }

        PreferenceDetail selection = (PreferenceDetail) templateEntries.remove(selected);
        editor.deleteDetail(getTemplateDomain(), selection.getKey());
        ((AbstractTableModel) view.getTable().getModel()).fireTableRowsDeleted(
                selected,
                selected);
    }
View Full Code Here

        Domain generatorPrefs = Application
                .getInstance()
                .getPreferenceDomain()
                .getSubdomain(DefaultClassGenerator.class);

        PreferenceDetail detail = generatorPrefs.getDetail(
                GeneralPreferences.ENCODING_PREFERENCE,
                false);
        if (detail != null) {
            generator.setEncoding(detail
                    .getProperty(GeneralPreferences.ENCODING_PREFERENCE));
        }

        generator.setDestDir(outputDir);
        generator.setMakePairs(true);
View Full Code Here

        int selected = view.getTable().getSelectedRow();
        if (selected < 0) {
            return;
        }

        PreferenceDetail selection = (PreferenceDetail) templateEntries.remove(selected);
        editor.deleteDetail(getTemplateDomain(), selection.getKey());
        ((AbstractTableModel) view.getTable().getModel()).fireTableRowsDeleted(
                selected,
                selected);
    }
View Full Code Here

        Object selectedValue = pane.getValue();
    shouldDelete = selectedValue==null?false:selectedValue.equals(JOptionPane.YES_OPTION);

        // If the user clicks "no" or window close button, we'll just ignore whatever's in the checkbox because it's non-sensical.
        if (shouldDelete) {
            PreferenceDetail pref = Application.getInstance().getPreferenceDomain().getDetail(GeneralPreferences.DELETE_PROMPT_PREFERENCE, true);
            pref.setBooleanProperty(GeneralPreferences.DELETE_PROMPT_PREFERENCE, neverPromptAgainBox.isSelected());
            Application.getInstance().getPreferenceService().savePreferences();
        }
    }
View Full Code Here

        return shouldDelete(String.format("%s named '%s'?", type, name));
    }

    public boolean shouldDelete(String name) {
        if (allowAsking) {
            PreferenceDetail pref = Application.getInstance().getPreferenceDomain().getDetail(GeneralPreferences.DELETE_PROMPT_PREFERENCE, true);

            // See if the user has opted not to showDialog the delete dialog.
            if ((pref == null) || (false == pref.getBooleanProperty(GeneralPreferences.DELETE_PROMPT_PREFERENCE))) {
                showDialog(name);
            }
        }

        return shouldDelete;
View Full Code Here

        Domain generatorPrefs = Application
                .getInstance()
                .getPreferenceDomain()
                .getSubdomain(ClassGenerationAction.class);

        PreferenceDetail detail = generatorPrefs.getDetail(
                GeneralPreferences.ENCODING_PREFERENCE,
                false);
        if (detail != null) {
            generator.setEncoding(detail
                    .getProperty(GeneralPreferences.ENCODING_PREFERENCE));
        }

        generator.setDestDir(outputDir);
        generator.setMakePairs(true);
View Full Code Here

        int selected = view.getTable().getSelectedRow();
        if (selected < 0) {
            return;
        }

        PreferenceDetail selection = (PreferenceDetail) classPathEntries.remove(selected);
        editor.deleteDetail(getClassLoaderDomain(), selection.getKey());
        tableModel.fireTableRowsDeleted(selected, selected);
    }
View Full Code Here

        public int getRowCount() {
            return classPathEntries.size();
        }

        public Object getValueAt(int rowIndex, int columnIndex) {
            PreferenceDetail preference = (PreferenceDetail) classPathEntries
                    .get(rowIndex);
            return preference.getKey();
        }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.pref.PreferenceDetail

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.