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); }
/** @param patterned the patterned to set */ public void setPatterned(final RenderSettings.Patterned patterned) { if (patterned.equals(this.patterned)) { return; } this.patterned = patterned.copy(); if (getSelectedIndex() >= 0) { // něco bylo vybráno, ne text, tak to novu vybrat, ale ponovu final int index = urciCoMabytVybrano(); setSelectedIndex(index); } for (final Listener listener : listeners) { listener.patternChanged(patterned); } }
/** @return the patterned */ public RenderSettings.Patterned getPatterned() { return patterned.copy(); }