JIDE 3.5.15

com.jidesoft.swing
Class AbstractLayoutPersistence

java.lang.Object
  extended by com.jidesoft.swing.AbstractLayoutPersistence
All Implemented Interfaces:
LayoutPersistence
Direct Known Subclasses:
DefaultDockableBarManager, DefaultDockingManager, DockableBarLayoutLoader, DockingLayoutLoader, LayoutPersistenceManager

public abstract class AbstractLayoutPersistence
extends Object
implements LayoutPersistence

Abstract implementation of LayoutPersistence.


Field Summary
protected  String _layoutDirectory
           
protected  boolean _loadingLayoutData
           
protected  String _profileKey
          Key of profile.
protected  boolean _useFrameBounds
          true if the main frame bounds is persisted
protected  boolean _useFrameBoundsSet
           
protected  boolean _useFrameState
          true if the main frame state is persisted.
protected  boolean _useFrameStateSet
           
protected  boolean _usePref
          Whether use javax.utils.pref.
protected  short _version
          Version.
protected static String DEFAULT_PROFILE_NAME
          Default profile name if user didn't select any profile name.
protected static String LAYOUT_COUNT_STRING
           
protected  String LAYOUT_POSTFIX
           
protected static int MAX_PREF_BYTE_ARRAY_LENGTH
           
static String PROPERTY_PROFILE_KEY
           
static String PROPERTY_USE_PREF
           
static String PROPERTY_VERSION
           
static short V2004
          The persistence version in place at the end of 2004.
static short V2005_09
          The persistence version in place starting September 2005.
 
Fields inherited from interface com.jidesoft.swing.LayoutPersistence
ATTRIBUTE_PERSISTENCE_NAME, NODE_LAYOUT_PERSISTENCE
 
Constructor Summary
AbstractLayoutPersistence()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listener list.
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listener list for a specific property.
protected  void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
          Support for reporting bound property changes for boolean properties.
protected  void firePropertyChange(String propertyName, int oldValue, int newValue)
          Support for reporting bound property changes for integer properties.
protected  void firePropertyChange(String propertyName, Object oldValue, Object newValue)
          Support for reporting bound property changes for Object properties.
 List<String> getAvailableLayouts()
          Gets the list of available layout names.
 String getLayoutDirectory()
          Gets setting file directory.
 String getLayoutPersistenceName()
          Gets the persistence's name.
 byte[] getLayoutRawData()
          Gets layout raw data in byte array.
 PersistenceUtilsCallback.Load getLoadCallback()
          Gets the load callback to help add some customized information while loading layout from XML format.
 String getProfileKey()
          Gets profile key.
 PropertyChangeListener[] getPropertyChangeListeners()
          Returns an array of all the property change listeners registered on this component.
 PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
          Returns an array of all the listeners which have been associated with the named property.
 PersistenceUtilsCallback.Save getSaveCallback()
          Gets the save callback to help add some customized information while saving layout to XML format.
 short getVersion()
          Gets version number of profile.
 String getXmlEncoding()
          Gets XML encoding while saving layout to XML format.
 boolean isLast()
          Checks if it is the last one during when loading several several LayoutPersistences.
 boolean isLayoutAvailable(String layoutName)
          Checks if the layout is available.
 boolean isLayoutDataVersionValid(String layoutName)
          Checks if the layout version of the named layout is valid.
 boolean isLoadingLayoutData()
          Gets the flag indicating if the layout persistence is currently loading layout.
 boolean isNeedFormatCheck()
          Gets the flag indicating if format check is required.
 boolean isUsePref()
          Checks if the layout will be saved using javax.util.pref package.
