Package org.esa.snap.rcp.placemark
Class PlacemarkDialog
- java.lang.Object
-
- org.esa.snap.ui.AbstractDialog
-
- org.esa.snap.ui.ModalDialog
-
- org.esa.snap.rcp.placemark.PlacemarkDialog
-
public class PlacemarkDialog extends ModalDialog
A dialog used to create new placemarks or edit existing placemarks.
-
-
Field Summary
-
Fields inherited from class org.esa.snap.ui.ModalDialog
ID_OK_APPLY_CANCEL, ID_OK_APPLY_CANCEL_HELP, ID_OK_CANCEL, ID_OK_CANCEL_HELP, ID_YES_NO, ID_YES_NO_HELP
-
-
Constructor Summary
Constructors Constructor Description PlacemarkDialog(Window parent, Product product, PlacemarkDescriptor placemarkDescriptor, boolean switchGeoAndPixelPositionsEditable)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()GeoPosgetGeoPos()StringgetLabel()doublegetLat()doublegetLon()StringgetName()PixelPosgetPixelPos()doublegetPixelX()doublegetPixelY()ProductgetProduct()StringgetStyleCss()static voidmain(String[] args)protected voidonOK()Called if the "OK" button has been clicked.voidsetDescription(String description)voidsetGeoPos(GeoPos geoPos)voidsetLabel(String label)voidsetLat(double lat)voidsetLon(double lon)voidsetName(String name)voidsetPixelPos(PixelPos pixelPos)voidsetPixelX(double pixelX)voidsetPixelY(double pixelY)static booleanshowEditPlacemarkDialog(Window parent, Product product, Placemark placemark, PlacemarkDescriptor placemarkDescriptor)Shows a dialog to edit the properties of an placemark.-
Methods inherited from class org.esa.snap.ui.ModalDialog
close
-
Methods inherited from class org.esa.snap.ui.AbstractDialog
center, collectButtons, getButton, getButtonID, getButtonMask, getButtonPanel, getContent, getHelpID, getJDialog, getParent, getQualifiedPropertyName, getTitle, hide, onApply, onCancel, onClose, onHelp, onNo, onOther, onReset, onYes, registerButton, setButtonID, setContent, setContent, setHelpID, setTitle, show, showErrorDialog, showErrorDialog, showErrorDialog, showInformationDialog, showInformationDialog, showInformationDialog, showWarningDialog, showWarningDialog, showWarningDialog, verifyUserInput
-
-
-
-
Constructor Detail
-
PlacemarkDialog
public PlacemarkDialog(Window parent, Product product, PlacemarkDescriptor placemarkDescriptor, boolean switchGeoAndPixelPositionsEditable)
-
-
Method Detail
-
getProduct
public Product getProduct()
-
onOK
protected void onOK()
Description copied from class:AbstractDialogCalled if the "OK" button has been clicked. The default implementation callsAbstractDialog.hide(). Clients should override this method to implement meaningful behaviour.- Overrides:
onOKin classAbstractDialog
-
getName
public String getName()
-
setName
public void setName(String name)
-
getLabel
public String getLabel()
-
setLabel
public void setLabel(String label)
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
-
getStyleCss
public String getStyleCss()
-
getPixelX
public double getPixelX()
-
setPixelX
public void setPixelX(double pixelX)
-
getPixelY
public double getPixelY()
-
setPixelY
public void setPixelY(double pixelY)
-
getLat
public double getLat()
-
setLat
public void setLat(double lat)
-
getLon
public double getLon()
-
setLon
public void setLon(double lon)
-
getGeoPos
public GeoPos getGeoPos()
-
setGeoPos
public void setGeoPos(GeoPos geoPos)
-
getPixelPos
public PixelPos getPixelPos()
-
setPixelPos
public void setPixelPos(PixelPos pixelPos)
-
showEditPlacemarkDialog
public static boolean showEditPlacemarkDialog(Window parent, Product product, Placemark placemark, PlacemarkDescriptor placemarkDescriptor)
Shows a dialog to edit the properties of an placemark. If the placemark does not belong to a product it will be added after editing.- Parameters:
parent- the parent window fo the dialogproduct- the product where the placemark is already contained or where it will be addedplacemark- the placemark to editplacemarkDescriptor- the descriptor of the placemark- Returns:
trueif editing was successful, otherwisefalse.
-
main
public static void main(String[] args) throws org.opengis.referencing.operation.TransformException, org.opengis.referencing.FactoryException
- Throws:
org.opengis.referencing.operation.TransformExceptionorg.opengis.referencing.FactoryException
-
-