當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。