All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bidib.wizard.nodes.client.model.NodeRow Maven / Gradle / Ivy

package org.bidib.wizard.nodes.client.model;

import org.apache.commons.lang3.StringUtils;

import com.jidesoft.grid.DefaultExpandableRow;

public class NodeRow extends DefaultExpandableRow {

    private final AccessoryNode accessoryNode;

    public NodeRow(final AccessoryNode accessoryNode) {
        this.accessoryNode = accessoryNode;
    }

    @Override
    public Object getValueAt(int column) {
        if (column == 0) {
            return getName();
        }
        return null;
    }

    public String getName() {
        String label = this.accessoryNode.getLabel();

        if (StringUtils.isBlank(label)) {
            label = this.accessoryNode.getNode().toString();
        }
        return label;
    }

    public Long getUniqueId() {
        return Long.valueOf(this.accessoryNode.getNode().getUniqueId());
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy