本文整理汇总了Python中gaphor.UML.format方法的典型用法代码示例。如果您正苦于以下问题:Python UML.format方法的具体用法?Python UML.format怎么用?Python UML.format使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gaphor.UML
的用法示例。
在下文中一共展示了UML.format方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _set_object_value
# 需要导入模块: from gaphor import UML [as 别名]
# 或者: from gaphor.UML import format [as 别名]
def _set_object_value(self, row, col, value):
attr = row[-1]
if col == 0:
UML.parse(attr, value)
row[0] = UML.format(attr)
elif col == 1:
attr.isStatic = not attr.isStatic
row[1] = attr.isStatic
elif col == 2:
# Value in attribute object changed:
row[0] = UML.format(attr)
row[1] = attr.isStatic
示例2: render
# 需要导入模块: from gaphor import UML [as 别名]
# 或者: from gaphor.UML import format [as 别名]
def render(self):
"""Render the OperationItem."""
return UML.format(self.subject,\
visibility=True,\
type=True,\
multiplicity=True,\
default=True) or ''
示例3: handler
# 需要导入模块: from gaphor import UML [as 别名]
# 或者: from gaphor.UML import format [as 别名]
def handler(event):
if not entry.props.has_focus:
entry.handler_block(changed_id)
entry.set_text(UML.format(self.subject,
visibility=True, is_derived=True,
multiplicity=True) or '')
#entry.set_text(UML.format(self.subject, multiplicity=True) or '')
entry.handler_unblock(changed_id)
示例4: get_text
# 需要导入模块: from gaphor import UML [as 别名]
# 或者: from gaphor.UML import format [as 别名]
def get_text(self):
if self._edit is self._item:
return self._edit.subject.name
return UML.format(
self._edit.subject,
visibility=True,
is_derived=True,
type=True,
multiplicity=True,
default=True,
)
示例5: set_text
# 需要导入模块: from gaphor import UML [as 别名]
# 或者: from gaphor.UML import format [as 别名]
def set_text(self):
"""
Set the text on the association end.
"""
if self.subject:
try:
n, m = UML.format(self.subject)
except ValueError:
# need more than 0 values to unpack: property was rendered as
# attribute while in a UNDO action for example.
pass
else:
self._name = n
self._mult = m
self.request_update()
示例6: get_text
# 需要导入模块: from gaphor import UML [as 别名]
# 或者: from gaphor.UML import format [as 别名]
def get_text(self):
return UML.format(editable(self._edit.subject))
示例7: render
# 需要导入模块: from gaphor import UML [as 别名]
# 或者: from gaphor.UML import format [as 别名]
def render(self):
"""
Return a rendered feature, as a string.
"""
return UML.format(self.subject, pattern=self.pattern) or ''
示例8: _get_rows
# 需要导入模块: from gaphor import UML [as 别名]
# 或者: from gaphor.UML import format [as 别名]
def _get_rows(self):
for operation in self._item.subject.ownedOperation:
yield [UML.format(operation), operation.isAbstract, operation.isStatic, operation]