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

fixed behavior on setting row/columns

File:
1 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());
Note: See TracChangeset for help on using the changeset viewer.