Replace.

@param target
the target
@param component
the component
165354
public static void replace(final AjaxRequestTarget target, final Component component)
	{
		component.add(new DisplayNoneBehavior());
		target.add(component);
		target.appendJavaScript("jQuery('#" + component.getMarkupId() + "').slideDown(100);");
	}
583371
public void replaceWith(Node in) {
        Validate.notNull(in);
        Validate.notNull(parentNode);
        parentNode.replaceChild(this, in);
    }
898355
static String replaceSlashes(final String target) {
		String replaced = target;
		if (replaced != null) {
			replaced = replaced.replaceAll("/+", "/");
		}
		return replaced;
	}
884
protected void removeTargetListeners (Component comp)
    {
        comp.removeMouseListener(_targetListener);
        comp.removeMouseMotionListener(_targetListener);
        if (comp instanceof Container) { // again, always true for JComp...
            Container cont = (Container) comp;
            cont.removeContainerListener(_childListener);
            for (int ii=0, nn=cont.getComponentCount(); ii < nn; ii++) {
                removeTargetListeners(cont.getComponent(ii));
            }
        }
    }
532200
public void setReplaceInfo(Widget replaceInfo) {

        if (m_replaceInfo != null) {
            m_replaceInfo.removeFromParent();
        }
        m_replaceInfo = replaceInfo;
        m_mainPanel.insert(m_replaceInfo, 0);
    }
740019
public void updateAllComponents(final AbstractField<?> component) {

        allComponents.add(component);
        component.addValueChangeListener(new ChangeListener(component));
    }
505465
protected void addTarget (
        DropTarget target, JComponent comp, boolean autoremove)
    {
        _droppers.put(comp, target);
        addTargetListeners(comp);
        if (autoremove) {
            comp.addAncestorListener(_remover);
        }
    }
256681
public void replaceInternalFrame(final String title, final Component component)
	{
		if (getCurrentVisibleInternalFrame() != null)
		{
			getCurrentVisibleInternalFrame().dispose();
		}
		// create internal frame
		final JInternalFrame internalFrame = JComponentFactory.newInternalFrame(title, true, true,
			true, true);
		JInternalFrameExtensions.addComponentToFrame(internalFrame, component);
		JInternalFrameExtensions.addJInternalFrame(getMainComponent(), internalFrame);
		setCurrentVisibleInternalFrame(internalFrame);
	}
167531
public void setTarget(Profile<S, C> target) {
		this.target = target;
		targetFuture = null;
		reset();
	}
498751
public void setEditorTarget (PropertyEditorTarget target)
    {
        if (target instanceof DBMetaCatalogNode)
        {
            super.setEditorTarget(target);
            this.tfCatalogName.setText((String)target.getAttribute(DBMetaCatalogNode.ATT_CATALOG_NAME));
        }
        else
        {
            throw new UnsupportedOperationException("This editor can only edit DBMetaCatalogNode objects");
        }
    }
1350923
private void updateProperties(T target, Map<String, Object> source) {
        Map<String, PropertyDescriptor> mapTargetProps = MappingUtils.mapPropertyDescriptors(target.getClass());

        for (String sourceKey : source.keySet()) {
            if (mapTargetProps.containsKey(sourceKey) == true) {
                MappingUtils.callSetter(target, mapTargetProps.get(sourceKey), source.get(sourceKey));
            }
        }
    }
564071
public void replace(T from, T to) throws IOException {
        List<T> copy = new ArrayList<>(data.getView());
        for (int i=0; i<copy.size(); i++) {
            if (copy.get(i).equals(from))
                copy.set(i,to);
        }
        data.replaceBy(copy);
    }
494386
protected static void removeChildInsidePanel( JComponent root , JComponent target ) {
		int N = root.getComponentCount();

		for (int i = 0; i < N; i++) {
			try {
				JPanel p = (JPanel)root.getComponent(i);
				Component[] children = p.getComponents();
				for (int j = 0; j < children.length; j++) {
					if( children[j] == target ) {
						root.remove(i);
						return;
					}
				}
			}catch( ClassCastException ignore){}
		}
	}
534029
public void removeTarget(T target) {
    for (MethodlessRouter<T> r : routers.values()) r.removeTarget(target);
    anyMethodRouter.removeTarget(target);
  }
537408
public StringGrabber replace(String target, String replacement) {
		sb = new StringBuilder(sb.toString().replace(target, replacement));
		return StringGrabber.this;
	}
807574
private String stringReplace(String text, String target, String replacement) {
		return Pattern.compile(target.toString(), Pattern.LITERAL).matcher(
				text).replaceAll(replacement);
	}
872519
@Override
    public void setTarget(Object target) {
        if (mTarget != target) {
            final Object oldTarget = mTarget;
            mTarget = target;
            if (oldTarget != null && target != null && oldTarget.getClass() == target.getClass()) {
                return;
            }
            // New target type should cause re-initialization prior to starting
            mInitialized = false;
        }
    }