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 String
getDescription()
GeoPos
getGeoPos()
String
getLabel()
double
getLat()
double
getLon()
String
getName()
PixelPos
getPixelPos()
double
getPixelX()
double
getPixelY()
Product
getProduct()
String
getStyleCss()
static void
main(String[] args)
protected void
onOK()
Called if the "OK" button has been clicked.void
setDescription(String description)
void
setGeoPos(GeoPos geoPos)
void
setLabel(String label)
void
setLat(double lat)
void
setLon(double lon)
void
setName(String name)
void
setPixelPos(PixelPos pixelPos)
void
setPixelX(double pixelX)
void
setPixelY(double pixelY)
static boolean
showEditPlacemarkDialog(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:AbstractDialog
Called if the "OK" button has been clicked. The default implementation callsAbstractDialog.hide()
. Clients should override this method to implement meaningful behaviour.- Overrides:
onOK
in 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:
true
if 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.TransformException
org.opengis.referencing.FactoryException
-
-