Ignore:
Timestamp:
2013-07-17T00:01:49+02:00 (11 years ago)
Author:
stoecker
Message:

see #8853 remove tabs, trailing spaces, windows line ends, strange characters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r6068 r6070  
    152152     */
    153153    private final TagEditHelper editHelper = new TagEditHelper(propertyData, valueCount);
    154    
     154
    155155    private final DataSetListenerAdapter dataChangedAdapter = new DataSetListenerAdapter(this);
    156156    private final HelpAction helpAction = new HelpAction();
     
    170170    private final SelectRelationAction selectRelationAction = new SelectRelationAction(false);
    171171    private final SelectRelationAction addRelationToSelectionAction = new SelectRelationAction(true);
    172    
     172
    173173    private final DownloadMembersAction downloadMembersAction = new DownloadMembersAction();
    174174    private final DownloadSelectedIncompleteMembersAction downloadSelectedIncompleteMembersAction = new DownloadSelectedIncompleteMembersAction();
    175    
     175
    176176    private final SelectMembersAction selectMembersAction = new SelectMembersAction(false);
    177177    private final SelectMembersAction addMembersToSelectionAction = new SelectMembersAction(true);
    178    
     178
    179179    private final HighlightHelper highlightHelper= new HighlightHelper();
    180    
     180
    181181    /**
    182182     * The Add button (needed to be able to disable it)
     
    195195     */
    196196    private final PresetListPanel presets = new PresetListPanel();
    197    
     197
    198198    /**
    199199     * Text to display when nothing selected.
     
    214214        }
    215215    };
    216    
     216
    217217    // <editor-fold defaultstate="collapsed" desc="Dialog construction and helper methods">
    218    
     218
    219219    /**
    220220     * Create a new PropertiesDialog
     
    231231        setupMembershipMenu();
    232232        buildMembershipTable();
    233        
     233
    234234        // combine both tables and wrap them in a scrollPane
    235235        JPanel bothTables = new JPanel();
     
    249249            bothTables.add(presets, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2));
    250250        }
    251        
     251
    252252        setupKeyboardShortcuts();
    253253
     
    257257        propertyTable.getSelectionModel().addListSelectionListener(deleteAction);
    258258        membershipTable.getSelectionModel().addListSelectionListener(deleteAction);
    259        
    260        
     259
     260
    261261        JScrollPane scrollPane = (JScrollPane) createLayout(bothTables, true, Arrays.asList(new SideButton[] {
    262262                this.btnAdd, this.btnEdit, this.btnDel
     
    273273        editHelper.loadTagsIfNeeded();
    274274    }
    275        
     275
    276276    private void buildPropertiesTable() {
    277277        // setting up the properties table
     
    280280        propertyTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    281281        propertyTable.getTableHeader().setReorderingAllowed(false);
    282        
     282
    283283        propertyTable.getColumnModel().getColumn(1).setCellRenderer(new DefaultTableCellRenderer(){
    284284            @Override public Component getTableCellRendererComponent(JTable table, Object value,
     
    383383        mod.getColumn(0).setPreferredWidth(200);
    384384    }
    385    
     385
    386386    /**
    387387     * creates the popup menu @field membershipMenu and its launcher on membership table
     
    432432        });
    433433    }
    434    
    435     /**
    436      * creates the popup menu @field propertyMenu and its launcher on property table 
     434
     435    /**
     436     * creates the popup menu @field propertyMenu and its launcher on property table
    437437     */
    438438    private void setupPropertiesMenu() {
     
    448448        propertyTable.addMouseListener(new PopupMenuLauncher(propertyMenu));
    449449    }
    450    
     450
    451451    /**
    452452     * Assignas all needed keys like Enter and Spacebar to most important actions
    453453     */
    454454    private void setupKeyboardShortcuts() {
    455        
     455
    456456        // ENTER = editAction, open "edit" dialog
    457457        propertyTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
     
    461461                .put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),"onTableEnter");
    462462        membershipTable.getActionMap().put("onTableEnter",editAction);
    463        
    464         // INSERT button = addAction, open "add property" dialog 
     463
     464        // INSERT button = addAction, open "add property" dialog
    465465        propertyTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
    466466                .put(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, 0),"onTableInsert");
    467467        propertyTable.getActionMap().put("onTableInsert",addAction);
    468        
     468
    469469        // unassign some standard shortcuts for JTable to allow upload / download
    470470        InputMapUtils.unassignCtrlShiftUpDown(propertyTable, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
    471        
     471
    472472        // unassign some standard shortcuts for correct copy-pasting, fix #8508
    473473        propertyTable.setTransferHandler(null);
    474  
     474
    475475        propertyTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
    476476                .put(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK),"onCopy");
     
    479479        // allow using enter to add tags for all look&feel configurations
    480480        InputMapUtils.enableEnter(this.btnAdd);
    481        
     481
    482482        // DEL button = deleteAction
    483483        getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
     
    485485                );
    486486        getActionMap().put("delete", deleteAction);
    487        
     487
    488488        // F1 button = custom help action
    489489        getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
     
    491491        getActionMap().put("onHelp", helpAction);
    492492    }
    493    
     493
    494494         /**
    495495     * This simply fires up an {@link RelationEditor} for the relation shown; everything else
     
    506506                ((MemberInfo) membershipData.getValueAt(row, 1)).role).setVisible(true);
    507507    }
    508    
     508
    509509    private int findRow(TableModel model, Object value) {
    510510        for (int i=0; i<model.getRowCount(); i++) {
     
    514514        return -1;
    515515    }
    516    
     516
    517517    /**
    518518     * Update selection status, call @{link #selectionChanged} function.
     
    525525        }
    526526    }
    527    
     527
    528528   // </editor-fold>
    529529
    530530    // <editor-fold defaultstate="collapsed" desc="Event listeners methods">
    531    
     531
    532532    @Override
    533533    public void showNotify() {
     
    558558        }
    559559    }
    560    
     560
    561561    @Override
    562562    public void destroy() {
     
    625625                    ? e.getValue().keySet().iterator().next() : tr("<different>"));
    626626        }
    627        
     627
    628628        membershipData.setRowCount(0);
    629629
     
    698698        }
    699699    }
    700    
     700
    701701    /* ---------------------------------------------------------------------------------- */
    702702    /* EditLayerChangeListener                                                            */
     
    721721
    722722    // <editor-fold defaultstate="collapsed" desc="Methods that are called by plugins to extend fuctionality ">
    723    
     723
    724724    /**
    725725     * Replies the property popup menu handler.
     
    752752        return row > -1 ? (IRelation) membershipData.getValueAt(row, 0) : null;
    753753    }
    754        
     754
    755755    // </editor-fold>
    756    
     756
    757757     /**
    758758     * Class that watches for mouse clicks
     
    852852        }
    853853    };
    854    
     854
    855855    /**
    856856     * Action handling delete button press in properties dialog.
     
    940940            } else if (membershipTable.getSelectedRowCount() > 0) {
    941941                int[] rows = membershipTable.getSelectedRows();
    942                 // delete from last relation to convserve row numbers in the table 
     942                // delete from last relation to convserve row numbers in the table
    943943                for (int i=rows.length-1; i>=0; i--) {
    944944                    deleteFromRelation(rows[i]);
Note: See TracChangeset for help on using the changeset viewer.