from javax.swing import JCheckBox from org.das2.datum import TimeUtil from org.das2.graph import Renderer from java.awt.geom import GeneralPath,Rectangle2D from org.json import JSONObject import jarray from java.net import DatagramSocket,DatagramPacket from java.lang import String BUF_LEN = 2048 PORT = 50222 arrow__CLASSTYPE = GeneralPath # isConstructor (line794) class WindRenderer( Renderer ): def render( self, g, xaxis, yaxis ): ds= self.getDataSet() if ( ds==None ): return print ds for d in ds: ix= xaxis.transform( d[0] ) iy= yaxis.transform( d[1] ) ang= toRadians( d[2] ) g.fill( Rectangle2D.Double( ix-3, iy, 6, yaxis.transform(0,yaxis.units)-iy ) ) g2= g.create() g2.translate( ix, yaxis.transform(yaxis.dataMaximum)+20 ) g2.rotate( float(ang) ) g2.draw( Rectangle2D.Double( 0, 0, 1, 1 ) ) s= min( sqrt( float(d[1]) ) / 4.0, 20 ) g2.scale( s,s ) g2.fill( arrow ) collectCB= JCheckBox('Collect Data',selected=True) from org.das2.datum import Units mphu__CLASSTYPE = Units # (line895)