|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.tree.DefaultMutableTreeNode org.opensourcephysics.tools.LaunchNode
public class LaunchNode
This is a tree node that can describe and launch an application.
Nested Class Summary | |
---|---|
class |
LaunchNode.HTML
A class to hold html data. |
Field Summary |
---|
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
---|---|
LaunchNode(java.lang.String name)
Constructs a node with the specified name. |
Method Summary | |
---|---|
LaunchNode.HTML |
addHTML(java.lang.String title,
java.lang.String path)
Adds an HTML tab with the specified title and relative path. |
void |
addMenuItemsTo(javax.swing.JComponent menu)
Adds menu item to a JPopupMenu or JMenu. |
void |
addTerminateAction(javax.swing.Action action)
Adds an action to this node's actions collection. |
boolean |
exists()
Determines whether a resource exists for this node. |
LaunchNode[] |
getAllOwnedNodes()
Returns all descendents of this node with non-null file names. |
java.lang.String[] |
getArgs()
Gets the launch arguments of this node. |
java.lang.String |
getAuthor()
Gets the author. |
LaunchNode |
getChildNode(java.lang.String childFileName)
Gets a child node specified by fileName. |
LaunchNode[] |
getChildOwnedNodes()
Returns the nearest descendents of this node with non-null file names. |
java.lang.String |
getClassPath()
Gets the complete class path in node-to-root order. |
java.lang.String |
getComment()
Gets the comment of this node. |
java.lang.String |
getCourseLevel()
Gets the course level of this node or ancestor. |
java.lang.String |
getDescription()
Gets the description of this node. |
java.io.File |
getFile()
Return an existing file with current file name and specified base. |
java.lang.String |
getFileName()
Gets the fileName. |
LaunchNode.HTML |
getHTML(int tab)
Gets an HTML tab. |
int |
getHTMLCount()
Returns the number of html objects in the list. |
java.lang.String |
getID()
Gets the unique ID string for this node. |
java.lang.String |
getKeywords()
Gets the keywords of this node or ancestor. |
java.lang.String |
getLanguages()
Gets the languages for which translations exist for this node or ancestor. |
java.lang.Class<?> |
getLaunchClass()
Gets the launch class for this node. |
java.lang.Object |
getLaunchObject()
Gets the launch object. |
static XML.ObjectLoader |
getLoader()
Returns the XML.ObjectLoader for this class. |
java.util.logging.Level |
getLogLevel()
Gets the log level. |
java.lang.String |
getName()
Gets the name of this node. |
LaunchNode |
getOwner()
Returns the nearest ancestor with a non-null file name. |
java.lang.String |
getPathString()
Gets the string path to this node, starting from the root. |
Resource |
getResource()
Gets the resource, if any, for this node |
java.lang.String |
getTooltip()
Gets the tooltip of this node. |
LaunchNode.HTML |
insertHTML(int tab,
java.lang.String title,
java.lang.String path)
Inserts an HTML tab with the specified title and relative path. |
boolean |
isButtonView()
Gets the buttonView value. |
boolean |
isClearLog()
Gets the clearLog value. |
boolean |
isHiddenInLauncher()
Gets the hiddenInLauncher value. |
boolean |
isParentSelfContained()
Gets the parentSelfContained flag. |
boolean |
isPreviewing()
Gets the previewing flag. |
boolean |
isSavingHiddenNodes()
Gets the saveHiddenNodes flag. |
boolean |
isSelfContained()
Gets the selfContained flag. |
boolean |
isShowLog()
Gets the showLog value. |
boolean |
isSingleApp()
Gets the singleApp value. |
boolean |
isSingleton()
Gets the singleton value. |
boolean |
isSingleVM()
Gets the singleVM flag. |
void |
launch()
Launches this node. |
void |
launch(LaunchPanel tab)
Launches this node from the specified launch panel. |
boolean |
matches(LaunchNode node)
Determines if this node matches another node. |
LaunchNode.HTML |
removeHTML(int tab)
Removes an HTML tab. |
void |
removeTerminateAction(javax.swing.Action action)
Removes an action from this node's actions collection. |
protected void |
removeThread(java.lang.Runnable runner)
|
void |
setArgs(java.lang.String[] args)
Sets the launch arguments of this node. |
void |
setAuthor(java.lang.String _author)
Sets the author of this node |
void |
setButtonView(boolean buttonView)
Sets the buttonView flag. |
void |
setClassPath(java.lang.String jarNames)
Sets the class path (jar file names separated by colons or semicolons). |
void |
setClearLog(boolean clear)
Sets the showLog flag. |
void |
setComment(java.lang.String _comment)
Sets the comment of this node |
void |
setCourseLevel(java.lang.String _level)
Sets the course level of this node |
void |
setDescription(java.lang.String desc)
Sets the description of this node. |
java.lang.String |
setFileName(java.lang.String path)
Sets the fileName. |
void |
setHiddenInLauncher(boolean hide)
Sets the hiddenInLauncher flag. |
void |
setHiddenWhenRoot(boolean hide)
Sets the hiddenWhenRoot flag. |
LaunchNode.HTML |
setHTML(int tab,
java.lang.String title,
java.lang.String path)
Sets the specified HTML tab title and url path. |
void |
setKeyword(java.lang.String _keywords)
Sets the keywords of this node |
void |
setLanguages(java.lang.String _lang)
Sets the languages for which translations exist for this node |
boolean |
setLaunchClass(java.lang.String className)
Sets the launch class for this node. |
void |
setLaunchObject(java.lang.Object obj)
Sets the launch object. |
void |
setLogLevel(java.util.logging.Level level)
Sets the log level. |
protected void |
setMinimumArgLength(int n)
|
void |
setName(java.lang.String name)
Sets the name of this node. |
void |
setSelfContained(boolean selfContained)
Sets the selfContained flag. |
void |
setShowLog(boolean show)
Sets the showLog flag. |
void |
setSingleApp(boolean singleApp)
Sets the singleApp flag. |
void |
setSingleton(boolean singleton)
Sets the singleton flag. |
void |
setSingleVM(boolean singleVM)
Sets the single VM flag. |
void |
setTooltip(java.lang.String _tooltip)
Sets the tooltip of this node |
void |
terminate(javax.swing.Action action)
Removes an action from this node's actions collection. |
void |
terminateAll()
Terminates all apps launched by this node. |
void |
threadRunning(boolean starting)
Signals that a launch thread for this node is about to start or end. |
java.lang.String |
toString()
Returns a string used as a display name for this node. |
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LaunchNode(java.lang.String name)
name
- the nameMethod Detail |
---|
public void threadRunning(boolean starting)
starting
- true if the thread is startingpublic void launch()
public void launch(LaunchPanel tab)
tab
- the launch panelpublic LaunchNode getOwner()
public LaunchNode[] getAllOwnedNodes()
public LaunchNode[] getChildOwnedNodes()
public java.lang.String toString()
toString
in class javax.swing.tree.DefaultMutableTreeNode
public java.lang.String getID()
public void setName(java.lang.String name)
name
- the namepublic java.lang.String getName()
public void setDescription(java.lang.String desc)
desc
- the descriptionpublic java.lang.String getDescription()
public void setArgs(java.lang.String[] args)
args
- the argumentspublic java.lang.String[] getArgs()
public void setTooltip(java.lang.String _tooltip)
_tooltip
- the tooltippublic java.lang.String getTooltip()
public void setAuthor(java.lang.String _author)
_author
- the authorpublic java.lang.String getAuthor()
public void setKeyword(java.lang.String _keywords)
_keywords
- the keywordspublic java.lang.String getKeywords()
public void setComment(java.lang.String _comment)
_comment
- the commentpublic java.lang.String getComment()
public void setCourseLevel(java.lang.String _level)
_level
- the levelpublic java.lang.String getCourseLevel()
public void setLanguages(java.lang.String _lang)
_lang
- the languagespublic java.lang.String getLanguages()
public java.lang.String getClassPath()
public void setClassPath(java.lang.String jarNames)
jarNames
- the class pathpublic boolean setLaunchClass(java.lang.String className)
className
- the name of the class
public java.lang.Class<?> getLaunchClass()
public java.lang.Object getLaunchObject()
public void setLaunchObject(java.lang.Object obj)
obj
- the launch objectpublic LaunchNode.HTML addHTML(java.lang.String title, java.lang.String path)
title
- the tab title. May be null.path
- the html path.public LaunchNode.HTML insertHTML(int tab, java.lang.String title, java.lang.String path)
tab
- the insertion indextitle
- the tab title. May be null.path
- the html path.public LaunchNode.HTML removeHTML(int tab)
tab
- the tab number
public LaunchNode.HTML getHTML(int tab)
tab
- the tab number
public int getHTMLCount()
public LaunchNode.HTML setHTML(int tab, java.lang.String title, java.lang.String path)
tab
- the tab numbertitle
- the tab titlepath
- the path of the url.
public java.lang.String getFileName()
public java.lang.String getPathString()
public java.lang.String setFileName(java.lang.String path)
path
- the path to the file
public boolean isParentSelfContained()
public boolean isSelfContained()
public boolean isPreviewing()
public boolean isSavingHiddenNodes()
public void setSelfContained(boolean selfContained)
selfContained
- true if self containedpublic boolean isSingleVM()
public void setSingleVM(boolean singleVM)
singleVM
- true if single vmpublic boolean isShowLog()
public void setShowLog(boolean show)
show
- true to show the OSPLog (single vm only)public boolean isClearLog()
public void setClearLog(boolean clear)
clear
- true to clear the OSPLog (single vm only)public java.util.logging.Level getLogLevel()
public void setLogLevel(java.util.logging.Level level)
level
- the levelpublic boolean isSingleApp()
public void setSingleApp(boolean singleApp)
singleApp
- true to close other apps when launching new app (single vm only)public void setHiddenWhenRoot(boolean hide)
hide
- true to hide node when at rootpublic boolean isButtonView()
public void setButtonView(boolean buttonView)
buttonView
- true to display in buttonViewpublic boolean isSingleton()
public void setSingleton(boolean singleton)
singleton
- true to allow single instance when in separate vmpublic boolean isHiddenInLauncher()
public void setHiddenInLauncher(boolean hide)
hide
- true to hide this node in Launcherpublic Resource getResource()
public boolean exists()
public java.io.File getFile()
public boolean matches(LaunchNode node)
node
- the node to match
public LaunchNode getChildNode(java.lang.String childFileName)
childFileName
- the file name of the child
public void addMenuItemsTo(javax.swing.JComponent menu)
menu
- the menupublic void addTerminateAction(javax.swing.Action action)
action
- the action to addpublic void removeTerminateAction(javax.swing.Action action)
action
- the action to removepublic void terminate(javax.swing.Action action)
action
- the action to removepublic void terminateAll()
public static XML.ObjectLoader getLoader()
protected void setMinimumArgLength(int n)
protected void removeThread(java.lang.Runnable runner)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |