axesPlacementSet = EnumSet.noneOf(Mosaic.AxesPlacement.class); _mosaic = new Mosaic(nrow,ncol,axesPlacementSet); _colorMapHandler = new ColorMapHandler(); GridBagConstraints gbc = new GridBagConstraints();
/** * 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); }
float[] x1 = {0.0f,1.0f}; float[] x2 = {0.0f,1.0f}; Mosaic mosaic = new Mosaic(nrow,ncol,axesPlacement); mosaic.setBackground(Color.WHITE); mosaic.setFont(new Font("SansSerif",Font.PLAIN,12));