Commit 144d51b4 authored by Florian Lugou's avatar Florian Lugou

removed some warnings

parent 0907a910
# IntelliJ
/.idea
*.iml
/build
# Vim
*.swp
# Emacs
.#*
# TTool
*~
# Gradle
.gradle
# Compilation
/build
/bin
/release
/TTool_install
......@@ -54,7 +54,7 @@ FORCE:
# ========== SUB-PROJECTS BUILD ==========
# ========================================
export TTOOL_SRC = $(TTOOL_PATH)/src/main/java
export GLOBAL_JAVA = $(shell cd $(TTOOL_SRC); find . -name "*.java")
export GLOBAL_JAVA = $(shell cd $(TTOOL_SRC); find . -name "[^.]*.java")
export TTOOL_RESOURCES = $(TTOOL_PATH)/src/main/resources
export TTOOL_WEBCRAWLER_SRC = $(TTOOL_PATH)/src/main/java/web/crawler
export TTOOL_BIN = $(TTOOL_PATH)/bin
......
......@@ -565,7 +565,7 @@ public final class GraphicLib {
sortJTabbedPane(jtp, v, beginIndex, maxIndex);
}
public static void moveTabFromTo(JTabbedPane jtp, Vector v, int src, int dst) {
public static <E> void moveTabFromTo(JTabbedPane jtp, Vector<E> v, int src, int dst) {
// Get all the properties
Component comp = jtp.getComponentAt(src);
......@@ -593,7 +593,7 @@ public final class GraphicLib {
jtp.setForegroundAt(dst, fg);
jtp.setBackgroundAt(dst, bg);
Object o = v.elementAt(src);
E o = v.elementAt(src);
v.removeElementAt(src);
v.insertElementAt(o, dst);
}
......
......@@ -68,33 +68,20 @@ import java.util.List;
/* available at http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/TableSorter.java */
public class TableSorter extends AbstractTableModel {
protected TableModel tableModel;
private TableModel tableModel;
public static final int DESCENDING = -1;
public static final int NOT_SORTED = 0;
public static final int ASCENDING = 1;
private static final int DESCENDING = -1;
private static final int NOT_SORTED = 0;
private static Directive EMPTY_DIRECTIVE = new Directive(-1, NOT_SORTED);
public static final Comparator COMPARABLE_COMAPRATOR = new Comparator() {
@SuppressWarnings("unchecked")
private static final Comparator<Object> COMPARABLE_COMPARATOR = new Comparator<Object>() {
public int compare(Object o1, Object o2) {
return ((Comparable) o1).compareTo(o2);
}
};
public static final Comparator LEXICAL_COMPARATOR = new Comparator() {
/*public int compare(Object o1, Object o2) {
return o1.toString().compareTo(o2.toString());
}*/
/*public int compare(Object o1, Object o2) {
int i1, i2;
try {
i1 = Integer.parseInt((String)o1);
i2 = Integer.parseInt((String)o2);
return i2 - i1;
} catch (Exception e) {
return o1.toString().compareTo(o2.toString());
}
}*/
private static final Comparator<Object> LEXICAL_COMPARATOR = new Comparator<Object>() {
public int compare(Object o1, Object o2) {
if ((o1 instanceof Integer) && (o2 instanceof Integer)) {
return ((Integer)o1).compareTo((Integer)o2);
......@@ -103,14 +90,6 @@ public class TableSorter extends AbstractTableModel {
}
};
public static final Comparator INTEGER_COMPARATOR = new Comparator() {
public int compare(Object o1, Object o2) {
if ((o1 instanceof Integer) && (o2 instanceof Integer)) {
return ((Integer)o1).compareTo((Integer)o2);
}
return o1.toString().compareTo(o2.toString());
}
};
private Row[] viewToModel;
private int[] modelToView;
......@@ -118,8 +97,7 @@ public class TableSorter extends AbstractTableModel {
private JTableHeader tableHeader;
private MouseListener mouseListener;
private TableModelListener tableModelListener;
private Map columnComparators = new HashMap();
private List sortingColumns = new ArrayList();
private List<Directive> sortingColumns = new ArrayList<>();
public TableSorter() {
this.mouseListener = new MouseHandler();
......@@ -146,7 +124,7 @@ public class TableSorter extends AbstractTableModel {
return tableModel;
}
public void setTableModel(TableModel tableModel) {
private void setTableModel(TableModel tableModel) {
if (this.tableModel != null) {
this.tableModel.removeTableModelListener(tableModelListener);
}
......@@ -180,13 +158,12 @@ public class TableSorter extends AbstractTableModel {
}
}
public boolean isSorting() {
private boolean isSorting() {
return sortingColumns.size() != 0;
}
private Directive getDirective(int column) {
for (int i = 0; i < sortingColumns.size(); i++) {
Directive directive = (Directive)sortingColumns.get(i);
for (Directive directive: sortingColumns) {
if (directive.column == column) {
return directive;
}
......@@ -194,7 +171,7 @@ public class TableSorter extends AbstractTableModel {
return EMPTY_DIRECTIVE;
}
public int getSortingStatus(int column) {
private int getSortingStatus(int column) {
return getDirective(column).direction;
}
......@@ -206,7 +183,7 @@ public class TableSorter extends AbstractTableModel {
}
}
public void setSortingStatus(int column, int status) {
private void setSortingStatus(int column, int status) {
Directive directive = getDirective(column);
if (directive != EMPTY_DIRECTIVE) {
sortingColumns.remove(directive);
......@@ -217,7 +194,7 @@ public class TableSorter extends AbstractTableModel {
sortingStatusChanged();
}
protected Icon getHeaderRendererIcon(int column, int size) {
private Icon getHeaderRendererIcon(int column, int size) {
Directive directive = getDirective(column);
if (directive == EMPTY_DIRECTIVE) {
return null;
......@@ -230,28 +207,15 @@ public class TableSorter extends AbstractTableModel {
sortingStatusChanged();
}
public void setColumnComparator(Class type, Comparator comparator) {
if (comparator == null) {
columnComparators.remove(type);
} else {
columnComparators.put(type, comparator);
}
}
protected Comparator getComparator(int column) {
private Comparator<Object> getComparator(int column) {
Class columnType = tableModel.getColumnClass(column);
Comparator comparator = (Comparator) columnComparators.get(columnType);
if (comparator != null) {
return comparator;
}
if (Comparable.class.isAssignableFrom(columnType)) {
return COMPARABLE_COMAPRATOR;
return COMPARABLE_COMPARATOR;
}
return LEXICAL_COMPARATOR;
}
private Row[] getViewToModel() {
try {
if (viewToModel == null) {
int tableModelRowCount = tableModel.getRowCount();
viewToModel = new Row[tableModelRowCount];
......@@ -263,7 +227,6 @@ public class TableSorter extends AbstractTableModel {
Arrays.sort(viewToModel);
}
}
} catch (Exception e) {}
return viewToModel;
}
......@@ -321,7 +284,7 @@ public class TableSorter extends AbstractTableModel {
private class Row implements Comparable {
private int modelIndex;
public Row(int index) {
private Row(int index) {
this.modelIndex = index;
}
......@@ -329,13 +292,12 @@ public class TableSorter extends AbstractTableModel {
int row1 = modelIndex;
int row2 = ((Row) o).modelIndex;
for (Iterator it = sortingColumns.iterator(); it.hasNext();) {
Directive directive = (Directive) it.next();
for (Directive directive : sortingColumns) {
int column = directive.column;
Object o1 = tableModel.getValueAt(row1, column);
Object o2 = tableModel.getValueAt(row2, column);
int comparison = 0;
int comparison;
// Define null less than everything, except null.
if (o1 == null && o2 == null) {
comparison = 0;
......@@ -405,7 +367,6 @@ public class TableSorter extends AbstractTableModel {
// Something has happened to the data that may have invalidated the row order.
clearSortingState();
fireTableDataChanged();
return;
}
}
......@@ -434,7 +395,7 @@ public class TableSorter extends AbstractTableModel {
private int size;
private int priority;
public Arrow(boolean descending, int size, int priority) {
private Arrow(boolean descending, int size, int priority) {
this.descending = descending;
this.size = size;
this.priority = priority;
......@@ -485,7 +446,7 @@ public class TableSorter extends AbstractTableModel {
private class SortableHeaderRenderer implements TableCellRenderer {
private TableCellRenderer tableCellRenderer;
public SortableHeaderRenderer(TableCellRenderer tableCellRenderer) {
private SortableHeaderRenderer(TableCellRenderer tableCellRenderer) {
this.tableCellRenderer = tableCellRenderer;
}
......@@ -515,7 +476,7 @@ public class TableSorter extends AbstractTableModel {
private int column;
private int direction;
public Directive(int column, int direction) {
private Directive(int column, int direction) {
this.column = column;
this.direction = direction;
}
......
......@@ -59,7 +59,26 @@ import java.net.Socket;
import java.util.ArrayList;
public class Client {
public Object parserAnswerMessage(Message answerMsg) {
public byte[] parserAnswerMessageAsBytes(Message answerMsg) {
if (answerMsg ==null){
return null;
}
String cmd = answerMsg.getCmd();
if (cmd != null) {
if (cmd.equals(Message.RESULT_STATISTIC)) {
// the content are image.
return (byte[]) answerMsg.getContent().get(0);
} else if (cmd.equals(Message.RESULT_HISTOGRAM)) {
// the content are image.
return (byte[]) answerMsg.getContent().get(0);
}
}
return null;
}
public ArrayList<Record> parserAnswerMessage(Message answerMsg) {
//Analyse the message from the server,
//Depends on the cmd, we can determine the values
if (answerMsg ==null){
......@@ -143,17 +162,9 @@ public class Client {
}
return r;
} else if (cmd.equals(Message.RESULT_STATISTIC)) {
// the content are image.
byte[] encoded = (byte[]) answerMsg.getContent().get(0);
return encoded;
} else if (cmd.equals(Message.RESULT_HISTOGRAM)) {
// the content are image.
byte[] encoded = (byte[]) answerMsg.getContent().get(0);
return encoded;
ArrayList<Record> lrecord = new ArrayList<>();
lrecord.add(r);
return lrecord;
} else
//TraceManager.addDev("The command is not supported\n");
return null;
......
......@@ -48,6 +48,7 @@ package ui;
import myutil.TraceManager;
import java.awt.*;
import java.util.Vector;
//import java.awt.geom.*;
......@@ -56,7 +57,7 @@ import java.util.Vector;
public abstract class TGConnectorWithCommentConnectionPoints extends TGConnector {
protected TGConnectingPointGroup tg;
public TGConnectorWithCommentConnectionPoints(int _x, int _y, int _minX, int _minY, int _maxX, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp, TGConnectingPoint _p1, TGConnectingPoint _p2, Vector _listPoint) {
public TGConnectorWithCommentConnectionPoints(int _x, int _y, int _minX, int _minY, int _maxX, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp, TGConnectingPoint _p1, TGConnectingPoint _p2, Vector<Point> _listPoint) {
super(_x, _y, _minX, _minY, _maxX, _maxY, _pos, _father, _tdp, _p1, _p2, _listPoint);
// We create a connecting point per segment i.e :
......
......@@ -274,7 +274,7 @@ public class JFrameAvatarInteractiveSimulation extends JFrame implements Avatar
try {
Vector<AvatarSimulationPendingTransaction> ll = (Vector<AvatarSimulationPendingTransaction>)(ass.getPendingTransitions().clone());
Vector<AvatarSimulationPendingTransaction> ll = new Vector<>(ass.getPendingTransitions());
listPendingTransactions.clearSelection();
selectedComponentForTransaction1 = null;
......@@ -1391,7 +1391,7 @@ public class JFrameAvatarInteractiveSimulation extends JFrame implements Avatar
public void updateAsynchronousChannels() {
if (ass != null) {
lastAsyncmsgs = (Vector<AvatarSimulationAsynchronousTransaction>)(ass.getAsynchronousMessages().clone());
lastAsyncmsgs = new Vector<>(ass.getAsynchronousMessages());
if (fifos != null) {
for(AvatarInteractiveSimulationFIFOData fifo: fifos) {
......
......@@ -58,7 +58,7 @@ import java.util.Vector;
public class AvatarRDVerifyConnector extends TGConnectorWithCommentConnectionPoints {
int w, h;
public AvatarRDVerifyConnector(int _x, int _y, int _minX, int _minY, int _maxX, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp, TGConnectingPoint _p1, TGConnectingPoint _p2, Vector _listPoint) {
public AvatarRDVerifyConnector(int _x, int _y, int _minX, int _minY, int _maxX, int _maxY, boolean _pos, TGComponent _father, TDiagramPanel _tdp, TGConnectingPoint _p1, TGConnectingPoint _p2, Vector<Point> _listPoint) {
super(_x, _y, _minX, _minY, _maxX, _maxY, _pos, _father, _tdp, _p1, _p2, _listPoint);
value = "<<verify>>";
......
......@@ -117,7 +117,7 @@ public class AvatarSMDPanel extends TDiagramPanel implements TDPWithAttributes {
public void enhance() {
//System.out.println("enhance");
Vector v = new Vector();
Vector<TGComponent> v = new Vector<>();
Object o;
Iterator iterator = componentList.listIterator();
......@@ -132,7 +132,7 @@ public class AvatarSMDPanel extends TDiagramPanel implements TDPWithAttributes {
repaint();
}
public void enhance(Vector v, TGComponent tgc) {
public void enhance(Vector<TGComponent> v, TGComponent tgc) {
TGComponent tgc1;
TGConnector tgcon;
int i;
......
......@@ -117,14 +117,14 @@ public class EBRDDPanel extends TDiagramPanel {
public void enhance() {
//System.out.println("enhance");
Vector v = new Vector();
Vector<TGComponent> v = new Vector<>();
Object o;
Iterator iterator = componentList.listIterator();
while(iterator.hasNext()) {
o = iterator.next();
if (o instanceof EBRDDStartState){
enhance(v, (EBRDDStartState)o);
this.enhance(v, (EBRDDStartState)o);
}
}
......@@ -132,7 +132,7 @@ public class EBRDDPanel extends TDiagramPanel {
repaint();
}
public void enhance(Vector v, TGComponent tgc) {
public void enhance(Vector<TGComponent> v, TGComponent tgc) {
TGComponent tgc1;
TGConnector tgcon;
int i;
......@@ -165,7 +165,7 @@ public class EBRDDPanel extends TDiagramPanel {
// Explore next elements
for(i=0; i<tgc.getNbNext(); i++) {
tgc1 = getNextTGComponent(tgc, i);
enhance(v, tgc1);
this.enhance(v, tgc1);
}
}
......
......@@ -223,7 +223,7 @@ public class InteractionOverviewDiagramPanel extends TDiagramPanel {
public void enhance() {
//System.out.println("enhance");
Vector v = new Vector();
Vector<TGComponent> v = new Vector<>();
Object o;
Iterator iterator = componentList.listIterator();
......@@ -238,7 +238,7 @@ public class InteractionOverviewDiagramPanel extends TDiagramPanel {
repaint();
}
public void enhance(Vector v, TGComponent tgc) {
public void enhance(Vector<TGComponent> v, TGComponent tgc) {
TGComponent tgc1;
TGConnector tgcon;
int i;
......
......@@ -221,7 +221,7 @@ public class TMLCPPanel extends TDiagramPanel {
public void enhance() {
//System.out.println("enhance");
Vector v = new Vector();
Vector<TGComponent> v = new Vector<>();
Object o;
Iterator iterator = componentList.listIterator();
......@@ -236,7 +236,7 @@ public class TMLCPPanel extends TDiagramPanel {
repaint();
}
public void enhance(Vector v, TGComponent tgc) {
public void enhance(Vector<TGComponent> v, TGComponent tgc) {
TGComponent tgc1;
TGConnector tgcon;
int i;
......
......@@ -59,7 +59,7 @@ import java.util.Vector;
public class DiagramTreeModel implements TreeModel {
private MainGUI mgui;
private Vector treeModelListeners = new Vector();
private Vector<TreeModelListener> treeModelListeners = new Vector<>();
public DiagramTreeModel(MainGUI _mgui) {
......
......@@ -77,7 +77,7 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M
private DiagramTreeModel dtm;
//for update
private Set m_expandedTreePaths = new HashSet();
private Set<TreePath> m_expandedTreePaths = new HashSet<>();
private TreePath[] m_selectedTreePaths = new TreePath[0];
//private boolean m_nodeWasSelected = false;
......@@ -204,11 +204,11 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M
public synchronized void run(){
checkPaths();
Iterator l_keys = m_expandedTreePaths.iterator();
Iterator<TreePath> l_keys = m_expandedTreePaths.iterator();
TreePath l_path = null;
while(l_keys.hasNext()){
try {
l_path = (TreePath) l_keys.next();
l_path = l_keys.next();
TreePath parent = l_path.getParentPath();
//System.out.println("Path: " + l_path);
//System.out.println("Parent path: " + parent);
......@@ -228,9 +228,9 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M
private void checkPaths() {
TreePath l_path = null;
Iterator l_keys = m_expandedTreePaths.iterator();
Iterator<TreePath> l_keys = m_expandedTreePaths.iterator();
while(l_keys.hasNext()){
l_path = (TreePath) l_keys.next();
l_path = l_keys.next();
if (!isAPathOf(l_path)) {
m_expandedTreePaths.remove(l_path);
}
......@@ -273,11 +273,11 @@ public class JDiagramTree extends javax.swing.JTree implements ActionListener, M
public void treeExpanded(TreeExpansionEvent treeExpansionEvent) {
TreePath tp = treeExpansionEvent.getPath();
m_expandedTreePaths.add(tp);
Iterator l_keys = m_expandedTreePaths.iterator();
Iterator<TreePath> l_keys = m_expandedTreePaths.iterator();
while(l_keys.hasNext()){
TreePath l_path = null;
try {
l_path = (TreePath) l_keys.next();
l_path = l_keys.next();
TreePath parent = l_path.getParentPath();
if ((l_path.getPathCount() == 1) || (m_expandedTreePaths.contains(parent))) {
expandPath(l_path);
......
......@@ -88,12 +88,12 @@ public class JDialogSearchBox extends javax.swing.JFrame {
public static final int MAXLENGTH_INPUT = 100;
public static final String ERROR_INPUT_TOO_LONG="The input is too long.";
private javax.swing.JList ListKeywords;
private javax.swing.JComboBox combobox_Score;
private javax.swing.JComboBox combobox_System;
private javax.swing.JComboBox combobox_Year;
private javax.swing.JComboBox combobox_Diagram;
private javax.swing.JComboBox combobox_Num;
private javax.swing.JList<String> ListKeywords;
private javax.swing.JComboBox<String> combobox_Score;
private javax.swing.JComboBox<String> combobox_System;
private javax.swing.JComboBox<String> combobox_Year;
private javax.swing.JComboBox<String> combobox_Diagram;
private javax.swing.JComboBox<String> combobox_Num;
private javax.swing.JCheckBox databaseCb;
private javax.swing.JTextPane detailText_db;
private javax.swing.JTextPane detailText_google;
......@@ -145,7 +145,7 @@ public class JDialogSearchBox extends javax.swing.JFrame {
private DefaultListModel listModel;
private DefaultListModel<String> listModel;
//ArrayList<GoogleSearch> resultGoogle;
int searchGoogle;
//ArrayList<GoogleSearch> resultGoogleScholar;
......@@ -192,7 +192,7 @@ public class JDialogSearchBox extends javax.swing.JFrame {
private void initComponents(){
jScrollPane1 = new javax.swing.JScrollPane();
ListKeywords = new javax.swing.JList();
ListKeywords = new javax.swing.JList<>();
removeBt = new javax.swing.JButton();
searchBt = new javax.swing.JButton();
searchBox = new javax.swing.JTextField();
......@@ -207,7 +207,7 @@ public class JDialogSearchBox extends javax.swing.JFrame {
jScrollPane4 = new javax.swing.JScrollPane();
resultTable_google = new javax.swing.JTable();
resultTable_googleScholar = new javax.swing.JTable();
listModel = new DefaultListModel();
listModel = new DefaultListModel<>();
jLabel_Keyword = new javax.swing.JLabel();
jLabel_Result = new javax.swing.JLabel();
......@@ -220,10 +220,10 @@ public class JDialogSearchBox extends javax.swing.JFrame {
jPanel_GoogleTab = new javax.swing.JPanel();
jPanel_DBTab = new javax.swing.JPanel();
jTabbedPane2 = new javax.swing.JTabbedPane();
combobox_Score = new javax.swing.JComboBox();
combobox_System = new javax.swing.JComboBox();;
combobox_Year = new javax.swing.JComboBox();
combobox_Num = new javax.swing.JComboBox();
combobox_Score = new javax.swing.JComboBox<>();
combobox_System = new javax.swing.JComboBox<>();
combobox_Year = new javax.swing.JComboBox<>();
combobox_Num = new javax.swing.JComboBox<>();
jLabel_System = new javax.swing.JLabel();
jLabel_Score = new javax.swing.JLabel();
jLabel_Number = new javax.swing.JLabel();
......@@ -238,7 +238,7 @@ public class JDialogSearchBox extends javax.swing.JFrame {
jScrollPane9= new JScrollPane();
jTextaddressDB = new JTextField();
combobox_Diagram = new javax.swing.JComboBox();
combobox_Diagram = new javax.swing.JComboBox<>();
drawBt = new JButton();
String NUM_LIST[] = {"10","15","20","30","40","50"};
String DIAGRAM_LIST[] = {"None","Statistic","Histogram"};
......@@ -269,8 +269,8 @@ public class JDialogSearchBox extends javax.swing.JFrame {
searchGoogle=0;
searchGoogle = 0;
searchDatabase =0;
rowsGoogle=new ArrayList<Object[]>();
rowsGoogleScholar=new ArrayList<Object[]>();
rowsGoogle=new ArrayList<>();
rowsGoogleScholar=new ArrayList<>();
jLabel_System.setText("System");
jLabel_Number.setText("Number of result");
......@@ -457,15 +457,15 @@ public class JDialogSearchBox extends javax.swing.JFrame {
jTabbedPane2.addTab(DB, jPanel_DBTab);
combobox_System.setModel(new javax.swing.DefaultComboBoxModel(SYSTEM_LIST));
combobox_System.setModel(new javax.swing.DefaultComboBoxModel<>(SYSTEM_LIST));
combobox_Year.setModel(new javax.swing.DefaultComboBoxModel(TIME_LIST));
combobox_Year.setModel(new javax.swing.DefaultComboBoxModel<>(TIME_LIST));
combobox_Score.setModel(new javax.swing.DefaultComboBoxModel(SCORE_LIST));
combobox_Score.setModel(new javax.swing.DefaultComboBoxModel<>(SCORE_LIST));
combobox_Diagram.setModel(new javax.swing.DefaultComboBoxModel(DIAGRAM_LIST));
combobox_Diagram.setModel(new javax.swing.DefaultComboBoxModel<>(DIAGRAM_LIST));
combobox_Num.setModel(new javax.swing.DefaultComboBoxModel(NUM_LIST));
combobox_Num.setModel(new javax.swing.DefaultComboBoxModel<>(NUM_LIST));
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
......@@ -749,7 +749,7 @@ public class JDialogSearchBox extends javax.swing.JFrame {
Message returnMsg = sendMessage(msg);
if (returnMsg != null) {
Record r = (Record) parserMessage(returnMsg);
Record r = parserMessage(returnMsg).get(0);
printDetailRecord(r);
}
}
......@@ -918,16 +918,16 @@ public class JDialogSearchBox extends javax.swing.JFrame {
}
/**
*
* @param msg
* @return Object
*/
public Object parserMessage(Message msg){
public ArrayList<Record> parserMessage(Message msg){
Client cl = new Client();
return cl.parserAnswerMessage(msg);
}
public byte[] parserMessageAsBytes(Message msg){
Client cl = new Client();
return cl.parserAnswerMessageAsBytes(msg);
}
private void ListKeywordsComponentAdded(java.awt.event.ContainerEvent evt) {
this.removeBt.setEnabled(true);
}
......@@ -941,14 +941,14 @@ public class JDialogSearchBox extends javax.swing.JFrame {
String query = "";
//first value
if (this.listModel.getSize() > 0){
String element = (String) this.listModel.elementAt(0);
String element = this.listModel.elementAt(0);
String value = splitAndConcat(element);
query = value;
}
for (int i = 1; i < this.listModel.getSize(); i++) {
String element = (String) this.listModel.elementAt(i);
String element = this.listModel.elementAt(i);
String value = splitAndConcat(element);
query = query + " + " + value; //(String) this.listModel.elementAt(i);
......@@ -1110,7 +1110,7 @@ public class JDialogSearchBox extends javax.swing.JFrame {
Message returnMsg = sendMessage(msg);
ArrayList<Record> re = (ArrayList<Record>)parserMessage(returnMsg);
ArrayList<Record> re = parserMessage(returnMsg);
putDBToTable(re);
showtable(rowsDB, modelDB,2);
......@@ -1252,12 +1252,12 @@ public class JDialogSearchBox extends javax.swing.JFrame {
String query = "";
if (this.listModel.getSize()>0)
//split the string
query = splitAndConcat((String) this.listModel.elementAt(0));
query = splitAndConcat(this.listModel.elementAt(0));
for (int i=1; i< this.listModel.getSize(); i++ ){
if (query != "")
query= query + " + " + splitAndConcat((String) this.listModel.elementAt(i));
query= query + " + " + splitAndConcat(this.listModel.elementAt(i));
else
query = splitAndConcat((String) this.listModel.elementAt(i));
query = splitAndConcat(this.listModel.elementAt(i));
}
this.searchBox.setText(query);
}
......@@ -1352,7 +1352,7 @@ public class JDialogSearchBox extends javax.swing.JFrame {
Message ret = sendMessage(msg);
if (ret !=null)
{
byte[] b = (byte[])parserMessage(ret);
byte[] b = parserMessageAsBytes(ret);
if(b != null) {
ByteArrayInputStream in = new ByteArrayInputStream(b);
img = ImageIO.read(in);
......@@ -1377,7 +1377,7 @@ public class JDialogSearchBox extends javax.swing.JFrame {
Message ret = sendMessage(msg);
if (ret !=null)
{
byte[] b = (byte[])parserMessage(ret);
byte[] b = parserMessageAsBytes(ret);
if(b != null) {
ByteArrayInputStream in = new ByteArrayInputStream(b);
img = ImageIO.read(in);
......
......@@ -177,7 +177,7 @@ public class JStartingWindow extends Window {
w = new JStartingWindow(f, splashImage, msg);
// Show the window.
w.toFront();
w.show();
w.setVisible(true);
} catch (Exception e) {
return null;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment