Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
dshea committed Dec 15, 2014
2 parents ddded7b + f59bcc9 commit 91949f8
Show file tree
Hide file tree
Showing 21 changed files with 1,017 additions and 73 deletions.
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
<module>../beam/beam-cluster-analysis</module>
<module>../beam/beam-collocation</module>
<module>../beam/beam-envisat-reader</module>
<module>../beam/beam-envi-reader</module>
<module>../beam/beam-geotiff</module>
<module>../beam/beam-getasse30-reader</module>
<module>../beam/beam-hdf5-writer</module>
Expand Down Expand Up @@ -253,6 +254,11 @@
<artifactId>beam-envisat-reader</artifactId>
<version>${beam.versionRange}</version>
</dependency>
<dependency>
<groupId>org.esa.beam</groupId>
<artifactId>beam-envi-reader</artifactId>
<version>5.0.1</version>
</dependency>
<dependency>
<groupId>org.esa.beam</groupId>
<artifactId>beam-geotiff</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions seadas-bootstrap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@
<groupId>org.esa.beam</groupId>
<artifactId>beam-envisat-reader</artifactId>
</dependency>
<dependency>
<groupId>org.esa.beam</groupId>
<artifactId>beam-envi-reader</artifactId>
</dependency>
<dependency>
<groupId>org.esa.beam</groupId>
<artifactId>beam-geotiff</artifactId>
Expand Down
1 change: 1 addition & 0 deletions seadas-contour-operator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<version>1.0</version>

<name>SEADAS Contour Operator</name>

<description>Provides an API as well as an operator for creating a contour overlay for a given band from a loaded
product.
</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
*/
public class ShowVectorContourOverlayAction extends AbstractShowOverlayAction {

final String DEFAULT_STYLE_FORMAT = "fill:%s; fill-opacity:0.5; stroke:%s; stroke-opacity:1.0; stroke-width:1.0; symbol:cross";
final String DEFAULT_STYLE_FORMAT = "fill:%s; fill-opacity:0.5; stroke:%s; stroke-opacity:1.0; stroke-width:1.0; stroke-dasharray:%s; symbol:cross";
Product product;
double noDataValue;

Expand Down Expand Up @@ -165,7 +165,7 @@ private ArrayList<VectorDataNode> createVectorDataNodesforContours(ContourData c
//convert RGB color to an hexadecimal value
//String hex = "#"+Integer.toHexString(interval.getLineColor().getRGB()).substring(2);
String hex = String.format("#%02x%02x%02x", interval.getLineColor().getRed(), interval.getLineColor().getGreen(), interval.getLineColor().getBlue());
vectorDataNode.setDefaultStyleCss(String.format(DEFAULT_STYLE_FORMAT, hex, hex));
vectorDataNode.setDefaultStyleCss(String.format(DEFAULT_STYLE_FORMAT, hex, hex, interval.getContourLineStyleValue()));
vectorDataNodes.add(vectorDataNode);
}
return vectorDataNodes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@
public class ContourInterval {
String contourLevelName;
Double contourLevelValue;
String contourLineStyleValue;
private Color lineColor;

DecimalFormat decimalFormat = new DecimalFormat("##.###");

ContourInterval(String contourBaseName, Double contourLevelValue) {
this.contourLevelValue = new Double(decimalFormat.format(contourLevelValue));
contourLevelName = contourBaseName + this.contourLevelValue;
lineColor = Color.WHITE;
contourLineStyleValue = "1.0, 0";
}

ContourInterval(Double contourLevelValue) {
Expand All @@ -46,6 +49,14 @@ public double getContourLevelValue() {
return contourLevelValue;
}

public String getContourLineStyleValue() {
return contourLineStyleValue;
}

public void setContourLineStyleValue(String contourLineStyleValue) {
this.contourLineStyleValue = contourLineStyleValue;
}

public Color getLineColor() {
return lineColor;
}
Expand All @@ -63,6 +74,7 @@ public ContourInterval clone(){
this.getLineColor().getAlpha()));
contourInterval.setContourLevelName(this.getContourLevelName());
contourInterval.setContourLevelValue(this.getContourLevelValue());
contourInterval.setContourLineStyleValue(this.getContourLineStyleValue());
return contourInterval;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public void actionPerformed(ActionEvent event) {

contourData.createContourLevels(getMinValue(), getMaxValue(), getNumberOfLevels(), logCheckBox.isSelected());
}
System.out.print("--- no change!---");
//System.out.print("--- no change!---");
customizeContourLevels(contourData);
}
});
Expand Down Expand Up @@ -285,24 +285,30 @@ private void customizeContourLevels(ContourData contourData) {
final String contourNamePropertyName = "contourName";
final String contourValuePropertyName = "contourValue";
final String contourColorPropertyName = "contourColor";
final String contourLineStylePropertyName = "contourLineStyle";
ArrayList<ContourInterval> contourIntervalsClone = contourData.cloneContourIntervals();
JPanel customPanel = new JPanel();
customPanel.setLayout(new BoxLayout(customPanel, BoxLayout.Y_AXIS));
for (final ContourInterval interval : contourIntervalsClone) {
JPanel contourLevelPanel = new JPanel(new TableLayout(7));
JPanel contourLevelPanel = new JPanel(new TableLayout(8));
JLabel contourNameLabel = new JLabel("Name: ");
JLabel contourValueLabel = new JLabel("Value: ");
JLabel contourColorLabel = new JLabel("Color: ");
JLabel contourLineStyleLabel = new JLabel("Line Style: ");
JTextField contourLevelName = new JTextField();
contourLevelName.setColumns(20);
contourLevelName.setText(interval.getContourLevelName());
JTextField contourLevelValue = new JTextField();
contourLevelValue.setColumns(5);
contourLevelValue.setText(new Double(interval.getContourLevelValue()).toString());
JTextField contourLineStyleValue = new JTextField();
contourLineStyleValue.setColumns(10);
contourLineStyleValue.setText(interval.getContourLineStyleValue());
PropertyContainer propertyContainer = new PropertyContainer();
propertyContainer.addProperty(Property.create(contourNamePropertyName, interval.getContourLevelName()));
propertyContainer.addProperty(Property.create(contourValuePropertyName, interval.getContourLevelValue()));
propertyContainer.addProperty(Property.create(contourColorPropertyName, interval.getLineColor()));
propertyContainer.addProperty(Property.create(contourLineStylePropertyName, interval.getContourLineStyleValue()));
final BindingContext bindingContext = new BindingContext(propertyContainer);
final PropertyChangeListener pcl_name = new PropertyChangeListener() {
@Override
Expand All @@ -322,6 +328,12 @@ public void propertyChange(PropertyChangeEvent evt) {
interval.setLineColor((Color) bindingContext.getBinding(contourColorPropertyName).getPropertyValue());
}
};
final PropertyChangeListener pcl_lineStyle = new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
interval.setContourLineStyleValue((String) bindingContext.getBinding(contourLineStylePropertyName).getPropertyValue());
}
};
ColorComboBox contourLineColorComboBox = new ColorComboBox();
contourLineColorComboBox.setColorValueVisible(false);
contourLineColorComboBox.setAllowDefaultColor(true);
Expand All @@ -337,12 +349,18 @@ public void propertyChange(PropertyChangeEvent evt) {
contourValueBinding.addComponent(contourValueLabel);
bindingContext.addPropertyChangeListener(contourValuePropertyName, pcl_value);

Binding contourLineBinding = bindingContext.bind(contourLineStylePropertyName, contourLineStyleValue);
contourValueBinding.addComponent(contourLineStyleLabel);
bindingContext.addPropertyChangeListener(contourLineStylePropertyName, pcl_lineStyle);

contourLevelPanel.add(contourNameLabel);
contourLevelPanel.add(contourLevelName);
contourLevelPanel.add(contourValueLabel);
contourLevelPanel.add(contourLevelValue);
contourLevelPanel.add(contourColorLabel);
contourLevelPanel.add(contourLineColorComboBox);
contourLevelPanel.add(contourLineStyleLabel);
contourLevelPanel.add(contourLineStyleValue);
customPanel.add(contourLevelPanel);
}

Expand Down
4 changes: 4 additions & 0 deletions seadas-ocsswws/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CHANGELOG

This file contains the significant changes for each OCSSW Web Services release.

Loading

0 comments on commit 91949f8

Please sign in to comment.