|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2002, 2008 Innoopract Informationssysteme GmbH. |
2 |
* Copyright (c) 2002, 2010 Innoopract Informationssysteme GmbH. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 7-12
Link Here
|
| 7 |
* |
7 |
* |
| 8 |
* Contributors: |
8 |
* Contributors: |
| 9 |
* Innoopract Informationssysteme GmbH - initial API and implementation |
9 |
* Innoopract Informationssysteme GmbH - initial API and implementation |
|
|
10 |
* EclipseSource - ongoing development |
| 10 |
******************************************************************************/ |
11 |
******************************************************************************/ |
| 11 |
|
12 |
|
| 12 |
package org.eclipse.swt.internal.widgets.tabfolderkit; |
13 |
package org.eclipse.swt.internal.widgets.tabfolderkit; |
|
Lines 40-46
Link Here
|
| 40 |
writer.set( "hideFocus", true ); |
41 |
writer.set( "hideFocus", true ); |
| 41 |
if( ( tabFolder.getStyle() & SWT.BOTTOM ) != 0 ) { |
42 |
if( ( tabFolder.getStyle() & SWT.BOTTOM ) != 0 ) { |
| 42 |
writer.set( "placeBarOnTop", false ); |
43 |
writer.set( "placeBarOnTop", false ); |
| 43 |
} |
44 |
} |
| 44 |
ControlLCAUtil.writeStyleFlags( tabFolder ); |
45 |
ControlLCAUtil.writeStyleFlags( tabFolder ); |
| 45 |
writer.addListener( "keypress", |
46 |
writer.addListener( "keypress", |
| 46 |
"org.eclipse.swt.TabUtil.onTabFolderKeyPress" ); |
47 |
"org.eclipse.swt.TabUtil.onTabFolderKeyPress" ); |
|
Lines 61-70
Link Here
|
| 61 |
public Rectangle adjustCoordinates( final Widget widget, |
62 |
public Rectangle adjustCoordinates( final Widget widget, |
| 62 |
final Rectangle newBounds ) |
63 |
final Rectangle newBounds ) |
| 63 |
{ |
64 |
{ |
|
|
65 |
Control control = ( Control )widget; |
| 66 |
TabFolder tabFolder = ( TabFolder )control.getParent(); |
| 67 |
boolean onBottom = ( tabFolder.getStyle() & SWT.BOTTOM ) != 0; |
| 64 |
int border = 1; |
68 |
int border = 1; |
| 65 |
int hTabBar = 23; |
69 |
int hTabBar = onBottom ? 0 : 23; |
| 66 |
return new Rectangle( newBounds.x - border - 10, |
70 |
return new Rectangle( newBounds.x - border - 10, |
| 67 |
newBounds.y - hTabBar - border -10, |
71 |
newBounds.y - hTabBar - border - 10, |
| 68 |
newBounds.width, |
72 |
newBounds.width, |
| 69 |
newBounds.height ); |
73 |
newBounds.height ); |
| 70 |
} |
74 |
} |