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
Nested ClassesModifier and TypeClassDescriptionprotected classThe 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 classprotected static classHandles the packaging of the target directory into the module file after the user saves the properties in the editorstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected Fileprotected Actionprotected MenuItemProxyprotected ComponentI18nDataprotected Stringprotected PropertyChangeSupportstatic final Stringprotected Stringstatic final Stringprotected URLFields inherited from class AbstractBuildable
buildComponents, validatorFields inherited from interface Configurable
NAME_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a PropertyChangeListener.voidAdds this component to its parent.protected Stringprotected voidExtract 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 Stringprotected Stringvoidlaunch()protected voidrecursiveDelete(File output) Deprecated, for removal: This API element is subject to removal in a future version.protected URLvoidRemove a child componentvoidremoveFrom(Buildable parent) Remove this component from its parentvoidsetAttribute(String key, Object value) Sets a buildFile (XML) attribute value for this component.Methods inherited from class AbstractBuildable
add, addImageNamesRecursively, build, buildString, getAllDescendantComponentsOf, getAncestor, getBuildables, getBuildComponents, getBuildElement, getComponents, getComponentsOf, getNonFolderAncestor, getPropertyNames, setAncestor, validateModifier and TypeMethodDescriptionvoidAdd a Buildable object to this objectvoidAdds all images used by this component AND any subcomponents to the collectionvoidBuild this component by getting all XML attributes of the XML element and callingAbstractBuildable.setAttribute(String, Object)with the String value of the attribute<T> List<T> getAllDescendantComponentsOf(Class<T> target) Recursively descend the build tree and return aListof all components that are instances of the given classDeprecated, for removal: This API element is subject to removal in a future version.UseAbstractBuildable.getBuildables()instead.getBuildElement(Document doc) <T> Enumeration<T> getComponents(Class<T> target) Deprecated, for removal: This API element is subject to removal in a future version.UseAbstractBuildable.getComponentsOf(Class)instead.<T> List<T> getComponentsOf(Class<T> target) Override this method to provide a list of properties to be exposed for use by expressions in the module.voidsetAncestor(Buildable ancestor) voidvalidate(Buildable target, ValidationReport report) Methods inherited from class AbstractImageFinder
addLocalImageNames, getAllImageNames, getLocalImageNamesModifier and TypeMethodDescriptionvoidClasses extending AbstractImageFinder should override this method in order to add the names of any image files they use to the collection.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Auditable
getComponentName, getComponentTypeNameMethods inherited from interface Buildable
isMandatory, isMovable, isUniqueModifier and TypeMethodDescriptiondefault booleanIs this component a reqired component within its parent?default booleanIs this component allowed to be moved around the Configure Tree?default booleanisUnique()Does this component need to be unique within it's parent?
-
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:AbstractBuildableLists 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:
getAttributeNamesin classAbstractBuildable- Returns:
- a list of all buildFile (XML) attribute names for this component
-
getAttributeValueString
- Specified by:
getAttributeValueStringin interfaceTranslatable- Specified by:
getAttributeValueStringin 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(String, Object). It is also frequently used for checking the current value of an attribute.
-
setAttribute
Description copied from class:AbstractBuildableSets a buildFile (XML) attribute value for this component. Thekeyparameter will be one of those listed inAbstractBuildable.getAttributeNames(). If thevalueparameter is a String, it will be the value returned byAbstractBuildable.getAttributeValueString(String)for the samekey. If the implementing class extendsAbstractConfigurable, thenvaluewill be an instance of the corresponding Class listed inAbstractConfigurable.getAttributeTypes()- Specified by:
setAttributein interfaceTranslatable- Specified by:
setAttributein classAbstractBuildable- Parameters:
key- the name of the attribute. Will be one of those listed inAbstractBuildable.getAttributeNames()value- If thevalueparameter is a String, it will be the value returned byAbstractBuildable.getAttributeValueString(String)for the samekey. If the implementing class extendsAbstractConfigurable, thenvaluecan also be an instance of the corresponding Class listed inAbstractConfigurable.getAttributeTypes()
-
addTo
Description copied from interface:BuildableAdds 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:ConfigurableRemove this component from its parent- Specified by:
removeFromin interfaceConfigurable
-
addPropertyChangeListener
Description copied from interface:ConfigurableAdd a PropertyChangeListener. A PropertyChangeEvent should be fired with property nameConfigurable.NAME_PROPERTYwhen the value returned fromConfigurable.getConfigureName()has changed- Specified by:
addPropertyChangeListenerin interfaceConfigurable
-
getAllowableConfigureComponents
- Specified by:
getAllowableConfigureComponentsin 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
ConfigureTreewindow by right-clicking on the component and selecting the appropriate "Add" option.
-
getConfigureComponents
- Specified by:
getConfigureComponentsin interfaceConfigurable- Returns:
- an array of Configurer objects representing the Configurable children of this Configurable object
-
getConfigureName
Description copied from interface:ConfigurableThe name of this Configurable Object- Specified by:
getConfigureNamein interfaceConfigurable
-
getConfigurer
- Specified by:
getConfigurerin interfaceConfigurable- Returns:
- a
Configurerobject which can be used to set the attributes of this object
-
getHelpFile
- Specified by:
getHelpFilein interfaceConfigurable- Returns:
- a HelpFile describing how to use and configure * this component
-
remove
Description copied from interface:ConfigurableRemove a child component- Specified by:
removein interfaceConfigurable
-
getConfigureTypeName
-
getI18nData
- Specified by:
getI18nDatain interfaceTranslatable
-
FileUtils.deleteDirectory(File)instead.