protected  boolean isVersionCompatible(int version)
          Tells whether the given version is compatible with our current version.
 boolean isXmlFormat()
          Gets the flag indicating if the layout should be saved to XML format by default.
 void loadInitialLayout(InputStream layoutStream)
          Load initial layout from an initial layout file designed by Visual Designer.
 void loadInitialLayout(String layoutFile)
          Load initial layout from an initial layout file designed by Visual Designer.
 void loadLayoutData()
          Load layout from default layout data from profile.
 void loadLayoutDataFrom(String layoutName)
          Load layout from default layout data from named profile.
 void loadLayoutDataFromFile(String fileName)
          Loads layout from default layout data from a file.
 void removeLayout(String layoutName)
          Removes the layout.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list.
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list for a specific property.
 void saveLayoutData()
          Save layout information to default profile.
 void saveLayoutDataAs(String layoutName)
          Save layout data to profile that specified in layoutName Note: Always use all lower case.
 void saveLayoutDataToFile(String layoutFileName)
          Save layout data to file that specified in layoutFileName.
 void setLast(boolean last)
          Sets the LayoutPersistence as the last one (or not the last one) when loading several LayoutPersistences.
 void setLayoutDirectory(String layoutDirectory)
          Sets the layout directory.
 void setLayoutPersistenceName(String layoutPersistenceName)
          Sets the persistence's name.
 void setLayoutRawData(byte[] layoutData)
          Sets the layout using layout raw data.
 void setLoadCallback(PersistenceUtilsCallback.Load loadCallback)
          Sets the load callback to help add some customized information while loading layout from XML format.
 void setLoadingLayoutData(boolean loadingLayoutData)
          Sets the flag indicating if the layout persistence is currently loading layout.
 void setNeedFormatCheck(boolean needFormatCheck)
          Sets the flag indicating if format check is required.
 void setProfileKey(String profileKey)
          Sets the profile key to be used to store layout information.
 void setSaveCallback(PersistenceUtilsCallback.Save saveCallback)
          Sets the save callback to help add some customized information while saving layout to XML format.
 void setUseFrameBounds(boolean useFrameBounds)
          If true, the bounds of main frame will be persisted in layout data.
 void setUseFrameState(boolean useFrameState)
          If true, the state of main frame will be persisted in layout data.
 void setUsePref(boolean usePref)
          If true, use javax.util.pref to store frames layout data.
 void setVersion(short version)
          Sets version number of profile.
 void setXmlEncoding(String xmlEncoding)
          Sets XML encoding while saving layout to XML format.
 void setXmlFormat(boolean xmlFormat)
          Sets the flag indicating if the layout should be saved to XML format by default.
protected  boolean shouldUseFrameBounds(boolean wasVisible)
           
protected  boolean shouldUseFrameState(boolean wasVisible)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jidesoft.swing.LayoutPersistence
beginLoadLayoutData, isLoadDataSuccessful, loadInitialLayout, loadLayoutFrom, loadLayoutFrom, resetToDefault, saveLayoutTo, saveLayoutTo
 

Field Detail

V2004

public static final short V2004
The persistence version in place at the end of 2004.

See Also:
Constant Field Values

V2005_09

public static final short V2005_09
The persistence version in place starting September 2005.

See Also:
Constant Field Values

_version

protected short _version
Version. Used to invalid previous save layout in case format changes.


DEFAULT_PROFILE_NAME

protected static final String DEFAULT_PROFILE_NAME
Default profile name if user didn't select any profile name.

See Also:
Constant Field Values

PROPERTY_PROFILE_KEY

public static final String PROPERTY_PROFILE_KEY
See Also:
Constant Field Values

PROPERTY_USE_PREF

public static final String PROPERTY_USE_PREF
See Also:
Constant Field Values

PROPERTY_VERSION

public static final String PROPERTY_VERSION
See Also:
Constant Field Values

_profileKey

protected String _profileKey
Key of profile.


MAX_PREF_BYTE_ARRAY_LENGTH

protected static final int MAX_PREF_BYTE_ARRAY_LENGTH
See Also:
Constant Field Values

_loadingLayoutData

protected boolean _loadingLayoutData

_useFrameBounds

protected boolean _useFrameBounds
true if the main frame bounds is persisted


_useFrameBoundsSet

protected boolean _useFrameBoundsSet

_useFrameState

