|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.clients.web.extensions.AbstractJspFactory net.sf.basedb.clients.web.extensions.AbstractJspActionFactory<ButtonAction> net.sf.basedb.clients.web.extensions.toolbar.FixedButtonFactory
public class FixedButtonFactory
A simple implementation of a toolbar button action factory that creates the same fixed button for all users not using any context information.
The button is by default both visible and enabled. Use the setter
method to change the properties. Changes to the properties are immediately
visible in the menu items returned from the getActions(InvokationContext)
method.
If the extension point supports scripts and stylesheets, use the
AbstractJspFactory.setScript(String)
and AbstractJspFactory.setStylesheet(String)
methods.
Each call to these methods will add the argument to a set. Use
the AbstractJspFactory.getScripts()
and AbstractJspFactory.getStylesheets()
methods to gain
access to the sets, for example, to remove added items.
Field Summary | |
---|---|
private ButtonAction[] |
actions
|
private String |
clazz
|
private boolean |
enabled
|
private String |
icon
|
private String |
id
|
private String |
onClick
|
private String |
style
|
private String |
title
|
private String |
tooltip
|
private boolean |
visible
|
Constructor Summary | |
---|---|
FixedButtonFactory()
Create a new factory instance. |
Method Summary | |
---|---|
ButtonAction[] |
getActions(InvokationContext context)
This method may be called one or several times for each request. |
String |
getClazz()
Class attribute of the main button tag. |
String |
getIcon()
Get a reference to an image that will be displayed in the menu. |
String |
getId()
ID attribute of the main button tag. |
String |
getOnClick()
A javascript action that is executed when the user clicks on the button. |
String |
getStyle()
Extra CSS style attributes that will be added to the style attribute of the main button tag. |
String |
getTitle()
Get the title of the button. |
String |
getTooltip()
A tooltip that is shown as a yellow popup when the user points the mouse at the button. |
boolean |
isEnabled()
If the button should be enabled or disabled. |
boolean |
isVisible()
If the button should be visible or not. |
void |
setClazz(String clazz)
|
void |
setEnabled(boolean enabled)
|
void |
setEnabled(String enabled)
|
void |
setIcon(String icon)
|
void |
setId(String id)
|
void |
setOnClick(String onClick)
|
void |
setStyle(String style)
|
void |
setTitle(String title)
|
void |
setTooltip(String tooltip)
|
void |
setVisible(boolean visible)
|
void |
setVisible(String visible)
|
Methods inherited from class net.sf.basedb.clients.web.extensions.AbstractJspActionFactory |
---|
prepareContext |
Methods inherited from class net.sf.basedb.clients.web.extensions.AbstractJspFactory |
---|
getScripts, getStylesheets, prepareContext, setScript, setStylesheet |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private ButtonAction[] actions
private String id
private String clazz
private String icon
private String onClick
private String style
private String title
private String tooltip
private boolean enabled
private boolean visible
Constructor Detail |
---|
public FixedButtonFactory()
Method Detail |
---|
public ButtonAction[] getActions(InvokationContext context)
ActionFactory
getActions
in interface ActionFactory<ButtonAction>
context
- The current invokation context
public String getClazz()
ButtonAction
getClazz
in interface ButtonAction
public String getId()
ButtonAction
getId
in interface ButtonAction
public String getIcon()
ButtonAction
getIcon
in interface ButtonAction
public String getOnClick()
ButtonAction
getOnClick
in interface ButtonAction
public String getStyle()
ButtonAction
style
attribute of the main button tag.
getStyle
in interface ButtonAction
public String getTitle()
ButtonAction
getTitle
in interface ButtonAction
public String getTooltip()
ButtonAction
getTooltip
in interface ButtonAction
public boolean isEnabled()
ButtonAction
isEnabled
in interface ButtonAction
public boolean isVisible()
ButtonAction
isVisible
in interface ButtonAction
public void setClazz(String clazz)
@VariableSetter @PathSetter public void setIcon(String icon)
public void setId(String id)
@VariableSetter public void setOnClick(String onClick)
public void setStyle(String style)
public void setTitle(String title)
public void setTooltip(String tooltip)
public void setEnabled(boolean enabled)
public void setEnabled(String enabled)
public void setVisible(boolean visible)
public void setVisible(String visible)
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |