org.yawlfoundation.yawl.resourcing.jsf.dynform
Class SubPanelController

java.lang.Object
  extended by org.yawlfoundation.yawl.resourcing.jsf.dynform.SubPanelController

public class SubPanelController
extends Object

Manages a set of 'cloned' panels on a dynamic form Author: Michael Adams Date: 21/02/2008


Constructor Summary
SubPanelController()
           
SubPanelController(SubPanel panel, long minOccurs, long maxOccurs, int level, String udBgColour, String udAltBgColour)
           
 
Method Summary
 SubPanel addSubPanel(SubPanel newPanel)
          Adds a new, cloned subpanel to this controller
 void assignStyleToSubPanels(int maxLevel)
           
 boolean canVaryOccurs()
           
 SubPanelController clone()
          clone this controller
static int convertOccurs(String occurs)
           
 String getAltBgColour()
           
 String getBgColour()
           
 long getCurrOccurs()
           
 int getDepthlevel()
           
 long getMaxOccurs()
           
 long getMinOccurs()
           
 String getName()
           
 List<SubPanel> getSubPanels()
           
 String getSubPanelStyleClass()
           
 String getUserDefinedBackgroundColour()
           
 boolean hasPanel(SubPanel panel)
           
 void incSubPanelTops(int top, int adjustment)
          reset the tops of all subpanels lower than the top specified
 SubPanel removeSubPanel(SubPanel oldPanel)
          Remove a subpanel from the set
 void setAltBgColour(String colour)
           
 void setBgColour(String colour)
           
 void setCurrOccurs(long currOccurs)
           
 void setDepthlevel(int depthlevel)
           
 void setMaxOccurs(long maxOccurs)
           
 void setMaxOccurs(String maxOccurs)
           
 void setMinOccurs(long minOccurs)
           
 void setMinOccurs(String minOccurs)
           
 void setName(String name)
           
 void setOccursButtonsEnablement()
          enable/disable the occurs buttons as required
 void storeSubPanel(SubPanel panel)
          Adds a subpanel to the set without making any surrounding adjustments to screen coordinates
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubPanelController

public SubPanelController()

SubPanelController

public SubPanelController(SubPanel panel,
                          long minOccurs,
                          long maxOccurs,
                          int level,
                          String udBgColour,
                          String udAltBgColour)
Method Detail

getMinOccurs

public long getMinOccurs()

setMinOccurs

public void setMinOccurs(long minOccurs)

setMinOccurs

public void setMinOccurs(String minOccurs)

getMaxOccurs

public long getMaxOccurs()

setMaxOccurs

public void setMaxOccurs(long maxOccurs)

setMaxOccurs

public void setMaxOccurs(String maxOccurs)

getCurrOccurs

public long getCurrOccurs()

setCurrOccurs

public void setCurrOccurs(long currOccurs)

getDepthlevel

public int getDepthlevel()

setDepthlevel

public void setDepthlevel(int depthlevel)

getName

public String getName()

setName

public void setName(String name)

getAltBgColour

public String getAltBgColour()

setAltBgColour

public void setAltBgColour(String colour)

getBgColour

public String getBgColour()

setBgColour

public void setBgColour(String colour)

getSubPanels

public List<SubPanel> getSubPanels()

hasPanel

public boolean hasPanel(SubPanel panel)

convertOccurs

public static int convertOccurs(String occurs)
Returns:
the int value of the min or max Occurs string for this panel set

getSubPanelStyleClass

public String getSubPanelStyleClass()
Returns:
the appropriate style class for this depthlevel

getUserDefinedBackgroundColour

public String getUserDefinedBackgroundColour()
Returns:
the user-defined bg colour (if any) for this depthlevel

canVaryOccurs

public boolean canVaryOccurs()
Returns:
true if this subpanel can appear more times that it currently is

assignStyleToSubPanels

public void assignStyleToSubPanels(int maxLevel)

addSubPanel

public SubPanel addSubPanel(SubPanel newPanel)
Adds a new, cloned subpanel to this controller

Parameters:
newPanel - the subpanel to add
Returns:
the outermost containing subpanel of the one added

removeSubPanel

public SubPanel removeSubPanel(SubPanel oldPanel)
Remove a subpanel from the set

Parameters:
oldPanel - the panel to remove
Returns:
the outermost containing subpanel of the one removed

incSubPanelTops

public void incSubPanelTops(int top,
                            int adjustment)
reset the tops of all subpanels lower than the top specified

Parameters:
top - the y-coord below which subpanels should be moved down
adjustment - how much to move them down by

setOccursButtonsEnablement

public void setOccursButtonsEnablement()
enable/disable the occurs buttons as required


clone

public SubPanelController clone()
clone this controller

Overrides:
clone in class Object

storeSubPanel

public void storeSubPanel(SubPanel panel)
Adds a subpanel to the set without making any surrounding adjustments to screen coordinates

Parameters:
panel - the panel to add


Copyright © 2004-2012 The YAWL Foundation.