/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/Model/label.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/Model/label.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/thuban/Thuban/Model/label.py revision 2563 by jan, Wed Feb 16 23:13:19 2005 UTC branches/WIP-pyshapelib-bramz/Thuban/Model/label.py revision 2734 by bramz, Thu Mar 1 12:42:59 2007 UTC
# Line 22  ALIGN_BASELINE = "baseline" Line 22  ALIGN_BASELINE = "baseline"
22    
23  class Label:  class Label:
24    
25      """This class repesents a single label that is      """This class repesents a single label.
26      defined by its coordinate, the text as well  
27        The label is defined by its coordinate, the text as well
28      as vertical and horizontal alignment concerning      as vertical and horizontal alignment concerning
29      the coordinate."""      the coordinate.
30        """
31    
32      def __init__(self, x, y, text, halign, valign):      def __init__(self, x, y, text, halign, valign):
33          """Initialize the label with the given parameters."""          """Initialize the label with the given parameters."""
# Line 41  class LabelLayer(TitledObject, Modifiabl Line 43  class LabelLayer(TitledObject, Modifiabl
43      """This represent a layer holding a number of labels."""      """This represent a layer holding a number of labels."""
44    
45      def __init__(self, title):      def __init__(self, title):
46          """Initialize the LabeleLayer with an empty          """Initialize the LabeleLayer.
47    
48            Initialization is done with an empty
49          list of labels and set the title to "title".          list of labels and set the title to "title".
50          """          """
51          TitledObject.__init__(self, title)          TitledObject.__init__(self, title)
# Line 78  class LabelLayer(TitledObject, Modifiabl Line 82  class LabelLayer(TitledObject, Modifiabl
82          self.changed(CHANGED)          self.changed(CHANGED)
83    
84      def TreeInfo(self):      def TreeInfo(self):
85          """Return a tuple of (title, tupel) describing the contents          """Return a description of the object.
86          of the object in a tree-structure.  
87            A tuple of (title, tupel) describing the contents
88            of the object in a tree-structure is returned.
89          """          """
90          items = []          items = []
91          items.append(_("Number of labels: %d") % len(self.labels))          items.append(_("Number of labels: %d") % len(self.labels))

Legend:
Removed from v.2563  
changed lines
  Added in v.2734

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26