javaclass

Annotated java/text.py

108:54500cf00f58
2005-01-10 Paul Boddie Exposed the Frame.quit method and Button configuration methods for both textual data and for callbacks.
paul@74 1
#!/usr/bin/env python
paul@74 2
paul@80 3
class FilterOutputStream(object):
paul@74 4
    def __init__(self, out):
paul@74 5
        self.out = out
paul@74 6
    def write(self, value, *args):
paul@74 7
        if args:
paul@74 8
            start, length = args
paul@74 9
            self.out.write(value[start:start+length])
paul@74 10
        else:
paul@74 11
            self.out.write(value)
paul@74 12
    def flush(self):
paul@74 13
        self.out.flush()
paul@74 14
    def close(self):
paul@74 15
        self.out.close()
paul@74 16
paul@80 17
class InputStream(object):
paul@74 18
    def read(self, *args):
paul@74 19
        raise NotImplementedError, "read"
paul@74 20
    def skip(self, n):
paul@74 21
        raise NotImplementedError, "skip"
paul@74 22
    def available(self):
paul@74 23
        raise NotImplementedError, "available"
paul@74 24
    def close(self):
paul@74 25
        raise NotImplementedError, "close"
paul@74 26
    def mark(self, readlimit):
paul@74 27
        raise NotImplementedError, "mark"
paul@74 28
    def reset(self):
paul@74 29
        raise NotImplementedError, "reset"
paul@74 30
    def markSupported(self):
paul@74 31
        raise NotImplementedError, "markSupported"
paul@74 32
paul@80 33
class MessageFormat(object):
paul@80 34
    def __init__(self, pattern):
paul@80 35
        self.pattern = pattern
paul@80 36
paul@80 37
    def applyPattern(self, pattern):
paul@80 38
        self.pattern = pattern
paul@80 39
    applyPattern___java__lang__String = applyPattern
paul@80 40
paul@80 41
    def equals(self, obj):
paul@80 42
        return self == obj
paul@80 43
    equals___java__lang__Object = equals
paul@80 44
paul@80 45
    def format(self, *args):
paul@80 46
        raise NotImplementedError, "format"
paul@80 47
    format___java__lang__Object_array____java__lang__StringBuffer___java__text__FieldPosition = format
paul@80 48
    format___java__lang__Object___java__lang__StringBuffer___java__text__FieldPosition = format
paul@80 49
paul@80 50
    def format__static(pattern, arguments):
paul@80 51
        mf = MessageFormat(pattern)
paul@80 52
        # NOTE: To be implemented.
paul@80 53
        return ""
paul@80 54
    format___java__lang__String___java__lang__Object_array_ = staticmethod(format__static)
paul@80 55
paul@80 56
    def getFormats(self):
paul@80 57
        raise NotImplementedError, "getFormats"
paul@80 58
    getFormats___ = getFormats
paul@80 59
paul@80 60
    def getLocale(self):
paul@80 61
        raise NotImplementedError, "getLocale"
paul@80 62
    getLocale___ = getLocale
paul@80 63
    
paul@80 64
setattr(MessageFormat, "__init_____java__lang__String", MessageFormat.__init__)
paul@80 65
paul@80 66
class OutputStream(object):
paul@74 67
    def write(self, b, *args):
paul@74 68
        raise NotImplementedError, "write"
paul@74 69
    def flush(self):
paul@74 70
        raise NotImplementedError, "flush"
paul@74 71
    def close(self):
paul@74 72
        raise NotImplementedError, "close"
paul@74 73
paul@74 74
# vim: tabstop=4 expandtab shiftwidth=4