/**
  * Sets the controller for which this piece works.
  *
  * @param controller the controller
  */
 public void setController(DockController controller) {
   this.controller = controller;
   action.setEnabled(controller != null);
   model = null;
   if (isBound()) {
     text.setController(controller);
   }
 }
 @Override
 public void bind() {
   super.bind();
   text.setController(controller);
 }
 @Override
 public void unbind() {
   super.unbind();
   text.setController(null);
 }