Skip to content
Commits on Source (6)
......@@ -7,6 +7,9 @@
*.swp
\#*
*~
.gradle
# IntelliJ files
*.eml
*.ipr
......@@ -32,8 +35,11 @@ nbbuild.xml
__pycache__
ant.properties
bin
build
build2
cachedir
dist
target
profile.txt
......@@ -8,6 +8,9 @@ syntax: glob
*.swp
\#*
*~
.gradle
# IntelliJ files
*.eml
*.ipr
......@@ -25,10 +28,16 @@ syntax: glob
.DS_Store
.settings
__pycache__
ant.properties
bin
# Jython specific
ant.properties
build
build2
cachedir
dist
publications
reports
profile.txt
out
......@@ -108,3 +108,6 @@ c3289f2a275446451605e586e5bef70092224184 v2.7.1b3
a5a06c9efdb6dd361d5f5c5c1ef07c2ac802e2e0 v2.7.1rc3
a5a06c9efdb6dd361d5f5c5c1ef07c2ac802e2e0 v2.7.1rc3
b6e989b788d563b8ecb0c0458ab486fca8d128d6 v2.7.1rc3
dd7e191d4c90d9f5d5fe8f0840f186697ecf272a v2.7.1
dfc49bafbe79566bd54c8d417829e001ff2316ea v2.7.2a1
328e162ec1178fb38b81b342f84c1268bf21d7fb v2.7.2b1
language: java
notifications:
email:
recipients:
- jython-dev@lists.sourceforge.net
addons:
hostname: jyshort
install: ant
homebrew: # only active on osx
update: true
packages:
- ant
os:
- linux
- osx
env:
matrix:
- CUSTOM_JDK="default"
- CUSTOM_JDK="oraclejdk7"
- CUSTOM_JDK="openjdk7"
- CUSTOM_JDK="oraclejdk8"
include:
- os: linux
dist: xenial
addons:
apt:
packages:
- ant
jdk: openjdk8
- os: linux
dist: xenial
addons:
apt:
packages:
- ant
jdk: openjdk11
matrix:
exclude:
# On OSX, run with default JDK only.
- os: osx
env: CUSTOM_JDK="oraclejdk7"
- os: osx
env: CUSTOM_JDK="openjdk7"
- os: osx
env: CUSTOM_JDK="oraclejdk8"
# On Linux, run with specific JDKs only.
- os: linux
env: CUSTOM_JDK="default"
before_install:
# Patch for buffer overflow bug, see https://github.com/travis-ci/travis-ci/issues/5227
- hostname
- cat /etc/hosts # optionally check the content *before*
- sudo hostname "$(hostname | cut -c1-63)"
- sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts
- hostname
- cat /etc/hosts # optionally check the content *after*
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export JAVA_HOME=$(/usr/libexec/java_home); fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install ant; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then jdk_switcher use "$CUSTOM_JDK"; fi
script: ant && ant regrtest-travis
dist: xenial
addons:
apt:
packages:
- ant
jdk: openjdk12
- os: osx
osx_image: xcode9.3 # Last supporting Java 8
jdk: oraclejdk8
install:
- ant developer-build
script:
- ant regrtest-travis
notifications:
email:
recipients:
- jython-dev@lists.sourceforge.net
......@@ -3,7 +3,7 @@ ACKNOWLEDGMENTS
Jython: Python for the Java Platform
Copyright (c) 2000-2017 Jython Developers.
Copyright (c) 2000-2018 Jython Developers.
All rights reserved.
Copyright (c) 2000 BeOpen.com.
......@@ -31,7 +31,7 @@ Jython links the following libraries:
* Jar Jar Links, licensed under the Apache 2.0 License from Tonic Systems
* Java Native Runtime, licensed under the Common Public License
* JLine2, licensed under a BSD license
* JUnit, licenseed under Eclipse Public License 1.0 from the JUnit project
* JUnit, licensed under Eclipse Public License 1.0 from the JUnit project
* Mock Runner, licensed under the Apache 1.1 license
* Netty 4, licensed under the Apache 2.0 license from the Netty project
* PyPy datetime module, licensed under the MIT License from the PyPy project
......@@ -179,6 +179,13 @@ Jython in ways large and small, in no particular order:
James Mudd
Mat Booth
Alex Gaman
Tom Bech
Richie Bendall
Raymond Ferguson
yishenggudou (愧僧)
Andrew Kuchling
Jim Peterson
Christian Clauss
Local Variables:
mode: indented-text
......
......@@ -39,6 +39,7 @@ org/python/core/PyMethod.class
org/python/core/PyMethodDescr.class
org/python/core/PyModule.class
org/python/core/PyNone.class
org/python/core/PyNullImporter.class
org/python/core/PyObject.class
org/python/core/PyProperty.class
org/python/core/PySet.class
......@@ -56,6 +57,7 @@ org/python/core/PyType.class
org/python/core/PyUnicode.class
org/python/core/PyVersionInfo.class
org/python/core/PyXRange.class
org/python/core/PyXRangeIter.class
org/python/core/WinVersion.class
org/python/core/stringlib/MarkupIterator.class
org/python/core/stringlib/FieldNameIterator.class
......@@ -72,6 +74,8 @@ org/python/modules/_io/PyRawIOBase.class
org/python/modules/_io/PyFileIO.class
org/python/modules/_functools/PyPartial.class
org/python/modules/_hashlib$Hash.class
org/python/modules/_json/Encoder.class
org/python/modules/_json/Scanner.class
org/python/modules/bz2/PyBZ2File.class
org/python/modules/bz2/PyBZ2Compressor.class
org/python/modules/bz2/PyBZ2Decompressor.class
......@@ -85,6 +89,7 @@ org/python/modules/itertools/dropwhile.class
org/python/modules/itertools/groupby.class
org/python/modules/itertools/ifilterfalse.class
org/python/modules/itertools/ifilter.class
org/python/modules/itertools/imap.class
org/python/modules/itertools/islice.class
org/python/modules/itertools/izip.class
org/python/modules/itertools/izipLongest.class
......@@ -99,6 +104,7 @@ org/python/modules/jffi/ByReference.class
org/python/modules/jffi/CData.class
org/python/modules/jffi/CType.class
org/python/modules/jffi/CType$Array.class
org/python/modules/jffi/CType$Custom.class
org/python/modules/jffi/CType$Pointer.class
org/python/modules/jffi/DynamicLibrary.class
org/python/modules/jffi/DynamicLibrary$Symbol.class
......@@ -170,6 +176,8 @@ org/python/antlr/ast/Print.class
org/python/antlr/ast/Raise.class
org/python/antlr/ast/Repr.class
org/python/antlr/ast/Return.class
org/python/antlr/ast/Set.class
org/python/antlr/ast/SetComp.class
org/python/antlr/ast/Slice.class
org/python/antlr/ast/Str.class
org/python/antlr/ast/Subscript.class
......
......@@ -6,6 +6,7 @@ This example shows how to use Buttons
from java import awt, applet
class ButtonDemo(applet.Applet):
def init(self):
self.b1 = awt.Button('Disable middle button',
......
......@@ -6,6 +6,7 @@ This example shows how to use Buttons
from java import awt, applet
class ButtonFontDemo(applet.Applet):
def init(self):
self.font = awt.Font('Serif', 0, 24)
......
......@@ -6,6 +6,7 @@ This example shows how to use Checkboxes
from java import awt, applet
class CheckboxDemo(applet.Applet):
def init(self):
cb1 = awt.Checkbox('Checkbox 1')
......@@ -38,4 +39,3 @@ class CheckboxDemo(applet.Applet):
if __name__ == '__main__':
import pawt
pawt.test(CheckboxDemo())
......@@ -6,6 +6,7 @@ This example shows how to use Choice
from java import awt, applet
class ChoiceDemo(applet.Applet):
def init(self):
self.choices = awt.Choice(itemStateChanged=self.change)
......
......@@ -19,7 +19,6 @@ basicUnits = [['Metric System', [('Centimeters', 0.01),
]
class SimpleBorder:
def paint(self, g):
g.drawRect(0, 0, self.size.width-1, self.size.height-1)
......@@ -28,7 +27,6 @@ class SimpleBorder:
return awt.Insets(5, 5, 5, 5)
class Converter(Applet, SimpleBorder):
def init(self, unitSets=basicUnits):
self.setLayout(awt.GridLayout(2, 0, 5, 5))
......@@ -47,7 +45,6 @@ class Converter(Applet, SimpleBorder):
panel.setValue(multiplier/panel.getMultiplier()*value)
class ConversionPanel(awt.Panel, SimpleBorder,
ActionListener, AdjustmentListener, ItemListener):
max, block = 10000, 100
......@@ -107,7 +104,6 @@ class ConversionPanel(awt.Panel, SimpleBorder,
self.slider.value = int(f)
if __name__ == '__main__':
import pawt
pawt.test(Converter())
......@@ -23,7 +23,6 @@ class CoordinatesDemo(applet.Applet):
self.label.text = text % (point.x, point.y)
class FramedArea(awt.Panel):
def __init__(self, controller):
self.background = awt.Color.lightGray
......@@ -42,7 +41,6 @@ class FramedArea(awt.Panel):
g.draw3DRect(3, 3, d.width-7, d.height-7, 1)
class CoordinateArea(awt.Canvas):
def __init__(self, controller):
self.mousePressed = self.push
......@@ -63,7 +61,6 @@ class CoordinateArea(awt.Canvas):
g.fillRect(self.point.x-1, self.point.y-1, 2, 2)
if __name__ == '__main__':
import pawt
pawt.test(CoordinatesDemo(), size=(300, 200))
......@@ -19,6 +19,7 @@ release to the web.
from java import awt, applet
class HelloApplet(applet.Applet):
def paint(self, g):
g.setColor(awt.Color.black)
......
from java.applet import Applet
import sys
class HelloWorld(Applet):
def paint(self, g):
g.drawString("Hello from Jython %s!" % sys.version, 20, 30)
......
......@@ -7,6 +7,7 @@ This example shows how to use Label
from java import applet
from java.awt import Label, GridLayout
class LabelDemo(applet.Applet):
def init(self):
self.setLayout(GridLayout(0, 1))
......
......@@ -8,6 +8,7 @@ from java import applet, awt
from java.awt.event import ItemEvent
from pawt import GridBag
class ListDemo(applet.Applet):
def fillList(self, list, names):
list.actionPerformed = self.action
......
......@@ -13,7 +13,8 @@ for name in dir(colors):
if isinstance(color, awt.Color):
l = awt.Label(name, awt.Label.CENTER, background=color)
intensity = sqrt(color.red**2 + color.green**2 + color.blue**2)/3
if intensity < 90: l.foreground = colors.white
if intensity < 90:
l.foreground = colors.white
p.add(l)
test(p, size=(700, 500))
......@@ -2,6 +2,7 @@ from java import awt
from math import *
from jarray import array
class Graph(awt.Canvas):
def __init__(self):
self.function = None
......@@ -54,7 +55,8 @@ if __name__ == '__main__':
graph = Graph()
p.add(graph, 'Center')
expression = awt.TextField(text='(sin(3*x)+cos(x))/2', actionPerformed=enter)
expression = awt.TextField(
text='(sin(3*x)+cos(x))/2', actionPerformed=enter)
p.add(expression, 'South')
import pawt
......
......@@ -9,8 +9,10 @@ and they all show how to use different parts of the AWT.
import java
from java import awt
def exit(e): java.lang.System.exit(0)
frame = awt.Frame('AWT Example', visible=1)
button = awt.Button('Close Me!', actionPerformed=exit)
frame.add(button, 'Center')
......
import java
class TempConverter(java.lang.Object):
def __init__(self):
self.setFahrenheit(0.0)
......@@ -25,6 +26,7 @@ class TempConverter(java.lang.Object):
def __repr__(self):
return '<%.2g degrees fahrenheit == %.2g celsius>' % (self.f, self.c)
if __name__ == '__main__':
c = TempConverter()
print c
......