mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 22:57:56 -05:00
34 lines
621 B
Python
34 lines
621 B
Python
|
##
|
||
|
##
|
||
|
|
||
|
|
||
|
#
|
||
|
# Adapter for java.awt.Point
|
||
|
#
|
||
|
#
|
||
|
# SOFTWARE HISTORY
|
||
|
#
|
||
|
# Date Ticket# Engineer Description
|
||
|
# ------------ ---------- ----------- --------------------------
|
||
|
# 08/31/10 njensen Initial Creation.
|
||
|
#
|
||
|
#
|
||
|
#
|
||
|
|
||
|
from dynamicserialize.dstypes.java.awt import Point
|
||
|
|
||
|
ClassAdapter = 'java.awt.Point'
|
||
|
|
||
|
def serialize(context, point):
|
||
|
context.writeI32(point.getX())
|
||
|
context.writeI32(point.getY())
|
||
|
|
||
|
def deserialize(context):
|
||
|
x = context.readI32()
|
||
|
y = context.readI32()
|
||
|
point = Point()
|
||
|
point.setX(x)
|
||
|
point.setY(y)
|
||
|
return point
|
||
|
|