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


Python NSColor.greenColor方法代码示例

本文整理汇总了Python中AppKit.NSColor.greenColor方法的典型用法代码示例。如果您正苦于以下问题:Python NSColor.greenColor方法的具体用法?Python NSColor.greenColor怎么用?Python NSColor.greenColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AppKit.NSColor的用法示例。


在下文中一共展示了NSColor.greenColor方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from AppKit import NSColor [as 别名]
# 或者: from AppKit.NSColor import greenColor [as 别名]
    def __init__(self, drawGrid=False):
        self.w = Window((600, 500), "", minSize=(300, 250))

        grp = Group((0, 0, 0, 0))
        grp.button = Button((10, 10, -10, 20), "Toggle", self.buttonCallback)

        self.view1 = TestSplitSubview((0, 0, 0, 0), NSColor.redColor())
        paneDescriptions2 = [
            dict(view=self.view1, canCollapse=True, size=50, identifier="pane1"),
            dict(view=grp, identifier="pane2"),
            dict(view=TestSplitSubview((0, 0, 0, 0), NSColor.greenColor()), minSize=50, identifier="pane3"),
            dict(view=TestSplitSubview((0, 0, 0, 0), NSColor.yellowColor()), identifier="pane4"),
        ]
        self.nestedSplit = SplitView((0, 0, 0, 0), paneDescriptions2, isVertical=True)
        paneDescriptions1 = [
            dict(view=self.nestedSplit, identifier="pane5"),
            dict(
                view=TestSplitSubview((0, 0, 0, 0), NSColor.magentaColor()),
                minSize=100,
                size=100,
                canCollapse=True,
                identifier="pane6",
            ),
        ]
        self.w.splitView = SplitView((10, 10, -10, -10), paneDescriptions1, isVertical=False)

        if drawGrid:
            self.drawGrid()
        self.w.open()
开发者ID:behnam,项目名称:typefacet,代码行数:31,代码来源:testAll.py

示例2: linearGradient

# 需要导入模块: from AppKit import NSColor [as 别名]
# 或者: from AppKit.NSColor import greenColor [as 别名]
def linearGradient(startPoint=None, endPoint=None, colors=None, locations=None):
	global currentGradient
	global currentFillColor
	if colors is None:
		colors = [NSColor.greenColor(), NSColor.redColor()]
	if locations is None:
		locations = [i / float(len(colors)-1) for i in range(len(colors))]
	currentGradient = ("linear", startPoint, endPoint, colors, locations)
	currentFillColor = None
开发者ID:schriftgestalt,项目名称:GlyphsSDK,代码行数:11,代码来源:drawingTools.py

示例3: check_signature_matcher

# 需要导入模块: from AppKit import NSColor [as 别名]
# 或者: from AppKit.NSColor import greenColor [as 别名]
 def check_signature_matcher(self, obj):
     regex       = obj.stringValue()
     feedback    = self.customSignatureMatcherFeedback
     try:
         re.compile(regex)
         feedback.setColor_(NSColor.greenColor())
         feedback.setToolTip_("")
     except re.error, e:
         feedback.setColor_(NSColor.redColor())
         feedback.setToolTip_(str(e))
开发者ID:robertklep,项目名称:quotefixformac,代码行数:12,代码来源:preferences.py

示例4: transformedValue_

# 需要导入模块: from AppKit import NSColor [as 别名]
# 或者: from AppKit.NSColor import greenColor [as 别名]
 def transformedValue_(self, priority):
     if priority > 4:
         return NSColor.redColor()
     elif priority > 3:
         return NSColor.orangeColor()
     elif priority > 2:
         return NSColor.blueColor()
     elif priority > 1:
         return NSColor.greenColor()
     elif priority > 0:
         return NSColor.brownColor()
     else:
         return NSColor.blackColor()
开发者ID:fruitsamples,项目名称:PyObjC,代码行数:15,代码来源:PriorityToColourTransformer.py

示例5: __init__

# 需要导入模块: from AppKit import NSColor [as 别名]
# 或者: from AppKit.NSColor import greenColor [as 别名]

class Color:
    """ A class representing a color """

    def __init__(self, ns_color):
        self.ns_color = ns_color


Color.BLACK = Color(NSColor.blackColor())
Color.BLUE = Color(NSColor.blueColor())
Color.BROWN = Color(NSColor.brownColor())
Color.CYAN = Color(NSColor.cyanColor())
Color.DARK_GRAY = Color(NSColor.darkGrayColor())
Color.GRAY = Color(NSColor.grayColor())
Color.GREEN = Color(NSColor.greenColor())
Color.MAGENTA = Color(NSColor.magentaColor())
Color.ORANGE = Color(NSColor.orangeColor())
Color.PURPLE = Color(NSColor.purpleColor())
Color.RED = Color(NSColor.redColor())
Color.WHITE = Color(NSColor.whiteColor())
Color.YELLOW = Color(NSColor.yellowColor())


class Font:
    """ Text font """

    def __init__(self, name, size):
        self.ns_font = NSFont.fontWithName_size_(name, size)

开发者ID:xoconusco,项目名称:verano16,代码行数:30,代码来源:osx_panel.py


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