Package gnue :: Package appserver :: Package generator :: Module layout :: Class Manager
[show private | hide private]

Class Manager

Known Subclasses:
Tabular, Vertical

Method Summary
  __init__(self, classdef, maxWidth, maxHeight)
  arrangeItems(self)
This function creates the visual pages and arranges all properties on them.
  arrangeWidgets(self, item, left, maxSpace)
This function arranges all widgets of a property by lining them up starting at the given position.
  getSpecialLocation(self, page, item)
This function returns the location-dictionary for a special property on a given page.

Method Details

__init__(self, classdef, maxWidth, maxHeight)
(Constructor)

Parameters:
classdef - class definition to create a layout for
maxWidth - maximum width for a form
maxHeight - maximum height for a form

arrangeItems(self)

This function creates the visual pages and arranges all properties on them. As a side effect after this function the properties 'maxPageHeight' and 'maxPageWidth' are set.

arrangeWidgets(self, item, left, maxSpace=None)

This function arranges all widgets of a property by lining them up starting at the given position. If an item is a reference all reference items are positioned as well, where the reference-property get's an overall-width set.

After this function is done, the 'left'- and 'width'-members of an item (and all it's references/buddies) are set.
Parameters:
item - the property to arrange
left - the x position of the item
maxSpace - the maximum space left for the widget

getSpecialLocation(self, page, item)

This function returns the location-dictionary for a special property on a given page. Such a dictionary has a 'labelPos'-, a 'left'- and a 'row'-key.
Parameters:
page - the visual page to get the location record for
item - the item to get the location record for
Returns:
dictionary with location information for the special property


GNUe Home

Public API

Developer's Corner