Package com.openinventor.inventor.nodes
Class SoWWWAnchor
- All Implemented Interfaces:
SafeDisposable
Separator group node with a URL hyperlink.
This node defines a separator group which has a URL (Universal Resource Locator) hyperlink. When clicked on, this node invokes an application callback to fetch the URL. The application may fetch the data itself, or call a web browser to load the URL.
File format/default:
WWWAnchor {
boundingBoxCaching | AUTO |
renderCulling | AUTO |
pickCulling | AUTO |
fastEditing | DISABLE |
mode | AUTO |
style | EMISSIVE |
color | 0.3 0.3 0.3 |
name | "<Undefined URL>" |
description | "" |
map | NONE |
Action behavior:
SoHandleEventAction
When the left mouse is clicked over a child of this anchor node, the application is called back to fetch the URL (see setFetchURLCallBack()).
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoLocateHighlight
SoLocateHighlight.Modes, SoLocateHighlight.Styles
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoSeparator
SoSeparator.Cachings, SoSeparator.FastEditings, SoSeparator.RenderUnitIds
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SoSFString
A description of the URL which may make more sense to users than the URL itself (e.g., "The VSG Home Page").final SoSFEnum
<SoWWWAnchor.Mappings> Specifies what additional information should be added to the end of the URL when passed back to the application for fetching.final SoSFFilePathString
URL which the application will be called back to fetch when this node is activated by a left mouse click (e.g., "https://www.openinventor.com/").Fields inherited from class com.openinventor.inventor.nodes.SoLocateHighlight
color, mode, style
Fields inherited from class com.openinventor.inventor.nodes.SoSeparator
boundingBoxCaching, fastEditing, pickCulling, renderCaching, renderCulling, renderUnitId
Fields inherited from class com.openinventor.inventor.nodes.SoGroup
boundingBoxIgnoring
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
enableEvents
(boolean OnOffFlag) Returns the full URL set bysetFullURLName()
, or if not set, returns the contents of the name field.void
setFullURLName
(String url) If the name field contains a relative URL (e.g., "foo.wrl" instead of "http://bogus.com/foo.wrl"), the anchor cannot resolve the URL reference.Methods inherited from class com.openinventor.inventor.nodes.SoLocateHighlight
turnOffCurrentHighlight
Methods inherited from class com.openinventor.inventor.nodes.SoGroup
addChild, findChild, getChild, getNumChildren, insertChild, removeAllChildren, removeChild, removeChild, replaceChild, replaceChild
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Field Details
-
name
URL which the application will be called back to fetch when this node is activated by a left mouse click (e.g., "https://www.openinventor.com/"). -
description
A description of the URL which may make more sense to users than the URL itself (e.g., "The VSG Home Page"). -
map
Specifies what additional information should be added to the end of the URL when passed back to the application for fetching. If set to POINT, then the x,y,z location of the object space intersection point when the mouse was clicked will be suffixed to the URL. Since the comma character does not transmit through some web browsers, it is written in hex form (e.g., if the intersection point is 17,4.5,1 the URL passed to the application callback would be "https://www.openinventor.com/?17\%2c4.5\%2c1"). . Default is NONE.
-
-
Constructor Details
-
SoWWWAnchor
public SoWWWAnchor()Creates an anchor node with default settings.
-
-
Method Details
-
getFullURLName
Returns the full URL set bysetFullURLName()
, or if not set, returns the contents of the name field. -
setFullURLName
If the name field contains a relative URL (e.g., "foo.wrl" instead of "http://bogus.com/foo.wrl"), the anchor cannot resolve the URL reference. This method allows the application to tell the anchor what its full URL should be.getFullURLName()
returns the fullURL set here, or if not set, returns the contents of the name field. -
enableEvents
public static void enableEvents(boolean OnOffFlag)
-