java-api 17.25.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. java_api-17.25.0/CHANGELOG.md +19 -0
  2. java_api-17.25.0/LICENSE +21 -0
  3. java_api-17.25.0/MANIFEST.in +1 -0
  4. java_api-17.25.0/PKG-INFO +147 -0
  5. java_api-17.25.0/README.md +117 -0
  6. java_api-17.25.0/pyproject.toml +6 -0
  7. java_api-17.25.0/setup.cfg +51 -0
  8. java_api-17.25.0/setup.py +6 -0
  9. java_api-17.25.0/src/java/__init__.py +0 -0
  10. java_api-17.25.0/src/java/awt/__init__.py +265 -0
  11. java_api-17.25.0/src/java/awt/event/__init__.py +184 -0
  12. java_api-17.25.0/src/java/awt/geom/__init__.py +116 -0
  13. java_api-17.25.0/src/java/awt/image/__init__.py +14 -0
  14. java_api-17.25.0/src/java/awt/print/__init__.py +93 -0
  15. java_api-17.25.0/src/java/beans/__init__.py +38 -0
  16. java_api-17.25.0/src/java/io/__init__.py +442 -0
  17. java_api-17.25.0/src/java/lang/__init__.py +868 -0
  18. java_api-17.25.0/src/java/lang/reflect/__init__.py +9 -0
  19. java_api-17.25.0/src/java/math/__init__.py +93 -0
  20. java_api-17.25.0/src/java/net/__init__.py +504 -0
  21. java_api-17.25.0/src/java/net/http/__init__.py +15 -0
  22. java_api-17.25.0/src/java/nio/__init__.py +667 -0
  23. java_api-17.25.0/src/java/nio/channels/__init__.py +352 -0
  24. java_api-17.25.0/src/java/nio/charset/__init__.py +146 -0
  25. java_api-17.25.0/src/java/nio/file/__init__.py +728 -0
  26. java_api-17.25.0/src/java/nio/file/attribute/__init__.py +141 -0
  27. java_api-17.25.0/src/java/org/__init__.py +0 -0
  28. java_api-17.25.0/src/java/org/jdesktop/__init__.py +0 -0
  29. java_api-17.25.0/src/java/org/jdesktop/core/__init__.py +0 -0
  30. java_api-17.25.0/src/java/org/jdesktop/core/animation/__init__.py +0 -0
  31. java_api-17.25.0/src/java/org/jdesktop/core/animation/timing/__init__.py +17 -0
  32. java_api-17.25.0/src/java/security/__init__.py +27 -0
  33. java_api-17.25.0/src/java/text/__init__.py +543 -0
  34. java_api-17.25.0/src/java/time/__init__.py +575 -0
  35. java_api-17.25.0/src/java/time/chrono/__init__.py +319 -0
  36. java_api-17.25.0/src/java/time/format/__init__.py +72 -0
  37. java_api-17.25.0/src/java/time/temporal/__init__.py +353 -0
  38. java_api-17.25.0/src/java/util/__init__.py +1479 -0
  39. java_api-17.25.0/src/java/util/concurrent/__init__.py +147 -0
  40. java_api-17.25.0/src/java/util/function/__init__.py +131 -0
  41. java_api-17.25.0/src/java/util/regex/__init__.py +197 -0
  42. java_api-17.25.0/src/java/util/stream/__init__.py +128 -0
  43. java_api-17.25.0/src/java_api.egg-info/PKG-INFO +147 -0
  44. java_api-17.25.0/src/java_api.egg-info/SOURCES.txt +53 -0
  45. java_api-17.25.0/src/java_api.egg-info/dependency_links.txt +1 -0
  46. java_api-17.25.0/src/java_api.egg-info/requires.txt +1 -0
  47. java_api-17.25.0/src/java_api.egg-info/top_level.txt +2 -0
  48. java_api-17.25.0/src/javax/__init__.py +0 -0
  49. java_api-17.25.0/src/javax/security/__init__.py +0 -0
  50. java_api-17.25.0/src/javax/security/auth/__init__.py +14 -0
  51. java_api-17.25.0/src/javax/swing/__init__.py +483 -0
  52. java_api-17.25.0/src/javax/swing/event/__init__.py +43 -0
  53. java_api-17.25.0/src/javax/swing/plaf/__init__.py +28 -0
  54. java_api-17.25.0/src/javax/swing/text/__init__.py +19 -0
