com.moximedia.ows.website
Class Tool

java.lang.Object
  extended bycom.moximedia.ows.website.Tool
All Implemented Interfaces:
java.io.Serializable, ToolShapeType, ToolType

public class Tool
extends java.lang.Object
implements ToolType, ToolShapeType, java.io.Serializable

This class represents a map tool button used in the IMF web site framework. Tools are created using XML configuration files.

Author:
Doug Cates - www.moximedia.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.moximedia.ows.types.ToolType
TOOL_TYPE_BUTTON, TOOL_TYPE_SPACE, TOOL_TYPE_TOOL
 
Fields inherited from interface com.moximedia.ows.types.ToolShapeType
TOOL_SHAPE_TYPE_BOX, TOOL_SHAPE_TYPE_LINE, TOOL_SHAPE_TYPE_POINT, TOOL_SHAPE_TYPE_POLYGON
 
Constructor Summary
Tool()
          Creates new Tool
 
Method Summary
 java.lang.String getActiveGraphic()
          Gets the URL of the active graphic image for the tool button, the one that is displayed when the tool is active.
 java.lang.String getCleanName()
          Gets the name of the tool button without quotes or apostrophies.
 int getHeight()
          Returns the height of the tool button image.
 java.lang.String getHelp()
          Gets the descriptive help for the tool button for use in the generated help page.
 java.lang.String getHint()
          Gets the hint that will appear when the mouse is over the tool button.
 boolean getIsSpace()
           
 java.lang.String getName()
          Gets the name of the tool button.
 java.lang.String getNormalGraphic()
          Gets the URL of the standard graphic image for the tool button.
 int getShapeType()
          Gets the shape type of the tool button.
 java.lang.String getShapeTypeString()
          Gets the shape type of the tool button.
 java.lang.String getStatusMessage()
          Gets the status message that will appear when the mouse is over the tool button.
 java.lang.String getTarget()
          Gets the target frame of the tool button that the URL will be executed in when it is pushed.
 java.lang.String getUrl()
          Gets the URL of the tool or button that will be executed when it is used.
 int getWidth()
          Returns the width of the tool button image.
 boolean isButton()
          Returns true if the tool button is a button, otherwise false.
 boolean isPopup()
           
 boolean isSpace()
          Returns true if the tool button is a space, otherwise false.
 boolean isTool()
          Returns true if the tool button is a tool, otherwise false.
 boolean isVisible()
          Returns true if the tool is visible, otherwise false.
 boolean requiresVml()
           
 void setActiveGraphic(java.lang.String graphic)
          The URL of the graphic that will appear when the tool is active.
 void setHint(java.lang.String hint)
          Sets the hint text that will display when the mouse is over the tool.
 void setIsTool(boolean isTool)
          Sets this tool to be a tool as opposed to a button.
 void setName(java.lang.String name)
          Sets the name of a map tool.
 void setNormalGraphic(java.lang.String graphic)
          The URL of the graphic that will appear when the tool is not active.
 void setShapeType(java.lang.String type)
           
 void setStatusMessage(java.lang.String statusMessage)
          Sets the status message that will display when the mouse is ovet the tool.
 void setTarget(java.lang.String target)
          Sets the target frame where the URL is executed.
 void setUrl(java.lang.String url)
           
 void setVisible(boolean isVisible)
           
 void setXmlAttribute(Config conf, java.lang.String tag, java.lang.String name, java.lang.String value)
          Sets one of the attributes of this object using a string value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tool

public Tool()
Creates new Tool

Method Detail

setXmlAttribute

public void setXmlAttribute(Config conf,
                            java.lang.String tag,
                            java.lang.String name,
                            java.lang.String value)
Sets one of the attributes of this object using a string value. This method should only be called from the SAX event handler.

Parameters:
tag - The AXL element tag containing this attribute.
name - The AXL attribute name.
value - The AXL attribute value.

getHelp

public java.lang.String getHelp()
Gets the descriptive help for the tool button for use in the generated help page.

Returns:
The descriptive help for the tool button.

getName

public java.lang.String getName()
Gets the name of the tool button.

Returns:
The name of the tool button.

getCleanName

public java.lang.String getCleanName()
Gets the name of the tool button without quotes or apostrophies.

Returns:
The name of the tool button.

setName

