当前位置: 首页>>代码示例>>Python>>正文


Python UML.format方法代码示例

本文整理汇总了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
开发者ID:dieterv,项目名称:gaphor,代码行数:14,代码来源:propertypages.py

示例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 ''
开发者ID:dieterv,项目名称:gaphor,代码行数:10,代码来源:klass.py

示例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)
开发者ID:dieterv,项目名称:gaphor,代码行数:10,代码来源:propertypages.py

示例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,
     )
开发者ID:amolenaar,项目名称:gaphor,代码行数:13,代码来源:editors.py

示例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()
开发者ID:amolenaar,项目名称:gaphor,代码行数:17,代码来源:association.py

示例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))
开发者ID:dieterv,项目名称:gaphor,代码行数:4,代码来源:editors.py

示例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 ''
开发者ID:adamboduch,项目名称:gaphor,代码行数:7,代码来源:compartment.py

示例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]
开发者ID:dieterv,项目名称:gaphor,代码行数:5,代码来源:propertypages.py


注:本文中的gaphor.UML.format方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。