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.
  _addSpecials(self)
This function adds all special properties at the bottom of every visual page by creating a location record per property/page.
  _prepareSpecials(self)
This function creates a sequence of special properties.

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

_addSpecials(self)

This function adds all special properties at the bottom of every visual page by creating a location record per property/page. Addidionally the maximum page height will be incremented by the number of lines needed to fit all special properties.

_prepareSpecials(self)

This function creates a sequence of special properties. Bound properties are removed from the sequence, so it only contains those properties having a label.
Returns:
sequence with special property instances


GNUe Home

Private API

Developer's Corner