Search in sources :

Example 1 with AssetType

use of org.openremote.model.asset.AssetType in project openremote by openremote.

the class AssetEditImpl method setType.

@Override
public void setType(String type) {
    typeInput.setValue(type);
    AssetType assetType = AssetType.getByValue(type).orElse(AssetType.CUSTOM);
    if (assetType == AssetType.CUSTOM) {
        headline.setSub(type);
    } else {
        headline.setSub(managerMessages.assetTypeLabel(assetType.name()));
    }
}
Also used : AssetType(org.openremote.model.asset.AssetType)

Example 2 with AssetType

use of org.openremote.model.asset.AssetType in project openremote by openremote.

the class AssetViewImpl method setIconAndType.

@Override
public void setIconAndType(String icon, String type) {
    headline.setIcon(icon);
    AssetType assetType = AssetType.getByValue(type).orElse(AssetType.CUSTOM);
    if (assetType == AssetType.CUSTOM) {
        headline.setSub(type);
    } else {
        headline.setSub(managerMessages.assetTypeLabel(assetType.name()));
    }
}
Also used : AssetType(org.openremote.model.asset.AssetType)

Aggregations

AssetType (org.openremote.model.asset.AssetType)2