use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.
the class TableLastValuesView method createActions.
/**
* Create actions
*/
private void createActions() {
actionRefresh = new RefreshAction(this) {
@Override
public void run() {
refreshTable();
}
};
actionExportAllToCsv = new ExportToCsvAction(this, viewer.getViewer(), false);
}
use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.
the class ObjectStatusMapView method createActions.
/**
* Create actions
*/
private void createActions() {
actionRefresh = new RefreshAction(this) {
@Override
public void run() {
map.refresh();
}
};
actionFlatView = new Action("&Flat view", Action.AS_RADIO_BUTTON) {
@Override
public void run() {
((ObjectStatusMap) map).setGroupObjects(false);
map.refresh();
}
};
actionFlatView.setChecked(displayOption == 0);
actionFlatView.setImageDescriptor(Activator.getImageDescriptor("icons/not_grouped_nodes.png"));
actionGroupView = new Action("&Group view", Action.AS_RADIO_BUTTON) {
@Override
public void run() {
((ObjectStatusMap) map).setGroupObjects(true);
map.refresh();
}
};
actionGroupView.setChecked(displayOption == 1);
actionGroupView.setImageDescriptor(Activator.getImageDescriptor("icons/grouped_nodes.png"));
actionRadialView = new Action("&Radial view", Action.AS_RADIO_BUTTON) {
@Override
public void run() {
redraw(actionRadialView.isChecked());
}
};
actionRadialView.setChecked(displayOption == 2);
actionRadialView.setImageDescriptor(Activator.getImageDescriptor("icons/radial.png"));
actionShowFilter = new Action(Messages.get().ObjectStatusMapView_ActionShowFilter, Action.AS_CHECK_BOX) {
@Override
public void run() {
showFilter = actionShowFilter.isChecked();
map.enableFilter(showFilter);
}
};
actionShowFilter.setChecked(showFilter);
}
use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.
the class SoftwareInventoryView method createActions.
/**
* Create actions
*/
private void createActions() {
actionRefresh = new RefreshAction(this) {
@Override
public void run() {
inventoryWidget.refresh();
}
};
ViewerProvider vp = new ViewerProvider() {
@Override
public ColumnViewer getViewer() {
return inventoryWidget.getViewer();
}
};
actionExportToCsv = new ExportToCsvAction(this, vp, true);
actionExportAllToCsv = new ExportToCsvAction(this, vp, false);
}
use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.
the class MibExplorer method createActions.
/**
* Create actions
*/
private void createActions() {
final IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
actionRefresh = new RefreshAction() {
@Override
public void run() {
mibBrowser.refreshTree();
}
};
actionWalk = new Action(Messages.get().MibExplorer_Walk) {
@Override
public void run() {
doWalk();
}
};
actionWalk.setEnabled(currentNode != null);
actionSetNode = new Action(Messages.get().MibExplorer_SetNodeObject) {
@Override
public void run() {
ObjectSelectionDialog dlg = new ObjectSelectionDialog(MibExplorer.this.getSite().getShell(), null, ObjectSelectionDialog.createNodeSelectionFilter(false));
dlg.enableMultiSelection(false);
if (dlg.open() == Window.OK) {
setNode((AbstractNode) dlg.getSelectedObjects().get(0));
}
}
};
actionSelect = new Action("Select in MIB tree") {
@Override
public void run() {
selectInTree();
}
};
actionSelect.setEnabled(false);
actionExportToCsv = new ExportToCsvAction(this, viewer, true);
actionShowFilter = new Action("Show filter", Action.AS_CHECK_BOX) {
@Override
public void run() {
enableFilter(!initShowFilter);
actionShowFilter.setChecked(initShowFilter);
}
};
actionShowFilter.setChecked(initShowFilter);
// $NON-NLS-1$
actionShowFilter.setActionDefinitionId("org.netxms.ui.eclipse.snmp.commands.showFilter");
handlerService.activateHandler(actionShowFilter.getActionDefinitionId(), new ActionHandler(actionShowFilter));
}
use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.
the class MappingTableEditor method createActions.
/**
* Create actions
*/
private void createActions() {
final IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
actionRefresh = new RefreshAction(this) {
@Override
public void run() {
if (modified)
if (!MessageDialogHelper.openQuestion(getSite().getShell(), Messages.get().MappingTableEditor_RefreshConfirmation, Messages.get().MappingTableEditor_RefreshConfirmationText))
return;
refresh();
}
};
actionNewRow = new Action(Messages.get().MappingTableEditor_NewRow, SharedIcons.ADD_OBJECT) {
@Override
public void run() {
addNewRow();
}
};
actionNewRow.setEnabled(false);
// $NON-NLS-1$
actionNewRow.setActionDefinitionId("org.netxms.ui.eclipse.serverconfig.commands.add_new_row");
handlerService.activateHandler(actionNewRow.getActionDefinitionId(), new ActionHandler(actionNewRow));
actionDelete = new Action(Messages.get().MappingTableEditor_Delete, SharedIcons.DELETE_OBJECT) {
@Override
public void run() {
deleteRows();
}
};
actionDelete.setEnabled(false);
// $NON-NLS-1$
actionDelete.setActionDefinitionId("org.netxms.ui.eclipse.serverconfig.commands.delete_rows");
handlerService.activateHandler(actionDelete.getActionDefinitionId(), new ActionHandler(actionDelete));
actionSave = new Action(Messages.get().MappingTableEditor_Save, SharedIcons.SAVE) {
@Override
public void run() {
new SaveJob().start();
}
};
actionSave.setEnabled(false);
}
Aggregations