/** Find the property set with a given name. * @param name name of the set * @return the property set, or <code>null</code> if no such set exists */ public synchronized Set get(String name) { int indx = findIndex(name); return (indx == -1) ? null : sets.get(indx); }
/** Remove a property set from the sheet. * @param set name of set to remove * @return removed set, or <code>null</code> if the set could not be found */ public synchronized Set remove(String set) { int indx = findIndex(set); if (indx != -1) { Set s = sets.remove(indx); s.removePropertyChangeListener(propL); refresh(); return s; } else { return null; } }
/** Add a property set. If the set does not yet exist in the sheet, * inserts a new set with the implied name. Otherwise the old set is replaced * by the new one. * * @param set to add * @return the previous set with the same name, or <code>null</code> if this is a fresh insertion */ public synchronized Set put(Set set) { int indx = findIndex(set.getName()); Set removed = null; if (indx == -1) { sets.add(set); } else { removed = sets.set(indx, set); removed.removePropertyChangeListener(propL); } set.addPropertyChangeListener(propL); refresh(); return removed; }
/** Find the property set with a given name. * @param name name of the set * @return the property set, or <code>null</code> if no such set exists */ public synchronized Set get (String name) { int indx = findIndex (name); return indx == -1 ? null : (Set)sets.get (indx); }
/** Find the property set with a given name. * @param name name of the set * @return the property set, or <code>null</code> if no such set exists */ public synchronized Set get (String name) { int indx = findIndex (name); return indx == -1 ? null : (Set)sets.get (indx); }
/** Remove a property set from the sheet. * @param set name of set to remove * @return removed set, or <code>null</code> if the set could not be found */ public synchronized Set remove (String set) { int indx = findIndex (set); if (indx != -1) { Set s = (Set)sets.remove (indx); s.removePropertyChangeListener (propL); refresh (); return s; } else { return null; } }
/** Remove a property set from the sheet. * @param set name of set to remove * @return removed set, or <code>null</code> if the set could not be found */ public synchronized Set remove (String set) { int indx = findIndex (set); if (indx != -1) { Set s = (Set)sets.remove (indx); s.removePropertyChangeListener (propL); refresh (); return s; } else { return null; } }
/** Add a property set. If the set does not yet exist in the sheet, * inserts a new set with the implied name. Otherwise the old set is replaced * by the new one. * * @param set to add * @return the previous set with the same name, or <code>null</code> if this is a fresh insertion */ public synchronized Set put (Set set) { int indx = findIndex (set.getName ()); Set removed; if (indx == -1) { sets.add (set); removed = null; } else { removed = (Set)sets.set (indx, set); } set.removePropertyChangeListener (propL); if (removed == null) { set.addPropertyChangeListener (propL); } refresh (); return removed; }
/** Add a property set. If the set does not yet exist in the sheet, * inserts a new set with the implied name. Otherwise the old set is replaced * by the new one. * * @param set to add * @return the previous set with the same name, or <code>null</code> if this is a fresh insertion */ public synchronized Set put (Set set) { int indx = findIndex (set.getName ()); Set removed; if (indx == -1) { sets.add (set); removed = null; } else { removed = (Set)sets.set (indx, set); } set.removePropertyChangeListener (propL); if (removed == null) { set.addPropertyChangeListener (propL); } refresh (); return removed; }