protected boolean _useFrameState
true if the main frame state is persisted.


_useFrameStateSet

protected boolean _useFrameStateSet

_usePref

protected boolean _usePref
Whether use javax.utils.pref.


LAYOUT_COUNT_STRING

protected static final String LAYOUT_COUNT_STRING
See Also:
Constant Field Values

LAYOUT_POSTFIX

protected final String LAYOUT_POSTFIX
See Also:
Constant Field Values

_layoutDirectory

protected String _layoutDirectory
Constructor Detail

AbstractLayoutPersistence

public AbstractLayoutPersistence()
Method Detail

getVersion

public short getVersion()
Gets version number of profile.

Specified by:
getVersion in interface LayoutPersistence
Returns:
version of profile

setVersion

public void setVersion(short version)
Sets version number of profile. User can set a new version so that application restart, it will ignore previous layout information.

Specified by:
setVersion in interface LayoutPersistence
Parameters:
version - new version

getProfileKey

public String getProfileKey()
Gets profile key.

Returns:
the profile key.

setProfileKey

public void setProfileKey(String profileKey)
Sets the profile key to be used to store layout information. If usePref is true, profileKey will be used to create a node in registry. If usePref is false, it will be used to create a folder named as ".profileKey" and all layout files will be saved under that folder.

Specified by:
setProfileKey in interface LayoutPersistence
Parameters:
profileKey - profile key

loadLayoutData

public void loadLayoutData()
Load layout from default layout data from profile.
This method is Swing thread safe.

Specified by:
loadLayoutData in interface LayoutPersistence

isLayoutAvailable

public boolean isLayoutAvailable(String layoutName)
Description copied from interface: LayoutPersistence
Checks if the layout is available.

Specified by:
isLayoutAvailable in interface LayoutPersistence
Parameters:
layoutName - the layout name. In Window registry, the layout name is the registry key name. If it's a layout file, the layout name is the file name with ".layout" as suffix.
Returns:
true if the layout is available

getAvailableLayouts

public List<String> getAvailableLayouts()
Description copied from interface: LayoutPersistence
Gets the list of available layout names. If usePref is true and profileKey has been set, the method will return the list of save layouts. If usePref is false, it will find out the layout file in layout directory.

Specified by:
getAvailableLayouts in interface LayoutPersistence
Returns:
the list of available layout names.

removeLayout

public void removeLayout(String layoutName)
Description copied from interface: LayoutPersistence
Removes the layout.

Specified by:
removeLayout in interface LayoutPersistence
Parameters:
layoutName - the layout name. In Window registry, the layout name is the registry key name. If it's a layout file, the layout name is the file name with ".layout" as suffix.

loadLayoutDataFrom

public void loadLayoutDataFrom(String layoutName)
Load layout from default layout data from named profile.
This method is Swing thread safe.

Specified by:
loadLayoutDataFrom in interface LayoutPersistence
Parameters:
layoutName - the layout name. In Window registry, the layout name is the registry key name. If it's a layout file, the layout name is the file name with ".layout" as suffix. Please don't add ".layout" to invoke this method.

isLayoutDataVersionValid

public boolean isLayoutDataVersionValid(String layoutName)
Checks if the layout version of the named layout is valid.

Specified by:
isLayoutDataVersionValid in interface LayoutPersistence
Parameters:
layoutName - the layout name. In Window registry, the layout name is the registry key name. If it's a layout file, the layout name is the file name with ".layout" as suffix.
Returns:
true if the layout version valid.

isVersionCompatible

protected boolean isVersionCompatible(int version)
Tells whether the given version is compatible with our current version. It is compatible if it is the same as our version number, or if our version number is the current version and the given number is a supported older version.

Parameters:
version - the version to be checked
Returns:
true if the version is compatible.

loadLayoutDataFromFile

public void loadLayoutDataFromFile(String fileName)
Loads layout from default layout data from a file.
This method is Swing thread safe.

Specified by:
loadLayoutDataFromFile in interface LayoutPersistence
Parameters:
fileName - a layout file name.

