use of org.netxms.client.maps.elements.NetworkMapDecoration in project netxms by netxms.
the class PredefinedMap method editGroupBox.
/**
* Edit group box
*/
private void editGroupBox() {
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
if ((selection.size() != 1) || !(selection.getFirstElement() instanceof NetworkMapDecoration))
return;
NetworkMapDecoration groupBox = (NetworkMapDecoration) selection.getFirstElement();
EditGroupBoxDialog dlg = new EditGroupBoxDialog(getSite().getShell(), groupBox);
if (dlg.open() == Window.OK) {
mapPage.addElement(groupBox);
saveMap();
}
}
use of org.netxms.client.maps.elements.NetworkMapDecoration in project netxms by netxms.
the class PredefinedMap method fillElementContextMenu.
/*
* (non-Javadoc)
*
* @see
* org.netxms.ui.eclipse.networkmaps.views.NetworkMap#fillElementContextMenu
* (org.eclipse.jface.action.IMenuManager)
*/
protected void fillElementContextMenu(IMenuManager manager) {
if (!readOnly) {
manager.add(actionRemove);
Object o = ((IStructuredSelection) viewer.getSelection()).getFirstElement();
if (o instanceof NetworkMapDCIContainer)
manager.add(actionDCIContainerProperties);
if (o instanceof NetworkMapDCIImage)
manager.add(actionDCIImageProperties);
if (o instanceof NetworkMapTextBox)
manager.add(actionTextBoxProperties);
if (o instanceof NetworkMapDecoration)
manager.add(actionGroupBoxEdit);
manager.add(new Separator());
}
super.fillElementContextMenu(manager);
}
use of org.netxms.client.maps.elements.NetworkMapDecoration in project netxms by netxms.
the class PredefinedMap method addGroupBoxDecoration.
/**
* Add group box decoration
*/
private void addGroupBoxDecoration() {
NetworkMapDecoration element = new NetworkMapDecoration(mapPage.createElementId(), NetworkMapDecoration.GROUP_BOX);
EditGroupBoxDialog dlg = new EditGroupBoxDialog(getSite().getShell(), element);
if (dlg.open() != Window.OK)
return;
mapPage.addElement(element);
saveMap();
}
use of org.netxms.client.maps.elements.NetworkMapDecoration in project netxms by netxms.
the class PredefinedMap method addImageDecoration.
/**
* Add image decoration
*/
private void addImageDecoration() {
ImageSelectionDialog dlg = new ImageSelectionDialog(getSite().getShell());
if (dlg.open() != Window.OK)
return;
UUID imageGuid = dlg.getLibraryImage().getGuid();
Rectangle imageBounds = dlg.getImage().getBounds();
NetworkMapDecoration element = new NetworkMapDecoration(mapPage.createElementId(), NetworkMapDecoration.IMAGE);
element.setSize(imageBounds.width, imageBounds.height);
element.setTitle(imageGuid.toString());
mapPage.addElement(element);
saveMap();
}
Aggregations