当前位置: 首页>>代码示例>>Java>>正文


Java ConfigGuiType.STRING属性代码示例

本文整理汇总了Java中cpw.mods.fml.client.config.ConfigGuiType.STRING属性的典型用法代码示例。如果您正苦于以下问题:Java ConfigGuiType.STRING属性的具体用法?Java ConfigGuiType.STRING怎么用?Java ConfigGuiType.STRING使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在cpw.mods.fml.client.config.ConfigGuiType的用法示例。


在下文中一共展示了ConfigGuiType.STRING属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getGuiType

public static <T> ConfigGuiType getGuiType(Setting<T> setting) {
	if (setting instanceof BooleanSetting) return ConfigGuiType.BOOLEAN;
	else if (setting instanceof IntegerSetting) return ConfigGuiType.INTEGER;
	else if (setting instanceof DoubleSetting) return ConfigGuiType.DOUBLE;
	else if ((setting instanceof StringSetting) ||
	         (setting instanceof EnumSetting)) return ConfigGuiType.STRING;
	else throw new UnsupportedOperationException("Setting type '" + setting.getClass().getSimpleName() + "' not supported.");
}
 
开发者ID:copygirl,项目名称:copycore,代码行数:8,代码来源:GuiConfigBase.java

示例2: getType

public static ConfigGuiType getType(Object object) {
    if (object instanceof Boolean) {
        return ConfigGuiType.BOOLEAN;
    } else if (object instanceof Integer) {
        return ConfigGuiType.INTEGER;
    } else if (object instanceof String) {
        return ConfigGuiType.STRING;
    } else if (object instanceof Map) {
        return ConfigGuiType.CONFIG_CATEGORY;
    }
    return null;
}
 
开发者ID:EnderWizards,项目名称:libsandstone,代码行数:12,代码来源:ConfigElement.java

示例3: getType

@Override
public ConfigGuiType getType()
{
    ConfigGuiType type = lookup.get(field.getType().toString());
    return type != null ? type : ConfigGuiType.STRING;
}
 
开发者ID:CreeperHost,项目名称:CreeperHostGui,代码行数:6,代码来源:ReflectionConfigElement.java

示例4: getType

public static ConfigGuiType getType(Property prop)
{
    return prop.getType() == Property.Type.BOOLEAN ? ConfigGuiType.BOOLEAN : prop.getType() == Property.Type.DOUBLE ? ConfigGuiType.DOUBLE : 
        prop.getType() == Property.Type.INTEGER ? ConfigGuiType.INTEGER : prop.getType() == Property.Type.COLOR ? ConfigGuiType.COLOR : 
        prop.getType() == Property.Type.MOD_ID ? ConfigGuiType.MOD_ID : ConfigGuiType.STRING;
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:6,代码来源:ConfigElement.java


注:本文中的cpw.mods.fml.client.config.ConfigGuiType.STRING属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。