Multiple Expanding Nodes in Virtual TreeView possible? - delphi

I am using a TVirtualStringTree (part of the Virtual TreeView Component) in my Delphi project and I would like to create a view where 2 columns can have children that are expandable/collapsable with [+] sign.
In the picture below as sample I would like to have a [+] sign in the Server Column but also in the Image column. The idea is that the tree has several Server nodes that each have many process child's (which main colum is image) and some processes have sub-processes which are children of the processes'node.
(source: remkoweijnen.nl)
Is such a layout possible? If not with the default component I would appreciate advice on how to implement this in a descendant.
/Edit: The following screenshots are when using the method TOndrej suggests:
alt text http://www.remkoweijnen.nl/temp/TreeView2.png
alt text http://www.remkoweijnen.nl/temp/TreeView3.png
alt text http://www.remkoweijnen.nl/temp/TreeView4.png
OK, I decided to implement as per TOndrej's idea:
alt text http://www.remkoweijnen.nl/temp/TreeView5.png

You most probably don't need that. Just make yourself a clear specification of what grouping you need. The first column can be multi-purpose - showing different information on each grouping level - e.g. level 0: server, level 1: process, level 2 and higher: child process.
On each level, only columns relevant to that level need to display any information. In the above example, level 0 would only display the server name in the first column; the rest of the columns would remain empty.
You could probably implement as many plus signs as you want by custom-drawing but it would be a lot of work and I really think the result is unnecessary, unusual and easily confusing to the user.

Only one column can have the tree, the other columns act a a listview. The column with the tree is the main column.
I would not know how your grouping would work if two columns had a tree and they might "conflict". What is parent node etc etc. GUI technically this might not be the best way of giving those details; a user won't expect it to work that way.

Related

Vaadin 23 proper usage of nested layouts

Typically, when I need to present some information, I use VerticalLayout (VL) as a main container and many of nested HorizonalLayouts (HL). I may be wrong, but I feel that this is not a very effective way to organize the information. I suppose I may achieve the same without nesting of such amount of HorizonalLayouts.
For example, I need to present user info with 100 lines, each line will have 5-10 spans. Typically, with my current approach, I'll create 1 VL and 100 HL for that.
Is there a more effective way to present this information other than nesting 100 HL into VL ?
You're absolutely correct about that – the main inefficiency being that HorizontalLayouts are a bit heavier than plain html elements that would probably do the job just fine.
There are many different ways to approach this, but I'm going to assume that you're basically rendering a table where you want each element to line up in neat columns.
HTML has the <table> element for that, but unfortunately Flow does not have an API for doing <table>s easily.
The easiest way is probably to use this add-on that provides such an API: https://vaadin.com/directory/component/html-table/overview
Other ways would be to e.g. use Divs for tables, rows and cells instead. Divs can be made to render as those elements by applying the appropriate display css values table, table-row and table-cell. These can be applied via classnames or the Style API in Flow:
Div cell = new Div();
cell.getStyle().set("display", "table-cell");

Custom names detection

This is a project in really early phase and I'm trying to find ideas on where to start.
Any help or pointers would be greatly appreciated!
My problem:
I have text on one side, and a list of named GraphDB elements on the other (usually the name is either an acronym or a multi-word expression). My texts are not annotated.
I want to detect whenever a name is explicitly used in the text. The trick is that it will not necessarily be a perfect string match (for example an acronym can be used to shorten a multi-word expression, or a small part can be left out). So a simple string search will not have a 100% recall (even though it can be used as a starter).
If I just had an input and I wanted it to match it to one of the names, I would do a simple edit distance computation and that's it. What bugs me is that I have to do this for a whole text, and I don't know how to approach/break down the problem.
I cannot break down everything in N-grams because my named entities can be a single word or up to seven words long... Or can I?
I have thousands of Graph elements so I don't think NER can be applied here... Or can it?
An example could be:
My list of names is ['Graph Database', 'Manager', 'Employee Number 1']
The text is:
Every morning, the Manager browse through the Graph Database to look for updates. Every evening, Employee 1 updates the GraphDB.
I want in this block of text to map the 4 highlighted portions to their corresponding item in the list.
I have a small background in Machine Learning but I haven't really ever done NLP. To be clear, I do not care about the meaning of these words, I just want to be able to detect them.
Thanks

