RobertBColton/DockFX

FXML

dhakehurst opened this issue · 5 comments

Are you going to have FXML support in the near future?

As far as I am aware, Robert is waiting for some JDK bugs to be fixed before continuing this (excellent) work. See this discussion (about half way down):

#10

One fork of this project (Kladimir) has added in FXML support which I've just ported to the ClearControl fork which seems to be the most active:

https://github.com/SamCooper/DockFX

So my recommendation would be to move to ClearControl fork and take my changes. Hopefully they will be merged soon.

Thanks very much,

are there any instructions/demos of how to use it in FXML ?

thanks

On 20 July 2016 at 14:46, Sam Cooper notifications@github.com wrote:

As far as I am aware, Robert is waiting for some JDK bugs to be fixed
before continuing this (excellent) work. See this discussion (about half
way down):

#10 #10

One fork of this project (Kladimir) has added in FXML support which I've
just ported to the ClearControl fork which seems to be the most active:

https://github.com/SamCooper/DockFX

So my recommendation would be to move to ClearControl fork and take my
changes. Hopefully they will be merged soon.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#21 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFW7ZWM6zjEBjMWGP-ZKcWowdfMLSdH9ks5qXhiegaJpZM4JQu2D
.

@kladimir did all the clever work, and updated Roberts demo to use it:

https://github.com/Kladimir/DockFX/blob/master/src/main/java/org/dockfx/demo/DockFX.java#L121

Note though, it is FXML support for dock node contents not FXML support for docked node layout.

I have just figured that out :-)

I am looking for FXML support for using the DockPane & DockNode, not simply
giving a DockNode content.

I have had a go at trying to provide this myself,

  • Provide no arg constructor for DockNode
  • add a property to the DockPane for adding content
    • which docks the content.
  • But it doesn't seem to work, the docking function breaks somehow!
    I guess I don't really know how to provide FXML support.
    if anyone knows more about FXML than I, please do advise what I am missing,

--- example use ---

<TextArea></TextArea>

--- added to DockNode ---

public DockNode() {
dockTitleBar = new DockTitleBar(this);
getChildren().addAll(dockTitleBar);

 this.getStyleClass().add("dock-node");

}
DockPos position;
public void setPosition(DockPos value) {
this.position = value;
}
public DockPos getPosition() {
return this.position;
}

--- added to DockPane ----

public List getElements() {
ObservableList children = super.getChildren();
List els = new AbstractList() {

@OverRide
public Node get(int index) {
return children.get(index);
}

@OverRide
public int size() {
return children.size();
}
@OverRide
public void add(int index, Node n) {
if (n instanceof DockNode) {
DockNode dn = (DockNode)n;
dock(dn, dn.getPosition());
} else {
DockNode dn = new DockNode(n);
dock(dn, DockPos.CENTER);
}
}
};
return els;
}

On 21 July 2016 at 10:44, Sam Cooper notifications@github.com wrote:

@kladimir https://github.com/kladimir did all the clever work, and
updated Roberts demo to use it:

https://github.com/Kladimir/DockFX/blob/master/src/main/java/org/dockfx/demo/DockFX.java#L121

Note though, it is FXML support for dock node contents not FXML support
for docked node layout.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#21 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFW7ZWnwinHslCfLt0K2EdppqStrcdWFks5qXzF2gaJpZM4JQu2D
.

I would suggest moving this conversation over to:

https://github.com/ClearControl/DockFX

And re-create the issue there (linking back to this one) as I think this is a subject that @hkmoon is keen on. He seems to have a good idea how this works as he added the tabbed support so may have a better idea what is broken :)

If you do that please ref me (@SamCooper) so that I get a notification as this is also something that I am very keen on.