Ignore:
Timestamp:
2013-03-20T08:05:48+01:00 (11 years ago)
Author:
zverik
Message:

some updates to iodb plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/imagery_offset_db/src/iodb/OffsetDialog.java

    r29376 r29377  
    2222    protected static final String PREF_CALIBRATION = "iodb.show.calibration";
    2323    protected static final String PREF_DEPRECATED = "iodb.show.deprecated";
     24    private static final int MAX_OFFSETS = Main.main.pref.getInteger("iodb.max.offsets", 5);
    2425
    2526    private List<ImageryOffsetBase> offsets;
     
    4243        Box dialog = new Box(BoxLayout.Y_AXIS);
    4344        updateButtonPanel();
    44         // todo: calibration objects and deprecated offsets button
    45         final JCheckBox calibrationBox = new JCheckBox(tr("Hide calibration geometries"));
     45        final JCheckBox calibrationBox = new JCheckBox(tr("Calibration geometries"));
    4646        calibrationBox.setSelected(Main.pref.getBoolean(PREF_CALIBRATION, true));
    4747        calibrationBox.addActionListener(new ActionListener() {
     
    5151            }
    5252        });
    53         final JCheckBox deprecatedBox = new JCheckBox(tr("Show deprecated offsets"));
     53        final JCheckBox deprecatedBox = new JCheckBox(tr("Deprecated offsets"));
    5454        deprecatedBox.setSelected(Main.pref.getBoolean(PREF_DEPRECATED, false));
    5555        deprecatedBox.addActionListener(new ActionListener() {
     
    9292            buttonPanel.add(button);
    9393        }
     94//        buttonPanel.setMinimumSize(buttonPanel.getPreferredSize());
    9495        pack();
    9596    }
     
    105106                continue;
    106107            filteredOffsets.add(offset);
     108            if( filteredOffsets.size() >= MAX_OFFSETS )
     109                break;
    107110        }
    108111        return filteredOffsets;
Note: See TracChangeset for help on using the changeset viewer.