public PaletteSample(ColorPalette palette)
 {
   base.\u002Ector();
   PaletteSample paletteSample = this;
   this.palette = palette;
   this.preferredSize = new Dimension(80, 18);
 }
Exemple #2
0
 public ColorBar(string label)
 {
   base.\u002Ector();
   ColorBar colorBar = this;
   this.colorBarThickness = 0;
   this.colorBarThicknessPercent = 0.1;
   this.colorPalette = (ColorPalette) null;
   this.colorBarLength = 0;
   NumberAxis numberAxis = new NumberAxis(label);
   numberAxis.setAutoRangeIncludesZero(false);
   this.axis = (ValueAxis) numberAxis;
   this.axis.setLowerMargin(0.0);
   this.axis.setUpperMargin(0.0);
   this.colorPalette = (ColorPalette) new RainbowPalette();
   this.colorBarThickness = 0;
   this.colorBarThicknessPercent = 0.1;
   this.outerGap = 2;
   this.colorPalette.setMinZ(this.axis.getRange().getLowerBound());
   this.colorPalette.setMaxZ(this.axis.getRange().getUpperBound());
 }
 public virtual void setPalette(ColorPalette palette)
 {
   this.palette = palette;
   ((Component) this).repaint();
 }