Class BrowserHelpFile
java.lang.Object
VASSAL.search.AbstractImageFinder
VASSAL.build.AbstractBuildable
VASSAL.build.module.documentation.BrowserHelpFile
- All Implemented Interfaces:
Buildable
,Configurable
,PropertyNameSource
,ValidityChecker
,Translatable
,Auditable
,ImageSearchTarget
Unpacks a zipped directory stored in the module and displays it in an
external browser window.
- Author:
- rkinney
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
The attributes we want to expose in the editor are not the same as the ones we want to save to the buildFile, so we use this object to specify the properties in the editor.static class
protected static class
Handles the packaging of the target directory into the module file after the user saves the properties in the editorstatic class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected File
protected Action
protected MenuItemProxy
protected ComponentI18nData
protected String
protected PropertyChangeSupport
static final String
protected String
static final String
protected URL
Fields inherited from class VASSAL.build.AbstractBuildable
buildComponents, validator
Fields inherited from interface VASSAL.build.Configurable
NAME_PROPERTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a PropertyChangeListener.void
Adds this component to its parent.protected String
protected void
Extract the HTML from the module, or create an External URL from the Starting page if there is noneClass<?>[]
String[]
Lists all the buildFile (XML) attribute names for this component.The name of this Configurable Objectstatic String
protected String
void
launch()
protected void
recursiveDelete
(File output) Deprecated, for removal: This API element is subject to removal in a future version.protected URL
void
Remove a child componentvoid
removeFrom
(Buildable parent) Remove this component from its parentvoid
setAttribute
(String key, Object value) Sets a buildFile (XML) attribute value for this component.Methods inherited from class VASSAL.build.AbstractBuildable
add, addImageNamesRecursively, build, buildString, getAllDescendantComponentsOf, getAncestor, getBuildables, getBuildComponents, getBuildElement, getComponents, getComponentsOf, getNonFolderAncestor, getPropertyNames, setAncestor, validate
Methods inherited from class VASSAL.search.AbstractImageFinder
addLocalImageNames, getAllImageNames, getLocalImageNames
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface VASSAL.script.expression.Auditable
getComponentName, getComponentTypeName
Methods inherited from interface VASSAL.build.Buildable
add, build, getBuildElement, isMandatory, isMovable, isUnique
-
Field Details
-
TITLE
- See Also:
-
CONTENTS
- See Also:
-
STARTING_PAGE
- See Also:
-
name
-
startingPage
-
launch
-
url
-
externalTempFile
-
propSupport
-
myI18nData
-
launchItem
-
-
Constructor Details
-
BrowserHelpFile
public BrowserHelpFile()
-
-
Method Details
-
launch
public void launch() -
getContentsResource
- Returns:
- The entry in the module Zip file containing the HTML directory
-
extractContents
protected void extractContents()Extract the HTML from the module, or create an External URL from the Starting page if there is none -
regenerateUrl
-
evaluateStartingPage
-
recursiveDelete
Deprecated, for removal: This API element is subject to removal in a future version.UseFileUtils.deleteDirectory(File)
instead. -
getAttributeNames
Description copied from class:AbstractBuildable
Lists all the buildFile (XML) attribute names for this component. If this component is ALSO anAbstractConfigurable
, then this list of attributes determines the appropriate attribute order forAbstractConfigurable.getAttributeDescriptions()
andAbstractConfigurable.getAttributeTypes()
.- Specified by:
getAttributeNames
in classAbstractBuildable
- Returns:
- a list of all buildFile (XML) attribute names for this component
-
getAttributeValueString
- Specified by:
getAttributeValueString
in interfaceTranslatable
- Specified by:
getAttributeValueString
in classAbstractBuildable
- Parameters:
key
- the name of the attribute. Will be one of those listed inAbstractBuildable.getAttributeNames()
- Returns:
- a String representation of the XML buildFile attribute with the given name. When initializing a module,
this String value will loaded from the XML and passed to
AbstractBuildable.setAttribute(java.lang.String, java.lang.Object)
. It is also frequently used for checking the current value of an attribute.
-
setAttribute
Description copied from class:AbstractBuildable
Sets a buildFile (XML) attribute value for this component. Thekey
parameter will be one of those listed inAbstractBuildable.getAttributeNames()
. If thevalue
parameter is a String, it will be the value returned byAbstractBuildable.getAttributeValueString(java.lang.String)
for the samekey
. If the implementing class extendsAbstractConfigurable
, thenvalue
will be an instance of the corresponding Class listed inAbstractConfigurable.getAttributeTypes()
- Specified by:
setAttribute
in interfaceTranslatable
- Specified by:
setAttribute
in classAbstractBuildable
- Parameters:
key
- the name of the attribute. Will be one of those listed inAbstractBuildable.getAttributeNames()
value
- If thevalue
parameter is a String, it will be the value returned byAbstractBuildable.getAttributeValueString(java.lang.String)
for the samekey
. If the implementing class extendsAbstractConfigurable
, thenvalue
can also be an instance of the corresponding Class listed inAbstractConfigurable.getAttributeTypes()
-
addTo
Description copied from interface:Buildable
Adds this component to its parent. In order to make Buildable objects extensible, the child is responsible for adding itself to the parent. That way, Buildable subcomponents can be defined in an extension package without needing to modify the containing class. -
removeFrom
Description copied from interface:Configurable
Remove this component from its parent- Specified by:
removeFrom
in interfaceConfigurable
-
addPropertyChangeListener
Description copied from interface:Configurable
Add a PropertyChangeListener. A PropertyChangeEvent should be fired with property nameConfigurable.NAME_PROPERTY
when the value returned fromConfigurable.getConfigureName()
has changed- Specified by:
addPropertyChangeListener
in interfaceConfigurable
-
getAllowableConfigureComponents
- Specified by:
getAllowableConfigureComponents
in interfaceConfigurable
- Returns:
- a list of valid sub-component Classes. If a Class
appears in this list, then instances of that class may be added
to this component from the Editor's
ConfigureTree
window by right-clicking on the component and selecting the appropriate "Add" option.
-
getConfigureComponents
- Specified by:
getConfigureComponents
in interfaceConfigurable
- Returns:
- an array of Configurer objects representing the Configurable children of this Configurable object
-
getConfigureName
Description copied from interface:Configurable
The name of this Configurable Object- Specified by:
getConfigureName
in interfaceConfigurable
-
getConfigurer
- Specified by:
getConfigurer
in interfaceConfigurable
- Returns:
- a
Configurer
object which can be used to set the attributes of this object
-
getHelpFile
- Specified by:
getHelpFile
in interfaceConfigurable
- Returns:
- a HelpFile describing how to use and configure * this component
-
remove
Description copied from interface:Configurable
Remove a child component- Specified by:
remove
in interfaceConfigurable
-
getConfigureTypeName
-
getI18nData
- Specified by:
getI18nData
in interfaceTranslatable
-
FileUtils.deleteDirectory(File)
instead.