Examples of StructureStylesheetUserPreferences


Examples of org.jasig.portal.StructureStylesheetUserPreferences

    // Simply divide the number of columns by 100 and produce an evenly numbered column widths
    int columns = list.getLength();
    int columnSize = 100 / columns;
    int remainder = 100 % columns;
    // Traverse through the columns and reset with the new caculated value
    StructureStylesheetUserPreferences ssup = userPrefs.getStructureStylesheetUserPreferences();
    for (int i=0; i < list.getLength(); i++){
        Element c = (Element) list.item(i);
        String nId = c.getAttribute("ID");
        ssup.setFolderAttributeValue(nId, "width", (i == (list.getLength() - 1) ? columnSize+remainder+"%" : columnSize+"%"));
    }           
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.