use of org.eclipse.ui.internal.dialogs.PropertyDialog in project netxms by netxms.
the class AlarmCategoryList method editCategory.
/**
* Edit alarm category
*/
public void editCategory() {
if (selection.isEmpty())
return;
AlarmCategoryEditor editor = new AlarmCategoryEditor((AlarmCategory) selection.getFirstElement());
PropertyDialog dlg = PropertyDialog.createDialogOn(getShell(), null, editor);
dlg.open();
}
use of org.eclipse.ui.internal.dialogs.PropertyDialog in project netxms by netxms.
the class PredefinedMap method showLinkProperties.
/**
* Show properties for currently selected link
*/
private void showLinkProperties() {
updateObjectPositions();
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
if ((selection.size() != 1) || !(selection.getFirstElement() instanceof NetworkMapLink))
return;
LinkEditor link = new LinkEditor((NetworkMapLink) selection.getFirstElement(), mapPage);
PropertyDialog dlg = PropertyDialog.createDialogOn(getSite().getShell(), null, link);
if (dlg != null) {
dlg.open();
if (link.isModified())
saveMap();
}
}
use of org.eclipse.ui.internal.dialogs.PropertyDialog in project netxms by netxms.
the class PredefinedMap method showTextBoxProperties.
/**
* Show text box properties
*/
private void showTextBoxProperties() {
updateObjectPositions();
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
if ((selection.size() != 1) || !(selection.getFirstElement() instanceof NetworkMapTextBox))
return;
PropertyDialog dlg = PropertyDialog.createDialogOn(getSite().getShell(), null, (NetworkMapTextBox) selection.getFirstElement());
if (dlg.open() != Window.OK)
return;
saveMap();
}
use of org.eclipse.ui.internal.dialogs.PropertyDialog in project netxms by netxms.
the class PredefinedMap method showDCIContainerProperties.
/**
* Show DCI Container properties
*/
private void showDCIContainerProperties() {
updateObjectPositions();
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
if ((selection.size() != 1) || !(selection.getFirstElement() instanceof NetworkMapDCIContainer))
return;
NetworkMapDCIContainer container = (NetworkMapDCIContainer) selection.getFirstElement();
PropertyDialog dlg = PropertyDialog.createDialogOn(getSite().getShell(), null, container);
if (dlg != null) {
if (dlg.open() == PropertyDialog.OK)
saveMap();
}
}
use of org.eclipse.ui.internal.dialogs.PropertyDialog in project netxms by netxms.
the class PredefinedMap method addDCIImageToMap.
/**
* Add DCI image to map
*/
private void addDCIImageToMap() {
NetworkMapDCIImage dciImage = new NetworkMapDCIImage(mapPage.createElementId());
// runn property page
PropertyDialog dlg = PropertyDialog.createDialogOn(getSite().getShell(), null, dciImage);
if (dlg != null) {
if (dlg.open() == Window.OK) {
mapPage.addElement(dciImage);
saveMap();
addDciToRequestList();
}
}
}
Aggregations