gov.nih.nlm.mms.browser
Class ExpansionState

java.lang.Object
  extended by gov.nih.nlm.mms.browser.ExpansionState

public class ExpansionState
extends Object

Holds expansion state of nodes of ConceptView.


Constructor Summary
ExpansionState()
           
 
Method Summary
 void clear()
          Clears all data indicating nodes that should or should not be expanded.
 void clearNonPersistent()
          Clears all non-persistent data indicating nodes that should or should not be expanded.
 int getPageNumber(String key)
          Returns the page which holds the node associated with the given key.
 boolean isExpanded(String key, boolean persistent)
          Indicates if the node associated with the given key is expanded on the ConceptView.
 boolean isPageMode(String key)
          Returns whether or not the node associated with the given key is displayed in page mode or not.
 boolean isShowAllPagesMode(String key)
          Returns whether or not the node associated with the given key is displayed in page mode or not.
 void resetPageNumbers()
          Resets all files being shown in page mode to page 1.
 void setExpanded(String key, boolean persistent, boolean expanded)
          Indicates whether or not the node associated with the given key should be expanded on the ConceptView.
 void setPageMode(String key, boolean pageMode)
          Indicates whether or not the node associated with the given key should be displayed in page mode or not.
 void setPageNumber(String key, int page)
          Sets the page on which the node associated with the given page will be displayed.
 void setShowAllPagesMode(String key, boolean showAllPagesMode)
          Indicates whether or not the node associated with the given key should be displayed in page mode or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpansionState

public ExpansionState()
Method Detail

isExpanded

public boolean isExpanded(String key,
                          boolean persistent)
Indicates if the node associated with the given key is expanded on the ConceptView.

Parameters:
key - identifies node
persistent - queries if this node is always expanded irregardless of current concept
Returns:
true if node is expanded false otherwise

setExpanded

public void setExpanded(String key,
                        boolean persistent,
                        boolean expanded)
Indicates whether or not the node associated with the given key should be expanded on the ConceptView.

Parameters:
key - identifies node
persistent - indicates if this node should be permanently expanded
expanded - true indicates that node should display expanded false indicates that node should display not expanded

isPageMode

public boolean isPageMode(String key)
Returns whether or not the node associated with the given key is displayed in page mode or not.

Parameters:
key - node identifier
Returns:
true if node is displayed in page mode false node is displayed in all mode

setPageMode

public void setPageMode(String key,
                        boolean pageMode)
Indicates whether or not the node associated with the given key should be displayed in page mode or not.

Parameters:
key - node identifier
pageMode - true if node should be displayed in page mode false if node should be displayed in all mode

isShowAllPagesMode

public boolean isShowAllPagesMode(String key)
Returns whether or not the node associated with the given key is displayed in page mode or not.

Parameters:
key - node identifier
Returns:
true if node is displayed in all mode false node is displayed in page mode

setShowAllPagesMode

public void setShowAllPagesMode(String key,
                                boolean showAllPagesMode)
Indicates whether or not the node associated with the given key should be displayed in page mode or not.

Parameters:
key - node identifier
showAllPagesMode - true if node should be displayed in all mode false if node should be displayed in page mode

getPageNumber

public int getPageNumber(String key)
Returns the page which holds the node associated with the given key.

Parameters:
key - node identifier
Returns:
page number

setPageNumber

public void setPageNumber(String key,
                          int page)
Sets the page on which the node associated with the given page will be displayed.

Parameters:
key - node identifier
page - page number

resetPageNumbers

public void resetPageNumbers()
Resets all files being shown in page mode to page 1.


clear

public void clear()
Clears all data indicating nodes that should or should not be expanded.


clearNonPersistent

public void clearNonPersistent()
Clears all non-persistent data indicating nodes that should or should not be expanded.



Copyright ©2005