[GUI] Helptext only displayed for TreeNodes wich get initialized with a Field
Summary
This bug is visible when using the attribute table. It occurres when clicking on table rows which are not fields of registered types which means they are not represented by a FieldNode.
What is the current bug behavior?
When the user clocks on a tabel row which is not represented by a FieldNode / e.g ObjectNode,ArrayNode,AbstrNode. No help text is getting displayed.
What is the expected correct behavior?
Helptext should be displayed.
Steps to reproduce
- E.g select a target.
- Swich the right split panel to 'Attribute Table'
- click on the lable absorber (It is represented by an ObjectNode)
- Now the help text panel at the bottom should display some help text about the attribute. It does not
Starting point
Attributes are rendered via a JAttributeTable using a JAttributeTableStyler which is used to layout a single JTable for an attribute. Using a Styler makes it possible to do different styles e.g TableStyler in org/vadere/gui/topographycreator/control/attribtable/ui/AttributeTablePage.java.
This Style uses a MouseListener to notify the AttributeHelpView to load different help text. AttributeHelpView's method load help looks like this. Since not all AttributeTree.TreeNode's can have a valid field attribute based on the current implementation. It would make sense to replace the arguments for this method by declaring class name and field name.
public void loadHelpFromField(Field field){
loadHelpText("/helpText/" + field.getDeclaringClass().getName()+"VVV"+field.getName() + ".html");
}
This would require to change the table modeld used in TableStyle to use not the Field instances as model but both the field name and field type instead. And instantiate any node with a new attribute wich stores the name of the declaring class