Tabnine Logo
ColorPaletteDef$Point.setColor
Code IndexAdd Tabnine to your IDE (free)

How to use
setColor
method
in
org.esa.beam.framework.datamodel.ColorPaletteDef$Point

Best Java code snippets using org.esa.beam.framework.datamodel.ColorPaletteDef$Point.setColor (Showing top 6 results out of 315)

origin: bcdev/beam

  sample = lastSample + 1.0;
point.setColor(color);
point.setSample(sample);
points[i] = point;
origin: bcdev/beam

private static void transferPoints(ColorPaletteDef sourceCPD,
                  double minSample,
                  double maxSample,
                  boolean autoDistribute,
                  ColorPaletteDef targetCPD) {
  if (autoDistribute || sourceCPD.isAutoDistribute()) {
    alignNumPoints(sourceCPD, targetCPD);
    double minDisplaySample = sourceCPD.getMinDisplaySample();
    double maxDisplaySample = sourceCPD.getMaxDisplaySample();
    double delta1 = (maxSample > minSample) ? maxSample - minSample : 1.0;
    double delta2 = (maxDisplaySample > minDisplaySample) ? maxDisplaySample - minDisplaySample : 1.0;
    double b = delta1 / delta2;
    double a = minSample - minDisplaySample * b;
    for (int i = 0; i < sourceCPD.getNumPoints(); i++) {
      targetCPD.getPointAt(i).setSample(a + b * sourceCPD.getPointAt(i).getSample());
      targetCPD.getPointAt(i).setColor(sourceCPD.getPointAt(i).getColor());
      targetCPD.getPointAt(i).setLabel(sourceCPD.getPointAt(i).getLabel());
    }
  } else {
    targetCPD.setPoints(sourceCPD.getPoints().clone());
  }
}
origin: bcdev/beam

@Override
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
  if (getImageInfo() == null) {
    return;
  }
  final ColorPaletteDef.Point point = getImageInfo().getColorPaletteDef().getPointAt(rowIndex);
  if (columnIndex == 0) {
    point.setLabel((String) aValue);
    fireTableCellUpdated(rowIndex, columnIndex);
    parentForm.applyChanges();
  } else if (columnIndex == 1) {
    final Color color = (Color) aValue;
    point.setColor(color == null ? ImageInfo.NO_COLOR : color);
    fireTableCellUpdated(rowIndex, columnIndex);
    parentForm.applyChanges();
  }
}
origin: bcdev/beam

/**
 * Sets the colours of the colour palette of this image info.
 *
 * @param colors the new colours
 */
public void setColors(Color[] colors) {
  ColorPaletteDef cpd = getColorPaletteDef();
  int numPoints = cpd.getNumPoints();
  for (int i = 0; i < numPoints; i++) {
    ColorPaletteDef.Point point = cpd.getPointAt(i);
    point.setColor(colors[i % colors.length]);
  }
}
origin: bcdev/beam

@Override
public void setSliderColor(int index, Color color) {
  getImageInfo().getColorPaletteDef().getPointAt(index).setColor(color);
  fireStateChanged();
}
origin: bcdev/beam

@Override
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
  final ColorPaletteDef.Point point = getImageInfo().getColorPaletteDef().getPointAt(rowIndex);
  if (columnIndex == 0) {
    final Color color = (Color) aValue;
    point.setColor(color == null ? ImageInfo.NO_COLOR : color);
    fireTableCellUpdated(rowIndex, columnIndex);
  } else if (columnIndex == 1) {
    point.setSample((Double) aValue);
    fireTableCellUpdated(rowIndex, columnIndex);
  }
}
org.esa.beam.framework.datamodelColorPaletteDef$PointsetColor

Popular methods of ColorPaletteDef$Point

  • <init>
  • getColor
  • getSample
  • setSample
  • getLabel
  • setLabel
  • clone
  • createClone

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JComboBox (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now