|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.formbuilder.util.PersistentContainerHelper
This class is used internally by PersistentFormSection and PersistentOptionGroup to manage the associations to the Component children of these containers.
Field Summary | |
static String |
versionId
|
Constructor Summary | |
PersistentContainerHelper(PersistentComponentFactory factory)
|
Method Summary | |
void |
addComponent(PersistentComponentFactory componentFactory)
Add a component after the already added components (in the last position). |
void |
addComponent(PersistentComponentFactory componentFactory,
boolean selected)
Add a component after the already added components (in the last position). |
void |
addComponent(PersistentComponentFactory componentFactory,
int position)
Add a child component of the container. |
void |
addComponent(PersistentComponentFactory componentFactory,
int position,
boolean isSelected)
Add a child component of the container. |
protected void |
assertPositionInAddRange(int position)
Assert that the position is valid for adding a component at. |
protected void |
assertPositionInCurrentRange(int position)
Assert that the position is within the current range of component positions. |
protected void |
assertPositionInRange(int position,
int upperLimit)
Assert that the position is between 1 and the given upper limit |
void |
clearComponents()
Delete all component associations from this container |
protected void |
decrementNumberOfComponents()
|
protected void |
executeAddComponent(BigDecimal componentID,
int position,
boolean isSelected)
Map a component with a certain position to the container. |
protected void |
executeClearComponents()
Remove all component associations from the container |
protected void |
executeRemoveComponent(BigDecimal componentID)
Remove a component-container mapping. |
protected void |
executeSetComponentSelected(BigDecimal componentID,
boolean selected)
|
Collection |
getComponents()
Return all children components represented by their PersistentComponentFactory objects. |
protected int |
getNumberOfComponents()
|
List |
getSelectedComponents()
Can be invoked after getComponents() has been invoked to fetch the components that are selected. |
protected void |
incrementNumberOfComponents()
|
void |
moveComponent(PersistentComponentFactory componentFactory,
int toPosition)
Move component to new position. |
void |
removeComponent(PersistentComponentFactory componentFactory)
Remove a component from the container. |
void |
setComponentSelected(PersistentComponentFactory componentFactory,
boolean selected)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String versionId
Constructor Detail |
public PersistentContainerHelper(PersistentComponentFactory factory)
Method Detail |
public void addComponent(PersistentComponentFactory componentFactory)
addComponent
in interface PersistentContainer
public void addComponent(PersistentComponentFactory componentFactory, boolean selected)
public void addComponent(PersistentComponentFactory componentFactory, int position)
addComponent
in interface PersistentContainer
position
- The count of this component starting with 1 (i.e. if it's
the third component to be added to the container this
value would be 3)public void addComponent(PersistentComponentFactory componentFactory, int position, boolean isSelected)
position
- The count of this component starting with 1 (i.e. if it's
the third component to be added to the container this
value would be 3)public void removeComponent(PersistentComponentFactory componentFactory)
removeComponent
in interface PersistentContainer
public void moveComponent(PersistentComponentFactory componentFactory, int toPosition)
moveComponent
in interface PersistentContainer
toPosition
- The position to move the component to. Positions start with 1.public void clearComponents()
PersistentContainer
clearComponents
in interface PersistentContainer
public void setComponentSelected(PersistentComponentFactory componentFactory, boolean selected)
public Collection getComponents()
public List getSelectedComponents()
protected void executeAddComponent(BigDecimal componentID, int position, boolean isSelected)
protected void executeRemoveComponent(BigDecimal componentID)
protected void executeClearComponents()
protected void executeSetComponentSelected(BigDecimal componentID, boolean selected)
protected void assertPositionInAddRange(int position)
protected void assertPositionInCurrentRange(int position)
protected void assertPositionInRange(int position, int upperLimit)
protected int getNumberOfComponents()
protected void incrementNumberOfComponents()
protected void decrementNumberOfComponents()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |