|
Revision 2255, 0.6 kB
(checked in by arj..@yirdis.nl, 9 months ago)
|
moved classes items to seperate package. More unit tests for interface item.
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
""" |
|---|
| 2 |
Generalization -- |
|---|
| 3 |
""" |
|---|
| 4 |
|
|---|
| 5 |
import gobject |
|---|
| 6 |
|
|---|
| 7 |
from gaphor import UML |
|---|
| 8 |
from gaphor.diagram.diagramline import DiagramLine |
|---|
| 9 |
|
|---|
| 10 |
class GeneralizationItem(DiagramLine): |
|---|
| 11 |
|
|---|
| 12 |
__uml__ = UML.Generalization |
|---|
| 13 |
__relationship__ = 'general', None, 'specific', 'generalization' |
|---|
| 14 |
|
|---|
| 15 |
def __init__(self, id=None): |
|---|
| 16 |
DiagramLine.__init__(self, id) |
|---|
| 17 |
|
|---|
| 18 |
def draw_head(self, context): |
|---|
| 19 |
cr = context.cairo |
|---|
| 20 |
cr.move_to(0, 0) |
|---|
| 21 |
cr.line_to(15, -10) |
|---|
| 22 |
cr.line_to(15, 10) |
|---|
| 23 |
cr.close_path() |
|---|
| 24 |
cr.stroke() |
|---|
| 25 |
cr.move_to(15, 0) |
|---|
| 26 |
|
|---|
| 27 |
|
|---|