use of org.qi4j.tools.model.descriptor.CompositeMethodDetailDescriptor in project qi4j-sdk by Qi4j.
the class StatePane method setDescriptor.
@Override
protected void setDescriptor(Object objectDesciptor) {
clear();
if (objectDesciptor instanceof CompositeDetailDescriptor) {
CompositeDetailDescriptor descriptor = ((CompositeDetailDescriptor) objectDesciptor);
List<CompositeMethodDetailDescriptor> list = DescriptorUtilities.findState(descriptor);
for (CompositeMethodDetailDescriptor methodDescriptor : list) {
methodListModel.addElement(methodDescriptor);
}
if (!methodListModel.isEmpty()) {
methodList.setSelectedIndex(0);
}
} else if (objectDesciptor instanceof ObjectDetailDescriptor) {
// Object does not have state
}
}
Aggregations