org.wicketstuff.eidogo
Class Eidogo

java.lang.Object
  extended by org.apache.wicket.Component
      extended by org.apache.wicket.markup.html.WebComponent
          extended by org.wicketstuff.eidogo.Eidogo
All Implemented Interfaces:
Serializable, org.apache.wicket.IClusterable, org.apache.wicket.IConverterLocator, org.apache.wicket.markup.html.IHeaderContributor

public class Eidogo
extends org.apache.wicket.markup.html.WebComponent
implements org.apache.wicket.markup.html.IHeaderContributor

Component to render a EidoGo Player

Page.html :

 <div wicket:id="eidogo">[[EidoGo player here]]</div>
 
Nota : the markup MUST be <div>.

Page.java :

 public class Page extends WebPage {
        public Page() {
                add(new Eidogo("eidogo"));
        }
 }
 

Source : http://eidogo.com/source

Author:
Isammoc
See Also:
Serialized Form

Nested Class Summary
static class Eidogo.Mode
          Mode of the player.
static class Eidogo.Theme
          Possible theme.
 
Nested classes/interfaces inherited from class org.apache.wicket.Component
org.apache.wicket.Component.ComponentModelChange, org.apache.wicket.Component.EnabledChange, org.apache.wicket.Component.IVisitor<T extends org.apache.wicket.Component>, org.apache.wicket.Component.VisibilityChange
 
Field Summary
 
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_CONFIGURED, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER
 
Constructor Summary
Eidogo(String id)
          Minimalist constructor.
Eidogo(String id, String sgfUrl)
          Constructor with URL to the SGF file.
 
Method Summary
 boolean isEnableShortcuts()
           
 boolean isMarkCurrent()
           
 boolean isMarkNext()
           
 boolean isMarkVariation()
           
 boolean isProblemMode()
           
 boolean isShowComments()
           
 boolean isShowGameInfo()
           
 boolean isShowOtions()
           
 boolean isShowPlayerInfo()
           
 boolean isShowTools()
           
protected  void onComponentTag(org.apache.wicket.markup.ComponentTag tag)
          Checks that component tag is a <div> and adds a markup id.
 void onComponentTagBody(org.apache.wicket.markup.MarkupStream markupStream, org.apache.wicket.markup.ComponentTag openTag)
          Renders a javascript component to create the player.
 void renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
          Renders links to the needed javascript and the CSS in the head of response.
 void setEnableShortcuts(boolean enableShortcuts)
          Enable or disable the keyboard shortcuts.
 void setMarkCurrent(boolean markCurrent)
          Set the visibility of the mark on the last played stone.
 void setMarkNext(boolean markNext)
          Enable or disable the mark on the position of the next move.
 void setMarkVariation(boolean markVariation)
          Enable or disable the mark on variation positions.
 void setProblemMode(boolean problemMode)
          Enable or disable problem mode
 void setShowComments(boolean showComments)
          Set the visibility of the comments.
 void setShowGameInfo(boolean showGameInfo)
          Set the visibility of game information.
 void setShowOtions(boolean showOtions)
          Set the visibility of the options.
 void setShowPlayerInfo(boolean showPlayerInfo)
          Set the visibility of players information.
 void setShowTools(boolean showTools)
          Set the visibility of the tools.
 
Methods inherited from class org.apache.wicket.markup.html.WebComponent
onRender
 
Methods inherited from class org.apache.wicket.Component
add, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachBehaviors, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviors, getBehaviors, getBehaviorsRawList, getClassRelativePath, getComponentBorder, getConverter, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdImpl, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalAttach, internalDetach, internalOnAttach, internalOnDetach, internalOnModelChanged, isActionAuthorized, isAncestorOf, isAttached, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markAttached, markRendering, modelChanged, modelChanging, onAfterRender, onAttach, onBeforeRender, onBeginRequest, onConfigure, onDetach, onEndRequest, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, setAuto, setComponentBorder, setDefaultModel, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMarkupId, setMarkupIdImpl, setMarkupStream, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, toString, toString, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Eidogo

