mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
make javadoc broken
The makefile rule javadoc was misnamed docs in trick_source/java/makefile. I fixed hundreds of warnings and errors that were present when creating the java docs. refs #159
This commit is contained in:
parent
32da702aeb
commit
87a48b36f5
1
share/doc/trick/.gitignore
vendored
1
share/doc/trick/.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
html
|
||||
trick.tag
|
||||
java
|
||||
|
@ -12,7 +12,7 @@ DEST_DIR = ${BUILD_DIR}/classes
|
||||
LIB_DIR = ${TRICK_HOME}/$(LIBEXEC)/trick/java/lib
|
||||
DIST_DIR = ${TRICK_HOME}/$(LIBEXEC)/trick/java/dist
|
||||
RESOURCES_DIR = ${TRICK_HOME}/$(LIBEXEC)/trick/java/resources
|
||||
DOCS_API_DIR = docs/api
|
||||
DOCS_API_DIR = ${TRICK_HOME}/share/doc/trick/java
|
||||
TEST_REPORTS_DIR = test/reports
|
||||
|
||||
empty :=
|
||||
@ -47,11 +47,10 @@ ${RESOURCES_DIR}/trick_icon.png: ${SRC_DIR}/trick/common/resources/trick_icon.pn
|
||||
|
||||
JAVA_DOC_LINKS = \
|
||||
-link "http://docs.oracle.com/javase/6/docs/api/" \
|
||||
-link "http://www.jdocs.com/swingx/1.0/overview-summary.html" \
|
||||
-link "http://www.jfree.org/jfreechart/api/javadoc/" \
|
||||
-link "http://junit.sourceforge.net/javadoc/"
|
||||
|
||||
docs: ${DOCS_API_DIR}
|
||||
javadoc: ${DOCS_API_DIR}
|
||||
javadoc -d ${DOCS_API_DIR} -classpath ${CLASS_PATH} -sourcepath ${SRC_DIR} -windowtitle "Trick GUI API" ${JAVA_DOC_LINKS} trick ${SRC_FILES}
|
||||
|
||||
clean:
|
||||
|
@ -91,7 +91,9 @@ public abstract class RunTimeTrickApplication extends TrickApplication {
|
||||
protected static final String widthKey = "width";
|
||||
protected static final String heightKey = "height";
|
||||
|
||||
/** attempts to connect to the simulation specified by the current host name and port */
|
||||
/** attempts to connect to the simulation specified by the current host name and port
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
protected void connect() throws IOException {
|
||||
if (!connected) {
|
||||
variableServerConnection = new VariableServerConnection(
|
||||
@ -103,7 +105,9 @@ public abstract class RunTimeTrickApplication extends TrickApplication {
|
||||
}
|
||||
}
|
||||
|
||||
/** attempts to disconnect from the simulation */
|
||||
/** attempts to disconnect from the simulation
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
protected void disconnect() throws IOException {
|
||||
disconnect(null);
|
||||
}
|
||||
@ -114,6 +118,7 @@ public abstract class RunTimeTrickApplication extends TrickApplication {
|
||||
* <code>null</code>, it is displayed as the reason for the disconnection.
|
||||
*
|
||||
* @param exception (optional) the reason for the disconnection
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
protected void disconnect(Exception exception) throws IOException {
|
||||
if (connected) {
|
||||
@ -663,6 +668,7 @@ public abstract class RunTimeTrickApplication extends TrickApplication {
|
||||
* adds <code>panel</code> to this dialog
|
||||
*
|
||||
* @param panel the panel to add
|
||||
* @param constraints constraints
|
||||
*/
|
||||
public void addPanel(JPanel panel, GridBagConstraints constraints) {
|
||||
mainPanel.add(panel, constraints);
|
||||
@ -701,7 +707,7 @@ public abstract class RunTimeTrickApplication extends TrickApplication {
|
||||
public interface CommitChangesListener {
|
||||
/**
|
||||
* called just before changes are to be committed, allowing listeners to
|
||||
* veto the commit. If any listener returns <code>false<code>,
|
||||
* veto the commit. If any listener returns <code>false</code>,
|
||||
* <code>commitChanges()</code> will not be called.
|
||||
*
|
||||
* @return whether or not to proceed with the commit
|
||||
|
@ -265,7 +265,7 @@ public abstract class TrickApplication extends SingleFrameApplication implements
|
||||
|
||||
/**
|
||||
* Helper method for changing the look and feel for the application.
|
||||
*
|
||||
* @param lafClassName string of look and feel to use.
|
||||
*/
|
||||
protected void changeLookAndFeel(String lafClassName) {
|
||||
if (lafClassName != null) {
|
||||
@ -500,6 +500,7 @@ public abstract class TrickApplication extends SingleFrameApplication implements
|
||||
*
|
||||
* @param menu An instance of {@link JMenu} which needs adding radio button menu itmes for.
|
||||
* @param actions A list of actions that are for menu items.
|
||||
* @return the menu items created
|
||||
*/
|
||||
protected JRadioButtonMenuItem[] addRadioButtonMenuItems(JMenu menu, String[] actions) {
|
||||
JRadioButtonMenuItem[] menuItems = new JRadioButtonMenuItem[actions.length];
|
||||
@ -579,6 +580,7 @@ public abstract class TrickApplication extends SingleFrameApplication implements
|
||||
* Creates a checkbox menu item via the specified action name
|
||||
*
|
||||
* @param actionName the name of the action
|
||||
* @param b true or false
|
||||
*
|
||||
* @return the checkbox menu item
|
||||
*/
|
||||
@ -601,6 +603,7 @@ public abstract class TrickApplication extends SingleFrameApplication implements
|
||||
* resource property file from which any sub-class can inherit. All sub-class
|
||||
* needs to have its own {@code Application.id}, {@code Application.title}, and
|
||||
* {@code Application.description} to distinguish it from others.
|
||||
* @return the about box
|
||||
*/
|
||||
protected JDialog createAboutBox() {
|
||||
JPanel panel = new JPanel(new GridBagLayout());
|
||||
|
@ -51,6 +51,7 @@ public class TrickFileFilter implements java.io.FileFilter {
|
||||
//========================================
|
||||
/**
|
||||
* Default constructor.
|
||||
* @param type not sure.
|
||||
*/
|
||||
public TrickFileFilter(int type) {
|
||||
this.type = type;
|
||||
|
@ -261,6 +261,9 @@ public class UIUtils {
|
||||
|
||||
/**
|
||||
* Checks to see if a JComboBox contains an object.
|
||||
* @param model combo box to check
|
||||
* @param obj object to test for
|
||||
* @return true or false
|
||||
*/
|
||||
public static boolean comboBoxContains(DefaultComboBoxModel model, Object obj) {
|
||||
for (int i = 0; i < model.getSize(); i++) {
|
||||
@ -368,6 +371,8 @@ public class UIUtils {
|
||||
/**
|
||||
* Returns a file's name without its extension. If no extension found, return
|
||||
* the original file name.
|
||||
* @param file file object to use.
|
||||
* @return file name
|
||||
*/
|
||||
public static String getFileNameWithoutExtension(File file) {
|
||||
String fileName = file.getName();
|
||||
@ -656,6 +661,15 @@ public class UIUtils {
|
||||
* Normally, it's a {@link JComboBox} if less than 20 <code>selectionValues</code>,
|
||||
* {@link JList} if equal or greater than 20 <code>selectionValues</code>, or
|
||||
* {@link JTextField} if null <code>selectionValues</code>.
|
||||
* @param parentComponent parent to use for dialog box
|
||||
* @param message message to show
|
||||
* @param title title of window
|
||||
* @param messageType type of message to show
|
||||
* @param icon icon to use
|
||||
* @param selectionValues list of values to use as choices
|
||||
* @param initialSelectionValue sets initial value of selection values
|
||||
* @return value of the input selection
|
||||
* @throws HeadlessException HeadlessException
|
||||
*/
|
||||
public static Object showListInputDialog(Component parentComponent, Object message, String title, int messageType,
|
||||
Icon icon, Object[] selectionValues, Object initialSelectionValue)
|
||||
|
@ -189,6 +189,7 @@ public class FontChooser extends JDialog implements ActionListener, ListSelectio
|
||||
* @param parent The parent component for the dialog.
|
||||
* @param title The title of the dialog.
|
||||
* @param font The initial font.
|
||||
* @return Font Object
|
||||
*/
|
||||
public static Font showDialog(Component parent, String title, Font font) {
|
||||
Frame frame = JOptionPane.getFrameForComponent(parent);
|
||||
|
@ -98,6 +98,7 @@ public class NumberTextField extends JTextField {
|
||||
//========================================
|
||||
/**
|
||||
* Limits the text field only for integers.
|
||||
* @param intOnly true or false
|
||||
*/
|
||||
public void setIntOnly(boolean intOnly) {
|
||||
this.intOnly = intOnly;
|
||||
|
@ -58,6 +58,7 @@ public class AnimationPlayer extends JPanel {
|
||||
//========================================
|
||||
/**
|
||||
* Default constructor.
|
||||
* @param fileName name of file
|
||||
*/
|
||||
public AnimationPlayer(String fileName) {
|
||||
animationFile = fileName;
|
||||
|
@ -171,6 +171,7 @@ public class DynamicTree extends DataPanel {
|
||||
*
|
||||
* @param parent The parent {@link DefaultMutableTreeNode}.
|
||||
* @param child The child object.
|
||||
* @return the top of the tree
|
||||
*/
|
||||
public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent, Object child) {
|
||||
return addObject(parent, child, false);
|
||||
@ -182,6 +183,7 @@ public class DynamicTree extends DataPanel {
|
||||
* @param parent The parent {@link DefaultMutableTreeNode}.
|
||||
* @param child The child object.
|
||||
* @param shouldBeVisible <code>true</code> the node should be visible, <code>false</code> otherwise.
|
||||
* @return the top of the tree
|
||||
*/
|
||||
public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent, Object child, boolean shouldBeVisible) {
|
||||
DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(child);
|
||||
@ -261,7 +263,7 @@ public class DynamicTree extends DataPanel {
|
||||
|
||||
/**
|
||||
* Gets all selected nodes.
|
||||
*
|
||||
* @return list of selected nodes.
|
||||
*/
|
||||
public ArrayList<DefaultMutableTreeNode> getSelectedNodes() {
|
||||
ArrayList<DefaultMutableTreeNode> selectedNodes = null;
|
||||
|
@ -86,12 +86,14 @@ public class FindBar extends JXFindBar implements ActionListener{
|
||||
//========================================
|
||||
/**
|
||||
* Gets to see if case sensitive is checked.
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isCaseSensitive() {
|
||||
return getPatternModel().isCaseSensitive();
|
||||
}
|
||||
/**
|
||||
* Sets whether to have the options as {@link JXFindPanel}.
|
||||
* @param b true or false
|
||||
*/
|
||||
public void setOptions(boolean b) {
|
||||
hasOptions = b;
|
||||
@ -100,6 +102,7 @@ public class FindBar extends JXFindBar implements ActionListener{
|
||||
/**
|
||||
* Updates the searchField that is defined in parent class {@link AbstractPatternPanel}
|
||||
* if there is initial search text is defined.
|
||||
* @param searchText searchText
|
||||
*/
|
||||
public void updateSearchField(String searchText) {
|
||||
initialSearchText = searchText;
|
||||
@ -110,6 +113,7 @@ public class FindBar extends JXFindBar implements ActionListener{
|
||||
|
||||
/**
|
||||
* Gets the current search text shown in searchField.
|
||||
* @return the text
|
||||
*/
|
||||
public String getSearchText() {
|
||||
if (searchField != null) {
|
||||
|
@ -76,6 +76,7 @@ public class ListPanel extends DataPanel implements ListSelectionListener{
|
||||
|
||||
/**
|
||||
* Constructor with specified list model.
|
||||
* @param model not sure
|
||||
*/
|
||||
public ListPanel(AbstractListModel model) {
|
||||
super();
|
||||
@ -216,6 +217,7 @@ public class ListPanel extends DataPanel implements ListSelectionListener{
|
||||
|
||||
/**
|
||||
* Gets all selected data from the list.
|
||||
* @return list of selected data
|
||||
*/
|
||||
public Object[] getSelectedData() {
|
||||
return dataList.getSelectedValues();
|
||||
@ -223,6 +225,7 @@ public class ListPanel extends DataPanel implements ListSelectionListener{
|
||||
|
||||
/**
|
||||
* Gets the first selected value, or <code>null</code> if the selection is empty.
|
||||
* @return first selected data
|
||||
*/
|
||||
public Object getSelectedFirstData() {
|
||||
return dataList.getSelectedValue();
|
||||
@ -230,6 +233,7 @@ public class ListPanel extends DataPanel implements ListSelectionListener{
|
||||
|
||||
/**
|
||||
* Gets all data from the list.
|
||||
* @return list of all data
|
||||
*/
|
||||
public Object[] getAllData() {
|
||||
if (dataListModel instanceof SortedListModel) {
|
||||
|
@ -117,7 +117,7 @@ public class CSVDataReader extends DataReader {
|
||||
* Starts the process for getting variable value.
|
||||
*
|
||||
* @param var the variable name which need retrieving value for.
|
||||
* @throws IOException
|
||||
* @throws IOException io exception
|
||||
*/
|
||||
@Override
|
||||
public void beginRead(ProductVar var) throws IOException {
|
||||
|
@ -151,6 +151,8 @@ public abstract class DataReader {
|
||||
|
||||
/**
|
||||
* Gets the log variable for the specified variable.
|
||||
* @param varName string of variable name
|
||||
* @return value of variable.
|
||||
*/
|
||||
public LogVar getLogVar(String varName) {
|
||||
LogVar logVar = null;
|
||||
@ -184,7 +186,7 @@ public abstract class DataReader {
|
||||
* Starts the process for getting value.
|
||||
*
|
||||
* @param var the variable name which need retrieving value for.
|
||||
* @throws IOException
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void beginRead(ProductVar var) throws IOException {
|
||||
theVarIndex = locateVarIndex(var.getName());
|
||||
@ -196,7 +198,7 @@ public abstract class DataReader {
|
||||
*
|
||||
* @return The variable value.
|
||||
*
|
||||
* @throws IOException
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public abstract double getVarValue() throws IOException;
|
||||
|
||||
@ -216,6 +218,8 @@ public abstract class DataReader {
|
||||
|
||||
/**
|
||||
* Returns the index number of a variable in the list based on its name.
|
||||
* @param varName string of variable name
|
||||
* @return index value in list
|
||||
*/
|
||||
public int locateVarIndex(String varName) {
|
||||
int idx = -1;
|
||||
@ -239,6 +243,8 @@ public abstract class DataReader {
|
||||
*
|
||||
* @see #tstart
|
||||
* @see #tstop
|
||||
* @param timeData the time to check
|
||||
* @return true if time in range, else false
|
||||
*/
|
||||
public boolean isTimeInRange(double timeData) {
|
||||
boolean ret = true;
|
||||
@ -264,6 +270,7 @@ public abstract class DataReader {
|
||||
|
||||
/**
|
||||
* Gets the time stamp for the specified variable value retrieved.
|
||||
* @return the time
|
||||
*/
|
||||
public double getTimeValue() {
|
||||
return theTimeValue;
|
||||
@ -273,11 +280,17 @@ public abstract class DataReader {
|
||||
* Abstract method for processing the data recording file.
|
||||
* This method needs to be called after a {@link DataReader} instance
|
||||
* is created in order for recordedVarList to be filled in.
|
||||
* @throws FileNotFoundException FileNotFoundException
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
protected abstract void processHeader() throws FileNotFoundException, IOException;
|
||||
|
||||
/**
|
||||
* Checks to see if 2 doubles are almost equal with specified Epsilon.
|
||||
* @param a first value
|
||||
* @param b second value
|
||||
* @param eps epsilon (tolerance)
|
||||
* @return true if a and b are within epsilon, else false
|
||||
*/
|
||||
public static boolean nearlyEqual(double a, double b, double eps) {
|
||||
if (a == b) {
|
||||
@ -288,6 +301,9 @@ public abstract class DataReader {
|
||||
|
||||
/**
|
||||
* Checks to see if 2 doubles are almost equal with the default Epsilon.
|
||||
* @param a first value
|
||||
* @param b second value
|
||||
* @return true if a and b are within defalut epsilon, else false
|
||||
*/
|
||||
public static boolean nearlyEqual(double a, double b) {
|
||||
return nearlyEqual(a, b, EPSILON);
|
||||
@ -295,6 +311,9 @@ public abstract class DataReader {
|
||||
|
||||
/**
|
||||
* Updates the value of the variable properties such as scale, bias, and units.
|
||||
* @param varData value to set
|
||||
* @return the value of varData
|
||||
* @throws UnitType.IllegalUnitConversionException stuff
|
||||
*/
|
||||
protected double applyVarProperties(double varData) throws UnitType.IllegalUnitConversionException {
|
||||
if (theVar.getScale() != null) {
|
||||
|
@ -151,6 +151,7 @@ public class LogVar implements Comparable<LogVar>, Serializable {
|
||||
|
||||
/**
|
||||
* Sets the isFromLog flag.
|
||||
* @param b value to set flag to.
|
||||
*/
|
||||
public void setIsFromLog(boolean b) {
|
||||
isFromLog = b;
|
||||
@ -293,6 +294,7 @@ public class LogVar implements Comparable<LogVar>, Serializable {
|
||||
|
||||
/**
|
||||
* Gets the flag of isFromLog.
|
||||
* @return true or false.
|
||||
*/
|
||||
public boolean getIsFromLog() {
|
||||
return isFromLog;
|
||||
|
@ -124,6 +124,7 @@ public class SortedListModel extends AbstractListModel {
|
||||
|
||||
/**
|
||||
* Adds one element to the list if it is not already present.
|
||||
* @param element The element to add to the list
|
||||
*/
|
||||
public void add(Object element) {
|
||||
if (set.add(element)) {
|
||||
@ -133,6 +134,7 @@ public class SortedListModel extends AbstractListModel {
|
||||
|
||||
/**
|
||||
* Adds all of the elements to the list.
|
||||
* @param elements All of the elements to add to the list
|
||||
*/
|
||||
public void addAll(Object elements[]) {
|
||||
Collection<Object> c = Arrays.asList(elements);
|
||||
|
@ -99,6 +99,8 @@ public class TrickColors {
|
||||
|
||||
/**
|
||||
* Returns a color with the specified case-insensitive name.
|
||||
* @param color the color object
|
||||
* @return the string of the color
|
||||
*/
|
||||
public static String getName(Color color) {
|
||||
return color2name.get(color);
|
||||
@ -106,6 +108,8 @@ public class TrickColors {
|
||||
|
||||
/**
|
||||
* Returns a color with the specified case-insensitive name.
|
||||
* @param name the color name string
|
||||
* @return the Color object
|
||||
*/
|
||||
public static Color getColor(String name) {
|
||||
return name2color.get(name.toLowerCase());
|
||||
@ -113,6 +117,7 @@ public class TrickColors {
|
||||
|
||||
/**
|
||||
* Returns a collection of all color names.
|
||||
* @return the collection of all colors
|
||||
*/
|
||||
public static Collection<String> colors() {
|
||||
return name2color.keySet();
|
||||
|
@ -53,6 +53,7 @@ public class UnitInfixExpression {
|
||||
//========================================
|
||||
/**
|
||||
* Returns a derived unit based on for the unit expression.
|
||||
* @return a derived unit based on for the unit expression
|
||||
*/
|
||||
public UnitType.Unit getUnit() {
|
||||
UnitType.Unit ret = null;
|
||||
|
@ -202,11 +202,11 @@ public enum UnitType {
|
||||
/**
|
||||
* Converts the value of a specified units to the preferred units.
|
||||
*
|
||||
* @param fromValue
|
||||
* @param fromUnitStr
|
||||
* @param toUnitStr
|
||||
* @param fromValue from value
|
||||
* @param fromUnitStr from unit
|
||||
* @param toUnitStr to unit
|
||||
* @return new value based on the new units
|
||||
* @throws IllegalUnitConversionException
|
||||
* @throws IllegalUnitConversionException IllegalUnitConversionException
|
||||
*/
|
||||
public static double convertUnits(double fromValue, String fromUnitStr, String toUnitStr) throws IllegalUnitConversionException {
|
||||
Unit fromUnit = getExpressionUnit(fromUnitStr);
|
||||
@ -227,6 +227,7 @@ public enum UnitType {
|
||||
* member. This method handles only simple units, not compound units
|
||||
* resulting from multiplication, division, or exponentiation.
|
||||
*
|
||||
* @param abbreviation abbreviation of unit to search
|
||||
* @return the corresponding type, or null if none exists
|
||||
*/
|
||||
public static UnitType getType(String abbreviation) {
|
||||
@ -244,7 +245,7 @@ public enum UnitType {
|
||||
* Returns the primitive unit if it is a primitive units,
|
||||
* otherwise return a complex units that is made out of primitive units.
|
||||
*
|
||||
* @param expression
|
||||
* @param expression full expression to parse
|
||||
* @return an instance of {@link Unit}
|
||||
*/
|
||||
public static Unit getExpressionUnit(String expression) {
|
||||
@ -284,6 +285,8 @@ public enum UnitType {
|
||||
* gets all valid unit alternatives for <code>expression</code>.
|
||||
* This method handles compound units resulting from multiplication,
|
||||
* division, or exponentiation.
|
||||
* @param expression full expression to parse
|
||||
* @return list of valid unit alternatives
|
||||
*/
|
||||
public static List<String> getAll(String expression) {
|
||||
ArrayList<String> results = new ArrayList<String>();
|
||||
@ -301,7 +304,7 @@ public enum UnitType {
|
||||
|
||||
/**
|
||||
* gets all valid unit alternatives for <code>tail</code>, concatenating
|
||||
* each result to <code>head<code>, and appending each concatenation to
|
||||
* each result to <code>head</code>, and appending each concatenation to
|
||||
* <code>results</code>. This method handles compound units resulting
|
||||
* from multiplication, division, or exponentiation.
|
||||
*
|
||||
@ -326,7 +329,7 @@ public enum UnitType {
|
||||
|
||||
/**
|
||||
* Determines if <code>fromUnits</code> can legally be converted to
|
||||
* </code>toUnits</code>. This method handles compound units resulting
|
||||
* <code>toUnits</code>. This method handles compound units resulting
|
||||
* from multiplication, division, or exponentiation.
|
||||
*
|
||||
* @param fromUnits the unit expression from which to convert
|
||||
@ -364,7 +367,11 @@ public enum UnitType {
|
||||
this.factor2 = factor2;
|
||||
}
|
||||
|
||||
/** constructor */
|
||||
/** constructor
|
||||
* @param name name of unit
|
||||
* @param abbreviation abbreviation of unit
|
||||
* @param isPrefixable true or false
|
||||
*/
|
||||
public Unit(String name, String abbreviation, boolean isPrefixable) {
|
||||
this.name = name;
|
||||
this.abbreviation = abbreviation;
|
||||
|
@ -50,6 +50,9 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
*
|
||||
* @param host Variable Server machine name
|
||||
* @param port Variable Server port number
|
||||
* @throws UnknownHostException UnknownHostException
|
||||
* @throws IOException IOException
|
||||
* @throws SecurityException SecurityException
|
||||
*/
|
||||
public VariableServerConnection(String host, int port) throws UnknownHostException, IOException, SecurityException {
|
||||
socket = new Socket(host, port);
|
||||
@ -64,6 +67,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
* given command.
|
||||
*
|
||||
* @param command the Variable Server command to be sent
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void put(String command) throws IOException {
|
||||
outputStream.writeBytes(command + "\n");
|
||||
@ -75,6 +79,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
* automatically appended. The buffer is not flushed.
|
||||
*
|
||||
* @param command the Variable Server command to be written
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void write(String command) throws IOException {
|
||||
outputStream.writeBytes(command + "\n");
|
||||
@ -83,6 +88,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
/**
|
||||
* flushes the buffer, sending any pending commands to the Variable
|
||||
* Server
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void flush() throws IOException {
|
||||
outputStream.flush();
|
||||
@ -90,6 +96,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
|
||||
/**
|
||||
* commands the Variable Server to send variable data in ASCII
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void setAscii() throws IOException {
|
||||
if (dataMode != DataMode.ASCII) {
|
||||
@ -100,6 +107,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
|
||||
/**
|
||||
* commands the Variable Server to send variable data in binary
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void setBinary() throws IOException {
|
||||
if (dataMode != DataMode.BINARY) {
|
||||
@ -111,6 +119,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
/**
|
||||
* commands the Variable Server to send variable data in binary and to
|
||||
* omit names
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void setBinaryNoNames() throws IOException {
|
||||
if (dataMode != DataMode.BINARY_NO_NAMES) {
|
||||
@ -121,6 +130,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
|
||||
/**
|
||||
* sets the Variable Server to synchronized mode
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void setSync() throws IOException {
|
||||
if (!sync) {
|
||||
@ -131,6 +141,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
|
||||
/**
|
||||
* commands the Variable Server to stop sending data
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void pause() throws IOException {
|
||||
put("trick.var_pause()");
|
||||
@ -139,6 +150,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
|
||||
/**
|
||||
* commands the Variable Server to resume sending data
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void unpause() throws IOException {
|
||||
put("trick.var_unpause()");
|
||||
@ -148,7 +160,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
/**
|
||||
* returns the paused state of the Variable Server
|
||||
*
|
||||
* return whether or not the Variable Server is paused
|
||||
* @return whether or not the Variable Server is paused
|
||||
*/
|
||||
public boolean isPaused() {
|
||||
return isPaused;
|
||||
@ -158,6 +170,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
* adds the named variable to the Variable Server
|
||||
*
|
||||
* @param name the name of the variable to be added
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void add(String name) throws IOException {
|
||||
put("trick.var_add(\"" + name + "\")");
|
||||
@ -168,6 +181,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
*
|
||||
* @param name the name of the variable to be added
|
||||
* @param units the units to use
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void add(String name, String units) throws IOException {
|
||||
boolean invalidUnits = units == null || units.isEmpty();
|
||||
@ -178,6 +192,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
* removes the named variable from the Variable Server
|
||||
*
|
||||
* @param name the name of the variable to be removeed
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void remove(String name) throws IOException {
|
||||
put("trick.var_remove(\"" + name + "\")");
|
||||
@ -185,6 +200,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
|
||||
/**
|
||||
* clears all variables from the Variable Server
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void clear() throws IOException {
|
||||
put("trick.var_clear()");
|
||||
@ -194,6 +210,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
* sets the period at which the Variable Server sends updates
|
||||
*
|
||||
* @param period the update period
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void setCycle(double period) throws IOException {
|
||||
put("trick.var_cycle(" + period + ")");
|
||||
@ -201,6 +218,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
|
||||
/**
|
||||
* requests a single update from the Variable Server
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void poll() throws IOException {
|
||||
put("trick.var_send()");
|
||||
@ -208,6 +226,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
|
||||
/**
|
||||
* attempts to resolve all invalid variables
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void resolveInvalidReferences() throws IOException {
|
||||
put("trick.var_retry_bad_ref()");
|
||||
@ -215,6 +234,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
|
||||
/**
|
||||
* sends a freeze command to the simulation
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void freeze() throws IOException {
|
||||
put("trick.exec_freeze()");
|
||||
@ -222,6 +242,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
|
||||
/**
|
||||
* sends a run command to the simulation
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void run() throws IOException {
|
||||
put("trick.exec_run()");
|
||||
@ -229,6 +250,8 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
|
||||
/**
|
||||
* sends an enable or disable real time command to the simulation
|
||||
* @param enabled true or false
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void setRealTimeEnabled(boolean enabled) throws IOException {
|
||||
put("trick.real_time_" + (enabled ? "enable" : "disable") + "()");
|
||||
@ -238,6 +261,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
* sets the Variable Server's debug level
|
||||
*
|
||||
* @param level the debug level
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void setDebugLevel(int level) throws IOException {
|
||||
put("trick.var_debug(" + level + ")");
|
||||
@ -247,6 +271,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
* sets this client's tag
|
||||
*
|
||||
* @param tag the tag that the Variable Server will associate with this client
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void setClientTag(String tag) throws IOException {
|
||||
put("trick.var_set_client_tag(\"" + tag + "\")");
|
||||
@ -287,6 +312,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
* @param maxCount maximum numbers of characters to read
|
||||
*
|
||||
* @return the number of characters read, or -1 if the end of the stream is reached
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public int read(char[] buffer, int index, int maxCount) throws IOException {
|
||||
return inputStream.read(buffer, index, maxCount);
|
||||
@ -296,6 +322,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
* reads a line of data from the Variable Server. Values are tab-delimited.
|
||||
*
|
||||
* @return a tab-delimited line of data
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public String get() throws IOException {
|
||||
return get(1);
|
||||
@ -305,7 +332,9 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
* reads the specified number of variables from the Variable Server. This
|
||||
* supports multiple binary packets.
|
||||
*
|
||||
* @param num_variables num variables
|
||||
* @return the tab-delimited data
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public String get(int num_variables) throws IOException {
|
||||
// num_variables (optional) is number of variables you expect to get (needed for binary multiple packet support)
|
||||
@ -421,6 +450,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
|
||||
/**
|
||||
* flushes any data that is still on the input stream
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void flushInput() throws IOException {
|
||||
byte[] buffer = new byte[maximumPacketSize];
|
||||
@ -434,6 +464,7 @@ public class VariableServerConnection implements AutoCloseable {
|
||||
|
||||
/**
|
||||
* closes the connection to the Variable Server
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void close() throws IOException {
|
||||
try {
|
||||
|
@ -106,6 +106,7 @@ public abstract class XMLCreator {
|
||||
|
||||
/**
|
||||
* Sets the frame that calls the XMLCreator to generate XML file.
|
||||
* @param frame the frame
|
||||
*/
|
||||
public void setCallerFrame(JFrame frame) {
|
||||
callerMainFrame = frame;
|
||||
@ -198,6 +199,7 @@ public abstract class XMLCreator {
|
||||
|
||||
/**
|
||||
* This shall create the desired XML structure.
|
||||
* @return true or false
|
||||
*/
|
||||
protected abstract boolean createDOMTree();
|
||||
|
||||
|
@ -71,6 +71,8 @@ public class Variable<T extends VariableServerFluent> implements Serializable, C
|
||||
* commands the Variable Server to set the variable's value to <code>value</code>
|
||||
*
|
||||
* @param value the value to be sent
|
||||
* @param variableServerConnection the socket to send data to.
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void sendValueToVariableServer(T value,
|
||||
VariableServerConnection variableServerConnection) throws IOException {
|
||||
@ -82,6 +84,8 @@ public class Variable<T extends VariableServerFluent> implements Serializable, C
|
||||
|
||||
/**
|
||||
* commands the Variable Server to set the variable's value to its current value
|
||||
* @param variableServerConnection the socket to send data to.
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void sendValueToVariableServer(VariableServerConnection variableServerConnection)
|
||||
throws IOException {
|
||||
@ -92,6 +96,8 @@ public class Variable<T extends VariableServerFluent> implements Serializable, C
|
||||
* commands the Variable Server to set the variable's units to <code>units</code>
|
||||
*
|
||||
* @param units the units to be sent
|
||||
* @param variableServerConnection the socket to send data to.
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void sendUnitsToVariableServer(String units,
|
||||
VariableServerConnection variableServerConnection) throws IOException {
|
||||
@ -102,6 +108,8 @@ public class Variable<T extends VariableServerFluent> implements Serializable, C
|
||||
|
||||
/**
|
||||
* commands the Variable Server to set the variable's units to its current units
|
||||
* @param variableServerConnection the socket to send data to.
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void sendUnitsToVariableServer(VariableServerConnection variableServerConnection)
|
||||
throws IOException {
|
||||
|
@ -10,6 +10,8 @@ public interface VariableListener {
|
||||
/** invoked after the variables have been updated */
|
||||
public void variablesUpdated();
|
||||
|
||||
/** invoked if an exception is thrown during variable tracking */
|
||||
/** invoked if an exception is thrown during variable tracking
|
||||
* @param exception the exception
|
||||
*/
|
||||
public void variableUpdateFailed(Exception exception);
|
||||
}
|
||||
|
@ -43,6 +43,7 @@ public class VariableTracker extends SwingWorker<Void, String[]> {
|
||||
* begin tracking <code>variable</code>
|
||||
*
|
||||
* @param variable the variable to track
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void add(Variable variable) throws IOException {
|
||||
if (variables.add(variable)) {
|
||||
@ -54,6 +55,7 @@ public class VariableTracker extends SwingWorker<Void, String[]> {
|
||||
* stops tracking <code>variable</code>
|
||||
*
|
||||
* @param variable the variable to stop tracking
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void remove(Variable variable) throws IOException {
|
||||
variableServerConnection.remove(variable.name);
|
||||
|
@ -118,6 +118,7 @@ public abstract class DataProductsApplication extends TrickApplication {
|
||||
//========================================
|
||||
/**
|
||||
* Sets the preferred presentation.
|
||||
* @param pt the presentation string
|
||||
*/
|
||||
public void setPreferredPresentation(String pt) {
|
||||
preferredPresentation = pt;
|
||||
@ -125,6 +126,7 @@ public abstract class DataProductsApplication extends TrickApplication {
|
||||
|
||||
/**
|
||||
* Gets the preferred presentation.
|
||||
* @return the preferred presentation
|
||||
*/
|
||||
public String getPreferredPresentation() {
|
||||
return preferredPresentation;
|
||||
@ -132,6 +134,7 @@ public abstract class DataProductsApplication extends TrickApplication {
|
||||
|
||||
/**
|
||||
* Sets preferred display mode.
|
||||
* @param md the mode
|
||||
*/
|
||||
public void setDisplayMode(String md) {
|
||||
displayMode = md;
|
||||
@ -139,6 +142,7 @@ public abstract class DataProductsApplication extends TrickApplication {
|
||||
|
||||
/**
|
||||
* Gets preferred display mode.
|
||||
* @return the mode of the preferred display
|
||||
*/
|
||||
public String getDisplayMode() {
|
||||
return displayMode;
|
||||
@ -435,26 +439,31 @@ public abstract class DataProductsApplication extends TrickApplication {
|
||||
|
||||
/**
|
||||
* Creates the component for left top.
|
||||
* @return left top component
|
||||
*/
|
||||
protected abstract JComponent createLeftTop();
|
||||
|
||||
/**
|
||||
* Creates the component for left middle.
|
||||
* @return left middle component
|
||||
*/
|
||||
protected abstract JComponent createLeftMiddle();
|
||||
|
||||
/**
|
||||
* Creates the component for right top.
|
||||
* @return right top component
|
||||
*/
|
||||
protected abstract JComponent createRightTop();
|
||||
|
||||
/**
|
||||
* Creates the component for right middle.
|
||||
* @return right middle component
|
||||
*/
|
||||
protected abstract JComponent createRightMiddle();
|
||||
|
||||
/**
|
||||
* Creates the component for the bottom.
|
||||
* @return bottom component
|
||||
*/
|
||||
protected abstract JComponent createBottom();
|
||||
|
||||
@ -586,6 +595,7 @@ public abstract class DataProductsApplication extends TrickApplication {
|
||||
* Launches a process with specified parameters.
|
||||
*
|
||||
* @param command The operating system program and arguments.
|
||||
* @throws Exception Exception
|
||||
*/
|
||||
public void launchPlotProcess(String... command) throws Exception{
|
||||
if (command == null || command.length < 0) {
|
||||
@ -635,6 +645,7 @@ public abstract class DataProductsApplication extends TrickApplication {
|
||||
|
||||
/**
|
||||
* Prints status message to the status text area.
|
||||
* @param msg the string to use
|
||||
*/
|
||||
public void printStatusMessage(String msg) {
|
||||
statusArea.append(msg);
|
||||
|
@ -159,6 +159,7 @@ public class JXPlotApplication extends TrickApplication {
|
||||
//========================================
|
||||
/**
|
||||
* Main method for this application.
|
||||
* @param args command line arguments
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
Application.launch(JXPlotApplication.class, args);
|
||||
|
@ -186,6 +186,7 @@ public class PlotUtils {
|
||||
* Builds a {@link XYSeries} for x and y of the specified plot spec from the recorded data that is in a particular run directory.
|
||||
*
|
||||
* @param run A {@link SessionRun} instance.
|
||||
* @param page A {@link ProductPage} instance.
|
||||
* @param plot A {@link ProductPlot} instance.
|
||||
* @param xVar The X variable.
|
||||
* @param yVar The Y variable.
|
||||
|
@ -175,7 +175,7 @@ public class TrickChartFrame extends TrickFrame {
|
||||
|
||||
/**
|
||||
* Helper method for saving all charts to a PDF file.
|
||||
* @throws IOException
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void saveChartsAsPDF() throws IOException {
|
||||
File file = UIUtils.chooseSaveFile(null, "plot_", "pdf", this);
|
||||
@ -205,7 +205,7 @@ public class TrickChartFrame extends TrickFrame {
|
||||
*
|
||||
* @param pdfContent an object containing the user positioned text and graphic contents of a page.
|
||||
* @param mapper mapping between AWT fonts and PDF fonts.
|
||||
* @throws IOException
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public void writePDFPage(PdfContentByte pdfContent, FontMapper mapper) throws IOException {
|
||||
if (pdfContent == null) {
|
||||
|
@ -68,8 +68,10 @@ public class TrickTableFrame extends TrickFrame {
|
||||
* returned by <code>JComponent.getDefaultLocale</code>.
|
||||
*
|
||||
* @param title the title for the frame
|
||||
* @param iconImage icon image
|
||||
* @param sessionObject the {@link Session} object that contains where the table data is from
|
||||
* @param theTable the {@link ProductTable} instance that contains the table specs
|
||||
* @throws HeadlessException HeadlessException
|
||||
*
|
||||
*/
|
||||
public TrickTableFrame(String title, Image iconImage, Session sessionObject, ProductTable theTable) throws HeadlessException {
|
||||
|
@ -108,7 +108,7 @@ public class TrickAxisEditor extends JPanel implements ActionListener {
|
||||
* @param axis the axis whose properties are to be displayed/edited in
|
||||
* the panel.
|
||||
*
|
||||
* @return A panel or <code>null</code< if axis is <code>null</code>.
|
||||
* @return A panel or <code>null</code> if axis is <code>null</code>.
|
||||
*/
|
||||
public static TrickAxisEditor getInstance(Axis axis) {
|
||||
|
||||
|
@ -405,6 +405,7 @@ public class TrickDPApplication extends DataProductsApplication {
|
||||
//========================================
|
||||
/**
|
||||
* Main method for this application.
|
||||
* @param args command line arguments
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
Application.launch(TrickDPApplication.class, args);
|
||||
@ -938,6 +939,7 @@ public class TrickDPApplication extends DataProductsApplication {
|
||||
|
||||
/**
|
||||
* Helper method for getting selected run paths.
|
||||
* @return list of selected run paths
|
||||
*/
|
||||
public String[] getSelectedRunPaths() {
|
||||
String[] runPaths = null;
|
||||
|
@ -343,6 +343,7 @@ public class TrickDPActionController {
|
||||
|
||||
/**
|
||||
* Invoked when Edit DP is selected.
|
||||
* @param dpFile name of file to edit
|
||||
*/
|
||||
public void handleEditDP(String dpFile) {
|
||||
if (dpFile == null) {
|
||||
@ -401,6 +402,7 @@ public class TrickDPActionController {
|
||||
/**
|
||||
* Helper method for launching quick plot. The previous subprocess of trick quickplot
|
||||
* application will be destroyed before another one is created.
|
||||
* @param initialArgs argument list to send to QP
|
||||
*
|
||||
*/
|
||||
public void launchQP(String[] initialArgs) {
|
||||
|
@ -533,6 +533,7 @@ public class TrickQPApplication extends DataProductsApplication {
|
||||
|
||||
/**
|
||||
* Gets the instance of the action controller.
|
||||
* @return the action controller
|
||||
*/
|
||||
public TrickQPActionController getActionController() {
|
||||
return actionController;
|
||||
@ -572,6 +573,9 @@ public class TrickQPApplication extends DataProductsApplication {
|
||||
|
||||
/**
|
||||
* Main method for this application.
|
||||
* @param args command line arguments
|
||||
* @throws RemoteException RemoteException
|
||||
* @throws MalformedURLException MalformedURLException
|
||||
*/
|
||||
public static void main(String[] args) throws RemoteException, MalformedURLException {
|
||||
Application.launch(TrickQPApplication.class, args);
|
||||
|
@ -171,6 +171,7 @@ public class Product extends CommonProduct {
|
||||
/**
|
||||
* Checks to see if the product is valid. A product node is considered to be valid if
|
||||
* it has at least one valid page or table.
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isValid() {
|
||||
boolean allValid = false;
|
||||
|
@ -123,6 +123,7 @@ public class ProductAxis {
|
||||
/**
|
||||
* Checks to see if this axis is empty.
|
||||
* Meaning it doesn't have any attributes or elements XML wise.
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isEmptyNode() {
|
||||
if ((label == null || label.isEmpty()) && (format == null || format.isEmpty())) {
|
||||
|
@ -96,6 +96,8 @@ public class ProductColumn {
|
||||
|
||||
/**
|
||||
* Gets data for GUI display for the specified order number.
|
||||
* @param index index
|
||||
* @return object pointed to by index
|
||||
*/
|
||||
public Object getData(int index) {
|
||||
Object ret = null;
|
||||
@ -190,6 +192,7 @@ public class ProductColumn {
|
||||
/**
|
||||
* Returns the desired text for any {@link ProductColumn} instance.
|
||||
* It is for GUI displaying.
|
||||
* @return "Column"
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
@ -199,6 +202,7 @@ public class ProductColumn {
|
||||
/**
|
||||
* Check to see if the column is valid. A column is not considered to be valid if it doesn't
|
||||
* have a valid var.
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isValid() {
|
||||
return (var != null);
|
||||
|
@ -167,6 +167,7 @@ public class ProductCurve {
|
||||
/**
|
||||
* Returns the desired text for any {@link ProductCurve} instance.
|
||||
* It is for GUI displaying.
|
||||
* @return "Curve"
|
||||
*/
|
||||
public String toString() {
|
||||
return "Curve";
|
||||
@ -174,7 +175,8 @@ public class ProductCurve {
|
||||
|
||||
/**
|
||||
* Checks to see if the curve is valid. A curve is not considered to be valid if it
|
||||
* doesn't have either X & Y variables or varcase specs.
|
||||
* doesn't have either X and Y variables or varcase specs.
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isValid() {
|
||||
boolean allValid = false;
|
||||
|
@ -716,6 +716,8 @@ public class ProductDataPanel extends JPanel implements KeyListener {
|
||||
* Helper method for generating an instance of {@link Font} for the specified font text.
|
||||
*
|
||||
* The format of the font text should be "-*-font family-weight-slant-*--size-*-*-*-*-*-*-*".
|
||||
* @param fontText name of the font
|
||||
* @return font object
|
||||
*/
|
||||
public static Font getFontFromText(String fontText) {
|
||||
String[] attrs = null;
|
||||
|
@ -37,6 +37,11 @@ public class ProductDomParser {
|
||||
//========================================
|
||||
/**
|
||||
* Sets up the object data for based on the root element.
|
||||
* @param file the file name to read
|
||||
* @return the top level product object
|
||||
* @throws ParserConfigurationException ParserConfigurationException
|
||||
* @throws SAXException SAXException
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public static Product parse(File file)
|
||||
throws ParserConfigurationException, SAXException, IOException {
|
||||
|
@ -124,6 +124,8 @@ public class ProductExternalFunction {
|
||||
|
||||
/**
|
||||
* Gets data for GUI display for the specified order number.
|
||||
* @param index index
|
||||
* @return object pointed to by index
|
||||
*/
|
||||
public Object getData(int index) {
|
||||
Object ret = null;
|
||||
@ -205,6 +207,7 @@ public class ProductExternalFunction {
|
||||
/**
|
||||
* Check to see if the external function is valid. An external function is not considered
|
||||
* to be valid if it doesn't valid inputs and outputs.
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isValid() {
|
||||
boolean allValid = false;
|
||||
|
@ -103,6 +103,8 @@ public class ProductMeasurement {
|
||||
|
||||
/**
|
||||
* Gets data for GUI display for the specified order number.
|
||||
* @param index index into the list
|
||||
* @return the object pointed to by index
|
||||
*/
|
||||
public Object getData(int index) {
|
||||
Object ret = null;
|
||||
@ -134,6 +136,7 @@ public class ProductMeasurement {
|
||||
//========================================
|
||||
/**
|
||||
* Returns the name of this measurement. This is for GUI displaying.
|
||||
* @return the string value
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
@ -143,6 +146,7 @@ public class ProductMeasurement {
|
||||
/**
|
||||
* Check to see if the measurement is valid. A measurement is not considered to be valid if it doesn't
|
||||
* have defined var.
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isValid() {
|
||||
return (!"".equals(name));
|
||||
|
@ -65,6 +65,7 @@ public class ProductPage extends CommonProduct {
|
||||
//========================================
|
||||
/**
|
||||
* Sets the number shown plots horizontally.
|
||||
* @param hcellsStr number of horizontal cells
|
||||
*/
|
||||
public void setHcells(String hcellsStr) {
|
||||
try {
|
||||
@ -78,6 +79,7 @@ public class ProductPage extends CommonProduct {
|
||||
|
||||
/**
|
||||
* Sets the number shown plots vertically.
|
||||
* @param vcellsStr number of vertical cells
|
||||
*/
|
||||
public void setVcells(String vcellsStr) {
|
||||
try {
|
||||
@ -91,6 +93,7 @@ public class ProductPage extends CommonProduct {
|
||||
|
||||
/**
|
||||
* Gets the desired plots numbers shown horizontally.
|
||||
* @return number of horizontal cells
|
||||
*/
|
||||
public Integer getHcells() {
|
||||
return hcells;
|
||||
@ -98,6 +101,7 @@ public class ProductPage extends CommonProduct {
|
||||
|
||||
/**
|
||||
* Gets the desired plots numbers shown vertically.
|
||||
* @return number of vertical cells
|
||||
*/
|
||||
public Integer getVcells() {
|
||||
return vcells;
|
||||
@ -172,6 +176,8 @@ public class ProductPage extends CommonProduct {
|
||||
|
||||
/**
|
||||
* Gets data for GUI display for the specified order number.
|
||||
* @param index index into list of objects
|
||||
* @return the object pointed to by index
|
||||
*/
|
||||
public Object getData(int index) {
|
||||
Object ret = null;
|
||||
@ -262,6 +268,7 @@ public class ProductPage extends CommonProduct {
|
||||
/**
|
||||
* Returns the desired text for any {@link ProductPage} instance.
|
||||
* It is for GUI displaying.
|
||||
* @return title of the page
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
@ -275,6 +282,7 @@ public class ProductPage extends CommonProduct {
|
||||
/**
|
||||
* Checks to see if the page is valid. A page is not considered to be valid if it doesn't
|
||||
* have at least one valid plot.
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isValid() {
|
||||
boolean allValid = false;
|
||||
|
@ -244,6 +244,8 @@ public class ProductPlot extends CommonProduct {
|
||||
|
||||
/**
|
||||
* Gets data for GUI display for the specified order number.
|
||||
* @param index index into the list
|
||||
* @return object pointed to by index
|
||||
*/
|
||||
public Object getData(int index) {
|
||||
Object ret = null;
|
||||
@ -554,6 +556,7 @@ public class ProductPlot extends CommonProduct {
|
||||
|
||||
/**
|
||||
* Sets the maximum value for Y variable.
|
||||
* @return Y max
|
||||
*/
|
||||
public Double getYMax() {
|
||||
return ymax;
|
||||
@ -685,6 +688,7 @@ public class ProductPlot extends CommonProduct {
|
||||
/**
|
||||
* Check to see if the plot is valid. A plot is not considered to be valid if it doesn't
|
||||
* have at least one valid curve.
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isValid() {
|
||||
boolean allValid = false;
|
||||
|
@ -113,6 +113,8 @@ public class ProductTable extends CommonProduct {
|
||||
|
||||
/**
|
||||
* Gets data for GUI display for the specified order number.
|
||||
* @param index the index into the array
|
||||
* @return the object pointed to by the index
|
||||
*/
|
||||
public Object getData(int index) {
|
||||
Object ret = null;
|
||||
@ -221,6 +223,7 @@ public class ProductTable extends CommonProduct {
|
||||
/**
|
||||
* Check to see if the table is valid. A table is not considered to be valid if it doesn't
|
||||
* have at least one valid column.
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isValid() {
|
||||
boolean allValid = false;
|
||||
|
@ -213,6 +213,7 @@ public class ProductTree extends DynamicTree {
|
||||
|
||||
/**
|
||||
* Checks to see if the tree gets changed.
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isChanged() {
|
||||
return isChanged;
|
||||
@ -220,6 +221,7 @@ public class ProductTree extends DynamicTree {
|
||||
|
||||
/**
|
||||
* Sets the tree changing status.
|
||||
* @param b true or false
|
||||
*/
|
||||
public void setChanged(boolean b) {
|
||||
isChanged = b;
|
||||
|
@ -438,6 +438,8 @@ public class ProductVar {
|
||||
|
||||
/**
|
||||
* Gets data for GUI display for the specified order number.
|
||||
* @param index index into list
|
||||
* @return object pointed to by index
|
||||
*/
|
||||
public Object getData(int index) {
|
||||
Object ret = null;
|
||||
@ -626,6 +628,7 @@ public class ProductVar {
|
||||
|
||||
/**
|
||||
* Gets the name.
|
||||
* @return name
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
@ -633,6 +636,7 @@ public class ProductVar {
|
||||
|
||||
/**
|
||||
* Gets the short name that is the text after the last dot.
|
||||
* @return name
|
||||
*/
|
||||
public String getShortName() {
|
||||
String shortName = name;
|
||||
@ -719,7 +723,8 @@ public class ProductVar {
|
||||
/**
|
||||
* Gets the var symbol shape based on the symbol style and size.
|
||||
* If symbol style is not specified, it size is ignored.
|
||||
*
|
||||
*
|
||||
* @param symbolStyle sybol style to use
|
||||
* @return The var symbol shape instance {@link Shape}.
|
||||
*/
|
||||
public Shape getSymbolShape(SymbolStyle symbolStyle) {
|
||||
|
@ -119,6 +119,7 @@ public class ProductVarcase {
|
||||
/**
|
||||
* Returns the desired text for any {@link ProductVarcase} instance.
|
||||
* It is for GUI displaying.
|
||||
* @return "Varcase"
|
||||
*/
|
||||
public String toString() {
|
||||
return "Varcase";
|
||||
@ -127,6 +128,7 @@ public class ProductVarcase {
|
||||
/**
|
||||
* Check to see if the varcase is valid. A varcase is not considered to be valid if it doesn't
|
||||
* have at least varX and varY both defined.
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isValid() {
|
||||
return (varX != null && varY != null);
|
||||
|
@ -194,6 +194,8 @@ public class TrickQPActionController {
|
||||
* Helper method for adding specified new {@link ProductVar} variables to selected node(s) in the tree.
|
||||
* If newVars has only one element, it's for single variable. If newVars has more than one variable,
|
||||
* it's for array variable.
|
||||
* @param newVars new variables
|
||||
* @param selectedTreeNodes tree to add new variables
|
||||
*/
|
||||
public void handleAddVarToSelected(ProductVar[] newVars, ArrayList<DefaultMutableTreeNode> selectedTreeNodes) {
|
||||
CommonTreeNode plotNode;
|
||||
@ -853,6 +855,7 @@ public class TrickQPActionController {
|
||||
* TODO: Haven't added this mechanism to any other places as this is the
|
||||
* only one is called by other application for now. Add other
|
||||
* places if necessary.
|
||||
* @param dirList list of directories
|
||||
*/
|
||||
public void handleAddRuns(final String[] dirList) {
|
||||
|
||||
@ -959,6 +962,7 @@ public class TrickQPActionController {
|
||||
|
||||
/**
|
||||
* Invoked when new output is entered.
|
||||
* @param newOutput not sure
|
||||
*/
|
||||
public void handleNewProgramOutput(String newOutput) {
|
||||
addVarToOutput(new ProductMeasurement(newOutput), true);
|
||||
@ -968,6 +972,8 @@ public class TrickQPActionController {
|
||||
* Invoked when Subtract is selected.
|
||||
*
|
||||
* This function generates nodes for (var1 - var2)
|
||||
* @param var1 var1
|
||||
* @param var2 var2
|
||||
*/
|
||||
public void handleSubtractFunction(LogVar var1, LogVar var2) {
|
||||
String units = null;
|
||||
@ -1434,6 +1440,7 @@ public class TrickQPActionController {
|
||||
* The valid range would be [0, total child count of this plot].
|
||||
* @param isNew <code>true</code>, if the user object of the plot node does not
|
||||
* have the curve user object in its curve list, <code>false</code> otherwise.
|
||||
* @return curve node.
|
||||
*/
|
||||
public CommonTreeNode addCurveToPlot(CommonTreeNode plotNode, Object curve, int idx, boolean isNew) {
|
||||
CommonTreeNode curveNode = null;
|
||||
@ -1484,6 +1491,7 @@ public class TrickQPActionController {
|
||||
* is created based on the specified curve object.
|
||||
* @param isNew <code>true</code>, if the user object of the plot node does not
|
||||
* have the curve user object in its curve list, <code>false</code> otherwise.
|
||||
* @return curve node.
|
||||
*/
|
||||
public CommonTreeNode addCurveToPlot(CommonTreeNode plotNode, Object curve, boolean isNew) {
|
||||
return addCurveToPlot(plotNode, curve, -1, isNew);
|
||||
@ -1497,6 +1505,7 @@ public class TrickQPActionController {
|
||||
* an instance of {@link ProductPlot}.
|
||||
* @param isNew <code>true</code> if the plot user object needs adding to the
|
||||
* plot list of the page user object, <code>false</code> otherwise.
|
||||
* @return top plot node
|
||||
*
|
||||
*/
|
||||
public CommonTreeNode addPlotToPage(CommonTreeNode pageNode, Object plot, boolean isNew) {
|
||||
@ -1522,6 +1531,8 @@ public class TrickQPActionController {
|
||||
|
||||
/**
|
||||
* Helper method for adding a new Page.
|
||||
* @param page the page node
|
||||
* @return top page node
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public CommonTreeNode addPageToPlots(ProductPage page) {
|
||||
@ -1575,6 +1586,7 @@ public class TrickQPActionController {
|
||||
* The valid range would be [0, total child count of this table].
|
||||
* @param isNew <code>true</code> if the column user object needs adding to the
|
||||
* column list of the table user object, <code>false</code> otherwise.
|
||||
* @return top column node
|
||||
*/
|
||||
public CommonTreeNode addColumnToTable(CommonTreeNode tableNode, Object column, int idx, boolean isNew) {
|
||||
CommonTreeNode columnNode = null;
|
||||
@ -1608,6 +1620,7 @@ public class TrickQPActionController {
|
||||
* an instance of {@link ProductColumn}.
|
||||
* @param isNew <code>true</code> if the column user object needs adding to the
|
||||
* column list of the table user object, <code>false</code> otherwise.
|
||||
* @return top column node
|
||||
*/
|
||||
public CommonTreeNode addColumnToTable(CommonTreeNode tableNode, Object column, boolean isNew) {
|
||||
return addColumnToTable(tableNode, column, -1, isNew);
|
||||
|
@ -129,6 +129,8 @@ public class VarListPanel extends ListPanel {
|
||||
|
||||
/**
|
||||
* Gets the data with same name as given object from the list.
|
||||
* @param obj object go get
|
||||
* @return the object
|
||||
*/
|
||||
public Object getElement(Object obj) {
|
||||
return ((SortedListModel)dataListModel).getElement(obj);
|
||||
|
@ -67,6 +67,7 @@ public class FileTreeNode implements Comparable<FileTreeNode> {
|
||||
//========================================
|
||||
/**
|
||||
* Returns the {@link File} object for the tree node.
|
||||
* @return the file
|
||||
*/
|
||||
public File getFile() {
|
||||
return file;
|
||||
@ -74,6 +75,7 @@ public class FileTreeNode implements Comparable<FileTreeNode> {
|
||||
|
||||
/**
|
||||
* Returns true if the node is special.
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isSpecial() {
|
||||
return isSpecial;
|
||||
|
@ -110,6 +110,8 @@ public abstract class FileTreePanel extends DataPanel implements TreeSelectionLi
|
||||
//========================================
|
||||
/**
|
||||
* Constructs a {@link FileTreePanel} with specified file directory.
|
||||
* @param dir directory to list
|
||||
* @param filter the filter to use for displaying files
|
||||
*/
|
||||
public FileTreePanel(File dir, TrickFileFilter filter) {
|
||||
super();
|
||||
@ -120,6 +122,9 @@ public abstract class FileTreePanel extends DataPanel implements TreeSelectionLi
|
||||
|
||||
/**
|
||||
* Constructs a {@link FileTreePanel} with specified file directory and number of popup menus.
|
||||
* @param dir directory to list
|
||||
* @param filter the filter to use for displaying files
|
||||
* @param popupNum not sure
|
||||
*/
|
||||
public FileTreePanel(File dir, TrickFileFilter filter, int popupNum) {
|
||||
super(popupNum);
|
||||
@ -130,6 +135,9 @@ public abstract class FileTreePanel extends DataPanel implements TreeSelectionLi
|
||||
|
||||
/**
|
||||
* Constructs a {@link FileTreePanel} with specified file directory list and number of popup menus.
|
||||
* @param dirs list of dirs.
|
||||
* @param filter the filter to use for displaying files
|
||||
* @param popupNum not sure
|
||||
*/
|
||||
public FileTreePanel(Vector<File> dirs, TrickFileFilter filter, int popupNum) {
|
||||
super(popupNum);
|
||||
@ -199,6 +207,7 @@ public abstract class FileTreePanel extends DataPanel implements TreeSelectionLi
|
||||
* Gets the path in the tree as specified by the array of names.
|
||||
* The names[0] is the root and names[i] is a child of names[i-1].
|
||||
*
|
||||
* @param names list of names to get the path of.
|
||||
* @return The {@link TreePath} if found, null otherwise.
|
||||
*/
|
||||
public TreePath getPathByName(Object[] names) {
|
||||
@ -523,6 +532,7 @@ public abstract class FileTreePanel extends DataPanel implements TreeSelectionLi
|
||||
|
||||
/**
|
||||
* Gets all selected items. Each item is a string and composed in a particular format.
|
||||
* @return vector of selected items
|
||||
*/
|
||||
public Vector<String> getSelectedItems() {
|
||||
TreePath[] selectedPaths = fileTree.getSelectionPaths();
|
||||
@ -818,6 +828,7 @@ public abstract class FileTreePanel extends DataPanel implements TreeSelectionLi
|
||||
* @param curTop The current node which needs adding child nodes to.
|
||||
* @param filter A {@link TrickFileFilter} for only showing interested dirs/files.
|
||||
* @param dir The {@link File} object for the node.
|
||||
* @return not sure
|
||||
*/
|
||||
protected DefaultMutableTreeNode addNodes(DefaultMutableTreeNode curTop, TrickFileFilter filter, File dir) {
|
||||
String curPath = null;
|
||||
|
@ -209,7 +209,7 @@ public class Session {
|
||||
/**
|
||||
* Sets the device file name if the device if File.
|
||||
*
|
||||
* @param deviceFileName
|
||||
* @param deviceFileName device name string
|
||||
*
|
||||
* @see #DEVICE_OPTIONS
|
||||
*
|
||||
|
@ -58,6 +58,7 @@ public class SessionRunTransferHandler extends TransferHandler {
|
||||
//========================================
|
||||
/**
|
||||
* Default constructor.
|
||||
* @param list not sure
|
||||
*/
|
||||
public SessionRunTransferHandler(JList list) {
|
||||
this.list = list;
|
||||
|
@ -45,6 +45,8 @@ public class SimDPTree extends SimRunDPTree {
|
||||
//========================================
|
||||
/**
|
||||
* Constructs a {@link SimDPTree} with specified file directory.
|
||||
* @param dir directory to find run directories in.
|
||||
* @param filter wildcard filter to match to list directories.
|
||||
*/
|
||||
public SimDPTree(File dir, TrickFileFilter filter) {
|
||||
super(dir, filter);
|
||||
@ -52,6 +54,9 @@ public class SimDPTree extends SimRunDPTree {
|
||||
|
||||
/**
|
||||
* Constructs a {@link SimDPTree} with specified file directory and number of popup menus.
|
||||
* @param dir directory to find run directories in.
|
||||
* @param filter wildcard filter to match to list directories.
|
||||
* @param popupNum not sure
|
||||
*/
|
||||
public SimDPTree(File dir, TrickFileFilter filter, int popupNum) {
|
||||
super(dir, filter, popupNum);
|
||||
|
@ -51,6 +51,8 @@ public abstract class SimRunDPTree extends FileTreePanel{
|
||||
//========================================
|
||||
/**
|
||||
* Constructs a {@link SimRunDPTree} with specified file directory.
|
||||
* @param dir directory to find run directories in.
|
||||
* @param filter wildcard filter to match to list directories.
|
||||
*/
|
||||
public SimRunDPTree(File dir, TrickFileFilter filter) {
|
||||
super(dir, filter);
|
||||
@ -58,6 +60,9 @@ public abstract class SimRunDPTree extends FileTreePanel{
|
||||
|
||||
/**
|
||||
* Constructs a {@link SimRunDPTree} with specified file directory and number of popup menus.
|
||||
* @param dir directory to find run directories in.
|
||||
* @param filter wildcard filter to match to list directories.
|
||||
* @param popupNum not sure
|
||||
*/
|
||||
public SimRunDPTree(File dir, TrickFileFilter filter, int popupNum) {
|
||||
super(dir, filter, popupNum);
|
||||
|
@ -44,6 +44,8 @@ public class SimRunTree extends SimRunDPTree {
|
||||
//========================================
|
||||
/**
|
||||
* Constructs a {@link SimRunTree} with specified file directory.
|
||||
* @param dir directory to find run directories in.
|
||||
* @param filter wildcard filter to match to list directories.
|
||||
*/
|
||||
public SimRunTree(File dir, TrickFileFilter filter) {
|
||||
super(dir, filter);
|
||||
@ -51,6 +53,9 @@ public class SimRunTree extends SimRunDPTree {
|
||||
|
||||
/**
|
||||
* Constructs a {@link SimRunTree} with specified file directory and number of popup menus.
|
||||
* @param dir directory to find run directories in.
|
||||
* @param filter wildcard filter to match to list directories.
|
||||
* @param popupNum not sure
|
||||
*/
|
||||
public SimRunTree(File dir, TrickFileFilter filter, int popupNum) {
|
||||
super(dir, filter, popupNum);
|
||||
|
@ -295,6 +295,7 @@ public class DreApplication extends TrickApplication {
|
||||
//========================================
|
||||
/**
|
||||
* Main method for this application.
|
||||
* @param args command line arguments
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
Application.launch(DreApplication.class, args);
|
||||
|
@ -469,7 +469,9 @@ public class MonteMonitorApplication extends RunTimeTrickApplication {
|
||||
return menuBar;
|
||||
}
|
||||
|
||||
/** main method for this application */
|
||||
/** main method for this application
|
||||
* @param args command line arguments
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
Application.launch(MonteMonitorApplication.class, args);
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ public class Slave {
|
||||
|
||||
/**
|
||||
* constructs a new Slave whose initial state is UNKNOWN
|
||||
* @param id slave id
|
||||
*/
|
||||
public Slave(String id) {
|
||||
this.id = id;
|
||||
|
@ -72,6 +72,7 @@ public class MtvApp extends TrickApplication {
|
||||
|
||||
/**
|
||||
* Main method launching the application.
|
||||
* @param args command line arguments
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
launch(MtvApp.class, args);
|
||||
|
@ -291,6 +291,7 @@ public class SieApplication extends TrickApplication implements TreeSelectionLis
|
||||
|
||||
/**
|
||||
* Main method.
|
||||
* @param args command line arguments
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
if (args.length == 1) {
|
||||
@ -597,7 +598,7 @@ public class SieApplication extends TrickApplication implements TreeSelectionLis
|
||||
/**
|
||||
* Updates the reading pane for selected items from search results.
|
||||
*
|
||||
* @throws BadLocationException
|
||||
* @throws BadLocationException BadLocationException
|
||||
*/
|
||||
public void updateReadingPaneForSearch() throws BadLocationException {
|
||||
// if the reading pane is not ready, do nothing
|
||||
@ -617,7 +618,7 @@ public class SieApplication extends TrickApplication implements TreeSelectionLis
|
||||
/**
|
||||
* Updates the reading pane for showing details of variables.
|
||||
*
|
||||
* @throws BadLocationException
|
||||
* @throws BadLocationException BadLocationException
|
||||
*/
|
||||
public void updateReadingPaneForVars() throws BadLocationException {
|
||||
// if the reading pane is not ready, do nothing
|
||||
|
@ -106,7 +106,7 @@ public class SieEnumeration implements Comparable<SieEnumeration>, Serializable
|
||||
|
||||
/**
|
||||
* returns the result of comparing the enumerations' names as implemented
|
||||
* by <code>String.compareTo<code>
|
||||
* by <code>String.compareTo</code>
|
||||
*/
|
||||
@Override
|
||||
public int compareTo(SieEnumeration enumeration) {
|
||||
|
@ -35,6 +35,9 @@ public class SieResourceDomParser {
|
||||
* @param inputSource the source containing the S_sie.resource file
|
||||
*
|
||||
* @return the simulation's root instances
|
||||
* @throws ParserConfigurationException ParserConfigurationException
|
||||
* @throws SAXException SAXException
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public static Collection<SieTemplate> parse(InputSource inputSource)
|
||||
throws ParserConfigurationException, SAXException, IOException {
|
||||
@ -103,6 +106,9 @@ public class SieResourceDomParser {
|
||||
* @param inputSource the source containing the S_sie.resource file
|
||||
*
|
||||
* @return the simulation's enumerations
|
||||
* @throws ParserConfigurationException ParserConfigurationException
|
||||
* @throws SAXException SAXException
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public static HashMap<String, SieEnumeration> getSieEnumerationMap(InputSource inputSource)
|
||||
throws ParserConfigurationException, SAXException, IOException {
|
||||
|
@ -50,6 +50,7 @@ public class SieTemplate implements Comparable<SieTemplate>, Iterable<SieTemplat
|
||||
|
||||
/**
|
||||
* creates a new copy of specified SieTemplate without its children information
|
||||
* @param sieTemplate object to copy
|
||||
*/
|
||||
public SieTemplate(SieTemplate sieTemplate) {
|
||||
description = sieTemplate.description;
|
||||
|
@ -143,7 +143,7 @@ public class SieTree extends JXTree {
|
||||
}
|
||||
|
||||
/**
|
||||
* sets the comparator used for sorting. Pass </code>null</code>to disable sorting.
|
||||
* sets the comparator used for sorting. Pass <code>null</code>to disable sorting.
|
||||
*
|
||||
* @param comparator the sorting comparator, or <code>null</code>
|
||||
*/
|
||||
|
@ -53,6 +53,7 @@ public class VariableList extends JXList {
|
||||
//========================================
|
||||
/**
|
||||
* Default constructor.
|
||||
* @param model initial list of variables to use.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public VariableList(ListModel model) {
|
||||
|
@ -673,6 +673,7 @@ public class SimControlApplication extends TrickApplication implements PropertyC
|
||||
|
||||
/**
|
||||
* Main method for this application.
|
||||
* @param args command line arguments
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
Application.launch(SimControlApplication.class, args);
|
||||
|
@ -82,6 +82,8 @@ public class SimControlActionController {
|
||||
//========================================
|
||||
/**
|
||||
* Invoked when the user selects Freeze At ... from Actions menu.
|
||||
* @param execOutTime time to freeze at
|
||||
* @param dialogParent dialog parent
|
||||
*/
|
||||
public void handleFreezeAt(double execOutTime, Component dialogParent) {
|
||||
freeze(execOutTime, 0, "Freeze sim at (enter RET):", "Freeze sim at specified time", dialogParent);
|
||||
@ -135,6 +137,8 @@ public class SimControlActionController {
|
||||
|
||||
/**
|
||||
* Invoked when the user selects Freeze In ... from Actions menu.
|
||||
* @param execOutTime time to freeze in
|
||||
* @param dialogParent dialog parent
|
||||
*/
|
||||
public void handleFreezeIn(double execOutTime, Component dialogParent) {
|
||||
freeze(execOutTime, 1, "Freeze in this many seconds:", "Freeze sim in specified time", dialogParent);
|
||||
@ -142,6 +146,9 @@ public class SimControlActionController {
|
||||
|
||||
/**
|
||||
* Invoked when the user selects Checkpoint Objects ... from Actions menu.
|
||||
* @param dialogParent dialog parent
|
||||
* @param initObjects list of objects to checkpoint
|
||||
* @return list of objects to checkpoint
|
||||
*/
|
||||
public String handleCheckpointObjects(Component dialogParent, String initObjects) {
|
||||
return (String)JOptionPane.showInputDialog(dialogParent,
|
||||
@ -155,6 +162,7 @@ public class SimControlActionController {
|
||||
|
||||
/**
|
||||
* Invoked when the user selects Throttle ... from Actions menu.
|
||||
* @param dialogParent dialog parent
|
||||
*/
|
||||
public void handleThrottle(Component dialogParent) {
|
||||
double newRatio = -1.0;
|
||||
@ -224,6 +232,7 @@ public class SimControlActionController {
|
||||
|
||||
/**
|
||||
* Invoked when the users presses the Step button.
|
||||
* @param debug_flag single step the sim
|
||||
*/
|
||||
public void handleStep( int debug_flag ) {
|
||||
try {
|
||||
@ -240,6 +249,7 @@ public class SimControlActionController {
|
||||
|
||||
/**
|
||||
* Invoked when the user presses the Data Rec On button.
|
||||
* @param recording true or false
|
||||
*/
|
||||
public void handleRecOnOff(boolean recording) {
|
||||
|
||||
@ -268,6 +278,7 @@ public class SimControlActionController {
|
||||
|
||||
/**
|
||||
* Invoked when the user presses the Freeze button.
|
||||
* @param debug_flag value of debug
|
||||
*/
|
||||
public void handleFreeze( int debug_flag ) {
|
||||
try {
|
||||
@ -282,6 +293,7 @@ public class SimControlActionController {
|
||||
|
||||
/**
|
||||
* Invoked when the user presses Real Time button.
|
||||
* @param isRealtime true or false
|
||||
*/
|
||||
public void handleRealtime(boolean isRealtime) {
|
||||
try {
|
||||
@ -297,6 +309,10 @@ public class SimControlActionController {
|
||||
|
||||
/**
|
||||
* Invoked when the user presses Dump ASCII Chkpnt button.
|
||||
* @param checkpointObjects list of objects to checkpoint
|
||||
* @param dir directory to dump checkpoint
|
||||
* @param fileName name of checkpoint file
|
||||
* @param dialogParent dialogParent
|
||||
*/
|
||||
public void handleDumpChkpntASCII(String checkpointObjects, String dir, String fileName, Component dialogParent) {
|
||||
if (dir == null) {
|
||||
@ -327,6 +343,9 @@ public class SimControlActionController {
|
||||
|
||||
/**
|
||||
* Invoked when the user presses Dump DMTCP Chkpnt button.
|
||||
* @param dir directory to dump checkpoint
|
||||
* @param fileName name of checkpoint file
|
||||
* @param dialogParent dialogParent
|
||||
*/
|
||||
public void handleDumpDMTCPChkpnt(String dir, String fileName, Component dialogParent) {
|
||||
|
||||
@ -361,6 +380,8 @@ public class SimControlActionController {
|
||||
|
||||
/**
|
||||
* Invoked when the user presses Load ASCII Chkpnt button.
|
||||
* @param dir directory to load checkpoint
|
||||
* @param dialogParent dialogParent
|
||||
*/
|
||||
public void handleLoadChkpnt(String dir, Component dialogParent) {
|
||||
// If the Sim Run dir is unknown, current dir will be used for the file chooser.
|
||||
|
@ -320,7 +320,9 @@ public class SimSnifferApplication extends TrickApplication {
|
||||
return menuBar;
|
||||
}
|
||||
|
||||
/** main method for this application */
|
||||
/** main method for this application
|
||||
* @param args command line arguments
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
Application.launch(SimSnifferApplication.class, args);
|
||||
}
|
||||
|
@ -47,12 +47,26 @@ public class SimulationInformation implements Comparable<SimulationInformation>
|
||||
/** user tag */
|
||||
public final String tag;
|
||||
|
||||
/** constructor */
|
||||
/** constructor
|
||||
* @param machine the machine the simulation is running on
|
||||
* @param port the port the simulation is listening on
|
||||
*/
|
||||
public SimulationInformation(String machine, String port) {
|
||||
this(machine, port, "", "", "", "", "", "", "", "");
|
||||
}
|
||||
|
||||
/** constructor */
|
||||
/** constructor
|
||||
* @param machine the machine the simulation is running on
|
||||
* @param handshakePort the port the simulation is listening on
|
||||
* @param user the simulation owner
|
||||
* @param processID the process ID of the sim
|
||||
* @param simDirectory the directory the simulation is running
|
||||
* @param sMainFile name of the sim executable
|
||||
* @param runDirectory name of the run directory
|
||||
* @param version Trick version of sim
|
||||
* @param tag user defined tag of sim
|
||||
* @param noHandshakePort port number of the no handshake port
|
||||
*/
|
||||
public SimulationInformation(String machine, String handshakePort,
|
||||
String user, String processID, String simDirectory, String sMainFile,
|
||||
String runDirectory, String version, String tag,
|
||||
|
@ -1,7 +1,7 @@
|
||||
package trick.sniffer;
|
||||
|
||||
/**
|
||||
* <code>SimulationListener<code>s are notified by a SimulationSniffer when
|
||||
* <code>SimulationListener</code>s are notified by a SimulationSniffer when
|
||||
* simulations are added or removed from the list of currently running
|
||||
* simulations.
|
||||
*
|
||||
|
@ -653,7 +653,7 @@ public class StripChart extends JXPanel {
|
||||
* constructor
|
||||
*
|
||||
* @param stripChart the strip chart to be framed
|
||||
* @param bounds the bounds of the frame. <code>null<code> allows
|
||||
* @param bounds the bounds of the frame. <code>null</code> allows
|
||||
* the look and feel to determine the bounds.
|
||||
*/
|
||||
public Frame(final StripChart stripChart, Rectangle bounds) {
|
||||
|
@ -90,6 +90,7 @@ public class StripChartManager {
|
||||
/**
|
||||
* clears the <code>variable</code>'s value log and any pairs it is
|
||||
* participating in and removes it from the strip charts
|
||||
* @param variable the variable to remove
|
||||
*/
|
||||
public void removeVariable(Variable variable) {
|
||||
valueLogs.remove(variable);
|
||||
@ -108,6 +109,8 @@ public class StripChartManager {
|
||||
/**
|
||||
* returns an existing variable pair or a new one if none exists
|
||||
*
|
||||
* @param domainVariable not sure
|
||||
* @param rangeVariable not sure
|
||||
* @return a variable pair for the given arguments
|
||||
*/
|
||||
public VariablePair getPair(Variable domainVariable, Variable rangeVariable) {
|
||||
|
@ -1376,6 +1376,7 @@ public class TVApplication extends RunTimeTrickApplication implements VariableLi
|
||||
* checks the validity of the variable name
|
||||
*
|
||||
* @param name the name in question
|
||||
* @throws InvalidVariableNameException InvalidVariableNameException
|
||||
*/
|
||||
protected void validateVariable(String name) throws InvalidVariableNameException {
|
||||
name = name.replaceAll("\\s", "");
|
||||
@ -1421,6 +1422,7 @@ public class TVApplication extends RunTimeTrickApplication implements VariableLi
|
||||
* @param name the variable's name
|
||||
*
|
||||
* @return the list of generated variables
|
||||
* @throws InvalidVariableNameException InvalidVariableNameException
|
||||
*/
|
||||
protected List<Variable<? extends TrickViewFluent>> getVariables(String name) throws InvalidVariableNameException {
|
||||
validateVariable(name);
|
||||
@ -1828,6 +1830,7 @@ public class TVApplication extends RunTimeTrickApplication implements VariableLi
|
||||
* saves the variable table and strip charts to <code>file</code>
|
||||
*
|
||||
* @param file the target
|
||||
* @throws JAXBException JAXBException
|
||||
*/
|
||||
protected void saveState(File file) throws JAXBException {
|
||||
marshaller.marshal(new JAXBElement<TVBean>(new QName("trickView"), TVBean.class, new TVBean(this)), file);
|
||||
|
@ -100,7 +100,7 @@ public class TVVariableTree extends SieTree {
|
||||
}
|
||||
|
||||
/**
|
||||
* creates a new variable named <code>name</code> from </code>template</code>
|
||||
* creates a new variable named <code>name</code> from <code>template</code>
|
||||
*
|
||||
* @param name the new variable's name
|
||||
* @param template the template from which to create the new variable
|
||||
|
Loading…
Reference in New Issue
Block a user