Search in sources :

Example 16 with PropertyDialog

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();
}
Also used : AlarmCategoryEditor(org.netxms.ui.eclipse.alarmviewer.editors.AlarmCategoryEditor) PropertyDialog(org.eclipse.ui.internal.dialogs.PropertyDialog)

Example 17 with PropertyDialog

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();
    }
}
Also used : PropertyDialog(org.eclipse.ui.internal.dialogs.PropertyDialog) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) LinkEditor(org.netxms.ui.eclipse.networkmaps.views.helpers.LinkEditor) NetworkMapLink(org.netxms.client.maps.NetworkMapLink)

Example 18 with PropertyDialog

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();
}
Also used : NetworkMapTextBox(org.netxms.client.maps.elements.NetworkMapTextBox) PropertyDialog(org.eclipse.ui.internal.dialogs.PropertyDialog) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection)

Example 19 with PropertyDialog

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();
    }
}
Also used : PropertyDialog(org.eclipse.ui.internal.dialogs.PropertyDialog) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) NetworkMapDCIContainer(org.netxms.client.maps.elements.NetworkMapDCIContainer)

Example 20 with PropertyDialog

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();
        }
    }
}
Also used : PropertyDialog(org.eclipse.ui.internal.dialogs.PropertyDialog) NetworkMapDCIImage(org.netxms.client.maps.elements.NetworkMapDCIImage)

Aggregations

PropertyDialog (org.eclipse.ui.internal.dialogs.PropertyDialog)24 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)10 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)5 ConsoleJob (org.netxms.ui.eclipse.jobs.ConsoleJob)5 PartInitException (org.eclipse.ui.PartInitException)4 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)3 DashboardElementConfig (org.netxms.ui.eclipse.dashboard.widgets.internal.DashboardElementConfig)3 DciSummaryTable (org.netxms.client.datacollection.DciSummaryTable)2 DciSummaryTableDescriptor (org.netxms.client.datacollection.DciSummaryTableDescriptor)2 GraphSettings (org.netxms.client.datacollection.GraphSettings)2 NetworkMapDCIContainer (org.netxms.client.maps.elements.NetworkMapDCIContainer)2 NetworkMapDCIImage (org.netxms.client.maps.elements.NetworkMapDCIImage)2 NetworkMapTextBox (org.netxms.client.maps.elements.NetworkMapTextBox)2 AlarmCategoryEditor (org.netxms.ui.eclipse.alarmviewer.editors.AlarmCategoryEditor)2 PropertyEditor (com.centurylink.mdw.plugin.designer.properties.editor.PropertyEditor)1 ValueChangeListener (com.centurylink.mdw.plugin.designer.properties.editor.ValueChangeListener)1 ExtensionModulesUpdater (com.centurylink.mdw.plugin.project.assembly.ExtensionModulesUpdater)1 ProjectUpdater (com.centurylink.mdw.plugin.project.assembly.ProjectUpdater)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 HashMap (java.util.HashMap)1