public int getLayeredComponentIndex(Layered a) {
		if (a == null)
			return -1;
		int n = 0;
		synchronized (layerBasket) {
			for (Layered o : layerBasket) {
				if (a.getClass().isInstance(o)) {
					if (o == a)
						return n;
					n++;
				}
			}
		}
		return -1;
	}