private void showLines() { Mosaic mosaic = getMosaic(); Tile t00 = mosaic.getTile(0,0); Tile t10 = mosaic.getTile(1,0); Tile t11 = mosaic.getTile(1,1); if (_orientation==Orientation.X1DOWN_X2RIGHT) { t00.addTiledView(_l23); t10.addTiledView(_l12); t11.addTiledView(_l13); } else if (_orientation==Orientation.X1DOWN_X3RIGHT) { t00.addTiledView(_l23); t10.addTiledView(_l13); t11.addTiledView(_l12); } else if (_orientation==Orientation.X1RIGHT_X2UP) { t00.addTiledView(_l13); t10.addTiledView(_l12); t11.addTiledView(_l23); } else if (_orientation==Orientation.X1RIGHT_X3UP) { t00.addTiledView(_l12); t10.addTiledView(_l13); t11.addTiledView(_l23); } } private void hideLines() {
/** * Adds the specified tiled view to this plot panel. If the tiled view * is already in the specified tile, it is first removed, before adding * it again. * @param irow the tile row index. * @param icol the tile column index. * @param tv the tiled view. * @return true, if the tile did not already contain the specified * tiled view; false, otherwise. */ public boolean addTiledView(int irow, int icol, TiledView tv) { if (tv instanceof ColorMapped) { ColorMapped cm = (ColorMapped)tv; cm.getColorMap().addListener(_colorMapHandler); } return getTile(irow,icol).addTiledView(tv); }
for (int irow=0; irow<nrow; ++irow) { for (int icol=0; icol<ncol; ++icol) { mosaic.getTile(irow,icol).addTiledView(new PointsView(x1,x2));
private static void plot(TriMesh tm) { TriMeshView tmv = new TriMeshView(tm); tmv.setPolysVisible(true); tmv.setTriColor(Color.BLACK); tmv.setPolyColor(Color.BLUE); PlotPanel panel = new PlotPanel(); panel.setHLabel("x"); panel.setVLabel("y"); Mosaic mosaic = panel.getMosaic(); mosaic.getTile(0,0).addTiledView(tmv); PlotFrame frame = new PlotFrame(panel); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(700,700); frame.setVisible(true); } }
_pixels.setOrientation(PixelsView.Orientation.X1RIGHT_X2UP); _pixels.setInterpolation(PixelsView.Interpolation.LINEAR); _tile.addTiledView(_pixels);