|
Servoy 5.x Public API | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.servoy.j2db.server.headlessclient.dataui.ChangesRecorder
public class ChangesRecorder
This class records the changes for wicket components/beans in ajax mode.
It has a setChanged() method for marking the component for render and helper methods for generating the right css properties like location and font
when calling setChanged() on it the component will be re rendered the next time a (ajax) request comes in
This can be the ajax polling behavior that every page of a servoy application has if ajax mode is enabled.
setRendered() when the component is rendered again
else it will be re rendered for every coming request. This can be done by calling setRendered() from the Component.onAfterRender()
that the wicket component needs to override.
the helper methods should be called from javascript methods so that changes done by javascript are reflected in the browser.
| Constructor Summary | |
|---|---|
ChangesRecorder()
default constructor if the component doesnt have default border or padding. |
|
ChangesRecorder(Insets defaultBorder,
Insets defaultPadding)
use this constructor if the component for which this change recorder is made has a default border or padding in the browser. |
|
| Method Summary | |
|---|---|
Dimension |
calculateWebSize(int width,
int height,
Border border,
Insets margin,
int fontSize,
Properties properties)
|
Dimension |
calculateWebSize(int width,
int height,
Border border,
Insets margin,
int fontSize,
Properties properties,
int valign)
|
Properties |
getChanges()
|
Insets |
getPaddingAndBorder(int height,
Border border,
Insets margin,
int fontSize,
Properties properties)
|
Insets |
getPaddingAndBorder(int height,
Border border,
Insets margin,
int fontSize,
Properties properties,
int valign)
|
boolean |
isChanged()
Returns true if this change recorder is changed and its component will be rendered the next time. |
boolean |
isValueChanged()
returns true if its component model object is changed |
void |
setBgcolor(String bgcolor)
Adds the background-color css property for the given color to the changed properties set. |
void |
setBorder(String border)
Adds the border css property for the given color to the changed properties set. |
void |
setChanged()
Set the change flag to true so that the component will be rendered the next time. |
void |
setChanges(Properties changes)
Adds all the css properties to the changed set and calls setChanged() |
void |
setFgcolor(String clr)
Adds the color css property for the given color to the changed properties set. |
void |
setFont(String spec)
|
void |
setLocation(int x,
int y)
Sets the x,y location css properties to the changed set. |
void |
setRendered()
Call this method from the Component.onBeforeRender() call te let the change recorder know it has been rendered. |
void |
setSize(int width,
int height,
Border border,
Insets margin,
int fontSize)
|
void |
setSize(int width,
int height,
Border border,
Insets margin,
int fontSize,
int valign)
|
void |
setTransparent(boolean transparent)
Sets the background-color css property to transparent if the boolean is true, if false then it test if it has to set the bgcolor or remove the background-color property |
void |
setValueChanged()
sets the value changed to true so that servoy knows that it is the value object that is changed. |
void |
setVisible(boolean visible)
|
void |
testChanged(org.apache.wicket.Component component,
Object value)
Helper method to see if the value is changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChangesRecorder()
public ChangesRecorder(Insets defaultBorder,
Insets defaultPadding)
defaultBorder - defaultPadding - | Method Detail |
|---|
public Dimension calculateWebSize(int width,
int height,
Border border,
Insets margin,
int fontSize,
Properties properties)
public Dimension calculateWebSize(int width,
int height,
Border border,
Insets margin,
int fontSize,
Properties properties,
int valign)
public Properties getChanges()
getChanges in interface IStylePropertyChanges
public Insets getPaddingAndBorder(int height,
Border border,
Insets margin,
int fontSize,
Properties properties)
public Insets getPaddingAndBorder(int height,
Border border,
Insets margin,
int fontSize,
Properties properties,
int valign)
height - border - margin - fontSize - properties -
public boolean isChanged()
isChanged in interface IStylePropertyChangesIStylePropertyChanges.isChanged()public boolean isValueChanged()
isValueChanged in interface IStylePropertyChangesIStylePropertyChanges.isValueChanged()public void setBgcolor(String bgcolor)
bgcolor - public void setBorder(String border)
border - public void setChanged()
setChanged in interface IStylePropertyChangespublic void setChanges(Properties changes)
setChanges in interface IStylePropertyChangeschanges - public void setFgcolor(String clr)
clr - public void setFont(String spec)
spec -
public void setLocation(int x,
int y)
x - y - public void setRendered()
Component.onBeforeRender() call te let the change recorder know it has been rendered.
setRendered in interface IStylePropertyChanges
public void setSize(int width,
int height,
Border border,
Insets margin,
int fontSize)
width - height -
public void setSize(int width,
int height,
Border border,
Insets margin,
int fontSize,
int valign)
public void setTransparent(boolean transparent)
transparent - public void setValueChanged()
setValueChanged in interface IStylePropertyChangesIStylePropertyChanges.setValueChanged()public void setVisible(boolean visible)
visible -
public void testChanged(org.apache.wicket.Component component,
Object value)
component - value -
|
Copyright © 2010 Servoy B.V. | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||