(DrawingPanel panel, Graphics g)
| 22 | ArrayData griddata = new ArrayData(numpts, numpts, 3); |
| 23 | GrayscalePlot grayscalePlot = new GrayscalePlot(griddata) { |
| 24 | @Override |
| 25 | public void draw(DrawingPanel panel, Graphics g) { |
| 26 | |
| 27 | setRandomVals(); |
| 28 | super.draw(panel, g); |
| 29 | g.setColor(Color.blue); |
| 30 | String str = "" + textLayoutFont.getSize2D(); |
| 31 | TextLayout tl = new TextLayout(str, textLayoutFont); |
| 32 | System.out.println("TLT.tl " + tl.getBounds()); |
| 33 | System.out.println("TLT.fs " + textLayoutFont.getStringBounds(str, ((Graphics2D)g).getFontRenderContext())); |
| 34 | float w = (float) tl.getBounds().getWidth(); |
| 35 | float h = (float) tl.getBounds().getHeight(); |
| 36 | h = 0; |
| 37 | System.out.println("TLT.draw w=" + w + " h=" + h); |
| 38 | tl.draw(g, (103-w/2) , (112 - h/2)); |
| 39 | |
| 40 | } |
| 41 | }; |
| 42 | PlottingPanel plottingPanel = new PlottingPanel("x", "t", null); |
| 43 | DrawingFrame drawingFrame = new DrawingFrame(plottingPanel); |
nothing calls this directly
no test coverage detected