Package net.datacrow.settings.definitions

Examples of net.datacrow.settings.definitions.ProgramDefinitions


                            false,
                            false));       
        getSettings().addSetting(_FileHandlers,
                new Setting(DcRepository.ValueTypes._DEFINITIONGROUP,
                            DcRepository.Settings.stProgramDefinitions,
                            new ProgramDefinitions(),
                            ComponentFactory._PROGRAMDEFINITIONFIELD,
                            "tpProgramDefinitions",
                            "",
                            false,
                            true));
View Full Code Here


     * Returns the selected Font (with the chosen size, thickness)
     * Unless the user has chosen otherwise, Arial font size 11 is returned.
     */
    @Override
    public Object getValue() {
      ProgramDefinitions definitions = new ProgramDefinitions();
        for (int i = 0; i < programTable.getRowCount(); i++) {
            String extension = (String) programTable.getValueAt(i, 0, true);
            String program = (String) programTable.getValueAt(i, 1, true);
            ProgramDefinition definition = new ProgramDefinition(extension, program);
        definitions.add(definition);
      }

        return definitions;
    }
View Full Code Here

     * Applies a value to this field
     */
    @Override
    public void setValue(Object o) {
      if (o instanceof ProgramDefinitions) {
        ProgramDefinitions definitions = (ProgramDefinitions) o;
        for (ProgramDefinition definition : definitions.getDefinitions()) {
                Object[] row = {definition.getExtension(), definition.getProgram()};
                programTable.addRow(row);
        }
      }
    }
View Full Code Here

        }
    }
   
    private void addDefinition(String extension, String program) {
        if (extension.trim().length() > 0 && program.trim().length() > 0) {
            ProgramDefinitions definitions = getDefinitions();

            String current = definitions.getProgramForExtension(extension);
            if (current != null) {
                DcSwingUtilities.displayWarningMessage("msgProgramAlreadyDefined");
            } else {
                Object[] row = {extension, program};
                programTable.addRow(row);
View Full Code Here

        if (!file.exists()) {
            DcSwingUtilities.displayWarningMessage(DcResources.getText("msgFileDoesNotExist", filename));
            return;
        }
           
        ProgramDefinitions definitions = (ProgramDefinitions) DcSettings.getDefinitions(DcRepository.Settings.stProgramDefinitions);
        String program = null;
        String extension = Utilities.getExtension(file);
        if (definitions != null && !Utilities.isEmpty(extension))
            program = definitions.getProgramForExtension(extension);

        Desktop desktop = getDesktop();
        if (program == null || program.trim().length() == 0) {
            boolean launched = true;
            if (desktop != null) {
View Full Code Here

                    int group = sValue.indexOf("}");
                    IDefinitions definitions = (IDefinitions) getValue();
                   
                    if (definitions == null) {
                        if (key.equals(DcRepository.Settings.stProgramDefinitions))
                            definitions = new ProgramDefinitions();
                        else if (key.equals(DcRepository.ModuleSettings.stQuickViewFieldDefinitions))
                            definitions = new QuickViewFieldDefinitions();
                        else if (key.equals(DcRepository.ModuleSettings.stWebFieldDefinitions))
                            definitions = new QuickViewFieldDefinitions();
                        else
View Full Code Here

TOP

Related Classes of net.datacrow.settings.definitions.ProgramDefinitions

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.