I do that to extended org.apache.pivot.wtk.content.TableViewHeaderDataRenderer : see attach file

Le 04/08/2010 22:53, Duto a écrit :
I found this process too^^ :

src : TableViewHeaderDataRenderer

76: // Left-align the content
77:         getStyles().put("horizontalAlignment", (text == null) ?
78:            HorizontalAlignment.CENTER : HorizontalAlignment.LEFT);

Why It's do like that ? It's a bug or ... ?

Best regards

Duto

--
Olivier Dutrieux
Études et Projets Informatiques (Tél : 31 62)
package xxx;

import org.apache.pivot.wtk.TableViewHeader;

/**
 * Date: 4 août 2010
 * Time: 22:54:09
 */
public class TableViewHeaderDataRenderer extends org.apache.pivot.wtk.content.TableViewHeaderDataRenderer {
    private String overwriteHorizontalAlignment;
    @Override
    public void render(Object data, int columnIndex, TableViewHeader tableViewHeader, String columnName, boolean highlighted) {
        super.render(data, columnIndex, tableViewHeader, columnName, highlighted);
        if (this.overwriteHorizontalAlignment != null) {
            this.getStyles().put("overwriteHorizontalAlignment", this.overwriteHorizontalAlignment);
        }
    }

    public void setOverwriteHorizontalAlignment(String overwriteHorizontalAlignment) {
        this.overwriteHorizontalAlignment = overwriteHorizontalAlignment;
    }
}

Reply via email to