saveLayoutData

public void saveLayoutData()
Save layout information to default profile.

Specified by:
saveLayoutData in interface LayoutPersistence

getLayoutDirectory

public String getLayoutDirectory()
Gets setting file directory.

Specified by:
getLayoutDirectory in interface LayoutPersistence
Returns:
the setting directory

setLayoutDirectory

public void setLayoutDirectory(String layoutDirectory)
Description copied from interface: LayoutPersistence
Sets the layout directory. It is used only when usePref is false.

Specified by:
setLayoutDirectory in interface LayoutPersistence
Parameters:
layoutDirectory - the layout directory.

saveLayoutDataAs

public void saveLayoutDataAs(String layoutName)
Save layout data to profile that specified in layoutName Note: Always use all lower case. We found some problems with upper case on Windows.

Specified by:
saveLayoutDataAs in interface LayoutPersistence
Parameters:
layoutName - the layout name

saveLayoutDataToFile

public void saveLayoutDataToFile(String layoutFileName)
Save layout data to file that specified in layoutFileName. The layoutFileName should be full qualified file name. If the file exists, it will be overwritten.

Specified by:
saveLayoutDataToFile in interface LayoutPersistence
Parameters:
layoutFileName - the layout file name

setLayoutRawData

public void setLayoutRawData(byte[] layoutData)
Description copied from interface: LayoutPersistence
Sets the layout using layout raw data.

Specified by:
setLayoutRawData in interface LayoutPersistence
Parameters:
layoutData - the byte array that returned from getLayoutRawData

getLayoutRawData

public byte[] getLayoutRawData()
Description copied from interface: LayoutPersistence
Gets layout raw data in byte array. You can keep the value returned and pass it in to setLayoutRawData to set the layout.

Specified by:
getLayoutRawData in interface LayoutPersistence
Returns:
layout data

isUsePref

public boolean isUsePref()
Checks if the layout will be saved using javax.util.pref package.

Returns:
true if layout will be saved using javax.util.pref package.

setUsePref

public void setUsePref(boolean usePref)
If true, use javax.util.pref to store frames layout data. The setting only has effect on Windows. On UNIX or Linux, javax.util.pref is never used because it has problem to store binary data

Specified by:
setUsePref in interface LayoutPersistence
Parameters:
usePref - use javax pref or not. Default is true

setUseFrameState

public void setUseFrameState(boolean useFrameState)
If true, the state of main frame will be persisted in layout data.

Specified by:
setUseFrameState in interface LayoutPersistence
Parameters:
useFrameState - true if the state of main frame will be persisted in layout data.
See Also:
LayoutPersistence.setUseFrameBounds(boolean)

setUseFrameBounds

public void setUseFrameBounds(boolean useFrameBounds)
If true, the bounds of main frame will be persisted in layout data.

Specified by:
setUseFrameBounds in interface LayoutPersistence
Parameters:
useFrameBounds - true if the bounds of main frame will be persisted in layout data.
See Also:
LayoutPersistence.setUseFrameState(boolean)

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list.

Parameters:
listener - the PropertyChangeListener to be added
See Also:
removePropertyChangeListener(java.beans.PropertyChangeListener), getPropertyChangeListeners(), addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. This method should be used to remove PropertyChangeListeners that were registered for all bound properties of this class.

If listener is null, no exception is thrown and no action is performed.

Parameters:
listener - the PropertyChangeListener to be removed
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener), getPropertyChangeListeners(), removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)

getPropertyChangeListeners

public PropertyChangeListener[] getPropertyChangeListeners()
Returns an array of all the property change listeners registered on this component.

Returns:
all of this component's PropertyChangeListeners or an empty array if no property change listeners are currently registered
Since:
1.4
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener), removePropertyChangeListener(java.beans.PropertyChangeListener), getPropertyChangeListeners(java.lang.String), PropertyChangeSupport.getPropertyChangeListeners()

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list for a specific property.

