Package org.openfaces.component.table

Examples of org.openfaces.component.table.ColumnReordering


* @author Dmitry Pikhulya
*/
public class ColumnReorderingRenderer extends RendererBase {
    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        ColumnReordering cr = (ColumnReordering) component;
        AbstractTable table = cr.getTable();
        StyleParam draggedCellStyle = new StyleParam(cr, "draggedCell", "o_table_draggedColumn");
        StyleParam autoScrollAreaStyle = new StyleParam(cr, "autoScrollArea", "o_headerAutoScrollArea");
        StyleParam dropTargetStyle = new StyleParam(cr, "dropTarget", "o_table_columnDropTarget");
        Styles.renderStyleClasses(context, cr);
        // important: style rendering is made earlier than init function deliberately to allow script to
        // inspect styles dynamically
        Rendering.renderInitScript(context,
                new ScriptBuilder().initScript(context, table,
                        "O$.Table._initColumnReordering",
                        draggedCellStyle,
                        cr.getDraggedCellTransparency(),
                        autoScrollAreaStyle,
                        cr.getAutoScrollAreaTransparency(),
                        Resources.getURL(context, cr.getAutoScrollLeftImageUrl(), null, "table/autoScrollLeft.gif"),
                        Resources.getURL(context, cr.getAutoScrollRightImageUrl(), null, "table/autoScrollRight.gif"),
                        dropTargetStyle,
                        Resources.getURL(context, cr.getDropTargetTopImageUrl(), null, "table/dropTargetTop.gif"),
                        Resources.getURL(context, cr.getDropTargetBottomImageUrl(), null, "table/dropTargetBottom.gif")
                ),
                AbstractTableRenderer.getTableJsURL(context)
        );
    }
View Full Code Here

TOP

Related Classes of org.openfaces.component.table.ColumnReordering

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.