Search in sources :

Example 1 with EditGroupBoxDialog

use of org.netxms.ui.eclipse.networkmaps.dialogs.EditGroupBoxDialog 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();
    }
}
Also used : EditGroupBoxDialog(org.netxms.ui.eclipse.networkmaps.dialogs.EditGroupBoxDialog) NetworkMapDecoration(org.netxms.client.maps.elements.NetworkMapDecoration) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection)

Example 2 with EditGroupBoxDialog

use of org.netxms.ui.eclipse.networkmaps.dialogs.EditGroupBoxDialog 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();
}
Also used : EditGroupBoxDialog(org.netxms.ui.eclipse.networkmaps.dialogs.EditGroupBoxDialog) NetworkMapDecoration(org.netxms.client.maps.elements.NetworkMapDecoration)

Aggregations

NetworkMapDecoration (org.netxms.client.maps.elements.NetworkMapDecoration)2 EditGroupBoxDialog (org.netxms.ui.eclipse.networkmaps.dialogs.EditGroupBoxDialog)2 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1