1 11 package org.eclipse.ui.internal; 12 13 import org.eclipse.ui.IEditorPart; 14 import org.eclipse.ui.IEditorReference; 15 import org.eclipse.ui.part.MultiEditor; 16 17 20 public class MultiEditorInnerPane extends EditorPane { 21 22 EditorPane parentPane; 23 24 27 public MultiEditorInnerPane(EditorPane pane, IEditorReference ref, 28 WorkbenchPage page, EditorStack workbook) { 29 super(ref, page, workbook); 30 parentPane = pane; 31 } 32 33 36 public EditorPane getParentPane() { 37 return parentPane; 38 } 39 40 43 private void updateGradient() { 44 MultiEditor multiEditor = (MultiEditor) parentPane.getPartReference() 45 .getPart(true); 46 if (multiEditor != null) { 47 IEditorPart part = (IEditorPart) this.getEditorReference().getPart( 48 true); 49 if (part != null) { 50 multiEditor.updateGradient(part); 51 } 52 } 53 } 54 55 58 public void showFocus(boolean inFocus) { 59 super.showFocus(inFocus); 60 updateGradient(); 61 } 62 63 66 void shellDeactivated() { 67 super.shellDeactivated(); 68 updateGradient(); 69 } 70 71 74 void shellActivated() { 75 super.shellActivated(); 76 updateGradient(); 77 } 78 79 } 80 | Popular Tags |