General cleanup and fixes of texts and labels

This commit is contained in:
Adam Dunkels 2012-05-31 18:04:40 +02:00
parent cb00219096
commit 34c2cef205
15 changed files with 105 additions and 87 deletions

View file

@ -1052,7 +1052,7 @@ public class Simulation extends Observable implements Runnable {
// Change current radio medium to new one
if (radioMedium == null) {
logger.fatal("Radio medium could not be created!");
logger.fatal("Radio medium could not be created.");
return;
}
this.currentRadioMedium = radioMedium;

View file

@ -72,14 +72,14 @@ import se.sics.cooja.dialogs.MessageList.MessageContainer;
import se.sics.cooja.util.StringUtils;
/**
* The Contiki mote type holds the native library used to communicate with an
* The Cooja mote type holds the native library used to communicate with an
* underlying Contiki system. All communication with that system should always
* pass through this mote type.
* <p>
* This type also contains information about sensors and mote interfaces a mote
* of this type has.
* <p>
* All core communication with the Contiki mote should be via this class. When a
* All core communication with the Cooja mote should be via this class. When a
* mote type is created it allocates a CoreComm to be used with this type, and
* loads the variable and segments addresses.
* <p>
@ -90,7 +90,7 @@ import se.sics.cooja.util.StringUtils;
*
* @author Fredrik Osterlind
*/
@ClassDescription("Contiki Mote Type")
@ClassDescription("Cooja Mote Type")
@AbstractionLevelDescription("OS level")
public class ContikiMoteType implements MoteType {
private static Logger logger = Logger.getLogger(ContikiMoteType.class);
@ -199,7 +199,7 @@ public class ContikiMoteType implements MoteType {
private SectionMoteMemory initialMemory = null;
/**
* Creates a new uninitialized Contiki mote type. This mote type needs to load
* Creates a new uninitialized Cooja mote type. This mote type needs to load
* a library file and parse a map file before it can be used.
*/
public ContikiMoteType() {
@ -216,7 +216,7 @@ public class ContikiMoteType implements MoteType {
if (visAvailable) {
if (getDescription() == null) {
setDescription("Contiki Mote Type #" + (simulation.getMoteTypes().length+1));
setDescription("Cooja Mote Type #" + (simulation.getMoteTypes().length+1));
}
/* Compile Contiki from dialog */
@ -251,7 +251,7 @@ public class ContikiMoteType implements MoteType {
javaClassName = CoreComm.getAvailableClassName();
if (javaClassName == null) {
throw new MoteTypeCreationException("Could not allocate a core communicator!");
throw new MoteTypeCreationException("Could not allocate a core communicator.");
}
/* Delete output files */
@ -425,7 +425,7 @@ public class ContikiMoteType implements MoteType {
/* Parse command output */
if (mapFile == null ||
!mapFile.exists()) {
throw new MoteTypeCreationException("Map file " + mapFile + " could not be found!");
throw new MoteTypeCreationException("Map file " + mapFile + " could not be found");
}
String[] mapData = loadMapFile(mapFile);
if (mapData == null) {
@ -512,7 +512,7 @@ public class ContikiMoteType implements MoteType {
offset = tmp.getIntValueOf("referenceVar");
logger.info(getContikiFirmwareFile().getName() +
": offsetting Contiki mote address space: " + offset);
": offsetting Cooja mote address space: " + offset);
}
/* Create initial memory: data+bss+optional common */
@ -1138,7 +1138,7 @@ public class ContikiMoteType implements MoteType {
}
/**
* Generates a unique Contiki mote type ID.
* Generates a unique Cooja mote type ID.
*
* @param existingTypes Already existing mote types, may be null
* @param reservedIdentifiers Already reserved identifiers, may be null
@ -1315,7 +1315,7 @@ public class ContikiMoteType implements MoteType {
} else if (name.equals("symbols")) {
hasSystemSymbols = Boolean.parseBoolean(element.getText());
} else if (name.equals("commstack")) {
logger.warn("COOJA's communication stack config was removed: " + element.getText());
logger.warn("The Cooja communication stack config was removed: " + element.getText());
logger.warn("Instead assuming default network stack.");
netStack = NetworkStack.DEFAULT;
} else if (name.equals("netstack")) {
@ -1342,10 +1342,10 @@ public class ContikiMoteType implements MoteType {
name.equals("process") ||
name.equals("sensor") ||
name.equals("coreinterface")) {
/* Backwards compatibility: old contiki mote type is being loaded */
/* Backwards compatibility: old cooja mote type is being loaded */
if (!warnedOldVersion) {
warnedOldVersion = true;
logger.warn("Old simulation config detected: contiki mote types may not load correctly");
logger.warn("Old simulation config detected: Cooja mote types may not load correctly");
}
if (name.equals("compilefile")) {
@ -1368,7 +1368,7 @@ public class ContikiMoteType implements MoteType {
moteInterfacesClasses.toArray(arr);
setCoreInterfaces(ContikiMoteType.getRequiredCoreInterfaces(arr));
/* Backwards compatibility: old contiki mote type is being loaded */
/* Backwards compatibility: old cooja mote type is being loaded */
if (getContikiSourceFile() == null &&
warnedOldVersion &&
oldVersionSource != null)

View file

@ -681,7 +681,7 @@ public abstract class AbstractCompileDialog extends JDialog {
private void addMoteInterfacesTab(JTabbedPane parent) {
moteIntfBox = Box.createVerticalBox();
JPanel panel = new JPanel(new BorderLayout());
JLabel label = new JLabel("COOJA interacts with simulated motes via mote interfaces. You normally do not need to change these settings!");
JLabel label = new JLabel("Cooja interacts with simulated motes via mote interfaces. These settings normally do not need to be changed.");
Box b = Box.createHorizontalBox();
b.add(new JButton(defaultAction));
b.add(label);

View file

@ -139,12 +139,12 @@ public class AddMoteDialog extends JDialog {
buttonPane.add(Box.createHorizontalGlue());
button = new JButton("Cancel");
button = new JButton("Do not add motes");
button.setActionCommand("cancel");
button.addActionListener(myEventHandler);
buttonPane.add(button);
button = new JButton("Create and Add");
button = new JButton("Add motes");
button.setActionCommand("add");
button.addActionListener(myEventHandler);
this.getRootPane().setDefaultButton(button);
@ -554,9 +554,9 @@ public class AddMoteDialog extends JDialog {
newMotes = null;
JOptionPane.showMessageDialog(
AddMoteDialog.this,
"Out of memory!\nException message: \"" + e2.getMessage() + "\"\n\n" +
"Reduce number of nodes or start COOJA with more memory (\">ant run_bigmem\").",
"Not enough heap memory!", JOptionPane.ERROR_MESSAGE
"Out of memory.\nException message: \"" + e2.getMessage() + "\"\n\n" +
"Reduce number of nodes or start Cooja with more memory (\">ant run_bigmem\").",
"Not enough heap memory.", JOptionPane.ERROR_MESSAGE
);
}
}

View file

@ -131,7 +131,7 @@ public class ConfigurationWizard extends JDialog {
private static final String OPTION_RUN_TEST = "Run test";
private static final String OPTION_NEXT_TEST = "Next test";
private static final String OPTION_CLOSE_WIZARD = "Close Wizard";
private static final String OPTION_CLOSE_WIZARD = "Close wizard";
private static final String testTemplate = "test_template.c";
@ -189,14 +189,14 @@ public class ConfigurationWizard extends JDialog {
public static boolean showWizardInfo(Container parent, GUI gui) {
String options[] = {"Start tests", OPTION_CLOSE_WIZARD};
int value = JOptionPane.showOptionDialog(parent,
"This wizard configures and tests your toolchain for simulating Contiki motes in COOJA.\n" +
"This wizard configures and tests your toolchain for simulation of Cooja motes.\n" +
"Throughout the wizard, Contiki libraries are compiled and loaded while allowing you to \n" +
"alter external tools settings such as compiler arguments.\n" +
"\n" +
"Changes made in this wizard are reflected in menu Settings, External tools paths.\n" +
"\n" +
"NOTE: You do not need to complete this wizard for emulating motes, such as Sky motes.\n",
"Contiki mote configuration wizard",
"NOTE: You do not need to complete this wizard for emulated motes, such as Sky motes.\n",
"Cooja mote configuration wizard",
JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE,
null, options, options[0]);
@ -213,7 +213,7 @@ public class ConfigurationWizard extends JDialog {
while (value.equals(OPTION_RUN_TEST)) {
value = showStepDialog(
parent,
"Generates, compiles and links a COOJA/Contiki stub.\n",
"Generates, compiles and links a Cooja/Contiki stub.\n",
testDescription,
new String[] {
"COMPILER_ARGS", "LINK_COMMAND_1", "LINK_COMMAND_2", "AR_COMMAND_1", "AR_COMMAND_2"
@ -378,8 +378,8 @@ public class ConfigurationWizard extends JDialog {
while (value.equals(OPTION_RUN_TEST)) {
value = showStepDialog(
parent,
"Tests copying memory sections between Contiki and COOJA.\n" +
"Variable values are both altered in Contiki and in COOJA.\n" +
"Tests copying memory sections between Contiki and Cooja.\n" +
"Variable values are both altered in Contiki and in Cooja.\n" +
"\n" +
"This is the final test!\n",
testDescription,

View file

@ -152,7 +152,7 @@ public class ContikiMoteCompileDialog extends AbstractCompileDialog {
((ContikiMoteType)moteType).javaClassName = CoreComm.getAvailableClassName();
if (((ContikiMoteType)moteType).javaClassName == null) {
logger.fatal("Could not allocate a core communicator!");
logger.fatal("Could not allocate a core communicator.");
return "";
}

View file

@ -209,7 +209,7 @@ public class CreateSimDialog extends JDialog {
horizBox = Box.createHorizontalBox();
horizBox.setMaximumSize(new Dimension(Integer.MAX_VALUE,LABEL_HEIGHT));
horizBox.setAlignmentX(Component.LEFT_ALIGNMENT);
label = new JLabel("Simulation title");
label = new JLabel("Simulation name");
label.setPreferredSize(new Dimension(LABEL_WIDTH,LABEL_HEIGHT));
textField = new JTextField();
@ -228,7 +228,7 @@ public class CreateSimDialog extends JDialog {
horizBox = Box.createHorizontalBox();
horizBox.setMaximumSize(new Dimension(Integer.MAX_VALUE,LABEL_HEIGHT));
horizBox.setAlignmentX(Component.LEFT_ALIGNMENT);
label = new JLabel("Radio Medium");
label = new JLabel("Radio medium");
label.setPreferredSize(new Dimension(LABEL_WIDTH,LABEL_HEIGHT));
Vector<String> radioMediumDescriptions = new Vector<String>();
@ -259,7 +259,7 @@ public class CreateSimDialog extends JDialog {
horizBox = Box.createHorizontalBox();
horizBox.setMaximumSize(new Dimension(Integer.MAX_VALUE,LABEL_HEIGHT));
horizBox.setAlignmentX(Component.LEFT_ALIGNMENT);
label = new JLabel("Random startup (max, ms)");
label = new JLabel("Mote startup delay (ms)");
label.setPreferredSize(new Dimension(LABEL_WIDTH,LABEL_HEIGHT));
numberField = new JFormattedTextField(integerFormat);
@ -279,7 +279,7 @@ public class CreateSimDialog extends JDialog {
horizBox = Box.createHorizontalBox();
horizBox.setMaximumSize(new Dimension(Integer.MAX_VALUE,LABEL_HEIGHT));
horizBox.setAlignmentX(Component.LEFT_ALIGNMENT);
label = new JLabel("Main random seed");
label = new JLabel("Random seed");
label.setPreferredSize(new Dimension(LABEL_WIDTH,LABEL_HEIGHT));
numberField = new JFormattedTextField(integerFormat);
@ -287,6 +287,19 @@ public class CreateSimDialog extends JDialog {
numberField.setColumns(4);
randomSeed = numberField;
horizBox.add(label);
horizBox.add(Box.createHorizontalStrut(150));
horizBox.add(numberField);
horizBox.setToolTipText("Simulation random seed. Controls the random behavior such as mote startup delays, node positions etc.");
advancedBox.add(horizBox);
advancedBox.add(Box.createVerticalStrut(5));
horizBox = Box.createHorizontalBox();
horizBox.setMaximumSize(new Dimension(Integer.MAX_VALUE,LABEL_HEIGHT));
horizBox.setAlignmentX(Component.LEFT_ALIGNMENT);
label = new JLabel("New random seed on reload");
label.setPreferredSize(new Dimension(LABEL_WIDTH,LABEL_HEIGHT));
randomSeedGenerated = new JCheckBox();
randomSeedGenerated.setToolTipText("Automatically generate random seed at simulation load");
randomSeedGenerated.addActionListener(new ActionListener() {
@ -301,11 +314,10 @@ public class CreateSimDialog extends JDialog {
}
});
horizBox.add(label);
horizBox.add(Box.createHorizontalStrut(150));
horizBox.add(numberField);
horizBox.add(Box.createHorizontalStrut(116));
horizBox.add(randomSeedGenerated);
horizBox.setToolTipText("Simulation random seed. Controls the random behavior such as mote startup delays, node positions etc.");
advancedBox.add(horizBox);
advancedBox.add(Box.createVerticalStrut(5));

View file

@ -89,7 +89,7 @@ import se.sics.cooja.GUI;
import se.sics.cooja.ProjectConfig;
/**
* This dialog allows a user to manage COOJA projects: extensions to COOJA that
* This dialog allows a user to manage Cooja extensions: extensions to COOJA that
* provide new functionality such as radio mediums, plugins, and mote types.
*
* @author Fredrik Osterlind
@ -101,7 +101,7 @@ public class ProjectDirectoriesDialog extends JDialog {
private GUI gui;
private JTable table = null;
private JTextArea projectInfo = new JTextArea("Project information:");
private JTextArea projectInfo = new JTextArea("Extension information:");
private DirectoryTreePanel treePanel = null;
private ArrayList<COOJAProject> currentProjects = new ArrayList<COOJAProject>();
@ -132,7 +132,7 @@ public class ProjectDirectoriesDialog extends JDialog {
super(
parent instanceof Dialog?(Dialog)parent:
parent instanceof Window?(Window)parent:
(Frame)parent, "COOJA projects", ModalityType.APPLICATION_MODAL);
(Frame)parent, "Cooja extensions", ModalityType.APPLICATION_MODAL);
table = new JTable(new AbstractTableModel() {
private static final long serialVersionUID = 591599455927509191L;
@ -189,7 +189,7 @@ public class ProjectDirectoriesDialog extends JDialog {
}
});
/* Add current projects */
/* Add current extensions */
for (COOJAProject project : projects) {
addProjectDir(project);
}
@ -237,7 +237,18 @@ public class ProjectDirectoriesDialog extends JDialog {
buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
button = new JButton("Save as default");
button = new JButton("Apply for session");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ProjectDirectoriesDialog.this.returnedProjects = currentProjects.toArray(new COOJAProject[0]);
dispose();
}
});
buttonPane.add(button);
buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
button = new JButton("Save");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Object[] options = { "Ok", "Cancel" };
@ -270,16 +281,6 @@ public class ProjectDirectoriesDialog extends JDialog {
});
buttonPane.add(button);
buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
button = new JButton("OK");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ProjectDirectoriesDialog.this.returnedProjects = currentProjects.toArray(new COOJAProject[0]);
dispose();
}
});
buttonPane.add(button);
this.getRootPane().setDefaultButton(button);
}
@ -348,8 +349,8 @@ public class ProjectDirectoriesDialog extends JDialog {
String s2 = "Cancel";
Object[] options = { s1, s2 };
int n = JOptionPane.showOptionDialog(GUI.getTopParentContainer(),
"Remove COOJA project?\n" + project,
"Remove COOJA project?", JOptionPane.YES_NO_OPTION,
"Remove Cooja project?\n" + project,
"Remove Cooja project?", JOptionPane.YES_NO_OPTION,
JOptionPane.WARNING_MESSAGE, null, options, s1);
if (n != JOptionPane.YES_OPTION) {
return;
@ -386,8 +387,8 @@ public class ProjectDirectoriesDialog extends JDialog {
}
JPanel topPanel = new JPanel(new BorderLayout());
topPanel.add(BorderLayout.CENTER, new JLabel(" A COOJA project depends on a cooja.config file, and extends COOJA with radio mediums, mote types, plugins etc."));
topPanel.setBackground(Color.WHITE);
/* topPanel.add(BorderLayout.CENTER, new JLabel("A Cooja project depends on a cooja.config file, and extends Cooja with radio mediums, mote types, plugins etc."));
topPanel.setBackground(Color.WHITE);*/
getContentPane().add(BorderLayout.NORTH, topPanel);
getContentPane().add(BorderLayout.CENTER, mainPane);
getContentPane().add(BorderLayout.SOUTH, buttonPane);
@ -410,9 +411,9 @@ public class ProjectDirectoriesDialog extends JDialog {
if (!project.configExists()) {
return;
}
projectInfo.append("Parsing: " +
(project.configRead()?"OK":"FAILED") + "\n\n");
if (!project.configRead()) {
projectInfo.append("Parsing: " +
(project.configRead()?"OK":"FAILED") + "\n\n");
return;
}
@ -425,9 +426,9 @@ public class ProjectDirectoriesDialog extends JDialog {
for (String jar: jars) {
File jarFile = GUI.findJarFile(project.dir, jar);
if (jarFile == null) {
projectInfo.append("\tERROR: " + jar + " could not be found!\n");
projectInfo.append("\tError: " + jar + " could not be found.\n");
} else if (!jarFile.exists()) {
projectInfo.append("\tERROR: " + jarFile.getAbsolutePath() + " could not be found!\n");
projectInfo.append("\tError: " + jarFile.getAbsolutePath() + " could not be found.\n");
} else {
projectInfo.append("\t" + jarFile.getAbsolutePath() + " found\n");
}
@ -440,10 +441,10 @@ public class ProjectDirectoriesDialog extends JDialog {
projectInfo.append("Radio mediums: " + Arrays.toString(project.getConfigRadioMediums()) + "\n");
}
if (project.getConfigMoteInterfaces() != null) {
projectInfo.append("Contiki mote interfaces: " + Arrays.toString(project.getConfigMoteInterfaces()) + "\n");
projectInfo.append("Cooja mote interfaces: " + Arrays.toString(project.getConfigMoteInterfaces()) + "\n");
}
if (project.getConfigCSources() != null) {
projectInfo.append("Contiki mote C sources: " + Arrays.toString(project.getConfigCSources()) + "\n");
projectInfo.append("Cooja mote C sources: " + Arrays.toString(project.getConfigCSources()) + "\n");
}
}

View file

@ -483,7 +483,7 @@ public class LogListener extends VisPlugin {
updateTitle();
pack();
setSize(gui.getDesktopPane().getWidth(), 150);
setLocation(0, gui.getDesktopPane().getHeight() - 300);
setLocation(0, gui.getDesktopPane().getHeight() - 310);
}
public void registerNewLogOutput(Mote mote, long time, String msg) {
@ -515,8 +515,8 @@ public class LogListener extends VisPlugin {
}
private void updateTitle() {
setTitle("Log Listener (listening on "
+ simulation.getEventCentral().getLogOutputObservationsCount() + " log interfaces)");
setTitle("Log Listener listening on "
+ simulation.getEventCentral().getLogOutputObservationsCount() + " log interfaces");
}
public void closePlugin() {

View file

@ -404,7 +404,7 @@ public class LogScriptEngine {
new Thread() {
public void run() {
try { Thread.sleep(2000); } catch (InterruptedException e) { }
logger.warn("Killing COOJA");
logger.warn("Killing Cooja");
System.exit(1);
};
}.start();
@ -450,7 +450,7 @@ public class LogScriptEngine {
deactivateScript();
if (GUI.isVisualized()) {
log("[if test was run without visualization, COOJA would now have been terminated]\n");
log("[if test was run without visualization, Cooja would now have been terminated]\n");
stopSimulation = true;
simulation.invokeSimulationThread(stopSimulationRunnable);
} else {

View file

@ -103,7 +103,7 @@ public class ScriptRunner extends VisPlugin {
"helloworld.js", "Wait for 'Hello, world'",
"log_all.js", "Just log all printf()'s and timeout",
"shell.js", "Basic shell interaction",
"plugins.js", "Interact with surrounding COOJA plugins",
"plugins.js", "Interact with surrounding Cooja plugins",
};
private Simulation simulation;
@ -442,7 +442,7 @@ public class ScriptRunner extends VisPlugin {
if (!coojaJAR.exists()) {
JOptionPane.showMessageDialog(GUI.getTopParentContainer(),
"Can't start COOJA, cooja.jar not found:" +
"Can't start Cooja, cooja.jar not found:" +
"\n" + coojaJAR.getAbsolutePath()
+ "\n\nVerify that PATH_CONTIKI is correct in external tools settings.",
"cooja.jar not found", JOptionPane.ERROR_MESSAGE);
@ -463,9 +463,9 @@ public class ScriptRunner extends VisPlugin {
String s1 = "Start";
String s2 = "Cancel";
int n = JOptionPane.showOptionDialog(GUI.getTopParentContainer(),
"Starting COOJA in " + coojaBuild.getPath() + ":\n" +
"Starting Cooja in " + coojaBuild.getPath() + ":\n" +
" " + command[0] + " " + command[1] + " " + command[2] + " " + command[3] + "\n",
"Starting COOJA without GUI", JOptionPane.YES_NO_OPTION,
"Starting Cooja without GUI", JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE, null, new Object[] { s1, s2 }, s1);
if (n != JOptionPane.YES_OPTION) {
return;
@ -540,10 +540,10 @@ public class ScriptRunner extends VisPlugin {
}
}
if (testSucceeded) {
progressDialog.setTitle("Test run completed. Test succeeded!");
progressDialog.setTitle("Test run completed. Test succeeded.");
button.setText("Test OK");
} else {
progressDialog.setTitle("Test run completed. Test failed!");
progressDialog.setTitle("Test run completed. Test failed.");
button.setText("Test failed");
}
} catch (FileNotFoundException e) {

View file

@ -102,6 +102,7 @@ public class SimControl extends VisPlugin {
smallPanel.add(startButton = new JButton(startAction));
smallPanel.add(stopButton = new JButton(stopAction));
smallPanel.add(new JButton(stepAction));
smallPanel.add(new JButton(reloadAction));
smallPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
controlPanel.add(smallPanel);
@ -371,9 +372,14 @@ public class SimControl extends VisPlugin {
startButton.requestFocus();
}
};
private Action stepAction = new AbstractAction("Step millisecond") {
private Action stepAction = new AbstractAction("Step") {
public void actionPerformed(ActionEvent e) {
simulation.stepMillisecondSimulation();
}
};
private Action reloadAction = new AbstractAction("Reload") {
public void actionPerformed(ActionEvent e) {
simulation.getGUI().reloadCurrentSimulation(simulation.isRunning());
}
};
}

View file

@ -69,6 +69,7 @@ import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JScrollPane;
import javax.swing.JSeparator;
import javax.swing.JSlider;
import javax.swing.JSplitPane;
import javax.swing.JToolTip;
@ -161,13 +162,17 @@ public class TimeLine extends VisPlugin {
* @param gui GUI
*/
public TimeLine(final Simulation simulation, final GUI gui) {
super("Timeline (Add motes to observe by clicking +)", gui);
super("Timeline", gui);
this.simulation = simulation;
currentPixelDivisor = ZOOM_LEVELS[ZOOM_LEVELS.length/2];
/* Box: events to observe */
eventCheckboxes = Box.createVerticalBox();
eventCheckboxes.add(new JButton(addMoteAction));
eventCheckboxes.add(new JSeparator());
JCheckBox eventCheckBox;
eventCheckBox = createEventCheckbox("Radio RX/TX", "Show radio transmissions, receptions, and collisions");
eventCheckBox.setSelected(showRadioRXTX);
@ -237,15 +242,9 @@ public class TimeLine extends VisPlugin {
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
timelineScrollPane.getHorizontalScrollBar().setUnitIncrement(50);
JButton timelineAddMoteButton = new JButton(addMoteAction);
timelineAddMoteButton.setText("+");
timelineAddMoteButton.setToolTipText("Add mote");
timelineAddMoteButton.setBorderPainted(false);
timelineAddMoteButton.setFont(new Font("SansSerif", Font.PLAIN, 11));
timelineMoteRuler = new MoteRuler();
timelineScrollPane.setRowHeaderView(timelineMoteRuler);
timelineScrollPane.setCorner(JScrollPane.LOWER_LEFT_CORNER, timelineAddMoteButton);
timelineScrollPane.setBackground(Color.WHITE);
splitPane = new JSplitPane(
@ -265,8 +264,8 @@ public class TimeLine extends VisPlugin {
recalculateMoteHeight();
pack();
setSize(gui.getDesktopPane().getWidth(), 150);
setLocation(0, gui.getDesktopPane().getHeight() - 150);
setSize(gui.getDesktopPane().getWidth(), 160);
setLocation(0, gui.getDesktopPane().getHeight() - 160);
numberMotesWasUpdated();
@ -913,9 +912,9 @@ public class TimeLine extends VisPlugin {
private void numberMotesWasUpdated() {
/* Plugin title */
if (allMoteEvents.isEmpty()) {
setTitle("Timeline (Add motes to observe by clicking +)");
setTitle("Timeline");
} else {
setTitle("Timeline (" + allMoteEvents.size() + " motes)");
setTitle("Timeline showing " + allMoteEvents.size() + " motes");
}
timelineMoteRuler.revalidate();
timelineMoteRuler.repaint();

View file

@ -381,7 +381,7 @@ public class UDGM extends AbstractRadioMedium {
/* Backwards compatibility */
if (element.getName().equals("success_ratio")) {
SUCCESS_RATIO_TX = Double.parseDouble(element.getText());
logger.warn("Loading old COOJA Config, XML element \"sucess_ratio\" parsed at \"sucess_ratio_tx\"");
logger.warn("Loading old Cooja Config, XML element \"sucess_ratio\" parsed at \"sucess_ratio_tx\"");
}
if (element.getName().equals("success_ratio_tx")) {

View file

@ -348,7 +348,7 @@ public class ExecuteJAR {
}
}
differingSettings.store(out, "COOJA External Tools (User specific)");
differingSettings.store(out, "Cooja External Tools (User specific)");
out.close();
logger.info("Wrote external tools config: " + externalToolsConfig.getName());
} catch (Exception e2) {
@ -368,7 +368,7 @@ public class ExecuteJAR {
newConfig.setProperty(name, pConfig.getStringValue(name));
}
FileOutputStream out = new FileOutputStream(newConfigFile);
newConfig.store(out, "COOJA Project Config");
newConfig.store(out, "Cooja Project Config");
logger.info("Wrote project config: " + newConfigFile.getName());
} catch (Exception e1) {
e1.printStackTrace();