作者热门文章
- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.sis.internal.util.X364.forColorName()
方法的一些代码示例,展示了X364.forColorName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X364.forColorName()
方法的具体详情如下:
包路径:org.apache.sis.internal.util.X364
类名称:X364
方法名:forColorName
[英]Returns the enumeration value for the given color name. The search is case-insensitive.
[中]返回给定颜色名称的枚举值。搜索不区分大小写。
代码示例来源:origin: org.apache.sis.core/sis-referencing
/**
* Writes the color for the given type if {@code colors} is non-null.
*/
private static void writeColor(final Appendable out, final Colors colors, final ElementKind type)
throws IOException
{
if (colors != null) {
final String name = colors.getName(type);
if (name != null) {
out.append(X364.forColorName(name).sequence());
}
}
}
代码示例来源:origin: apache/sis
/**
* Writes the color for the given type if {@code colors} is non-null.
*/
private static void writeColor(final Appendable out, final Colors colors, final ElementKind type)
throws IOException
{
if (colors != null) {
final String name = colors.getName(type);
if (name != null) {
out.append(X364.forColorName(name).sequence());
}
}
}
代码示例来源:origin: org.apache.sis.core/sis-metadata
/**
* Sets the color of the given syntactic element from a color name.
* The color names supported in the current implementation are
* {@code "red"}, {@code "green"}, {@code "yellow"}, {@code "blue"}, {@code "magenta"}, {@code "cyan"}
* and {@code "gray"}, case-insensitive.
*
* @param key the syntactic element for which to set the color.
* @param color the color to give to the specified element, or {@code null} if none.
* @throws IllegalArgumentException if the given color name is not recognized.
*/
public void setName(final ElementKind key, final String color) throws IllegalArgumentException {
if (isImmutable) {
throw new UnsupportedOperationException(Errors.format(Errors.Keys.UnmodifiableObject_1, "Colors"));
}
if (color == null) {
map.remove(key);
} else {
map.put(key, X364.forColorName(color));
}
}
代码示例来源:origin: apache/sis
/**
* Sets the color of the given syntactic element from a color name.
* The color names supported in the current implementation are
* {@code "red"}, {@code "green"}, {@code "yellow"}, {@code "blue"}, {@code "magenta"}, {@code "cyan"}
* and {@code "gray"}, case-insensitive.
*
* @param key the syntactic element for which to set the color.
* @param color the color to give to the specified element, or {@code null} if none.
* @throws IllegalArgumentException if the given color name is not recognized.
*/
public void setName(final ElementKind key, final String color) throws IllegalArgumentException {
if (isImmutable) {
throw new UnsupportedOperationException(Errors.format(Errors.Keys.UnmodifiableObject_1, "Colors"));
}
if (color == null) {
map.remove(key);
} else {
map.put(key, X364.forColorName(color));
}
}
代码示例来源:origin: org.apache.sis.core/sis-utility
synchronized (buffer) {
if (color != null) {
final X364 code = X364.forColorName(color).background();
changed = (colors().put(level, code) != code);
} else if (colors != null) {
代码示例来源:origin: apache/sis
synchronized (buffer) {
if (color != null) {
final X364 code = X364.forColorName(color).background();
changed = (colors().put(level, code) != code);
} else if (colors != null) {
代码示例来源:origin: apache/sis
/**
* Tests {@link X364#forColorName(String)}.
*/
@Test
public void testForColorName() {
for (final X364 value : X364.values()) {
if (value.color != null) {
assertSame(value.color, value.foreground(), X364.forColorName(value.color));
}
}
}
本文整理了Java中org.apache.sis.internal.util.X364.forColorName()方法的一些代码示例,展示了X364.forColorName()的具体用法。这些代码
我是一名优秀的程序员,十分优秀!