Skip to content

Update javafxjython.py #1

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion javafxjython.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,25 @@ def __init__(self, fxmlfile): # changed by Fernando Lima
# start: made by Fernando Lima
def getInnerComponents(self, component):
# print("component: " + str(component))
if (hasattr(component, "children")): # component is a JavaFX Pane
if (hasattr(component, "columns")): # component is a JavaFX TableView
innerComponents = getattr(component, "columns", [])
if isinstance(innerComponents, Iterable):
for innerComponent in innerComponents:
self.components.append(innerComponent)
self.getInnerComponents(innerComponent)
else:
self.components.append(innerComponents)
self.getInnerComponents(innerComponents)
if (hasattr(component, "items")): # component is a JavaFX Menu
innerComponents = getattr(component, "items", [])
if isinstance(innerComponents, Iterable):
for innerComponent in innerComponents:
self.components.append(innerComponent)
self.getInnerComponents(innerComponent)
else:
self.components.append(innerComponents)
self.getInnerComponents(innerComponents)
elif (hasattr(component, "children")): # component is a JavaFX Pane
innerComponents = getattr(component, "children", [])
if isinstance(innerComponents, Iterable):
for innerComponent in innerComponents:
Expand Down