コード例 #1
0
ファイル: dfs.py プロジェクト: vdorr/bloced
	def __init_label_fmt_table(self) :
#TODO globalize
		self.__lbl_fmt = {
			core.get_proto_name(core.ConstProto()) : "{0}",
			core.get_proto_name(core.DelayProto()) : "Delay({0})",
			core.get_proto_name(core.TapProto()) : "Tap({0})",
			core.get_proto_name(core.TapEndProto()) : "TapEnd({0})",
			core.get_proto_name(core.InputProto()) : "Input({0})",
			core.get_proto_name(core.OutputProto()) : "Output({0})",
			core.get_proto_name(core.JointProto()) : "",
			core.get_proto_name(core.PipeProto()) : "Pipe({0})",
			core.get_proto_name(core.PipeEndProto()) : "PipeEnd({0})",
			core.get_proto_name(core.TextAreaProto()) : "{0}",
#			"ConstInputProto":"ConstInput({0})",
		}
コード例 #2
0
ファイル: dfs.py プロジェクト: vdorr/bloced
	def get_presentation_text(self) :
		cls = core.get_proto_name(self.prototype)
		if cls in self.__lbl_fmt :
			newtxt = self.__lbl_fmt[cls].format(self.stringified_value(self.value))
		else :
			newtxt = self.caption
		return newtxt