|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.tools.Launcher
org.opensourcephysics.tools.LaunchBuilder
public class LaunchBuilder
This provides a GUI for building LaunchNode and LaunchSet xml files.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.opensourcephysics.tools.Launcher |
|---|
Launcher.HTMLPane, Launcher.LaunchSet |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
LaunchBuilder()
No-arg constructor. |
|
LaunchBuilder(boolean splash)
Constructs a builder with or without a splash screen. |
|
LaunchBuilder(java.lang.String fileName)
Constructs a builder and loads the specified file. |
|
LaunchBuilder(java.lang.String fileName,
boolean splash)
Constructs a builder and loads the specified file with or without splash. |
|
| Method Summary | |
|---|---|
void |
addChildToSelectedNode(LaunchNode child)
Adds a child node to the selected node. |
boolean |
addTab(LaunchNode root)
Creates a LaunchPanel with the specified root and adds it to a new tab. |
protected void |
createActions()
Creates the actions. |
protected void |
createGUI(boolean splash)
Creates the GUI. |
protected void |
exit()
Overrides Launcher exit method. |
protected java.util.Map<LaunchPanel,LaunchNode> |
getClones(LaunchNode node)
Returns clones containing a specified node in a tab-to-node map. |
protected static javax.swing.JFileChooser |
getFileChooser()
Gets a file chooser. |
protected static javax.swing.JFileChooser |
getHTMLChooser()
Gets a file chooser for selecting html files. |
protected static javax.swing.JFileChooser |
getJARChooser()
Gets a file chooser for selecting jar files. |
protected void |
handleMousePressed(java.awt.event.MouseEvent e,
LaunchPanel tab)
Handles a mouse pressed event. |
protected boolean |
isNodeWritable(LaunchNode node)
Returns true if node is writable. |
protected boolean |
isTabSetWritable()
Returns true if tabset is writable. |
static void |
main(java.lang.String[] args)
Main entry point when used as application. |
protected void |
refreshClones(LaunchNode node)
Replaces clones of a specified node with new clones. |
protected void |
refreshGUI()
Refreshes the GUI. |
protected void |
refreshNode(LaunchNode node)
Refreshes the specified node with data from the input fields. |
protected void |
refreshSelectedNode()
Refreshes the selected node. |
protected void |
refreshStringResources()
Refreshes string resources. |
protected boolean |
removeAllTabs()
Removes all tabs and closes the tabset. |
void |
removeSelectedNode()
Removes the selected node. |
boolean |
removeSelectedTab()
Removes the selected tab. |
protected void |
replaceClones(LaunchNode node,
java.util.Map<LaunchPanel,LaunchNode> clones)
Replaces nodes with clones of the specified node. |
java.lang.String |
save(LaunchNode node,
java.lang.String fileName)
Saves a node to the specified file. |
protected boolean |
saveAllChanges()
Offers to save all changes, if any. |
java.lang.String |
saveAs(LaunchNode node)
Saves a node to an xml file selected with a chooser. |
protected boolean |
saveChanges(LaunchPanel tab)
Offers to save changes, if any, to the specified tab. |
protected boolean |
saveOwnedNodes(LaunchNode node)
Saves the owned nodes of the specified node. |
boolean |
saveTabs()
Saves tabs. |
java.lang.String |
saveTabSet()
Saves the current tabset. |
protected java.lang.String |
saveTabSetAs()
Saves a tabset to a file selected with a chooser. |
protected void |
setFontLevel(int level)
Sets the font level. |
protected void |
showAboutDialog()
Shows the about dialog. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LaunchBuilder()
public LaunchBuilder(java.lang.String fileName)
fileName - the file namepublic LaunchBuilder(boolean splash)
splash - true to show the splash screen
public LaunchBuilder(java.lang.String fileName,
boolean splash)
fileName - the file namesplash - true to show the splash screen| Method Detail |
|---|
public static void main(java.lang.String[] args)
args - args[0] may be an xml file name
public java.lang.String save(LaunchNode node,
java.lang.String fileName)
node - the nodefileName - the desired name of the file
public java.lang.String saveAs(LaunchNode node)
node - the node
protected boolean saveOwnedNodes(LaunchNode node)
node - the node
protected java.lang.String saveTabSetAs()
public java.lang.String saveTabSet()
public boolean saveTabs()
protected void refreshSelectedNode()
protected void refreshNode(LaunchNode node)
node - the node to refreshpublic boolean addTab(LaunchNode root)
addTab in class Launcherroot - the root node
public boolean removeSelectedTab()
removeSelectedTab in class Launcherprotected boolean saveChanges(LaunchPanel tab)
tab - the tab
protected boolean removeAllTabs()
removeAllTabs in class Launcherprotected boolean saveAllChanges()
protected void refreshStringResources()
refreshStringResources in class Launcherprotected void refreshGUI()
refreshGUI in class Launcherprotected void createGUI(boolean splash)
createGUI in class Launchersplash - true to show the splash screenprotected void setFontLevel(int level)
setFontLevel in class Launcherlevel - the levelprotected void createActions()
public void removeSelectedNode()
public void addChildToSelectedNode(LaunchNode child)
child - the child node to addprotected void refreshClones(LaunchNode node)
node - the current version of the node to clone
protected void replaceClones(LaunchNode node,
java.util.Map<LaunchPanel,LaunchNode> clones)
node - the current version of the node to cloneclones - the current clones to replaceprotected java.util.Map<LaunchPanel,LaunchNode> getClones(LaunchNode node)
node - the node
protected void showAboutDialog()
showAboutDialog in class Launcherprotected static javax.swing.JFileChooser getJARChooser()
protected static javax.swing.JFileChooser getHTMLChooser()
protected static javax.swing.JFileChooser getFileChooser()
protected void handleMousePressed(java.awt.event.MouseEvent e,
LaunchPanel tab)
handleMousePressed in class Launchere - the mouse eventtab - the launch panel triggering the eventprotected void exit()
exit in class Launcherprotected boolean isTabSetWritable()
protected boolean isNodeWritable(LaunchNode node)
node - the node
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||