@@ -0,0 +1,19 @@
1
+ ## 17.25.0 (2025-12-16)
2
+
3
+ ## 17.25.0b6 (2025-12-10)
4
+
5
+ ## 17.25.0b5 (2025-12-08)
6
+
7
+ ## 17.25.0b4 (2025-12-08)
8
+
9
+ ## 17.25.0b3 (2025-12-08)
10
+
11
+ ## 17.25.0b2 (2025-12-08)
12
+
13
+ ## 17.25.0b1 (2025-12-05)
14
+
15
+ ### Refactor
16
+
17
+ - **java**: set class attribute constants (#1)
18
+
19
+ ## 17.25.0b0 (2025-12-05)
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025- coatl.dev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ include CHANGELOG.md
@@ -0,0 +1,147 @@
1
+ Metadata-Version: 2.1
2
+ Name: java_api
3
+ Version: 17.25.0
4
+ Summary: Java API Specification for ignition-api
5
+ Home-page: https://github.com/ignition-devs/java-api
6
+ Author: César Román
7
+ Author-email: cesar@coatl.dev
8
+ License: MIT
9
+ Project-URL: Source, https://github.com/ignition-devs/java-api/tree/main
10
+ Project-URL: Documentation, https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions
11
+ Project-URL: Funding, https://github.com/sponsors/cesarcoatl
12
+ Project-URL: Tracker, https://github.com/ignition-devs/java-api/issues
13
+ Description: # java-api
14
+
15
+ <!--- Badges --->
16
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/java-api)](https://pypi.org/project/java-api/)
17
+ [![PyPI - Version](https://img.shields.io/pypi/v/java-api)](https://pypi.org/project/java-api/)
18
+ [![PyPI - Downloads](https://static.pepy.tech/badge/java-api)](https://pepy.tech/projects/java-api)
19
+ [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ignition-devs/java-api/main.svg)](https://results.pre-commit.ci/latest/github/ignition-devs/java-api/main)
20
+ [![ci](https://github.com/ignition-devs/java-api/actions/workflows/ci.yml/badge.svg)](https://github.com/ignition-devs/java-api/actions/workflows/ci.yml)
21
+ [![Join us on GitHub discussions](https://img.shields.io/badge/github-discussions-informational)](https://github.com/orgs/ignition-devs/discussions)
22
+
23
+ java-api is a Python package that allows developers to get code completion
24
+ for Java 17 API Specification functions and classes in their IDE of choice.
25
+
26
+ ## Table of contents
27
+
28
+ - [Prerequisites](#prerequisites)
29
+ - [Installation and usage](#installation-and-usage)
30
+ - [Installing with pip](#installing-with-pip)
31
+ - [Project structure](#project-structure)
32
+ - [Packages](#packages)
33
+ - [Contributing](#contributing)
34
+ - [Discussions](#discussions)
35
+ - [Contributors](#contributors)
36
+ - [License](#license)
37
+ - [Code of conduct](#code-of-conduct)
38
+
39
+ ## Prerequisites
40
+
41
+ Before you begin, ensure you have met the following requirements:
42
+
43
+ - You have installed [Python 2.7.18]
44
+
45
+ ## Installation and usage
46
+
47
+ To use java-api, you may install it using the following method.
48
+
49
+ ### Installing with `pip`
50
+
51
+ > [!NOTE]
52
+ > For stub files for this package, look for [`java-api-stubs`].
53
+
54
+ The preferred method is to install it by running `pip`. It requires Python
55
+ 2.7.18.
56
+
57
+ ```bash
58
+ python2 -m pip install java-api
59
+ ```
60
+
61
+ This will install it as package to your Python installation, which will allow
62
+ you to call Ignition Scripting functions from Python's REPL, and get code
63
+ completion using an IDE such as PyCharm and Visual Studio Code.
64
+
65
+ ```bash
66
+ $ python2
67
+ Python 2.7.18 (default, Sep 23 2024, 13:23:35)
68
+ [GCC Apple LLVM 16.0.0 (clang-1600.0.26.3)] on darwin
69
+ Type "help", "copyright", "credits" or "license" for more information.
70
+ >>> from __future__ import print_function
71
+ >>> import java.lang
72
+ >>> print(java.lang.__doc__)
73
+ Provides classes that are fundamental to the design of the Java
74
+ programming language.
75
+
76
+ >>> quit()
77
+ ```
78
+
79
+ And to uninstall:
80
+
81
+ ```bash
82
+ python2 -m pip uninstall java-api
83
+ ```
84
+
85
+ ## Project structure
86
+
87
+ ### Packages
88
+
89
+ This project consists of the following packages:
90
+
91
+ - [java](#javajavax)
92
+ - [javax](#javajavax)
93
+
94
+ #### java/javax
95
+
96
+ These packages include supporting Java classes and interfaces. For more
97
+ information, see documentation here:
98
+ <https://docs.oracle.com/en/java/javase/17/docs/api/index.html>.
99
+
100
+ ## Contributing
101
+
102
+ See [CONTRIBUTING.md].
103
+
104
+ ## Discussions
105
+
106
+ Feel free to post your questions and/or ideas at [Discussions].
107
+
108
+ ## Contributors
109
+
110
+ Thanks to everyone who has contributed to this project.
111
+
112
+ Up-to-date list of contributors can be found here: [CONTRIBUTORS].
113
+
114
+ ## License
115
+
116
+ See the [LICENSE].
117
+
118
+ ## Code of conduct
119
+
120
+ This project has adopted the [Microsoft Open Source Code of Conduct].
121
+
122
+ <!-- Links -->
123
+ [CONTRIBUTING.md]: https://github.com/ignition-devs/java-api/blob/main/CONTRIBUTING.md#contributing-to-java-api
124
+ [CONTRIBUTORS]: https://github.com/ignition-devs/java-api/graphs/contributors
125
+ [Discussions]: https://github.com/orgs/ignition-devs/discussions
126
+ [`java-api-stubs`]: https://pypi.org/project/java-api-stubs/
127
+ [LICENSE]: https://github.com/ignition-devs/java-api/blob/main/LICENSE
128
+ [Microsoft Open Source Code of Conduct]: https://opensource.microsoft.com/codeofconduct/
129
+ [Python 2.7.18]: https://www.python.org/downloads/release/python-2718/
130
+
131
+ Keywords: coatl.dev,ignition,inductive automation,java
132
+ Platform: UNKNOWN
133
+ Classifier: Development Status :: 5 - Production/Stable
134
+ Classifier: Intended Audience :: Developers
135
+ Classifier: Intended Audience :: Information Technology
136
+ Classifier: Intended Audience :: Manufacturing
137
+ Classifier: Operating System :: MacOS :: MacOS X
138
+ Classifier: Operating System :: Microsoft :: Windows
139
+ Classifier: Operating System :: POSIX :: Linux
140
+ Classifier: Programming Language :: Python
141
+ Classifier: Programming Language :: Python :: 2
142
+ Classifier: Programming Language :: Python :: 2 :: Only
143
+ Classifier: Programming Language :: Python :: 2.7
144
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
145
+ Classifier: Topic :: Software Development :: Testing :: Mocking
146
+ Requires-Python: ==2.7.18
147
+ Description-Content-Type: text/markdown
@@ -0,0 +1,117 @@
1
+ # java-api
2
+
3
+ <!--- Badges --->
4
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/java-api)](https://pypi.org/project/java-api/)
5
+ [![PyPI - Version](https://img.shields.io/pypi/v/java-api)](https://pypi.org/project/java-api/)
6
+ [![PyPI - Downloads](https://static.pepy.tech/badge/java-api)](https://pepy.tech/projects/java-api)
7
+ [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ignition-devs/java-api/main.svg)](https://results.pre-commit.ci/latest/github/ignition-devs/java-api/main)
8
+ [![ci](https://github.com/ignition-devs/java-api/actions/workflows/ci.yml/badge.svg)](https://github.com/ignition-devs/java-api/actions/workflows/ci.yml)
9
+ [![Join us on GitHub discussions](https://img.shields.io/badge/github-discussions-informational)](https://github.com/orgs/ignition-devs/discussions)
10
+
11
+ java-api is a Python package that allows developers to get code completion
12
+ for Java 17 API Specification functions and classes in their IDE of choice.
13
+
14
+ ## Table of contents
15
+
16
+ - [Prerequisites](#prerequisites)
17
+ - [Installation and usage](#installation-and-usage)
18
+ - [Installing with pip](#installing-with-pip)
19
+ - [Project structure](#project-structure)
20
+ - [Packages](#packages)
21
+ - [Contributing](#contributing)
22
+ - [Discussions](#discussions)
23
+ - [Contributors](#contributors)
24
+ - [License](#license)
25
+ - [Code of conduct](#code-of-conduct)
26
+
27
+ ## Prerequisites
28
+
29
+ Before you begin, ensure you have met the following requirements:
30
+
31
+ - You have installed [Python 2.7.18]
32
+
33
+ ## Installation and usage
34
+
35
+ To use java-api, you may install it using the following method.
36
+
37
+ ### Installing with `pip`
38
+
39
+ > [!NOTE]
40
+ > For stub files for this package, look for [`java-api-stubs`].
41
+
42
+ The preferred method is to install it by running `pip`. It requires Python
43
+ 2.7.18.
44
+
45
+ ```bash
46
+ python2 -m pip install java-api
47
+ ```
48
+
49
+ This will install it as package to your Python installation, which will allow
50
+ you to call Ignition Scripting functions from Python's REPL, and get code
51
+ completion using an IDE such as PyCharm and Visual Studio Code.
52
+
53
+ ```bash
54
+ $ python2
55
+ Python 2.7.18 (default, Sep 23 2024, 13:23:35)
56
+ [GCC Apple LLVM 16.0.0 (clang-1600.0.26.3)] on darwin
57
+ Type "help", "copyright", "credits" or "license" for more information.
58
+ >>> from __future__ import print_function
59
+ >>> import java.lang
60
+ >>> print(java.lang.__doc__)
61
+ Provides classes that are fundamental to the design of the Java
62
+ programming language.
63
+
64
+ >>> quit()
65
+ ```
66
+
67
+ And to uninstall:
68
+
69
+ ```bash
70
+ python2 -m pip uninstall java-api
71
+ ```
72
+
73
+ ## Project structure
74
+
75
+ ### Packages
76
+
77
+ This project consists of the following packages:
78
+
79
+ - [java](#javajavax)
80
+ - [javax](#javajavax)
81
+
82
+ #### java/javax
83
+
84
+ These packages include supporting Java classes and interfaces. For more
85
+ information, see documentation here:
86
+ <https://docs.oracle.com/en/java/javase/17/docs/api/index.html>.
87
+
88
+ ## Contributing
89
+
90
+ See [CONTRIBUTING.md].
91
+
92
+ ## Discussions
93
+
94
+ Feel free to post your questions and/or ideas at [Discussions].
95
+
96
+ ## Contributors
97
+
98
+ Thanks to everyone who has contributed to this project.
99
+
100
+ Up-to-date list of contributors can be found here: [CONTRIBUTORS].
101
+
102
+ ## License
103
+
104
+ See the [LICENSE].
105
+
106
+ ## Code of conduct
107
+
108
+ This project has adopted the [Microsoft Open Source Code of Conduct].
109
+
110
+ <!-- Links -->
111
+ [CONTRIBUTING.md]: https://github.com/ignition-devs/java-api/blob/main/CONTRIBUTING.md#contributing-to-java-api
112
+ [CONTRIBUTORS]: https://github.com/ignition-devs/java-api/graphs/contributors
113
+ [Discussions]: https://github.com/orgs/ignition-devs/discussions
114
+ [`java-api-stubs`]: https://pypi.org/project/java-api-stubs/
115
+ [LICENSE]: https://github.com/ignition-devs/java-api/blob/main/LICENSE
116
+ [Microsoft Open Source Code of Conduct]: https://opensource.microsoft.com/codeofconduct/
117
+ [Python 2.7.18]: https://www.python.org/downloads/release/python-2718/
@@ -0,0 +1,6 @@
1
+ [build-system]
2
+ build-backend = "setuptools.build_meta"
3
+ requires = [
4
+ "setuptools>=42",
5
+ "wheel",
6
+ ]
@@ -0,0 +1,51 @@
1
+ [metadata]
2
+ name = java_api
3
+ version = 17.25.0
4
+ description = Java API Specification for ignition-api
5
+ long_description = file: README.md
6
+ long_description_content_type = text/markdown
7
+ url = https://github.com/ignition-devs/java-api
8
+ author = César Román
9
+ author_email = cesar@coatl.dev
10
+ license = MIT
11
+ license_files = LICENSE
12
+ classifiers =
13
+ Development Status :: 5 - Production/Stable
14
+ Intended Audience :: Developers
15
+ Intended Audience :: Information Technology
16
+ Intended Audience :: Manufacturing
17
+ Operating System :: MacOS :: MacOS X
18
+ Operating System :: Microsoft :: Windows
19
+ Operating System :: POSIX :: Linux
20
+ Programming Language :: Python
21
+ Programming Language :: Python :: 2
22
+ Programming Language :: Python :: 2 :: Only
23
+ Programming Language :: Python :: 2.7
24
+ Topic :: Software Development :: Libraries :: Python Modules
25
+ Topic :: Software Development :: Testing :: Mocking
26
+ keywords =
27
+ coatl.dev
28
+ ignition
29
+ inductive automation
30
+ java
31
+ project_urls =
32
+ Documentation = https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions
33
+ Funding = https://github.com/sponsors/cesarcoatl
34
+ Source = https://github.com/ignition-devs/java-api/tree/main
35
+ Tracker = https://github.com/ignition-devs/java-api/issues
36
+
37
+ [options]
38
+ packages = find:
39
+ install_requires =
40
+ typing
41
+ python_requires = ==2.7.18
42
+ package_dir =
43
+ =src
44
+
45
+ [options.packages.find]
46
+ where = src
47
+
48
+ [egg_info]
49
+ tag_build =
50
+ tag_date = 0
51
+
@@ -0,0 +1,6 @@
1
+ # pylint: skip-file
2
+ """Java API Specification."""
3
+
4
+ from setuptools import setup
5
+
6
+ setup()
File without changes
@@ -0,0 +1,265 @@
1
+ from __future__ import print_function
2
+
3
+ __all__ = [
4
+ "AWTEvent",
5
+ "Color",
6
+ "Component",
7
+ "Container",
8
+ "Dimension",
9
+ "Frame",
10
+ "Graphics",
11
+ "GridLayout",
12
+ "Image",
13
+ "LayoutManager",
14
+ "Point",
15
+ "Toolkit",
16
+ "Window",
17
+ ]
18
+
19
+ from typing import Any, Optional, Union
20
+
21
+ from java.awt.geom import Dimension2D, Point2D
22
+ from java.lang import Object
23
+ from java.util import EventObject
24
+
25
+
26
+ class LayoutManager(object):
27
+ def addLayoutComponent(self, name, comp):
28
+ # type: (Union[str, unicode], Component) -> None
29
+ raise NotImplementedError
30
+
31
+ def layoutContainer(self, parent):
32
+ # type: (Container) -> None
33
+ raise NotImplementedError
34
+
35
+ def minimumLayoutSize(self, parent):
36
+ # type: (Container) -> Dimension
37
+ raise NotImplementedError
38
+
39
+ def preferredLayoutSize(self, parent):
40
+ # type: (Container) -> Dimension
41
+ raise NotImplementedError
42
+
43
+ def removeLayoutComponent(self, comp):
44
+ # type: (Component) -> None
45
+ raise NotImplementedError
46
+
47
+
48
+ class AWTEvent(EventObject):
49
+ _id = None # type: int
50
+
51
+ def __init__(self, source, id):
52
+ # type: (Object, int) -> None
53
+ super(AWTEvent, self).__init__(source)
54
+ self._id = id
55
+
56
+ def getID(self):
57
+ # type: () -> int
58
+ return self._id
59
+
60
+ def paramString(self):
61
+ # type: () -> Union[str, unicode]
62
+ pass
63
+
64
+ def setSource(self, newSource):
65
+ # type: (Object) -> None
66
+ pass
67
+
68
+
69
+ class Color(Object):
70
+ def __init__(self, *args):
71
+ # type: (*Any) -> None
72
+ super(Color, self).__init__()
73
+ print(args)
74
+
75
+
76
+ class Component(Object):
77
+ def imageUpdate(
78
+ self,
79
+ img, # type: Image
80
+ infoflags, # type: int
81
+ x, # type: int
82
+ y, # type: int
83
+ width, # type: int
84
+ height, # type: int
85
+ ):
86
+ # type: (...) -> bool
87
+ return True
88
+
89
+
90
+ class Container(Component):
91
+ def add(self, *args):
92
+ # type: (*Any) -> Optional[Component]
93
+ pass
94
+
95
+
96
+ class Dimension(Dimension2D):
97
+ height = None # type: int
98
+ width = None # type: int
99
+
100
+ def __init__(self, *args):
101
+ # type: (*Any) -> None
102
+ super(Dimension, self).__init__()
103
+ print(args)
104
+
105
+ def getHeight(self):
106
+ # type: () -> float
107
+ pass
108
+
109
+ def getSize(self):
110
+ # type: () -> Dimension
111
+ pass
112
+
113
+ def getWidth(self):
114
+ # type: () -> float
115
+ pass
116
+
117
+ def setSize(self, *args):
118
+ # type: (*Any) -> None
119
+ pass
120
+
121
+
122
+ class Image(Object):
123
+ def flush(self):
124
+ # type: () -> None
125
+ pass
126
+
127
+ def getAccelerationPriority(self):
128
+ # type: () -> float
129
+ pass
130
+
131
+ def setAccelerationPriority(self, priority):
132
+ # type: (float) -> None
133
+ pass
134
+
135
+
136
+ class Point(Point2D):
137
+ x = 0
138
+ y = 0
139
+
140
+ def __init__(self, *args):
141
+ # type: (*Any) -> None
142
+ super(Point, self).__init__()
143
+ print(args)
144
+
145
+ def getLocation(self):
146
+ # type: () -> Point
147
+ pass
148
+
149
+ def getX(self):
150
+ # type: () -> float
151
+ pass
152
+
153
+ def getY(self):
154
+ # type: () -> float
155
+ pass
156
+
157
+ def move(self, x, y):
158
+ # type: (int, int) -> None
159
+ pass
160
+
161
+ def setLocation(self, *args):
162
+ # type: (*Any) -> None
163
+ pass
164
+
165
+ def translate(self, dx, dy):
166
+ # type: (int, int) -> None
167
+ pass
168
+
169
+
170
+ class Toolkit(Object):
171
+ def __init__(self):
172
+ # type: () -> None
173
+ super(Toolkit, self).__init__()
174
+
175
+ def beep(self):
176
+ # type: () -> None
177
+ print(self, "Beep!")
178
+
179
+ @staticmethod
180
+ def getDefaultToolkit():
181
+ # type: () -> Toolkit
182
+ return Toolkit()
183
+
184
+
185
+ class Window(Container):
186
+ def __init__(self, *args):
187
+ # type: (*Any) -> None
188
+ super(Window, self).__init__()
189
+
190
+
191
+ class Frame(Window):
192
+ def __init__(self, *args):
193
+ # type: (*Any) -> None
194
+ super(Frame, self).__init__(*args)
195
+
196
+
197
+ class Graphics(Object):
198
+ def create(self):
199
+ # type: () -> Graphics
200
+ raise NotImplementedError
201
+
202
+
203
+ class GridLayout(Object, LayoutManager):
204
+ def __init__(
205
+ self,
206
+ rows=None, # type: Optional[int]
207
+ cols=None, # type: Optional[int]
208
+ hgap=None, # type: Optional[int]
209
+ vgap=None, # type: Optional[int]
210
+ ):
211
+ # type: (...) -> None
212
+ super(GridLayout, self).__init__()
213
+ print(rows, cols, hgap, vgap)
214
+
215
+ def addLayoutComponent(self, name, comp):
216
+ # type: (Union[str, unicode], Component) -> None
217
+ pass
218
+
219
+ def getColumns(self):
220
+ # type: () -> int
221
+ pass
222
+
223
+ def getHgap(self):
224
+ # type: () -> int
225
+ pass
226
+
227
+ def getRows(self):
228
+ # type: () -> int
229
+ pass
230
+
231
+ def getVgap(self):
232
+ # type: () -> int
233
+ pass
234
+
235
+ def layoutContainer(self, parent):
236
+ # type: (Container) -> None
237
+ pass
238
+
239
+ def minimumLayoutSize(self, parent):
240
+ # type: (Container) -> Dimension
241
+ pass
242
+
243
+ def preferredLayoutSize(self, parent):
244
+ # type: (Container) -> Dimension
245
+ pass
246
+
247
+ def removeLayoutComponent(self, comp):
248
+ # type: (Component) -> None
249
+ pass
250
+
251
+ def setColumns(self, cols):
252
+ # type: (int) -> None
253
+ pass
254
+
255
+ def setHgap(self, hgap):
256
+ # type: (int) -> None
257
+ pass
258
+
259
+ def setRows(self, rows):
260
+ # type: (int) -> None
261
+ pass
262
+
263
+ def setVgap(self, vgap):
264
+ # type: (int) -> None
265
+ pass