Parameters:
propertyName - one of the property names listed above
listener - the PropertyChangeListener to be added
See Also:
removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener), getPropertyChangeListeners(java.lang.String), addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list for a specific property. This method should be used to remove PropertyChangeListeners that were registered for a specific bound property.

If listener is null, no exception is thrown and no action is performed.

Parameters:
propertyName - a valid property name
listener - the PropertyChangeListener to be removed
See Also:
addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener), getPropertyChangeListeners(java.lang.String), removePropertyChangeListener(java.beans.PropertyChangeListener)

getPropertyChangeListeners

public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
Returns an array of all the listeners which have been associated with the named property.

Parameters:
propertyName - the property name.
Returns:
all of the PropertyChangeListeners associated with the named property or an empty array if no listeners have been added
See Also:
addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener), removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener), getPropertyChangeListeners()

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
Support for reporting bound property changes for Object properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

Parameters:
propertyName - the property whose value has changed
oldValue - the property's previous value
newValue - the property's new value

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  boolean oldValue,
                                  boolean newValue)
Support for reporting bound property changes for boolean properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

Parameters:
propertyName - the property whose value has changed
oldValue - the property's previous value
newValue - the property's new value

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  int oldValue,
                                  int newValue)
Support for reporting bound property changes for integer properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

Parameters:
propertyName - the property whose value has changed
oldValue - the property's previous value
newValue - the property's new value

loadInitialLayout

public void loadInitialLayout(String layoutFile)
                       throws ParserConfigurationException,
                              SAXException,
                              IOException
Description copied from interface: LayoutPersistence
Load initial layout from an initial layout file designed by Visual Designer.

Specified by:
loadInitialLayout in interface LayoutPersistence
Parameters:
layoutFile - the full file path to the .ilayout file.
Throws:
ParserConfigurationException - when DocumentBuilder cannot be created which satisfies the configuration requested.
SAXException - when DocumentBuilder has trouble parsing the initial layout xml file.
IOException - when DocumetnBuilder encounters any errors when reading the initial layout xml file.

loadInitialLayout

public void loadInitialLayout(InputStream layoutStream)
                       throws ParserConfigurationException,
                              SAXException,
                              IOException
Description copied from interface: LayoutPersistence
Load initial layout from an initial layout file designed by Visual Designer. To use this method, you should bundle initial layout files into jars, then use ClassLoader to load the file as InputStream.

Specified by:
loadInitialLayout in interface LayoutPersistence
Parameters:
layoutStream - an input stream containing an initial layout.
Throws:
ParserConfigurationException - when DocumentBuilder cannot be created which satisfies the configuration requested.
SAXException - when DocumentBuilder has trouble parsing the initial layout xml file.
IOException - when DocumetnBuilder encounters any errors when reading the initial layout xml file.

shouldUseFrameState

protected boolean shouldUseFrameState(boolean wasVisible)

shouldUseFrameBounds

protected boolean shouldUseFrameBounds(boolean wasVisible)

isLast

public boolean isLast()
Description copied from interface: LayoutPersistence
Checks if it is the last one during when loading several several LayoutPersistences. Only the last LayoutPersistence will restore the main window's state and bounds and make the main window visible.

Specified by:
isLast in interface LayoutPersistence
Returns:
true or false.

setLast

public void setLast(boolean last)
Description copied from interface: LayoutPersistence
Sets the LayoutPersistence as the last one (or not the last one) when loading several LayoutPersistences.

Specified by:
setLast in interface LayoutPersistence
Parameters:
last - true if the layout persistence is the last one in the LayoutPersistenceManager.

isLoadingLayoutData

public boolean isLoadingLayoutData()
Gets the flag indicating if the layout persistence is currently loading layout.

Returns:
true if it's on loading process. Otherwise false.

setLoadingLayoutData

public void setLoadingLayoutData(boolean loadingLayoutData)
Sets the flag indicating if the layout persistence is currently loading layout.

Parameters:
loadingLayoutData - the flag

