public abstract class DropDownButton extends org.apache.wicket.markup.html.link.AbstractLink implements Invertible<DropDownButton>, Activatable
| Constructor and Description |
|---|
DropDownButton(String id,
org.apache.wicket.model.IModel<String> model)
Construct.
|
DropDownButton(String markupId,
org.apache.wicket.model.IModel<String> model,
org.apache.wicket.model.IModel<IconType> iconTypeModel)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addButtonBehavior(org.apache.wicket.model.IModel<Buttons.Type> buttonType,
org.apache.wicket.model.IModel<Buttons.Size> buttonSize)
adds the button behavior to the base button of this dropdown component
|
protected void |
addIconToBaseButton(Icon icon)
adds an icon to the base button
|
DropDownButton |
addToButton(org.apache.wicket.behavior.Behavior behavior)
adds a
Behavior to the base button |
void |
appendToggleMenuScript(org.apache.wicket.ajax.AjaxRequestTarget target)
appends a toggle menu script to a given
AjaxRequestTarget. |
protected String |
createCssClassName() |
org.apache.wicket.Component |
getBaseButton()
Deprecated.
|
boolean |
isActive(org.apache.wicket.Component item)
Decides whether the current instance (
this) is the active item. |
protected org.apache.wicket.markup.html.WebMarkupContainer |
newButton(String markupId,
org.apache.wicket.model.IModel<String> labelModel,
org.apache.wicket.model.IModel<IconType> iconTypeModel)
creates a new button instance
|
protected Icon |
newButtonIcon(String markupId,
org.apache.wicket.model.IModel<IconType> iconTypeModel)
creates a new icon component with given
IconType. |
protected org.apache.wicket.Component |
newButtonLabel(String markupId,
org.apache.wicket.model.IModel<?> labelModel)
creates a new icon component with given
IconType. |
protected String |
newInitializerScript() |
protected org.apache.wicket.markup.html.panel.IMarkupSourcingStrategy |
newMarkupSourcingStrategy() |
protected abstract List<org.apache.wicket.markup.html.link.AbstractLink> |
newSubMenuButtons(String buttonMarkupId)
creates a list of sub menu buttons which will be shown if sub menu will be opened.
|
protected void |
onComponentTag(org.apache.wicket.markup.ComponentTag tag) |
void |
renderHead(org.apache.wicket.markup.head.IHeaderResponse response) |
DropDownButton |
setDropUp(boolean dropUp)
whether to use default dropdown behavior (default value is false which means default behavior)
or to open the dropdown menu at the top of dropdown button, also the button icon will be rotated.
|
DropDownButton |
setIconType(IconType iconType)
sets the icon of the base button element
|
DropDownButton |
setInverted(boolean inverted)
inverts the ui state of a component.
|
DropDownButton |
setSize(Buttons.Size size)
sets the size of the button
|
DropDownButton |
setType(Buttons.Type type)
sets the type of the button
|
disableLink, getAfterDisabledLink, getBeforeDisabledLink, getBody, isLinkEnabled, onBeforeRender, onComponentTagBody, onDetach, setAfterDisabledLink, setBeforeDisabledLink, setBodygetWebPage, getWebRequest, getWebResponse, getWebSessionadd, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildrenadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onConfigure, onEvent, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrappublic DropDownButton(String id, org.apache.wicket.model.IModel<String> model)
id - The markup idmodel - The label of the main buttonprotected String createCssClassName()
protected void addIconToBaseButton(Icon icon)
icon - The icon to addpublic final DropDownButton addToButton(org.apache.wicket.behavior.Behavior behavior)
Behavior to the base buttonbehavior - to addprotected String newInitializerScript()
public final void appendToggleMenuScript(org.apache.wicket.ajax.AjaxRequestTarget target)
AjaxRequestTarget.target - the current targetpublic final DropDownButton setIconType(IconType iconType)
iconType - The IconType of the iconprotected org.apache.wicket.markup.html.WebMarkupContainer newButton(String markupId, org.apache.wicket.model.IModel<String> labelModel, org.apache.wicket.model.IModel<IconType> iconTypeModel)
markupId - The component's idlabelModel - The label text as modeliconTypeModel - The icon type as modelprotected org.apache.wicket.Component newButtonLabel(String markupId, org.apache.wicket.model.IModel<?> labelModel)
IconType.markupId - The component' idlabelModel - The label text as modelprotected Icon newButtonIcon(String markupId, org.apache.wicket.model.IModel<IconType> iconTypeModel)
IconType.markupId - The component' idiconTypeModel - The icon type as modelpublic void renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
renderHead in interface org.apache.wicket.markup.html.IHeaderContributorrenderHead in class org.apache.wicket.Componentprotected void addButtonBehavior(org.apache.wicket.model.IModel<Buttons.Type> buttonType, org.apache.wicket.model.IModel<Buttons.Size> buttonSize)
buttonType - mandatory parameterbuttonSize - mandatory parameterprotected abstract List<org.apache.wicket.markup.html.link.AbstractLink> newSubMenuButtons(String buttonMarkupId)
buttonMarkupId - the markup id that all sub menu buttons must be use.public DropDownButton setDropUp(boolean dropUp)
dropUp - true, to use a 180deg rotated button and open menu on toppublic DropDownButton setSize(Buttons.Size size)
size - mandatory parameterpublic DropDownButton setType(Buttons.Type type)
type - mandatory parameterprotected final org.apache.wicket.markup.html.panel.IMarkupSourcingStrategy newMarkupSourcingStrategy()
newMarkupSourcingStrategy in class org.apache.wicket.Componentprotected void onComponentTag(org.apache.wicket.markup.ComponentTag tag)
onComponentTag in class org.apache.wicket.Componentpublic DropDownButton setInverted(boolean inverted)
InvertiblesetInverted in interface Invertible<DropDownButton>inverted - true, if inverted version should be usedpublic boolean isActive(org.apache.wicket.Component item)
Activatablethis) is the active item.isActive in interface Activatableitem - the current instance as a Componenttrue if the item is the current active one@Deprecated public final org.apache.wicket.Component getBaseButton()
Copyright © 2013 agilecoders.de. All Rights Reserved.