/** Set the cookie set. * A listener is attached to the provided cookie set, * and any change of the sheet is propagated to the node by * firing {@link #PROP_COOKIE} change events. * * @param s the cookie set to use * @deprecated just use getCookieSet().add(...) instead * @exception IllegalStateException If you pass a Lookup instance into the constructor, this * method cannot be called. */ @Deprecated protected final synchronized void setCookieSet(CookieSet s) { if (internalLookup(false) != null) { throw new IllegalStateException("CookieSet cannot be used when lookup is associated with the node"); // NOI18N } if (sheetCookieL == null) { sheetCookieL = new SheetAndCookieListener(); } CookieSet cookieSet = (CookieSet) lookup; if (cookieSet != null) { cookieSet.removeChangeListener(sheetCookieL); } s.addChangeListener(sheetCookieL); lookup = s; fireCookieChange(); }
/** Set the cookie set. * A listener is attached to the provided cookie set, * and any change of the sheet is propagated to the node by * firing {@link #PROP_COOKIE} change events. * * @param s the cookie set to use * @deprecated just use getCookieSet().add(...) instead * @exception IllegalStateException If you pass a Lookup instance into the constructor, this * method cannot be called. */ protected final synchronized void setCookieSet (CookieSet s) { if (internalLookup (false) != null) { throw new IllegalStateException ("CookieSet cannot be used when lookup is associated with the node"); // NOI18N } if (sheetCookieL == null) { sheetCookieL = new SheetAndCookieListener (); } CookieSet cookieSet = (CookieSet)lookup; if (cookieSet != null) { cookieSet.removeChangeListener (sheetCookieL); } s.addChangeListener (sheetCookieL); lookup = s; fireCookieChange (); }
/** Set the cookie set. * A listener is attached to the provided cookie set, * and any change of the sheet is propagated to the node by * firing {@link #PROP_COOKIE} change events. * * @param s the cookie set to use * @deprecated just use getCookieSet().add(...) instead * @exception IllegalStateException If you pass a Lookup instance into the constructor, this * method cannot be called. */ protected final synchronized void setCookieSet (CookieSet s) { if (internalLookup (false) != null) { throw new IllegalStateException ("CookieSet cannot be used when lookup is associated with the node"); // NOI18N } if (sheetCookieL == null) { sheetCookieL = new SheetAndCookieListener (); } CookieSet cookieSet = (CookieSet)lookup; if (cookieSet != null) { cookieSet.removeChangeListener (sheetCookieL); } s.addChangeListener (sheetCookieL); lookup = s; fireCookieChange (); }
private synchronized void setSheetImpl(Sheet s) { if (sheetCookieL == null) { sheetCookieL = new SheetAndCookieListener (); } if (sheet != null) { sheet.removePropertyChangeListener (sheetCookieL); } s.addPropertyChangeListener (sheetCookieL); sheet = s; }
private synchronized void setSheetImpl(Sheet s) { if (sheetCookieL == null) { sheetCookieL = new SheetAndCookieListener (); } if (sheet != null) { sheet.removePropertyChangeListener (sheetCookieL); } s.addPropertyChangeListener (sheetCookieL); sheet = s; }
private synchronized void setSheetImpl(Sheet s) { if (sheetCookieL == null) { sheetCookieL = new SheetAndCookieListener(); } if (sheet != null) { sheet.removePropertyChangeListener(sheetCookieL); } s.addPropertyChangeListener(sheetCookieL); sheet = s; }