|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.tbeans.navigationbar.html.NavigationBarScrollingElement
public abstract class NavigationBarScrollingElement
The abstract TransformationBean object needed to implement
a navigation scrolling element. Subclasses of this class can be added
to a NavigationBar which is a container of all BaseNavigationBarElement
types. This class renders scrolling actions and requires a model that implements
BaseNavigationInterface
.
The getMessage() method is responsible for setting up the value dictionary on the SimpleTemplate. Subclasses of the class should specify what variables are to be used in the dictionary. The subclass should set the value dictionary and then return the format string from the SimpleTemplate.
By default the gotoField is displayed in the message. When the gotoField is displayed within the message, then the gotoLabel is ignored. If isGotoFieldInMessage is false then the gotoField will be displayed between the arrow images.
The actions must be visible and supported to be displayed by the scrolling element. The isVisible methods are on this class. The isSupported methods are on the model.
The NavigationBarScrollingElement is one of several TransformationBeans that rely on a set of style classes that are used by default when generating the resulting markup language. For more information on style sheets and the default style classes that apply to this TransformationBean, refer to the AppDev Studio Developer Site. You'll find a useful reference document entitled Cascading Style Sheets, Images, and TransformationBeans as well as the TransformationBeans Style Sheet Reference.
The NavigationBarScrollingElement is one of several TransformationBeans that rely on JavaScript to provide some of its functionality. These JavaScript files are including automatically by the tbean. See JavaScriptIncludeHandler for more information about how these files are included and how to customize this behavior. The NavigationBarScrollingElement uses the following JavaScript files:
For More Information:
Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.
Examples for this class may be found on the Examples Site.
Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .
Field Summary |
---|
Fields inherited from interface com.sas.servlet.tbeans.HttpConstants |
---|
ALL, BASELINE, CHAR, COL, COLGROUP, JUSTIFY, MULTIPLE, NONE, ROW, ROWGROUP, SINGLE |
Fields inherited from interface com.sas.servlet.tbeans.navigationbar.html.NavigationBarScrollingElementStyleKeysInterface |
---|
NAVIGATIONBAR_INPUT_STYLE, NAVIGATIONBAR_MESSAGE_STYLE |
Constructor Summary | |
---|---|
NavigationBarScrollingElement()
Creates an instance of the NavigationBarScrollingElement with a null model and a default name. |
|
NavigationBarScrollingElement(BaseNavigationInterface model)
Creates an instance of the NavigationBarScrollingElement with the given model. |
Method Summary | |
---|---|
abstract com.sas.util.SimpleTemplate |
getDefaultMessageTemplate()
Returns the default messageTemplate used to generate the scrolling element's message. |
java.lang.String |
getGotoFieldLabel()
Returns the label used with the goto field when displaying the goto field. |
abstract java.lang.String |
getMessage()
Returns the scrolling message generated by using the SimpleTemplate returned from the getMessageTemplate() method. |
int |
getMessageOrientation()
Returns the current setting for where to display the scrolling element's message in accordance to the scrolling actions. |
com.sas.util.SimpleTemplate |
getMessageTemplate()
Returns the messageTemplate used to generate the scrolling element's message. |
java.util.Map |
getStyleMap()
Returns a Map containing all the style information for this component. |
com.sas.util.SimpleTemplate |
getURLTemplate()
Returns the Viewer's URLTemplate. |
boolean |
isGotoFieldInMessage()
Determines if the gotoField should be displayed within the message or in the default location between the scrolling images. |
abstract void |
setFirstVisible(boolean visible)
Sets if the first action is visible. |
void |
setGotoFieldInMessage(boolean inMessage)
Sets if the gotoField should be displayed within the message or in the default location between the scrolling images. |
void |
setGotoFieldLabel(java.lang.String label)
Sets the label used with the goto field when displaying the goto field. |
abstract void |
setGotoFieldVisible(boolean visible)
Set if the goto action should be displayed. |
void |
setImageVisible(boolean firstVisible,
boolean pageBackwardVisible,
boolean previousVisible,
boolean nextVisible,
boolean pageForwardVisible,
boolean lastVisible)
Convenience method to set visibility of all actions at one time. |
abstract void |
setLastVisible(boolean visible)
Sets if the last action is visible. |
void |
setMessageOrientation(int orientation)
Sets the position for where to display the scrolling element's message in accordance to the scrolling actions. |
void |
setMessageTemplate(com.sas.util.SimpleTemplate template)
Sets the messageTemplate that the getMessage() method uses to generate this element's message. |
abstract void |
setNextVisible(boolean visible)
Sets if the next action is visible. |
abstract void |
setPageBackwardVisible(boolean visible)
Sets if the pageBackward action is visible. |
abstract void |
setPageForwardVisible(boolean visible)
Sets if the pageForward action is visible. |
abstract void |
setPreviousVisible(boolean visible)
Sets if the previous action is visible. |
void |
writeBackwardScrollers(java.io.OutputStream out)
Generates the HTML visual representation of the scrolling actions that scroll backward and can be obtained from the ActionProvider. |
abstract void |
writeBackwardScrollers(java.io.PrintWriter out)
Generates the HTML visual representation of the scrolling actions that scroll backward and can be obtained from the ActionProvider. |
void |
writeBackwardScrollers(java.io.Writer out)
Generates the HTML visual representation of the scrolling actions that scroll backward and can be obtained from the ActionProvider. |
protected void |
writeContent(java.io.PrintWriter out)
Formats and writes the contents of the navigationbar element. |
void |
writeForwardScrollers(java.io.OutputStream out)
Generates the HTML visual representation of the scrolling actions that scroll forward and can be obtained from the ActionProvider. |
abstract void |
writeForwardScrollers(java.io.PrintWriter out)
Generates the HTML visual representation of the scrolling actions that scroll forward and can be obtained from the ActionProvider. |
void |
writeForwardScrollers(java.io.Writer out)
Generates the HTML visual representation of the scrolling actions that scroll forward and can be obtained from the ActionProvider. |
void |
writeGotoField(java.io.OutputStream out)
Generates the HTML visual representation of the gotoField action that can be obtained from the ActionProvider. |
abstract void |
writeGotoField(java.io.PrintWriter out)
Generates the HTML visual representation of the gotoField action that can be obtained from the ActionProvider. |
void |
writeGotoField(java.io.Writer out)
Generates the HTML visual representation of the gotoField action that can be obtained from the ActionProvider. |
void |
writeMessage(java.io.OutputStream out)
Formats and writes the contents of the navigationbar element's message. |
abstract void |
writeMessage(java.io.PrintWriter out)
Formats and writes the contents of the navigationbar element's message. |
void |
writeMessage(java.io.Writer out)
Formats and writes the contents of the navigationbar element's message. |
Methods inherited from class com.sas.servlet.tbeans.navigationbar.BaseNavigationBarElement |
---|
getModel, setModel |
Methods inherited from class com.sas.servlet.tbeans.BaseActionTransformation |
---|
dispose, getActionProvider, getActionSupportType, getUniqueId, isActionVisible, listActionTypes, listAreaTypes, setActionProvider, setActionSupportType, setActionVisible, setUniqueId |
Methods inherited from interface com.sas.servlet.tbeans.TransformationInterface |
---|
getCustomAttributes, getDescription, getId, getLocale, getName, getRequest, getResponse, getTagEpilog, getTagProlog, isVisible, setCustomAttributes, setDescription, setId, setLocale, setName, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, write, write, write |
Methods inherited from interface com.sas.actionprovider.HttpActionProviderViewInterface |
---|
getRequest, setRequest |
Constructor Detail |
---|
public NavigationBarScrollingElement()
public NavigationBarScrollingElement(BaseNavigationInterface model)
model
- the model for the scrolling elementMethod Detail |
---|
public int getMessageOrientation()
public void setMessageOrientation(int orientation)
orientation
- the orientation of the message
java.lang.IllegalArgumentException
- if orientation is invalidpublic com.sas.util.SimpleTemplate getMessageTemplate()
SimpleTemplate
,
getDefaultMessageTemplate()
,
getMessage()
public abstract com.sas.util.SimpleTemplate getDefaultMessageTemplate()
SimpleTemplate
,
getMessageTemplate()
,
getMessage()
public void setMessageTemplate(com.sas.util.SimpleTemplate template)
Sets the messageTemplate that the getMessage() method uses to generate this element's message.
For example, if using the NavigationBarRowScrollingElement, to have the getMessage() method generate a message of the form:
Rows 1 - 10 of 100
You would set a template like the following:
Rows %STARTROW - %ENDROW of %ROWCOUNT
The getMessage() method is responsible for setting up the dictionary on the SimpleTemplate. Subclasses of the class should specify what variables are to be used in the dictionary.
If isGotoFieldInMessage is true, then the gotoField will be used as the substitute value for %STARTROW.
template
- the template used to generatate the scrolling element's message.SimpleTemplate
,
getMessage()
,
isGotoFieldInMessage()
public abstract java.lang.String getMessage()
Returns the scrolling message generated by using the SimpleTemplate returned from the getMessageTemplate() method.
The getMessage() method is responsible for setting up the value dictionary on the SimpleTemplate. Subclasses of the class should specify what variables are to be used in the dictionary. The subclass should set the value dictionary and then return the format string from the SimpleTemplate.
If isGotoFieldInMessage is true, then the gotoField will be used as the substitute value for %STARTROW.
java.lang.NullPointerException
- if the model is not setgetMessageTemplate()
,
setMessageTemplate(com.sas.util.SimpleTemplate)
,
isGotoFieldInMessage()
,
SimpleTemplate
public abstract void setGotoFieldVisible(boolean visible)
visible
- true if goto action should be displayedpublic java.lang.String getGotoFieldLabel()
public void setGotoFieldLabel(java.lang.String label)
label
- the label for the goto fieldpublic boolean isGotoFieldInMessage()
setGotoFieldInMessage(boolean)
,
getMessage()
public void setGotoFieldInMessage(boolean inMessage)
inMessage
- true if the gotoField should be diplayed within the messageisGotoFieldInMessage()
,
getMessage()
public abstract void setFirstVisible(boolean visible)
visible
- true if the first action should be visiblepublic abstract void setPageBackwardVisible(boolean visible)
visible
- true if the pageBackward action should be visiblepublic abstract void setPreviousVisible(boolean visible)
visible
- true if the previous action should be visiblepublic abstract void setNextVisible(boolean visible)
visible
- true if the next action should be visiblepublic abstract void setPageForwardVisible(boolean visible)
visible
- true if the pageForward action should be visiblepublic abstract void setLastVisible(boolean visible)
visible
- true if the last action should be visiblepublic void setImageVisible(boolean firstVisible, boolean pageBackwardVisible, boolean previousVisible, boolean nextVisible, boolean pageForwardVisible, boolean lastVisible)
firstVisible
- true if first action should be visiblepageBackwardVisible
- true if pageBackward action should be visiblepreviousVisible
- true if previous action should be visiblenextVisible
- true if next action should be visiblepageForwardVisible
- true if pageForward action should be visiblelastVisible
- true if last action should be visibleprotected void writeContent(java.io.PrintWriter out) throws java.io.IOException
Formats and writes the contents of the navigationbar element. This method calls the writeBackwardScrollers, writeForwardScrollers, writeGotoField and writeMessage methods. It generates an HTML table that contains the supported and visible actions. It also aligns the element's message in the appropriate position based on getMessageOrientation().
This method calls the cleanUpResources method at the end to reset
the request
and response
back to null.
writeContent
in class com.sas.servlet.tbeans.BaseActionTransformation2
out
- the output stream
java.io.IOException
- Thrown if some type of I/O error occurswriteBackwardScrollers(java.io.OutputStream)
,
writeGotoField(java.io.OutputStream)
,
writeMessage(java.io.OutputStream)
,
writeForwardScrollers(java.io.OutputStream)
,
getMessageOrientation()
public void writeMessage(java.io.OutputStream out) throws java.io.IOException
out
- the output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeMessage(java.io.Writer out) throws java.io.IOException
out
- the output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic abstract void writeMessage(java.io.PrintWriter out) throws java.io.IOException
out
- the output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeBackwardScrollers(java.io.OutputStream out) throws java.io.IOException
out
- the output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeBackwardScrollers(java.io.Writer out) throws java.io.IOException
out
- the output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic abstract void writeBackwardScrollers(java.io.PrintWriter out) throws java.io.IOException
out
- the output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeForwardScrollers(java.io.OutputStream out) throws java.io.IOException
out
- the output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeForwardScrollers(java.io.Writer out) throws java.io.IOException
out
- the output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic abstract void writeForwardScrollers(java.io.PrintWriter out) throws java.io.IOException
out
- the output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeGotoField(java.io.OutputStream out) throws java.io.IOException
out
- the output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeGotoField(java.io.Writer out) throws java.io.IOException
out
- the output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic abstract void writeGotoField(java.io.PrintWriter out) throws java.io.IOException
out
- the output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic com.sas.util.SimpleTemplate getURLTemplate()
getURLTemplate
in interface URLTemplateViewInterface
getURLTemplate
in class com.sas.servlet.tbeans.BaseActionTransformation2
BaseActionTransformation2.setURLTemplate(com.sas.util.SimpleTemplate)
public java.util.Map getStyleMap()
getStyleMap
in interface ComplexStyleInterface
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |