/** * Constructs a new color bar with specified label. * @param label the label; null, if none. */ public ColorBar(String label) { super(); _mosaic = new Mosaic(1,1,EnumSet.of(Mosaic.AxesPlacement.RIGHT)); if (label!=null) _mosaic.getTileAxisRight(0).setLabel(label); _mosaic.setWidthMinimum(0,15); _mosaic.setWidthElastic(0,0); _tile = _mosaic.getTile(0,0); this.setLayout(new BorderLayout()); this.add(_mosaic,BorderLayout.CENTER); }
mosaic.setFont(new Font("SansSerif",Font.PLAIN,12)); mosaic.setWidthMinimum(1,200); mosaic.setWidthElastic(1,200); mosaic.setHeightElastic(0,0); for (int irow=0; irow<nrow; ++irow) {
_l13.setOrientation(PointsView.Orientation.X1DOWN_X2RIGHT); _l23.setOrientation(PointsView.Orientation.X1RIGHT_X2UP); getMosaic().setWidthElastic( 0,100*_n2/_n3); getMosaic().setHeightElastic(0,100*_n3/_n1); } else if (orientation==Orientation.X1DOWN_X3RIGHT) { _l13.setOrientation(PointsView.Orientation.X1DOWN_X2RIGHT); _l23.setOrientation(PointsView.Orientation.X1RIGHT_X2UP); getMosaic().setWidthElastic( 0,100*_n3/_n2); getMosaic().setHeightElastic(0,100*_n2/_n1); } else if (orientation==Orientation.X1RIGHT_X2UP) { _l13.setOrientation(PointsView.Orientation.X1RIGHT_X2UP); _l23.setOrientation(PointsView.Orientation.X1RIGHT_X2UP); getMosaic().setWidthElastic( 0,100*_n1/_n3); getMosaic().setHeightElastic(0,100*_n3/_n2); } else if (orientation==Orientation.X1RIGHT_X3UP) { _l13.setOrientation(PointsView.Orientation.X1RIGHT_X2UP); _l23.setOrientation(PointsView.Orientation.X1RIGHT_X2UP); getMosaic().setWidthElastic( 0,100*_n1/_n2); getMosaic().setHeightElastic(0,100*_n2/_n3);