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

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

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

origin: bcdev/beam

try {
  final ColorPaletteDef colorPaletteDef = ColorPaletteDef.loadColorPaletteDef(file);
  colorPaletteDef.getFirstPoint().setLabel(file.getName());
  applyColorPaletteDef(colorPaletteDef, getProductSceneView().getRaster(), targetImageInfo);
  setImageInfoCopy(targetImageInfo);
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

public ColorPaletteDef getSelectedColorPaletteDefinition() {
  final int selectedIndex = getSelectedIndex();
  final ComboBoxModel<ColorPaletteWrapper> model = getModel();
  final ColorPaletteWrapper colorPaletteWrapper = model.getElementAt(selectedIndex);
  final ColorPaletteDef cpd = colorPaletteWrapper.cpd;
  cpd.getFirstPoint().setLabel(colorPaletteWrapper.name);
  return cpd;
}
org.esa.beam.framework.datamodelColorPaletteDef$PointsetLabel

Popular methods of ColorPaletteDef$Point

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

Popular in Java

  • Updating database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • JList (javax.swing)
  • JTable (javax.swing)
  • Top PhpStorm 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