Search in sources :

Example 1 with ExportToCsvAction

use of org.netxms.ui.eclipse.actions.ExportToCsvAction in project netxms by netxms.

the class Dot1xStatusView method createActions.

/**
 * Create actions
 */
private void createActions() {
    actionRefresh = new RefreshAction(this) {

        @Override
        public void run() {
            refresh();
        }
    };
    actionExportToCsv = new ExportToCsvAction(this, viewer, true);
    actionExportAllToCsv = new ExportToCsvAction(this, viewer, false);
}
Also used : RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction)

Example 2 with ExportToCsvAction

use of org.netxms.ui.eclipse.actions.ExportToCsvAction in project netxms by netxms.

the class InterfacesTab method createActions.

/**
 * Create actions
 */
private void createActions() {
    actionCopyToClipboard = new Action(Messages.get().InterfacesTab_ActionCopy, SharedIcons.COPY) {

        @Override
        public void run() {
            copyToClipboard(-1);
        }
    };
    actionCopyMacAddressToClipboard = new Action(Messages.get().InterfacesTab_ActionCopyMAC) {

        @Override
        public void run() {
            copyToClipboard(COLUMN_MAC_ADDRESS);
        }
    };
    actionCopyIpAddressToClipboard = new Action(Messages.get().InterfacesTab_ActionCopyIP) {

        @Override
        public void run() {
            copyToClipboard(COLUMN_IP_ADDRESS);
        }
    };
    actionCopyPeerNameToClipboard = new Action(Messages.get().InterfacesTab_ActionCopyPeerName) {

        @Override
        public void run() {
            copyToClipboard(COLUMN_PEER_NAME);
        }
    };
    actionCopyPeerMacToClipboard = new Action(Messages.get().InterfacesTab_ActionCopyPeerMAC) {

        @Override
        public void run() {
            copyToClipboard(COLUMN_PEER_MAC_ADDRESS);
        }
    };
    actionCopyPeerIpToClipboard = new Action(Messages.get().InterfacesTab_ActionCopyPeerIP) {

        @Override
        public void run() {
            copyToClipboard(COLUMN_PEER_IP_ADDRESS);
        }
    };
    actionExportToCsv = new ExportToCsvAction(getViewPart(), viewer, true);
}
Also used : ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction) Action(org.eclipse.jface.action.Action) ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction)

Example 3 with ExportToCsvAction

use of org.netxms.ui.eclipse.actions.ExportToCsvAction in project netxms by netxms.

the class LastValuesWidget method createActions.

/**
 * Create actions
 */
private void createActions() {
    actionUseMultipliers = new Action(Messages.get().LastValuesWidget_UseMultipliers, Action.AS_CHECK_BOX) {

        @Override
        public void run() {
            setUseMultipliers(actionUseMultipliers.isChecked());
        }
    };
    actionUseMultipliers.setChecked(areMultipliersUsed());
    actionShowErrors = new Action(Messages.get().LastValuesWidget_ShowErrors, Action.AS_CHECK_BOX) {

        @Override
        public void run() {
            setShowErrors(actionShowErrors.isChecked());
        }
    };
    actionShowErrors.setChecked(isShowErrors());
    actionShowUnsupported = new Action(Messages.get().LastValuesWidget_ShowUnsupported, Action.AS_CHECK_BOX) {

        @Override
        public void run() {
            setShowUnsupported(actionShowUnsupported.isChecked());
        }
    };
    actionShowUnsupported.setChecked(isShowUnsupported());
    actionShowDisabled = new Action(Messages.get().LastValuesWidget_ShowDisabled, Action.AS_CHECK_BOX) {

        @Override
        public void run() {
            setShowDisabled(actionShowDisabled.isChecked());
        }
    };
    actionShowDisabled.setChecked(isShowDisabled());
    actionExportToCsv = new ExportToCsvAction(viewPart, dataViewer, true);
}
Also used : ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction) Action(org.eclipse.jface.action.Action) ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction)

Example 4 with ExportToCsvAction

use of org.netxms.ui.eclipse.actions.ExportToCsvAction in project netxms by netxms.

the class DataCollectionEditor method createActions.

/**
 * Create actions
 */