public Eidogo(String id)
Minimalist constructor.

Parameters:
id - Wicket ID of the component

Eidogo

public Eidogo(String id,
              String sgfUrl)
Constructor with URL to the SGF file.

Parameters:
id - Wicket ID of the component
sgfUrl - URL to the SGF file
Method Detail

renderHead

public void renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
Renders links to the needed javascript and the CSS in the head of response.

Specified by:
renderHead in interface org.apache.wicket.markup.html.IHeaderContributor
Parameters:
response - The header response to contribute to.

onComponentTag

protected void onComponentTag(org.apache.wicket.markup.ComponentTag tag)
Checks that component tag is a <div> and adds a markup id.

Overrides:
onComponentTag in class org.apache.wicket.Component

onComponentTagBody

public void onComponentTagBody(org.apache.wicket.markup.MarkupStream markupStream,
                               org.apache.wicket.markup.ComponentTag openTag)
Renders a javascript component to create the player.

Overrides:
onComponentTagBody in class org.apache.wicket.Component

isShowComments

public boolean isShowComments()
Returns:
true if comments must be shown, false otherwise.

setShowComments

public void setShowComments(boolean showComments)
Set the visibility of the comments.

Parameters:
showComments - true if comments must be shown, false otherwise.

isShowPlayerInfo

public boolean isShowPlayerInfo()
Returns:
true if players information must be shown, false otherwise

setShowPlayerInfo

public void setShowPlayerInfo(boolean showPlayerInfo)
Set the visibility of players information.

Parameters:
showPlayerInfo - true if players information must be shown, false otherwise

isShowGameInfo

public boolean isShowGameInfo()
Returns:
true if game information must be shown, false otherwise

setShowGameInfo

public void setShowGameInfo(boolean showGameInfo)
Set the visibility of game information.

Parameters:
showGameInfo - true if game information must be shown, false otherwise

isShowTools

public boolean isShowTools()
Returns:
true if tools must be shown, false otherwise

setShowTools

public void setShowTools(boolean showTools)
Set the visibility of the tools.

Parameters:
showTools - true if tools must be shown, false otherwise

isShowOtions

public boolean isShowOtions()
Returns:
true if options must be shown, false otherwise

setShowOtions

public void setShowOtions(boolean showOtions)
Set the visibility of the options.

Parameters:
showOtions - true if options must be shown, false otherwise

isMarkCurrent

public boolean isMarkCurrent()
Returns:
true if current stone must be marked, false otherwise

setMarkCurrent

public void setMarkCurrent(boolean markCurrent)
Set the visibility of the mark on the last played stone.

Parameters:
markCurrent - true if current stone must be marked, false otherwise

isMarkVariation

public boolean isMarkVariation()
Returns:
true if variation positions must be marked, false otherwise

setMarkVariation

public void setMarkVariation(boolean markVariation)
Enable or disable the mark on variation positions.

Parameters:
markVariation - true if variation positions must be marked, false otherwise

isMarkNext

public boolean isMarkNext()
Returns:
true if the next position must be marked, false otherwise

setMarkNext

public void setMarkNext(boolean markNext)
Enable or disable the mark on the position of the next move.

Parameters:
markNext - true if the next position must be marked, false otherwise

isEnableShortcuts

public boolean isEnableShortcuts()
Returns:
true if shortcuts are enabled, false otherwise

setEnableShortcuts

public void setEnableShortcuts(boolean enableShortcuts)
Enable or disable the keyboard shortcuts.

Parameters:
enableShortcuts - true if shortcuts are enabled, false otherwise

isProblemMode

public boolean isProblemMode()
Returns:
true if eidogo player is in problem mode, false otherwise

setProblemMode

public void setProblemMode(boolean problemMode)
Enable or disable problem mode

Parameters:
problemMode - true if eidogo player is in problem mode, false otherwise


Copyright © 2011. All Rights Reserved.