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
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
ConstructorsConstructorDescriptionPlacemarkDialog
(Window parent, Product product, PlacemarkDescriptor placemarkDescriptor, boolean switchGeoAndPixelPositionsEditable) -
Method Summary
Modifier and TypeMethodDescriptiongetLabel()
double
getLat()
double
getLon()
getName()
double
double
static void
protected void
onOK()
Called if the "OK" button has been clicked.void
setDescription
(String description) void
void
void
setLat
(double lat) void
setLon
(double lon) void
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 Details
-
PlacemarkDialog
public PlacemarkDialog(Window parent, Product product, PlacemarkDescriptor placemarkDescriptor, boolean switchGeoAndPixelPositionsEditable)
-
-
Method Details
-
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
-
setName
-
getLabel
-
setLabel
-
getDescription
-
setDescription
-
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
-
setGeoPos
-
getPixelPos
-
setPixelPos
-
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
-