|
NextApp Echo App Container 1.1.4 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnextapp.echoservlet.ui.ButtonRenderer
A utility class for rendering Button, RadioButton,
CheckBox, and CButton components.
| Field Summary | |
private java.lang.String |
borderTdStyleName
Name of style applied to border TD element (used for CButton renderings). |
private nextapp.echo.AbstractButton |
button
The underlying AbstractButton component being rendered. |
private AbstractButtonUI |
buttonUI
The AbstractButtonUI being rendered. |
private Renderable |
iconRenderable
Icon HTML code. |
private int |
nextRolloverSubIdValue
Counter indicating the next 'sub id' available to identify an HTML element that will take part in the rollover effect. |
private RenderingContext |
rc
The RenderingContext being used for this rendering. |
private Element |
rootElement
The root of the rendered HTML Element hierarchy. |
private java.lang.String |
rootStyleName
Name of style of root element. |
static Service |
SERVICE_BUTTON_SCRIPT
|
private Renderable |
stateRenderable
State icon HTML code. |
private Renderable |
textRenderable
Text HTML code. |
| Constructor Summary | |
private |
ButtonRenderer(RenderingContext rc,
AbstractButtonUI buttonUI)
Creates a ButtonRenderer for the given Button. |
| Method Summary | |
private static void |
addAlignmentSettings(Element tdElement,
int horizontalAlignment,
int verticalAlignment)
Adds alignment (text-align/vertical-align) properties to a TD element. |
private static void |
addBorderStyleSetting(ComponentStyle style,
int borderStyle)
Adds border-style property to a
ComponentSyle. |
private Element |
createCButtonBorderElement(Renderable innerRenderable)
Creates and returns border element for CButton. |
private Renderable |
createContainerRenderable()
Creates and returns a Renderable that contains the icon,
state, and text renderables of the button. |
private Renderable |
createIconRenderable()
Creates and returns an Renderable representing the
icon part of the button. |
private void |
createMainRenderables()
Creates the main (text/icon/state) renderable components that will make up the button. |
private void |
createPressEvents()
Adds mouse up/down event code to rootElement to create
button-press effects when mouse is depressed on button. |
private void |
createRolloverEvents()
Adds mouse over/out event code to rootElement to create
button-press effects when mouse is depressed on button. |
private Renderable |
createStateRenderable(Element iconImgElement)
Creates and returns an Renderable representing the
state part of the button. |
private java.lang.String |
createTablePressedCssStyle()
Creates CSS style for pressed state of CButton
which should be applied to all rendered TABLE
elements via a rollover effect when button is pressed on client. |
private java.lang.String |
createTableRolloverCssStyle()
Creates CSS style for rollover state of button which should be applied to all rendered TABLE
elements via a rollover effect when button is rolled over on client. |
private java.lang.String |
createTdPressedCssStyle()
Creates CSS style for pressed state of CButton
which should be applied to the border TD
element via a rollover effect when button is pressed on client. |
private java.lang.String |
createTdRolloverCssStyle()
Creates CSS style for rolled over state of CButton
which should be applied to the border TD
element via a rollover effect when button is rolled over on client. |
private Renderable |
createTextRenderable()
Creates and returns an Renderable representing the
text part of the button. |
private java.lang.String |
getBorderTableCellId()
Returns the element id of the border table cell's TD. |
static Element |
getElement(RenderingContext rc,
AbstractButtonUI buttonUI)
Returns an Element containing an HTML representation of the provided button. |
private java.lang.String |
getNextRolloverElementId()
Returns the next sequential id available to assign to an elemnet participating in the rollover effect. |
private Element |
getRoot()
Returns the rendered root element. |
private void |
modifyCButtonBorderTableStyle(ComponentStyle borderTableStyle)
Modifies style of border table to take into account properties of CButton. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final Service SERVICE_BUTTON_SCRIPT
private Element rootElement
Element hierarchy.
private RenderingContext rc
RenderingContext being used for this rendering.
private AbstractButtonUI buttonUI
AbstractButtonUI being rendered.
private nextapp.echo.AbstractButton button
AbstractButton component being rendered.
private Renderable textRenderable
private Renderable iconRenderable
private Renderable stateRenderable
private int nextRolloverSubIdValue
private java.lang.String rootStyleName
private java.lang.String borderTdStyleName
| Constructor Detail |
private ButtonRenderer(RenderingContext rc,
AbstractButtonUI buttonUI)
rc - The RenderingContext that is rendering the
button.buttonUI - The peer of the button to be rendered.| Method Detail |
private static void addAlignmentSettings(Element tdElement,
int horizontalAlignment,
int verticalAlignment)
tdElement - The TD element to which the properties are to be added.horizontalAlignment - The horizontal alignment setting desired
for the style, one of the following value:
verticalAlignment - The vertical alignment setting desired
for the style, one of the following value:
private static void addBorderStyleSetting(ComponentStyle style,
int borderStyle)
border-style property to a
ComponentSyle.
style - The ComponentStyle to modify.borderStyle - The border style constant value, one of the
following values:
CButton.BORDER_SOLID
CButton.BORDER_INSET
CButton.BORDER_OUTSET
CButton.BORDER_NONE
public static Element getElement(RenderingContext rc,
AbstractButtonUI buttonUI)
rc - The RenderingContext that is rendering the
button.buttonUI - The peer of the button to be rendered.
private Renderable createContainerRenderable()
Renderable that contains the icon,
state, and text renderables of the button.
Renderable that contains the icon,
state, and text renderables of the button.private void modifyCButtonBorderTableStyle(ComponentStyle borderTableStyle)
CButton.
borderTableStyle - The ComponentStyle to modify.private Element createCButtonBorderElement(Renderable innerRenderable)
innerRenderable - button contents.
Element containing contents of button.private Renderable createIconRenderable()
Renderable representing the
icon part of the button.
Renderable.private void createMainRenderables()
textRenderable, iconRenderable, and
stateRenderable.
private Renderable createStateRenderable(Element iconImgElement)
Renderable representing the
state part of the button.
Renderable.private Renderable createTextRenderable()
Renderable representing the
text part of the button.
Renderable.private java.lang.String createTablePressedCssStyle()
CButton
which should be applied to all rendered TABLE
elements via a rollover effect when button is pressed on client.
private java.lang.String createTdPressedCssStyle()
CButton
which should be applied to the border TD
element via a rollover effect when button is pressed on client.
private void createPressEvents()
rootElement to create
button-press effects when mouse is depressed on button.
private java.lang.String createTableRolloverCssStyle()
TABLE
elements via a rollover effect when button is rolled over on client.
private java.lang.String createTdRolloverCssStyle()
CButton
which should be applied to the border TD
element via a rollover effect when button is rolled over on client.
private void createRolloverEvents()
rootElement to create
button-press effects when mouse is depressed on button.
private java.lang.String getBorderTableCellId()
private java.lang.String getNextRolloverElementId()
private Element getRoot()
|
NextApp Echo App Container 1.1.4 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||