/** * Bind this handler to the given component. * * @param hostComponent * the component to bind to */ public final void bind(final Component hostComponent) { if (hostComponent == null) { throw new IllegalArgumentException("Argument hostComponent must be not null"); } if (component != null) { throw new IllegalStateException("this kind of handler cannot be attached to " + "multiple components; it is already attached to component " + component + ", but component " + hostComponent + " wants to be attached too"); } component = hostComponent; // call the callback onBind(); }
/** * Bind this handler to the given component. * * @param hostComponent * the component to bind to */ @Override public final void bind(final Component hostComponent) { if (hostComponent == null) { throw new IllegalArgumentException("Argument hostComponent must be not null"); } if (component != null) { throw new IllegalStateException("this kind of handler cannot be attached to " + "multiple components; it is already attached to component " + component + ", but component " + hostComponent + " wants to be attached too"); } component = hostComponent; // call the callback onBind(); }
/** * Bind this handler to the given component. * * @param hostComponent * the component to bind to */ @Override public final void bind(final Component hostComponent) { Args.notNull(hostComponent, "hostComponent"); if (component != null) { throw new IllegalStateException("this kind of handler cannot be attached to " + "multiple components; it is already attached to component " + component + ", but component " + hostComponent + " wants to be attached too"); } component = hostComponent; // call the callback onBind(); }
/** * Bind this handler to the given component. * * @param hostComponent * the component to bind to */ @Override public final void bind(final Component hostComponent) { Args.notNull(hostComponent, "hostComponent"); if (component != null) { throw new IllegalStateException("this kind of handler cannot be attached to " + "multiple components; it is already attached to component " + component + ", but component " + hostComponent + " wants to be attached too"); } component = hostComponent; // call the callback onBind(); }