static void enable(JComponent c, boolean b, Object source, int modelID, String modelClass, Page page) {
		if (page == null)
			return;
		boolean yes = false;
		if (modelID != -1) {
			if (isTargetClass(modelClass)) {
				try {
					Object o = page.getEmbeddedComponent(Class.forName(modelClass), modelID);
					if (o == source)
						yes = true;
				}
				catch (ClassNotFoundException e) {
					e.printStackTrace();
				}
			}
			else {
				ModelCanvas mc = page.getComponentPool().get(modelID);
				if (mc != null && mc.getMdContainer().getModel() == source)
					yes = true;
			}
		}
		if (yes)
			c.setEnabled(b);
	}