當前位置: 首頁>>代碼示例>>Java>>正文


Java BorderSpecification類代碼示例

本文整理匯總了Java中org.springframework.shell.table.BorderSpecification的典型用法代碼示例。如果您正苦於以下問題:Java BorderSpecification類的具體用法?Java BorderSpecification怎麽用?Java BorderSpecification使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BorderSpecification類屬於org.springframework.shell.table包,在下文中一共展示了BorderSpecification類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: applyStyleNoHeader

import org.springframework.shell.table.BorderSpecification; //導入依賴的package包/類
/**
 * Customize the given TableBuilder with almost same way than
 * {@link #applyStyle(TableBuilder)} but do not use any header styling.
 *
 * @param builder the table builder to use
 * @return the configured table builder
 */
public static TableBuilder applyStyleNoHeader(TableBuilder builder) {
	builder.addOutlineBorder(BorderStyle.fancy_double)
			.paintBorder(BorderStyle.air, BorderSpecification.INNER_VERTICAL).fromTopLeft().toBottomRight()
			.paintBorder(BorderStyle.fancy_light, BorderSpecification.INNER_VERTICAL).fromTopLeft()
			.toBottomRight();
	return Tables.configureKeyValueRendering(builder, " = ");
}
 
開發者ID:spring-cloud,項目名稱:spring-cloud-skipper,代碼行數:15,代碼來源:TableUtils.java

示例2: applyStyle

import org.springframework.shell.table.BorderSpecification; //導入依賴的package包/類
/**
 * Customize the given TableBuilder with the following common features
 * (these choices can always be overridden by applying later customizations) :<ul>
 *     <li>double border around the whole table and first row</li>
 *     <li>vertical space (air) borders, single line separators between rows</li>
 *     <li>first row is assumed to be a header and is centered horizontally and vertically</li>
 *     <li>cells containing Map values are rendered as {@literal key = value} lines, trying to align on equal signs</li>
 * </ul>
 */
public static TableBuilder applyStyle(TableBuilder builder) {
	builder.addOutlineBorder(BorderStyle.fancy_double)
			.paintBorder(BorderStyle.air, BorderSpecification.INNER_VERTICAL)
			.fromTopLeft().toBottomRight()
			.paintBorder(BorderStyle.fancy_light, BorderSpecification.INNER_VERTICAL)
			.fromTopLeft().toBottomRight()
			.addHeaderBorder(BorderStyle.fancy_double)
			.on(CellMatchers.row(0))
			.addAligner(SimpleVerticalAligner.middle)
			.addAligner(SimpleHorizontalAligner.center)
	;
	return Tables.configureKeyValueRendering(builder, " = ");
}
 
開發者ID:spring-cloud,項目名稱:spring-cloud-dashboard,代碼行數:23,代碼來源:DataFlowTables.java

示例3: applyStyle

import org.springframework.shell.table.BorderSpecification; //導入依賴的package包/類
/**
 * Customize the given TableBuilder with the following common features (these choices can
 * always be overridden by applying later customizations) :
 * <ul>
 * <li>double border around the whole table and first row</li>
 * <li>vertical space (air) borders, single line separators between rows</li>
 * <li>first row is assumed to be a header and is centered horizontally and
 * vertically</li>
 * <li>cells containing Map values are rendered as {@literal key = value} lines, trying to
 * align on equal signs</li>
 * </ul>
 *
 * @param builder the table builder to use
 * @return the configured table builder
 */
public static TableBuilder applyStyle(TableBuilder builder) {
	builder.addOutlineBorder(BorderStyle.fancy_double)
			.paintBorder(BorderStyle.air, BorderSpecification.INNER_VERTICAL).fromTopLeft().toBottomRight()
			.paintBorder(BorderStyle.fancy_light, BorderSpecification.INNER_VERTICAL).fromTopLeft()
			.toBottomRight()
			.addHeaderBorder(BorderStyle.fancy_double).on(CellMatchers.row(0))
			.addAligner(SimpleVerticalAligner.middle).addAligner(SimpleHorizontalAligner.center);
	return Tables.configureKeyValueRendering(builder, " = ");
}
 
開發者ID:spring-cloud,項目名稱:spring-cloud-skipper,代碼行數:25,代碼來源:TableUtils.java

示例4: applyStyle

import org.springframework.shell.table.BorderSpecification; //導入依賴的package包/類
/**
 * Customize the given TableBuilder with the following common features (these choices
 * can always be overridden by applying later customizations) :
 * <ul>
 * <li>double border around the whole table and first row</li>
 * <li>vertical space (air) borders, single line separators between rows</li>
 * <li>first row is assumed to be a header and is centered horizontally and
 * vertically</li>
 * <li>cells containing Map values are rendered as {@literal key = value} lines,
 * trying to align on equal signs</li>
 * </ul>
 *
 * @param builder the table builder to use
 * @return the configured table builder
 */
public static TableBuilder applyStyle(TableBuilder builder) {
	builder.addOutlineBorder(BorderStyle.fancy_double)
			.paintBorder(BorderStyle.air, BorderSpecification.INNER_VERTICAL).fromTopLeft().toBottomRight()
			.paintBorder(BorderStyle.fancy_light, BorderSpecification.INNER_VERTICAL).fromTopLeft().toBottomRight()
			.addHeaderBorder(BorderStyle.fancy_double).on(CellMatchers.row(0))
			.addAligner(SimpleVerticalAligner.middle).addAligner(SimpleHorizontalAligner.center);
	return Tables.configureKeyValueRendering(builder, " = ");
}
 
開發者ID:spring-cloud,項目名稱:spring-cloud-dataflow,代碼行數:24,代碼來源:DataFlowTables.java


注:本文中的org.springframework.shell.table.BorderSpecification類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。