public void setName(java.lang.String name)
Sets the name of a map tool. The name is used by the map tool frame and status frame to identify the active tool, if applicable.

Parameters:
name - The name of the map tool.

isPopup

public boolean isPopup()

setTarget

public void setTarget(java.lang.String target)
Sets the target frame where the URL is executed. Valid frame names are: "mapFrame", "dataFrame", "toolFrame", "statusFrame", "hiddenFrame", or "_blank".

Parameters:
target - The target frame for the tool's action.

setUrl

public void setUrl(java.lang.String url)

setHint

public void setHint(java.lang.String hint)
Sets the hint text that will display when the mouse is over the tool. Keep this short.

Parameters:
hint - The hint text.

setStatusMessage

public void setStatusMessage(java.lang.String statusMessage)
Sets the status message that will display when the mouse is ovet the tool. The message appears in the browser's status bar.

Parameters:
statusMessage - The status message.

setNormalGraphic

public void setNormalGraphic(java.lang.String graphic)
The URL of the graphic that will appear when the tool is not active. If the tool is a button, this will be the only graphic, but if it is a tool, the image will be replaced with the Active Graphic.

Parameters:
graphic - The URL of the standard (non-active) tool image.

setActiveGraphic

public void setActiveGraphic(java.lang.String graphic)
The URL of the graphic that will appear when the tool is active. If the tool is a tool (not a button), this image will be displayed when the user selects this tool.

Parameters:
graphic - The URL of the active tool image.

setIsTool

public void setIsTool(boolean isTool)
Sets this tool to be a tool as opposed to a button. Tools set modes that cause actions to happen when the user interacts with the map. Buttons cause something to happen right away.

Parameters:
isTool - True if the tool is a tool, otherwise false.

getIsSpace

public boolean getIsSpace()

getShapeType

public int getShapeType()
Gets the shape type of the tool button.

Returns:
The shape type of the tool button.

setShapeType

public void setShapeType(java.lang.String type)

getShapeTypeString

public java.lang.String getShapeTypeString()
Gets the shape type of the tool button.

Returns:
The shape type of the tool button.

getUrl

public java.lang.String getUrl()
Gets the URL of the tool or button that will be executed when it is used.

Returns:
The URL of the tool or button.

getTarget

public java.lang.String getTarget()
Gets the target frame of the tool button that the URL will be executed in when it is pushed. Valid frame names are: "mapFrame", "dataFrame", "toolFrame", "statusFrame", "hiddenFrame", or "_blank".

Returns:
The target frame of the tool button.

getHint

public java.lang.String getHint()
Gets the hint that will appear when the mouse is over the tool button.

Returns:
The mouseover hint of the tool button.

getStatusMessage

public java.lang.String getStatusMessage()
Gets the status message that will appear when the mouse is over the tool button.

Returns:
The mouseover status message of the tool button.

getNormalGraphic

public java.lang.String getNormalGraphic()
Gets the URL of the standard graphic image for the tool button.

Returns:
The URL of the standard graphic image for the tool button.

getActiveGraphic

public java.lang.String getActiveGraphic()
Gets the URL of the active graphic image for the tool button, the one that is displayed when the tool is active.

Returns:
The URL of the active graphic image for the tool button.

getWidth

public int getWidth()
Returns the width of the tool button image.

Returns:
The width the tool button image.

getHeight

public int getHeight()
Returns the height of the tool button image.

Returns:
The height the tool button image.

isSpace

public boolean isSpace()
Returns true if the tool button is a space, otherwise false.

Returns:
True if the tool button is a space, otherwise false.

isTool

public boolean isTool()
Returns true if the tool button is a tool, otherwise false.

Returns:
True if the tool button is a tool, otherwise false.

isButton

public boolean isButton()
Returns true if the tool button is a button, otherwise false.

Returns:
True if the tool button is a button, otherwise false.

requiresVml

public boolean requiresVml()

isVisible

public boolean isVisible()
Returns true if the tool is visible, otherwise false.

Returns:
True if the tool is a tool and visible or is a button, otherwise false.

setVisible

public void setVisible(boolean isVisible)


Internet Mapping Framework for OpenGIS Java Object Model API (v1.3.007)
Copyright © 2005 Moxi Media Inc. and Province of British Columbia. All Rights Reserved.