Codota Logo
ColorPaletteDef$Point.setColor
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: bcdev/beam

  sample = lastSample + 1.0;
point.setColor(color);
point.setSample(sample);
points[i] = point;
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 setSliderColor(int index, Color color) {
  getImageInfo().getColorPaletteDef().getPointAt(index).setColor(color);
  fireStateChanged();
}
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 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

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());
  }
}
org.esa.beam.framework.datamodelColorPaletteDef$PointsetColor

Popular methods of ColorPaletteDef$Point

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

Popular in Java

  • Making http post requests using okhttp
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • startActivity (Activity)
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now