Search in sources :

Example 1 with ToggleOrientationAction

use of org.talend.designer.runtime.visualization.internal.actions.ToggleOrientationAction in project tdi-studio-se by Talend.

the class ThreadDumpEditorActionContributor method setActiveEditor.

/*
     * @see EditorActionBarContributor#setActiveEditor(IEditorPart)
     */
@Override
public void setActiveEditor(IEditorPart targetEditor) {
    if (!(targetEditor instanceof ThreadDumpEditor)) {
        return;
    }
    ThreadDumpEditor threadDump = (ThreadDumpEditor) targetEditor;
    ThreadSashForm sashForm = threadDump.getThreadSashForm();
    for (ToggleOrientationAction action : orientationActions) {
        action.setSashForm(sashForm);
        if (action.isChecked()) {
            action.run();
        }
    }
}
Also used : ToggleOrientationAction(org.talend.designer.runtime.visualization.internal.actions.ToggleOrientationAction) ThreadSashForm(org.talend.designer.runtime.visualization.internal.ui.properties.thread.ThreadSashForm)

Example 2 with ToggleOrientationAction

use of org.talend.designer.runtime.visualization.internal.actions.ToggleOrientationAction in project tdi-studio-se by Talend.

the class AbstractSashForm method getOrientationActions.

/**
     * Gets the orientation actions.
     * 
     * @return The orientation actions
     */
public List<ToggleOrientationAction> getOrientationActions() {
    if (orientationActions == null) {
        orientationActions = new ArrayList<ToggleOrientationAction>();
        for (Orientation orientation : Orientation.values()) {
            ToggleOrientationAction action = new ToggleOrientationAction(this, orientation);
            orientationActions.add(action);
            if (action.isChecked()) {
                updateOrientation(orientation);
                currentOrientation = orientation;
            }
        }
    }
    return orientationActions;
}
Also used : ToggleOrientationAction(org.talend.designer.runtime.visualization.internal.actions.ToggleOrientationAction) Orientation(org.talend.designer.runtime.visualization.internal.actions.ToggleOrientationAction.Orientation)

Aggregations

ToggleOrientationAction (org.talend.designer.runtime.visualization.internal.actions.ToggleOrientationAction)2 Orientation (org.talend.designer.runtime.visualization.internal.actions.ToggleOrientationAction.Orientation)1 ThreadSashForm (org.talend.designer.runtime.visualization.internal.ui.properties.thread.ThreadSashForm)1