Search in sources :

Example 1 with PreAutoLayoutEvent

use of org.eclipse.sapphire.ui.diagram.editor.SapphireDiagramEditorPagePart.PreAutoLayoutEvent in project liferay-ide by liferay.

the class WorkflowDefinitionLayoutPersistenceService method _addDiagramPartListener.

private void _addDiagramPartListener() {
    _diagramPartListener = new Listener() {

        @Override
        public void handle(Event event) {
            if (event instanceof DiagramNodeEvent) {
                DiagramNodeEvent nodeEvent = (DiagramNodeEvent) event;
                _handleDiagramNodeEvent(nodeEvent);
            } else if (event instanceof DiagramPageEvent) {
                DiagramPageEvent pageEvent = (DiagramPageEvent) event;
                _handleDiagramPageEvent(pageEvent);
            } else if (event instanceof PreAutoLayoutEvent) {
                _autoLayout = true;
            } else if (event instanceof PostAutoLayoutEvent) {
                _autoLayout = false;
            } else if (event instanceof ConnectionAddEvent) {
                ConnectionAddEvent addEvent = (ConnectionAddEvent) event;
                handleConnectionAddEvent(addEvent);
            } else if (event instanceof ConnectionDeleteEvent) {
                handleConnectionDeleteEvent((ConnectionDeleteEvent) event);
            }
        }
    };
    _part().attach(_diagramPartListener);
}
Also used : ConnectionAddEvent(org.eclipse.sapphire.ui.diagram.ConnectionAddEvent) DiagramPageEvent(org.eclipse.sapphire.ui.diagram.editor.DiagramPageEvent) FilteredListener(org.eclipse.sapphire.FilteredListener) Listener(org.eclipse.sapphire.Listener) PostAutoLayoutEvent(org.eclipse.sapphire.ui.diagram.editor.SapphireDiagramEditorPagePart.PostAutoLayoutEvent) DiagramNodeAddEvent(org.eclipse.sapphire.ui.diagram.editor.DiagramNodeAddEvent) PostAutoLayoutEvent(org.eclipse.sapphire.ui.diagram.editor.SapphireDiagramEditorPagePart.PostAutoLayoutEvent) PreAutoLayoutEvent(org.eclipse.sapphire.ui.diagram.editor.SapphireDiagramEditorPagePart.PreAutoLayoutEvent) DiagramPageEvent(org.eclipse.sapphire.ui.diagram.editor.DiagramPageEvent) Event(org.eclipse.sapphire.Event) ConnectionBendpointsEvent(org.eclipse.sapphire.ui.diagram.ConnectionBendpointsEvent) DiagramNodeMoveEvent(org.eclipse.sapphire.ui.diagram.editor.DiagramNodeMoveEvent) ConnectionDeleteEvent(org.eclipse.sapphire.ui.diagram.ConnectionDeleteEvent) DiagramNodeEvent(org.eclipse.sapphire.ui.diagram.editor.DiagramNodeEvent) ConnectionAddEvent(org.eclipse.sapphire.ui.diagram.ConnectionAddEvent) PropertyEvent(org.eclipse.sapphire.PropertyEvent) DiagramNodeDeleteEvent(org.eclipse.sapphire.ui.diagram.editor.DiagramNodeDeleteEvent) DiagramNodeEvent(org.eclipse.sapphire.ui.diagram.editor.DiagramNodeEvent) ConnectionDeleteEvent(org.eclipse.sapphire.ui.diagram.ConnectionDeleteEvent) PreAutoLayoutEvent(org.eclipse.sapphire.ui.diagram.editor.SapphireDiagramEditorPagePart.PreAutoLayoutEvent)

Aggregations

Event (org.eclipse.sapphire.Event)1 FilteredListener (org.eclipse.sapphire.FilteredListener)1 Listener (org.eclipse.sapphire.Listener)1 PropertyEvent (org.eclipse.sapphire.PropertyEvent)1 ConnectionAddEvent (org.eclipse.sapphire.ui.diagram.ConnectionAddEvent)1 ConnectionBendpointsEvent (org.eclipse.sapphire.ui.diagram.ConnectionBendpointsEvent)1 ConnectionDeleteEvent (org.eclipse.sapphire.ui.diagram.ConnectionDeleteEvent)1 DiagramNodeAddEvent (org.eclipse.sapphire.ui.diagram.editor.DiagramNodeAddEvent)1 DiagramNodeDeleteEvent (org.eclipse.sapphire.ui.diagram.editor.DiagramNodeDeleteEvent)1 DiagramNodeEvent (org.eclipse.sapphire.ui.diagram.editor.DiagramNodeEvent)1 DiagramNodeMoveEvent (org.eclipse.sapphire.ui.diagram.editor.DiagramNodeMoveEvent)1 DiagramPageEvent (org.eclipse.sapphire.ui.diagram.editor.DiagramPageEvent)1 PostAutoLayoutEvent (org.eclipse.sapphire.ui.diagram.editor.SapphireDiagramEditorPagePart.PostAutoLayoutEvent)1 PreAutoLayoutEvent (org.eclipse.sapphire.ui.diagram.editor.SapphireDiagramEditorPagePart.PreAutoLayoutEvent)1