isXmlFormat

public boolean isXmlFormat()
Gets the flag indicating if the layout should be saved to XML format by default.

Specified by:
isXmlFormat in interface LayoutPersistence
Returns:
true if the layout should be saved to XML format. Otherwise false.
See Also:
setXmlFormat(boolean)

setXmlFormat

public void setXmlFormat(boolean xmlFormat)
Sets the flag indicating if the layout should be saved to XML format by default.

If the flag is set to true, the layout format would be XML format. Otherwise, it will be traditional binary format to save space.

By default, the flag is false to keep original behavior. No matter how this flag is set, the DockingManager should be able to read either XML format or binary format layout file.

Specified by:
setXmlFormat in interface LayoutPersistence
Parameters:
xmlFormat - the flag

getSaveCallback

public PersistenceUtilsCallback.Save getSaveCallback()
Description copied from interface: LayoutPersistence
Gets the save callback to help add some customized information while saving layout to XML format.

Specified by:
getSaveCallback in interface LayoutPersistence
Returns:
the save call back.

setSaveCallback

public void setSaveCallback(PersistenceUtilsCallback.Save saveCallback)
Description copied from interface: LayoutPersistence
Sets the save callback to help add some customized information while saving layout to XML format.

Specified by:
setSaveCallback in interface LayoutPersistence
Parameters:
saveCallback - the save call back

getLoadCallback

public PersistenceUtilsCallback.Load getLoadCallback()
Description copied from interface: LayoutPersistence
Gets the load callback to help add some customized information while loading layout from XML format.

Specified by:
getLoadCallback in interface LayoutPersistence
Returns:
the load call back.

setLoadCallback

public void setLoadCallback(PersistenceUtilsCallback.Load loadCallback)
Description copied from interface: LayoutPersistence
Sets the load callback to help add some customized information while loading layout from XML format.

Specified by:
setLoadCallback in interface LayoutPersistence
Parameters:
loadCallback - the load call back

getXmlEncoding

public String getXmlEncoding()
Description copied from interface: LayoutPersistence
Gets XML encoding while saving layout to XML format.

Specified by:
getXmlEncoding in interface LayoutPersistence
Returns:
the xml encoding.

setXmlEncoding

public void setXmlEncoding(String xmlEncoding)
Description copied from interface: LayoutPersistence
Sets XML encoding while saving layout to XML format.

Specified by:
setXmlEncoding in interface LayoutPersistence
Parameters:
xmlEncoding - the xml encoding

getLayoutPersistenceName

public String getLayoutPersistenceName()
Description copied from interface: LayoutPersistence
Gets the persistence's name.

The persistence name will be used to distinguish different nodes while loading layout from XML file

By default, JIDE will simply put "1", "2", "3" as a default name for each persistence LayoutPersistenceManager manages.

Specified by:
getLayoutPersistenceName in interface LayoutPersistence
Returns:
the layout persistence name.

setLayoutPersistenceName

public void setLayoutPersistenceName(String layoutPersistenceName)
Description copied from interface: LayoutPersistence
Sets the persistence's name.

Specified by:
setLayoutPersistenceName in interface LayoutPersistence
Parameters:
layoutPersistenceName - the layout persistence name

isNeedFormatCheck

public boolean isNeedFormatCheck()
Description copied from interface: LayoutPersistence
Gets the flag indicating if format check is required.

By default, it should be true. In LayoutPersistenceManager scenario, it will be set to false if the format is traditional binary.

Specified by:
isNeedFormatCheck in interface LayoutPersistence
Returns:
true if format check to be skipped on loading. Otherwise false.

setNeedFormatCheck

public void setNeedFormatCheck(boolean needFormatCheck)
Description copied from interface: LayoutPersistence
Sets the flag indicating if format check is required.

It's not supposed to be invoked publicly. It will be invoked by LayoutPersistenceManager.

Specified by:
setNeedFormatCheck in interface LayoutPersistence
Parameters:
needFormatCheck - the flag

JIDE 3.5.15