Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FXML #21

Open
dhakehurst opened this issue Jul 20, 2016 · 5 comments
Open

FXML #21

dhakehurst opened this issue Jul 20, 2016 · 5 comments

Comments

@dhakehurst
Copy link

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

@SamCooper
Copy link

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.

@dhakehurst
Copy link
Author

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
.

@SamCooper
Copy link

@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.

@dhakehurst
Copy link
Author

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
.

@SamCooper
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants