Package org.eclipse.nebula.widgets.nattable.persistence.command

Examples of org.eclipse.nebula.widgets.nattable.persistence.command.StateChangeEvent


            for (int i = 0; i < this.viewer.getTable().getItemCount(); i++) {
                String element = this.viewer.getElementAt(i).toString();
                if (configName.equals(element)) {
                    // fire event for a changed view configuration
                    fireStateChange(new StateChangeEvent(configName,
                            StateChangeType.CHANGE));
                    return;
                }
            }

            this.viewer.add(configName);
            // fire event for a newly created view configuration
            fireStateChange(new StateChangeEvent(configName,
                    StateChangeType.CREATE));
        } else if (buttonId == DELETE_ID) {
            ISelection selection = this.viewer.getSelection();
            if (selection != null && selection instanceof IStructuredSelection) {
                String configName = ((IStructuredSelection) selection)
                        .getFirstElement().toString();
                PersistenceHelper.deleteState(configName, this.properties);
                // remove the state name out of the viewer
                this.viewer.getTable().deselectAll();
                this.viewer.remove(configName);
                this.configNameText.setText(""); //$NON-NLS-1$
                // fire event for a deleted view configuration
                fireStateChange(new StateChangeEvent(configName,
                        StateChangeType.DELETE));
            }
        } else if (buttonId == LOAD_ID) {
            ISelection selection = this.viewer.getSelection();
            if (selection != null && selection instanceof IStructuredSelection) {
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.persistence.command.StateChangeEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.