sonia.ui
Class ApplySettingsDialog

java.lang.Object
  extended by sonia.ui.ApplySettingsDialog
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class ApplySettingsDialog
extends java.lang.Object
implements java.awt.event.ActionListener

Provides the controls for specifing layout parameters and how the layots will be applied. Includes starting coords, hondeling of isolates, animating redraws, post-processing, and options to apply to all the remaining slices.


Constructor Summary
ApplySettingsDialog(ApplySettings settings, SoniaController cont, SoniaLayoutEngine eng, java.awt.Frame owner, NetLayout layoutAlg)
          Creates a dilog box with settings to control the various stages of the layout process, including some algorithm specific parameters, which it adds to the window by communicating with the layout algorithm.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          figures out what user did and calls apropriate method
 void addLayoutProperty(java.lang.String name, double value)
          called by the layout algorithm during setup so that it can add parameters to the dilog box.
 ApplySettings getSettings()
           
 java.lang.String getSummaryString()
          returns a string summarizing the layout settings to record in the log
 void setLayoutProperty(java.lang.String name, double value)
          sets the algorithm specific layout pramter to the passed value, after checking that there is a parameter corresponding to name.
 void showDialog()
          displays the dialog on screen
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplySettingsDialog

public ApplySettingsDialog(ApplySettings settings,
                           SoniaController cont,
                           SoniaLayoutEngine eng,
                           java.awt.Frame owner,
                           NetLayout layoutAlg)
Creates a dilog box with settings to control the various stages of the layout process, including some algorithm specific parameters, which it adds to the window by communicating with the layout algorithm.

Parameters:
cont - the main soniaController
eng - the layout engine which the layout belongs to
owner - the parent frame (the layout window)
layoutAlg - the layout algorithm
Method Detail

showDialog

public void showDialog()
displays the dialog on screen


addLayoutProperty

public void addLayoutProperty(java.lang.String name,
                              double value)
called by the layout algorithm during setup so that it can add parameters to the dilog box.

Parameters:
name - the string name of the prameter to display and to use as the key
value - the defualt double value of the parameter

setLayoutProperty

public void setLayoutProperty(java.lang.String name,
                              double value)
sets the algorithm specific layout pramter to the passed value, after checking that there is a parameter corresponding to name. Will spit out an error (TO CONSOLE, SHOULD FIX THIS?) if there is no param.

Parameters:
name - the string name of the paramter to set
value - the double value to set it to

getSummaryString

public java.lang.String getSummaryString()
returns a string summarizing the layout settings to record in the log


getSettings

public ApplySettings getSettings()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
figures out what user did and calls apropriate method

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
evt - the ActionEvent to determine the source of the event