Ignore:
Timestamp:
2007-06-04T13:51:20+02:00 (18 years ago)
Author:
christofd
Message:

fixed behavior on setting row/columns

Location:
applications/editors/josm/plugins/surveyor/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorComponent.java

    r3078 r3097  
    3232    private static final long serialVersionUID = 4539838472057529042L;
    3333    private LiveGpsData gpsData;
    34     private int rows = 3;
    35     private int columns = 3;
     34    private int rows = 0;
     35    private int columns = 0;
    3636    private int width = 0;
    3737    private int height = 0;
     
    6565     */
    6666    public void setColumns(String columnsString) {
     67        System.out.println("setting columns to " +columnsString);
    6768        columns = Integer.parseInt(columnsString);
    6869        buttonPanel.setLayout(new GridLayout(rows, columns));
     
    9697
    9798    public void addButton(ButtonDescription description) {
     99        if(rows == 0 && columns == 0) {
     100            setColumns("4");
     101        }
    98102        description.setGpsDataSource(this);
    99103        buttonPanel.add(description.createComponent());
  • applications/editors/josm/plugins/surveyor/src/surveyor.xml

    r2943 r3097  
    11<?xml version="1.0"?>
    2 <surveyor rows="3" columns="3" width="0" height="0">
     2<surveyor columns="4" width="0" height="0">
    33  <!-- icons can either be absolute paths or relative paths to the .josm directory -->
    44  <!-- action class: either fully qualified classnames or if not found,
Note: See TracChangeset for help on using the changeset viewer.