private void createActions() {
    final IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
    actionRefresh = new RefreshAction() {

        @Override
        public void run() {
            viewer.setInput(dciConfig.getItems());
        }
    };
    actionCreateItem = new // $NON-NLS-1$
    Action(// $NON-NLS-1$
    Messages.get().DataCollectionEditor_NewParam, // $NON-NLS-1$
    Activator.getImageDescriptor("icons/new.png")) {

        @Override
        public void run() {
            createItem();
        }
    };
    actionCreateTable = new Action(Messages.get().DataCollectionEditor_NewTable) {

        @Override
        public void run() {
            createTable();
        }
    };
    actionEdit = new Action(Messages.get().DataCollectionEditor_ActionEdit, SharedIcons.EDIT) {

        @Override
        public void run() {
            editSelectedObject();
        }
    };
    actionEdit.setText(Messages.get().DataCollectionEditor_Edit);
    // $NON-NLS-1$
    actionEdit.setImageDescriptor(Activator.getImageDescriptor("icons/edit.png"));
    actionEdit.setEnabled(false);
    actionDelete = new // $NON-NLS-1$
    Action(// $NON-NLS-1$
    Messages.get().DataCollectionEditor_Delete, // $NON-NLS-1$
    Activator.getImageDescriptor("icons/delete.png")) {

        @Override
        public void run() {
            deleteItems();
        }
    };
    actionDelete.setEnabled(false);
    actionCopy = new Action(Messages.get().DataCollectionEditor_Copy) {

        @Override
        public void run() {
            copyItems(false);
        }
    };
    actionCopy.setEnabled(false);
    actionMove = new Action(Messages.get().DataCollectionEditor_Move) {

        @Override
        public void run() {
            copyItems(true);
        }
    };
    actionMove.setEnabled(false);
    actionConvert = new Action(Messages.get().DataCollectionEditor_Convert) {

        @Override
        public void run() {
            convertToTemplate();
        }
    };
    actionConvert.setEnabled(false);
    actionDuplicate = new Action(Messages.get().DataCollectionEditor_Duplicate) {

        @Override
        public void run() {
            duplicateItems();
        }
    };
    actionDuplicate.setEnabled(false);
    actionActivate = new // $NON-NLS-1$
    Action(// $NON-NLS-1$
    Messages.get().DataCollectionEditor_Activate, // $NON-NLS-1$
    Activator.getImageDescriptor("icons/active.gif")) {

        @Override
        public void run() {
            setItemStatus(DataCollectionObject.ACTIVE);
            actionActivate.setEnabled(false);
            actionDisable.setEnabled(true);
        }
    };
    actionActivate.setEnabled(false);
    actionDisable = new // $NON-NLS-1$
    Action(// $NON-NLS-1$
    Messages.get().DataCollectionEditor_Disable, // $NON-NLS-1$
    Activator.getImageDescriptor("icons/disabled.gif")) {

        @Override
        public void run() {
            setItemStatus(DataCollectionObject.DISABLED);
            actionActivate.setEnabled(true);
            actionDisable.setEnabled(false);
        }
    };
    actionDisable.setEnabled(false);
    actionShowFilter = new Action(Messages.get().DataCollectionEditor_ShowFilter, Action.AS_CHECK_BOX) {

        @Override
        public void run() {
            enableFilter(actionShowFilter.isChecked());
        }
    };
    actionShowFilter.setImageDescriptor(SharedIcons.FILTER);
    actionShowFilter.setChecked(getBooleanFromSettings("DataCollectionEditor.showFilter", true));
    // $NON-NLS-1$
    actionShowFilter.setActionDefinitionId("org.netxms.ui.eclipse.datacollection.commands.show_dci_filter");
    handlerService.activateHandler(actionShowFilter.getActionDefinitionId(), new ActionHandler(actionShowFilter));
    actionExportToCsv = new ExportToCsvAction(this, viewer, true);
    actionExportAllToCsv = new ExportToCsvAction(this, viewer, false);
}
Also used : ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction) RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) Action(org.eclipse.jface.action.Action) IHandlerService(org.eclipse.ui.handlers.IHandlerService) RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) ActionHandler(org.eclipse.jface.commands.ActionHandler) ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction)

Example 5 with ExportToCsvAction

use of org.netxms.ui.eclipse.actions.ExportToCsvAction in project netxms by netxms.

the class SummaryTable method createActions.

/**
 * Create actions
 */
private void createActions() {
    actionRefresh = new RefreshAction(this) {

        @Override
        public void run() {
            viewer.refresh();
        }
    };
    actionExportAllToCsv = new ExportToCsvAction(this, viewer.getViewer(), false);
}
Also used : RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction)

Aggregations

ExportToCsvAction (org.netxms.ui.eclipse.actions.ExportToCsvAction)21 RefreshAction (org.netxms.ui.eclipse.actions.RefreshAction)17 Action (org.eclipse.jface.action.Action)11 ActionHandler (org.eclipse.jface.commands.ActionHandler)5 IHandlerService (org.eclipse.ui.handlers.IHandlerService)5 IAction (org.eclipse.jface.action.IAction)1 AbstractNode (org.netxms.client.objects.AbstractNode)1 ViewerProvider (org.netxms.ui.eclipse.actions.ViewerProvider)1 AcknowledgeCustomTimeDialog (org.netxms.ui.eclipse.alarmviewer.dialogs.AcknowledgeCustomTimeDialog)1 ObjectSelectionDialog (org.netxms.ui.eclipse.objectbrowser.dialogs.ObjectSelectionDialog)1