use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.
the class SummaryTableManager method createActions.
/**
*/
private void createActions() {
final IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
// create show filter action
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.datacollection.commands.show_dci_filter");
handlerService.activateHandler(actionShowFilter.getActionDefinitionId(), new ActionHandler(actionShowFilter));
// create refresh action
actionRefresh = new RefreshAction(this) {
@Override
public void run() {
refresh();
}
};
// create add action for single value table
actionCreateSingleValue = new Action("Create new summary table...", SharedIcons.ADD_OBJECT) {
@Override
public void run() {
createSummaryTable(false);
}
};
actionCreateTableValue = new Action("Create new summary table for table DCIs...", Activator.getImageDescriptor("icons/new.png")) {
@Override
public void run() {
createSummaryTable(true);
}
};
// create edit action
actionEdit = new Action(Messages.get().SummaryTableManager_ActionEdit, SharedIcons.EDIT) {
@Override
public void run() {
editSummaryTable();
}
};
actionEdit.setEnabled(false);
// create delete action
actionDelete = new Action(Messages.get().SummaryTableManager_ActionDelete, SharedIcons.DELETE_OBJECT) {
@Override
public void run() {
deleteSelection();
}
};
actionDelete.setEnabled(false);
}
use of org.netxms.ui.eclipse.actions.RefreshAction 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);
}
use of org.netxms.ui.eclipse.actions.RefreshAction 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);
}
use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.
the class PackageManager method createActions.
/**
* Create actions
*/
private void createActions() {
actionRefresh = new RefreshAction(this) {
@Override
public void run() {
refresh();
}
};
actionInstall = new Action(Messages.get().PackageManager_InstallAction, SharedIcons.ADD_OBJECT) {
@Override
public void run() {
installPackage();
}
};
actionRemove = new Action(Messages.get().PackageManager_RemoveAction, SharedIcons.DELETE_OBJECT) {
@Override
public void run() {
removePackage();
}
};
actionDeploy = new // $NON-NLS-1$
Action(// $NON-NLS-1$
Messages.get().PackageManager_DeployAction, // $NON-NLS-1$
Activator.getImageDescriptor("icons/package_deploy.gif")) {
@Override
public void run() {
deployPackage();
}
};
}
use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.
the class ServerStoredAgentConfigEditorView method createActions.
/**
* Create actions
*/
private void createActions() {
actionRefresh = new RefreshAction() {
@Override
public void run() {
getConfigList();
}
};
actionSave = new Action(Messages.get().AgentConfigEditorView_Save, SharedIcons.SAVE) {
@Override
public void run() {
intermediateSave();
actionSave.setEnabled(false);
modified = false;
}
};
actionCreate = new Action(Messages.get().ServerStoredAgentConfigEditorView_JobTitle_CreateNew, SharedIcons.ADD_OBJECT) {
@Override
public void run() {
createNewConfig();
}
};
actionDelete = new Action(Messages.get().ServerStoredAgentConfigEditorView_Delete, SharedIcons.DELETE_OBJECT) {
@Override
public void run() {
deleteConfig();
}
};
actionMoveUp = new Action(Messages.get().ServerStoredAgentConfigEditorView_MoveUp, SharedIcons.UP) {
@Override
public void run() {
moveUp();
}
};
actionMoveDown = new Action(Messages.get().ServerStoredAgentConfigEditorView_MoveDown, SharedIcons.DOWN) {
@Override
public void run() {
moveDown();
}
};
}
Aggregations