org.wings
Class DefaultReloadManager

java.lang.Object
  extended by org.wings.DefaultReloadManager
All Implemented Interfaces:
Serializable, ReloadManager

public class DefaultReloadManager
extends Object
implements ReloadManager

Default implementation of the reload manager.

Author:
Stephan Schuster
See Also:
Serialized Form

Constructor Summary
DefaultReloadManager()
           
 
Method Summary
 void addUpdate(SComponent component, Update update)
          Inserts an update for a component.
 void clear()
          Clears all requested reloads and updates.
protected  void filterUpdates()
           
 Set<SComponent> getDirtyComponents()
          Returns a set of all components marked dirty.
 Set<SFrame> getDirtyFrames()
          Return a set of all frames marked dirty.
protected  Set<org.wings.DefaultReloadManager.PotentialUpdate> getFineGrainedUpdates(SComponent component)
           
 List<Update> getUpdates()
          Returns a (filtered) list of all updates.
 void invalidateFrames()
          Invalidates all frames containing dirty components.
 boolean isReloadRequired(SFrame frame)
          Returns a reload suggestion.
 boolean isSuppressMode()
          Returns the current suppress mode.
 boolean isUpdateMode()
          Returns the current operation mode.
 void notifyCGs()
          Notifies the CG's of dirty components about changes.
 void reload(SComponent component)
          Marks an entire component change.
 void setSuppressMode(boolean suppressMode)
          Sets the current suppress mode.
 void setUpdateMode(boolean updateMode)
          Sets the current operation mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultReloadManager

public DefaultReloadManager()
Method Detail

reload

public void reload(SComponent component)
Description copied from interface: ReloadManager
Marks an entire component change.

Specified by:
reload in interface ReloadManager
Parameters:
component - the component that changed

addUpdate

public void addUpdate(SComponent component,
                      Update update)
Description copied from interface: ReloadManager
Inserts an update for a component.

Specified by:
addUpdate in interface ReloadManager
Parameters:
component - the component that changed
update - the update for this component

getUpdates

public List<Update> getUpdates()
Description copied from interface: ReloadManager
Returns a (filtered) list of all updates.

Specified by:
getUpdates in interface ReloadManager
Returns:
a list of all needed updates

getDirtyComponents

public Set<SComponent> getDirtyComponents()
Description copied from interface: ReloadManager
Returns a set of all components marked dirty.

Specified by:
getDirtyComponents in interface ReloadManager
Returns:
a set of all dirty components

getDirtyFrames

public Set<SFrame> getDirtyFrames()
Description copied from interface: ReloadManager
Return a set of all frames marked dirty.

Specified by:
getDirtyFrames in interface ReloadManager
Returns:
a set of all dirty frames

invalidateFrames

public void invalidateFrames()
Description copied from interface: ReloadManager
Invalidates all frames containing dirty components.

Specified by:
invalidateFrames in interface ReloadManager

notifyCGs

public void notifyCGs()
Description copied from interface: ReloadManager
Notifies the CG's of dirty components about changes.

Specified by:
notifyCGs in interface ReloadManager

clear

public void clear()
Description copied from interface: ReloadManager
Clears all requested reloads and updates.

Specified by:
clear in interface ReloadManager

isUpdateMode

public boolean isUpdateMode()
Description copied from interface: ReloadManager
Returns the current operation mode.

Specified by:
isUpdateMode in interface ReloadManager
Returns:
true if in update mode

setUpdateMode

public void setUpdateMode(boolean updateMode)
Description copied from interface: ReloadManager
Sets the current operation mode.

Specified by:
setUpdateMode in interface ReloadManager
Parameters:
updateMode - true to enable update mode

isSuppressMode

public boolean isSuppressMode()
Description copied from interface: ReloadManager
Returns the current suppress mode.

Specified by:
isSuppressMode in interface ReloadManager
Returns:
true if in all reloads are suppressed

setSuppressMode

public void setSuppressMode(boolean suppressMode)
Description copied from interface: ReloadManager
Sets the current suppress mode.

Specified by:
setSuppressMode in interface ReloadManager
Parameters:
suppressMode - true to suppress all reloads

isReloadRequired

public boolean isReloadRequired(SFrame frame)
Description copied from interface: ReloadManager
Returns a reload suggestion.

Specified by:
isReloadRequired in interface ReloadManager
Returns:
true if a reload is required

getFineGrainedUpdates

protected Set<org.wings.DefaultReloadManager.PotentialUpdate> getFineGrainedUpdates(SComponent component)

filterUpdates

protected void filterUpdates()


wingS Swings ;-)