Пример #1
0
 @Override
 protected void takeDown(ARankColumnModel model) {
   super.takeDown(model);
   model.removePropertyChangeListener(PROP_WIDTH, listener);
   model.removePropertyChangeListener(IFilterColumnMixin.PROP_FILTER, listener);
   model.removePropertyChangeListener(IMappedColumnMixin.PROP_MAPPING, listener);
   // addDirectWeight(-model.getWeight());
   if (alignmentDetails > size() - 2) {
     setAlignment(alignmentDetails - 1);
   }
   super.setWidth(width - model.getWidth() - RenderStyle.COLUMN_SPACE);
   model.setParentData(null);
   cacheMulti.clear();
 }
Пример #2
0
 @Override
 public ARankColumnModel setWidth(float width) {
   if (isCompressed) {
     this.propertySupport.firePropertyChange(
         PROP_WIDTH, compressedWidth, this.compressedWidth = width);
     return this;
   }
   float shift = getSpaces();
   float factor = (width - shift) / (this.width - shift); // new / old
   for (ARankColumnModel col : this) {
     float wi = ((float) col.getParentData()) * factor;
     col.setParentData(wi);
     col.removePropertyChangeListener(PROP_WIDTH, listener);
     col.setWidth(wi);
     col.addPropertyChangeListener(PROP_WIDTH, listener);
   }
   return super.setWidth(width);
 }