GridSize.javaprojectforge-wicket/src/main/java/org/projectforge/web/wicket/bootstrap/GridSize.java que contiene código Java para la capa de Componente.Paquete: org.projectforge.web.wicket.bootstrap
Enums: GridSize
Métodos (3): getClassAttrValue, getLength, fromInt
Campos (2): classAttrValue, length
package org.projectforge.web.wicket.bootstrap;
/**
* Se utiliza para definir el valor del atributo de clase para elementos (tamaños de cuadrícula de bootstrap).
* <ul>
* <li>COL25 es un alias para SPAN3</li>
* <li>COL33 es un alias para SPAN4</li>
* <li>COL50 es un alias para SPAN6</li>
* <li>COL66 es un alias para SPAN8</li>
* <li>COL75 es un alias para SPAN9</li>
* <li>COL100 es un alias para SPAN12</li>
* </ul>
*
* @author Kai Reinhard (k.reinhard@micromata.de)
*/
public enum GridSize
{
SPAN1(1), SPAN2(2), SPAN3(3), SPAN4(4), SPAN6(6), SPAN8(8), SPAN9(9), SPAN12(12), COL25(SPAN3), COL33(SPAN4), COL50(
SPAN6), COL66(SPAN8), COL75(
SPAN9), COL100(SPAN12);
private final String classAttrValue;
private final int length;
public String getClassAttrValue()
{
return classAttrValue;
}
/**
* @return la longitud
*/
public int getLength()
{
return length;
}
private GridSize(final int length)
{
this.length = length;
// Para mantener anchos fluidos en escritorios y tabletas, pero apilar verticalmente en teléfonos inteligentes:
// Reemplazar .col-md-* con .col-sm-*
//
// Para mantener anchos fluidos en todos los dispositivos (sin apilamiento):
// Reemplazar .col-md-* con .col-xs-*
this.classAttrValue = "col-sm-" + length;
}
private GridSize(final GridSize master)
{
this.length = master.length;
this.classAttrValue = master.classAttrValue;
}
public static GridSize fromInt(final int span)
{
for (final GridSize gs : values()) {
if (gs.getLength() == span) {
return gs;
}
}
throw new IllegalArgumentException("No se puede encontrar GridSize para el tamaño: " + span);
}
}
868d6abb7 2025 -> 2026 63081666f Encabezados de archivos fuente: 2024 -> 2025. b6092df09 Derechos de autor 2023 -> 2024 ab45d51fa Derechos de autor 2001-2022 -> 2001-2023. 5f7ef41b8 Derechos de autor 2021 -> 2022