Locked History Actions

Diff for "GWT/CSS"

Differences between revisions 1 and 2
Deletions are marked like this. Additions are marked like this.
Line 17: Line 17:
EntryPoinで以下のように指定する。 EntryPointで以下のように指定する。

CSS

最も簡単なオリジナルCSSの指定方法

適当なcssファイルを作成し(ここではstyle.css)、以下のようなリソースファイルを作成する。

public interface Resources extends ClientBundle {  
  public static final Resources INSTANCE =  GWT.create(Resources.class);
  
  @Source("style.css")
  @CssResource.NotStrict
  CssResource css();
}

EntryPointで以下のように指定する。

public class Something implements EntryPoint {

  private final ClientGinjector ginjector = GWT.create(ClientGinjector.class);

  @Override
  public void onModuleLoad() {    
    Resources.INSTANCE.css().ensureInjected(); 
    
    DelayedBindRegistry.bind(ginjector);
    ginjector.getPlaceManager().revealCurrentPlace();
  }
}