Esempio n. 1
0
 private void nastavPatterned() {
   if (blokujEventy) {
     return;
   }
   final RenderSettings.Patterned p = patterned.copy();
   final int index = getSelectedIndex();
   // aby tam vůbec vešel
   if (index >= 0) {
     final String key = keys.get(index);
     if (!geotaggingPatterns.isEmpty()) { // mame data geotaggingu
       p.setPatternNumberCilovy(key);
       if (souradnicovePatterns.containsKey(key)) {
         p.setPatternNumberPredbezny(key);
       }
     } else { // mame jen zakladni data
       p.setPatternNumberPredbezny(key);
       if (p.getPatternNumberCilovy() != null
           && souradnicovePatterns.containsKey(p.getPatternNumberCilovy())) {
         p.setPatternNumberCilovy(key);
       }
     }
   }
   p.setText((String) getSelectedItem());
   setPatterned(p);
 }
Esempio n. 2
0
 private String urciVybranyKlic() {
   if (allPatterns.size() == 0) {
     return null;
   }
   if (patterned.getPatternNumberCilovy() != null
       && allPatterns.containsKey(patterned.getPatternNumberCilovy())) {
     return patterned.getPatternNumberCilovy();
   }
   if (patterned.getPatternNumberCilovy() == null && implicitnGeotaggingKey != null) {
     return implicitnGeotaggingKey;
   }
   if (patterned.getPatternNumberPredbezny() != null
       && allPatterns.containsKey(patterned.getPatternNumberPredbezny())) {
     return patterned.getPatternNumberPredbezny();
   }
   return allPatterns.firstKey();
 }