Add code to remove text formating characters which might be found in a Static data element definition. This could cause table copy/paste problems.

This commit is contained in:
Dale Schultz 2016-08-10 21:03:21 -04:00
parent e012a92af9
commit 3979a55d57
1 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,6 @@
/*
* RomRaider Open-Source Tuning, Logging and Reflashing
* Copyright (C) 2006-2012 RomRaider.com
* Copyright (C) 2006-2016 RomRaider.com
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -29,6 +29,7 @@ import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.Serializable;
import java.text.DecimalFormat;
import java.util.StringTokenizer;
import javax.swing.JLabel;
import javax.swing.border.Border;
@ -80,7 +81,10 @@ public class DataCell extends JLabel implements MouseListener, Serializable {
public DataCell(Table table, String staticText) {
this(table);
this.staticText = staticText;
final StringTokenizer st = new StringTokenizer(staticText,"\t\n\r\f");
if (st.hasMoreTokens()) {
this.staticText = st.nextToken();
}
table.setStaticDataTable(true);
}