Created
September 21, 2012 17:31
-
-
Save bhaak/3762793 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.bhaak; | |
import java.net.URI; | |
import com.amazon.kindle.booklet.AbstractBooklet; | |
import com.amazon.kindle.booklet.BookletContext; | |
import com.amazon.kindle.booklet.ChromeException; | |
import com.amazon.kindle.booklet.ChromeHeaderBar; | |
import com.amazon.kindle.booklet.ChromeHeaderRequest; | |
import com.amazon.kindle.booklet.ChromeSearchBarRequest; | |
import com.amazon.ebook.util.log.Log; | |
public class KindleCustomBooklet extends AbstractBooklet { | |
private static final Log logger = Log.getInstance("KindleCustomBooklet"); | |
public KindleCustomBooklet() { | |
logger.info("KindleCustomBooklet"); | |
} | |
public void start(URI contentURI) { | |
logger.info("start("+contentURI+")"); | |
ChromeHeaderBar chromeHeaderBar; | |
if ((chromeHeaderBar = (ChromeHeaderBar)this.getBookletContext().getService(ChromeHeaderBar.class)) != null) | |
{ | |
chromeHeaderBar.setStyle(this.getBookletContext(), ChromeHeaderBar.Style.TITLE_ONLY); // NO_HEADER, TITLE_ONLY, TITLE_AND_SEARCH | |
} | |
super.start(contentURI); | |
} | |
public void create(BookletContext bookletContext) { | |
logger.info("create("+bookletContext+")"); | |
super.create(bookletContext); | |
} | |
public void destroy() { | |
logger.info("destroy()"); | |
super.destroy(); | |
} | |
public String getName() { | |
logger.info("getName()"); | |
return super.getName(); | |
} | |
public void stop() { | |
logger.info("stop()"); | |
super.stop(); | |
} | |
public ChromeHeaderRequest getChromeHeaderRequest() { | |
logger.info("getChromeHeaderRequest()"); | |
return super.getChromeHeaderRequest(); | |
} | |
public ChromeSearchBarRequest getChromeSearchBarRequest() { | |
logger.info("stop()"); | |
return super.getChromeSearchBarRequest(); | |
} | |
public void setChromeHeaderRequest(ChromeHeaderRequest chromeHeaderRequest) { | |
logger.info("setChromeHeaderRequest("+chromeHeaderRequest+")"); | |
super.setChromeHeaderRequest(chromeHeaderRequest); | |
} | |
public void setChromeSearchBarRequest(ChromeSearchBarRequest chromeSearchBarRequest) { | |
logger.info("setChromeSearchBarRequest("+chromeSearchBarRequest+")"); | |
super.setChromeSearchBarRequest(chromeSearchBarRequest); | |
} | |
public void syncHeaderRequest() throws ChromeException { | |
logger.info("syncHeaderRequest()"); | |
super.syncHeaderRequest(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment