code: protected void noteConstraints (int constrain, int size)
      {
          switch (constrain) {
          case HORIZONTAL:
              if (size == 0) {
                  _constrain = HORIZONTAL;
              } else {
                  _label.setTargetWidth(size);
              }
              break;
  
          case VERTICAL:
              if (size == 0) {
                  _constrain = VERTICAL;
              } else {
                  _label.setTargetHeight(size);
              }
              break;
  
          case GOLDEN:
              _label.setGoldenLayout();
              break;
  
          case NONE:
              // nothing doing
              break;
  
          default:
              throw new IllegalArgumentException("Invalid constraint orientation " + constrain);
          }
      }
docs: Helper function.