Skip to content

Commit

Permalink
Merge branch 'development' into hpc-client
Browse files Browse the repository at this point in the history
  • Loading branch information
chirayukong committed Feb 15, 2017
1 parent e0ddcff commit 16c2bcc
Show file tree
Hide file tree
Showing 261 changed files with 11,722 additions and 8,758 deletions.
19 changes: 17 additions & 2 deletions tetrad-gui/src/main/java/edu/cmu/tetradapp/Tetrad.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ public final class Tetrad implements PropertyChangeListener {
"Tetrad " + Version.currentViewableVersion()
.toString();


/**
* Skip latest version checking
*/
private static boolean skipLatest;

//==============================CONSTRUCTORS===========================//

public Tetrad() {
Expand Down Expand Up @@ -98,14 +104,22 @@ public void propertyChange(final PropertyChangeEvent e) {
* contents and all of the images which Tetrad IV uses, all in their proper
* relative directories.</p>
*
* @param argv moves line arguments (none for now).
* @param argv --skip-latest argument will skip checking for latest version.
*/
public static void main(final String[] argv) {
setLookAndFeel();

// This is needed to get numbers to be parsed and rendered uniformly, especially in the interface.
Locale.setDefault(Locale.US);

// Check if we should skip checking for latest version
if (argv.length > 0 && argv[0] != null && argv[0].compareToIgnoreCase("--skip-latest") == 0) {
skipLatest = true;
} else {
skipLatest = false;
}


new Tetrad().launchFrame();
}

Expand Down Expand Up @@ -174,7 +188,7 @@ public Dimension getPreferredSize() {
// this.frame.setMinimumSize(Toolkit.getDefaultToolkit().getScreenSize());
// this.frame.setMaximumSize(Toolkit.getDefaultToolkit().getScreenSize());

SplashScreen.show(getFrame(), "Loading Tetrad...", 1000);
SplashScreen.show(getFrame(), "Loading Tetrad...", 1000, skipLatest);

getFrame().setContentPane(getDesktop());
getFrame().pack();
Expand Down Expand Up @@ -231,6 +245,7 @@ private JFrame getFrame() {
private TetradDesktop getDesktop() {
return desktop;
}

}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ private Node addNode(String nodeType, String nodeName, int centerX,
return node;
}

private void addEdge(String nodeName1, String nodeName2) {
public void addEdge(String nodeName1, String nodeName2) {

// Retrieve the nodes from the session wrapper.
Node node1 = getSessionWrapper().getNode(nodeName1);
Expand All @@ -451,6 +451,8 @@ private void addEdge(String nodeName1, String nodeName2) {

// Add the edge.
getSessionWrapper().addEdge(edge);
getSessionWorkbench().revalidate();
getSessionWorkbench().repaint();
}

private static SessionNodeWrapper getNewModelNode(String nextButtonType,
Expand Down
Loading

0 comments on commit 16c2bcc

Please sign in to comment.