|
Lines 15-20
Link Here
|
| 15 |
|
15 |
|
| 16 |
import org.eclipse.core.runtime.NullProgressMonitor; |
16 |
import org.eclipse.core.runtime.NullProgressMonitor; |
| 17 |
import org.eclipse.jface.action.CoolBarManager; |
17 |
import org.eclipse.jface.action.CoolBarManager; |
|
|
18 |
import org.eclipse.jface.action.ICoolBarManager; |
| 19 |
import org.eclipse.jface.action.IToolBarManager; |
| 20 |
import org.eclipse.jface.action.IToolBarManager2; |
| 18 |
import org.eclipse.jface.action.MenuManager; |
21 |
import org.eclipse.jface.action.MenuManager; |
| 19 |
import org.eclipse.jface.action.StatusLineManager; |
22 |
import org.eclipse.jface.action.StatusLineManager; |
| 20 |
import org.eclipse.jface.action.ToolBarManager; |
23 |
import org.eclipse.jface.action.ToolBarManager; |
|
Lines 77-83
Link Here
|
| 77 |
* |
80 |
* |
| 78 |
* @see #addToolBar |
81 |
* @see #addToolBar |
| 79 |
*/ |
82 |
*/ |
| 80 |
private ToolBarManager toolBarManager = null; |
83 |
protected IToolBarManager2 toolBarManager = null; |
| 81 |
|
84 |
|
| 82 |
/** |
85 |
/** |
| 83 |
* Status line manager, or <code>null</code> if none (default). |
86 |
* Status line manager, or <code>null</code> if none (default). |
|
Lines 92-98
Link Here
|
| 92 |
* @see #addCoolBar |
95 |
* @see #addCoolBar |
| 93 |
* @since 3.0 |
96 |
* @since 3.0 |
| 94 |
*/ |
97 |
*/ |
| 95 |
private CoolBarManager coolBarManager = null; |
98 |
protected ICoolBarManager coolBarManager = null; |
| 96 |
|
99 |
|
| 97 |
/** |
100 |
/** |
| 98 |
* The seperator between the menu bar and the rest of the window. |
101 |
* The seperator between the menu bar and the rest of the window. |
|
Lines 404-409
Link Here
|
| 404 |
protected ToolBarManager createToolBarManager(int style) { |
407 |
protected ToolBarManager createToolBarManager(int style) { |
| 405 |
return new ToolBarManager(style); |
408 |
return new ToolBarManager(style); |
| 406 |
} |
409 |
} |
|
|
410 |
|
| 411 |
/** |
| 412 |
* Returns a new tool bar manager for the window. |
| 413 |
* <p> |
| 414 |
* Subclasses may override this method to customize the tool bar manager. |
| 415 |
* The default implementation calls <code>createToolBarManager</code>. |
| 416 |
* </p> |
| 417 |
* @return a tool bar manager |
| 418 |
* @since 3.2 |
| 419 |
*/ |
| 420 |
protected IToolBarManager createToolBarManager2(int style) { |
| 421 |
return createToolBarManager(style); |
| 422 |
} |
| 407 |
|
423 |
|
| 408 |
/** |
424 |
/** |
| 409 |
* Returns a new cool bar manager for the window. |
425 |
* Returns a new cool bar manager for the window. |
|
Lines 417-422
Link Here
|
| 417 |
protected CoolBarManager createCoolBarManager(int style) { |
433 |
protected CoolBarManager createCoolBarManager(int style) { |
| 418 |
return new CoolBarManager(style); |
434 |
return new CoolBarManager(style); |
| 419 |
} |
435 |
} |
|
|
436 |
|
| 437 |
/** |
| 438 |
* Returns a new cool bar manager for the window. |
| 439 |
* <p> |
| 440 |
* Subclasses may override this method to customize the cool bar manager. |
| 441 |
* The default implementation calls <code>createCoolBarManager</code> |
| 442 |
* </p> |
| 443 |
* |
| 444 |
* @return a cool bar manager |
| 445 |
* @since 3.2 |
| 446 |
*/ |
| 447 |
protected ICoolBarManager createCoolBarManager2(int style) { |
| 448 |
return new CoolBarManager(style); |
| 449 |
} |
| 420 |
|
450 |
|
| 421 |
/** |
451 |
/** |
| 422 |
* Creates the control for the tool bar manager. |
452 |
* Creates the control for the tool bar manager. |
|
Lines 443-449
Link Here
|
| 443 |
*/ |
473 |
*/ |
| 444 |
protected Control createCoolBarControl(Composite composite) { |
474 |
protected Control createCoolBarControl(Composite composite) { |
| 445 |
if (coolBarManager != null) { |
475 |
if (coolBarManager != null) { |
| 446 |
return coolBarManager.createControl(composite); |
476 |
return coolBarManager.createControl2(composite); |
| 447 |
} |
477 |
} |
| 448 |
return null; |
478 |
return null; |
| 449 |
} |
479 |
} |
|
Lines 510-515
Link Here
|
| 510 |
* @see #addToolBar(int) |
540 |
* @see #addToolBar(int) |
| 511 |
*/ |
541 |
*/ |
| 512 |
public ToolBarManager getToolBarManager() { |
542 |
public ToolBarManager getToolBarManager() { |
|
|
543 |
if (toolBarManager instanceof ToolBarManager) |
| 544 |
return (ToolBarManager)toolBarManager; |
| 545 |
return null; |
| 546 |
} |
| 547 |
|
| 548 |
/** |
| 549 |
* Returns the tool bar manager for this window (if it has one). |
| 550 |
* |
| 551 |
* @return the tool bar manager, or <code>null</code> if |
| 552 |
* this window does not have a tool bar |
| 553 |
* @see #addToolBar(int) |
| 554 |
* @since 3.2 |
| 555 |
*/ |
| 556 |
public IToolBarManager2 getToolBarManager2() { |
| 513 |
return toolBarManager; |
557 |
return toolBarManager; |
| 514 |
} |
558 |
} |
| 515 |
|
559 |
|
|
Lines 522-527
Link Here
|
| 522 |
* @since 3.0 |
566 |
* @since 3.0 |
| 523 |
*/ |
567 |
*/ |
| 524 |
public CoolBarManager getCoolBarManager() { |
568 |
public CoolBarManager getCoolBarManager() { |
|
|
569 |
if (coolBarManager instanceof CoolBarManager) |
| 570 |
return (CoolBarManager)coolBarManager; |
| 571 |
return null; |
| 572 |
} |
| 573 |
|
| 574 |
/** |
| 575 |
* Returns the cool bar manager for this window. |
| 576 |
* |
| 577 |
* @return the cool bar manager, or <code>null</code> if |
| 578 |
* this window does not have a cool bar |
| 579 |
* @see #addCoolBar(int) |
| 580 |
* @since 3.2 |
| 581 |
*/ |
| 582 |
public ICoolBarManager getCoolBarManager2() { |
| 525 |
return coolBarManager; |
583 |
return coolBarManager; |
| 526 |
} |
584 |
} |
| 527 |
|
585 |
|