Strategy for Requirements Traceability Matrix in DOORS

I want to create a traceability matrix in a new module that shows the object ID & text at the top level, then in columns moving to the right the object ID & text for the source of the first in-link, and then it's in-links to the right, etc. If there is more than one in-link, the next source object will be shown on the next line (new object), and the higher level object ID & text just repeated in the columns to the left. Basically, it is the recursive trace analysis layout dxl, but I want to spread out the information over separate columns.
My question is related to the best practices for approach. Is it best to create a new module and write several dxl layout scripts for each column, pulling info from all of the various modules, and then later converting it to text (so it isn't too heavy)? Or is it necessary (or easier) to actually create dxl attributes within each requirements module, and then pull information from there into my RTM module?
I'm likely over-complicating it, but any tips would be appreciated!
Well, one of our assets contains something that looks like your approach:
script creates new modules that only contains trace information, a "report" module, which does not contain any link to the original "data" modules
there are some 2 or three columns for each Req Level (high level reqs at the left, low level reqs at the right)
the advantage of this approach is that one can easily use standard DOORS filtering mechanisms to find "holes" in the matrix (requirements which have not been implemented, design elements without requirement etc.). plus, as every report run creates a new report module with the date/time in its name, project progress can be made visible over time, reports to excels might be made.
On the other hand the implementation took several weeks. So, I don't know if this approach would be feasible for you.

Data model of existing data in Neo4J

I have a small dataset loaded into Neo4J consisting of a 6 node labels with about 20 nodes for each label and there are about 10 different relationships. I was wondering if you can automatically create a picture of this data model using the data available in the database.
I would like to create something like this automatically from the data:
taken from http://neo4j.com/docs/stable/cypherdoc-movie-database.html
I know that it would be quite simple doing it manually in this example but it could come in handy looking at more complex data models.
Any suggestions?
Thank you Michael, that helped. There is also functionality in the web tool that ships with Neo4J that can do something similar although less graphically.
You click on the little bubbles in the top left corner of the interface and then there is a predefined query that extracts all lables and relations from the graph.

Detecting HTML table orientation based only on table data

Given an HTML table with none of it's cells identified as "< th >" or "header" cells, I want to automatically detect whether the table is a "Vertical" table or "Horizontal" table.
For example:
This is a Horizontal table:
and this is a vertical table:
of course keep in mind that the "Bold" property along with the shading and any styling properties will not be available at the classification time.
I was thinking of approaching this by a statistical means, I can hand write couple of features like "if the first row has numbers, but the first column doesn't. That's probably a Vertical table" and give score for each feature and combine to decide the Class of the table orientation.
Is that how you approach such a problem? I haven't used any statistical-based algorithm before and I am not sure what would be optimal for such a problem
This is a bit confusing question. You are asking about ML method, but it seems you have not created training/crossvalidation/test sets yet. Without data preprocessing step any discussion about ML method is useless.
If I'm right and you didn't created datasets yet - give us more info on data (if you take a look on one example how do you know the table is vertical or horizontal?, how many data do you have, are you always sure whether s table is vertical/horizontal,...)
If you already created training/crossval/test sets - give us more details how the training set looks like (what are the features, number of examples, do you need white-box solution (you can see why a ML model give you this result),...)
How general is the domain for the tables? I know some Web table schema identification algorithms use types, properties, and instance data from a general knowledge schema such as Freebase to attempt to identify the property associated with a column. You might try leveraging that knowledge in an classifier.
If you want to do this without any external information, you'll need a bunch of hand labelled horizontal and vertical examples.
You say "of course" the font information isn't available, but I wouldn't be so quick to dismiss this since it's potentially a source of very useful information. Are you sure you can't get your data from a little bit further back in the pipeline so that you can get access to this info?

Resources