Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 281121
Collapse All | Expand All

(-)plugin.xml (+12 lines)
Lines 61-65 Link Here
61
         </presentationFactory>
61
         </presentationFactory>
62
      </branding>
62
      </branding>
63
   </extension>
63
   </extension>
64
   <extension
65
         point="org.eclipse.rap.ui.layouts">
66
      <layout
67
            id="org.eclipse.rap.design.example.business.layout"
68
            name="Business Layout Blue">
69
         <layoutSet
70
               class="org.eclipse.rap.examples.internal.design.LogoInitializer"
71
               id="org.eclipse.rap.design.example.business.layoutset.logo"
72
               name="Logo">
73
         </layoutSet>
74
      </layout>
75
   </extension>
64
76
65
</plugin>
77
</plugin>
(-)src/org/eclipse/rap/examples/internal/design/LogoInitializer.java (+38 lines)
Added Link Here
1
/******************************************************************************* 
2
* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
3
* program and the accompanying materials are made available under the terms of
4
* the Eclipse Public License v1.0 which accompanies this distribution, and is
5
* available at http://www.eclipse.org/legal/epl-v10.html
6
*
7
* Contributors:
8
*   EclipseSource - initial API and implementation
9
*******************************************************************************/ 
10
package org.eclipse.rap.examples.internal.design;
11
12
import org.eclipse.rap.ui.interactiondesign.layout.model.ILayoutSetInitializer;
13
import org.eclipse.rap.ui.interactiondesign.layout.model.LayoutSet;
14
import org.eclipse.swt.layout.FormAttachment;
15
import org.eclipse.swt.layout.FormData;
16
17
18
public class LogoInitializer implements ILayoutSetInitializer {
19
  
20
  public static final String SET_ID 
21
    = "org.eclipse.rap.design.example.business.layoutset.logo";
22
  
23
  public static final String LOGO = "header.logo";
24
  public static final String LOGO_POSITION = "header.logo.position";
25
26
  public LogoInitializer() {
27
  }
28
29
  public void initializeLayoutSet( LayoutSet layoutSet ) {
30
    layoutSet.addImagePath( LOGO, "icons/logo.png" );
31
    
32
    // positions
33
    FormData fdLogo = new FormData();
34
    fdLogo.right = new FormAttachment( 100, -75 );
35
    fdLogo.top = new FormAttachment( 0, 32 );
36
    layoutSet.addPosition( LOGO_POSITION, fdLogo );
37
  }
38
}

Return to bug 281121