Dashboard > GEE 3 > ... > Internals > Wrapping Swing in GEE
  GEE 3 Log In | Sign Up   View a printable version of the current page.  
  Wrapping Swing in GEE
Added by Charlie Groves, last edited by Charlie Groves on Jan 17, 2006  (view change)
Labels: 
(None)

Any swing classes accessed from Jython configuration should be wrapped to clean up swing's naming and provide uniform methods of construction.

Java Class GEE Class Container
JTabbedPane TabbedPanel
JFrame Frame
JToolBar Toolbar

All containers are given python container methods by inheriting SwingPyContainerMethods. This makes the swing componet access work like a python list.

comp.getComponent(i) -> comp[i]
comp.getComponentCount() -> len(comp)
comp.remove(i) -> del comp[i]

and so on.

All access to components inside the wrapped classes should go through these methods.

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators