Skip to content

How to define a resizeable node #741

Answered by rsoika
rsoika asked this question in Q&A
Sep 20, 2022 · 3 comments · 3 replies
Discussion options

You must be logged in to vote

Ok, everything is now working and I just want to provide a complete code example here (if someone finds this discussion helpful)

The Builder Class

In the Builder Class the method setProperties is used to set the prevWidth/height for the node given by the size object:

public class TaskNodeBuilder extends AbstractGNodeBuilder<TaskNode, TaskNodeBuilder> {

    private final String name;

    public TaskNodeBuilder(final String type, final String name) {
        super(type);
        this.name = name;
    }
    .....

    @Override
    public void setProperties(final TaskNode node) {
        super.setProperties(node);
        node.setName(name);
        node.setLayout(GConstants.Layout.HBOX);
…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@rsoika
Comment options

Comment options

You must be logged in to vote
2 replies
@rsoika
Comment options

@CamilleLetavernier
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by rsoika
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants