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

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

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

origin: bcdev/beam

point.setSample(sample);
points[i] = point;
lastSample = sample;
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) {
  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);
  }
}
origin: bcdev/beam

@Override
public void setSliderSample(int index, double sample) {
  getImageInfo().getColorPaletteDef().getPointAt(index).setSample(sample);
  fireStateChanged();
}
org.esa.beam.framework.datamodelColorPaletteDef$PointsetSample

Popular methods of ColorPaletteDef$Point

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

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • getSystemService (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JPanel (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best IntelliJ plugins
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