de.uniks.networkparser.TextItems Maven / Gradle / Ivy
package de.uniks.networkparser;
import de.uniks.networkparser.buffer.CharacterBuffer;
import de.uniks.networkparser.interfaces.LocalisationInterface;
import de.uniks.networkparser.interfaces.SendableEntityCreator;
import de.uniks.networkparser.list.SimpleKeyValueList;
public class TextItems extends SimpleKeyValueList implements SendableEntityCreator, LocalisationInterface {
public static final String PROPERTY_VALUE = "value";
private LocalisationInterface customLanguage = null;
private boolean defaultLabel=true;
@Override
public Object getValue(Object entity, String attribute) {
return ((TextItems) entity).get(attribute);
}
@Override
public boolean setValue(Object entity, String attribute, Object value,
String type) {
if(entity instanceof TextItems == false) {
return false;
}
TextItems items = (TextItems) entity;
return items.add(attribute, value);
}
@Override
public String getText(CharSequence label, Object model, Object gui) {
String text = null;
if (containsKey(label) == false) {
CharacterBuffer buffer=new CharacterBuffer();
buffer.with(label);
for(int i=0;i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy