Example #1
0
 @Override
 protected int adjustHeightAnchor(int height, Component comp) {
   if (comp instanceof Field<?>) {
     Field<?> f = (Field<?>) comp;
     if (!f.isHideLabel() && labelAlign.equals(LabelAlign.TOP)) {
       El elem = findLabelElement(comp);
       if (elem != null) {
         height -= elem.getHeight();
       }
     }
   }
   return super.adjustHeightAnchor(height, comp);
 }
Example #2
0
  @Override
  protected int adjustWidthAnchor(int width, Component comp) {
    if (comp instanceof Field<?>) {
      Field<?> f = (Field<?>) comp;
      width -= (f.isHideLabel() ? 0 : labelAdjust);

      // offset due to the label element
      if (((GXT.isIE && !GXT.isStrict) || GXT.isIE6)
          && !labelAlign.equals(LabelAlign.TOP)
          && !f.isHideLabel()) {
        width -= 3;
      }
    }

    return super.adjustWidthAnchor(width, comp);
  }