Skip to content

Commit 209e940

Browse files
committed
Final Release
0 parents  commit 209e940

32 files changed

+1080
-0
lines changed

SUC/.classpath

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
5+
<classpathentry kind="output" path="bin"/>
6+
</classpath>

SUC/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/bin/

SUC/.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>GUICheckUpdateV4</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=1.7
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11+
org.eclipse.jdt.core.compiler.source=1.7

SUC/XZDB/ZC6602DB

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
India Generic IN 1270-7186 10.5.A.0.230
2+
Indonesia PT. Sony Indonesia ID 1272-0741 10.5.A.0.230
3+
Indonesia PT. Surya Citra Multimedia 1270-3958 10.5.A.0.230
4+
Internal Commercial and Journalists 1270-4068 10.4.B.0.569
5+
Internal StoreFront 1272-8768 10.1.1.A.1.253
6+
MENA Arabic (b) Generic MEA 1270-7937 10.4.1.B.0.101
7+
MENA Latin (b) Generic MEL 1273-5771 10.4.1.B.0.101
8+
Saudi Arabia Generic SA 1270-8384 10.4.1.B.0.101
9+
Singapore Generic SG 1271-2229 10.5.A.0.230
10+
Taiwan Generic TW 1270-5691 10.5.A.0.230
11+
Thailand Generic TH 1270-3956 10.5.A.0.230
12+
USA Generic US 1271-0119 10.5.A.0.230

SUC/XZDB/ZC6603DB

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
Australia Generic AU 1271-0116 10.5.A.0.230
2+
Australia Optus AU 1271-2150 10.5.A.0.230
3+
Australia Telstra AU 1271-1556 10.4.1.B.0.101
4+
Australia Vodafone AU 1271-0244 10.5.A.0.230
5+
Austria 3 AT 1270-6492 10.5.A.0.233
6+
Austria Mobilkom A1 AT 1270-5337 10.5.A.0.230
7+
Austria Orange AT 1270-9725 10.4.1.B.0.101
8+
Austria T-Mobile AT 1270-3837 10.5.A.0.230
9+
Baltic Generic (b) Generic BAL 1270-7278 10.5.A.0.230
10+
Belgium Generic BE 1270-6704 10.5.A.0.230
11+
Belgium Proximus (Vfe) BE 1270-9081 10.5.A.0.230
12+
Bosnia and Herzegovina BH Telecom BA 1273-8571 10.5.A.0.230
13+
Bulgaria GloBul BG 1270-8751 10.5.A.0.230
14+
Bulgaria MobilTel EAD BG 1270-9085 10.5.A.0.230
15+
Central Europe 1 Generic CE1 1270-7298 10.5.A.0.230
16+
Central Europe 3 Generic CE3 1270-7296 10.5.A.0.230
17+
Central Europe 4 Generic CE4 1270-7294 10.5.A.0.230
18+
Central Europe 5 Generic CE5 1273-8577 10.5.A.0.230
19+
Croatia T-Mobile HR 1270-1420 10.5.A.0.230
20+
Croatia Vipnet HR 1270-9087 10.5.A.0.230
21+
Czech republic Telefonica O2 CZ 1271-8083 10.5.A.0.230
22+
Czech republic T-Mobile CZ 1270-1418 10.5.A.0.230
23+
Czech republic Vodafone CZ 1270-9089 10.5.A.0.230
24+
Denmark 3 DK 1270-7255 10.5.A.0.233
25+
Denmark Telenor DK 1270-9930 10.5.A.0.230
26+
Denmark Telia DK 1270-7248 10.5.A.0.230
27+
Finland Elisa FI 1270-9870 10.5.A.0.230
28+
France Bouygues Telecom FR 1271-0121 10.5.A.0.230
29+
France Generic FR 1270-1404 10.5.A.0.230
30+
France NRJ FR 1270-1414 10.4.1.B.0.101
31+
France Orange FR 1271-0707 10.4.1.B.0.101
32+
France SFR FR 1270-6253 10.4.1.B.0.101
33+
Germany Generic DE 1271-0334 10.5.A.0.230
34+
Germany o2 DE 1270-4636 10.5.A.0.230
35+
Germany Telekom.de DE 1270-3841 10.5.A.0.230
36+
Germany Vodafone DE 1270-8440 10.5.A.0.230
37+
Greece Cosmote GR 1270-6784 10.5.A.0.230
38+
Greece Generic GR 1270-4986 10.5.A.0.230
39+
Greece Vodafone GR 1270-8436 10.5.A.0.230
40+
Hong Kong Generic HK 1270-5695 10.5.A.0.233
41+
Hungary Telenor HU 1270-7300 10.5.A.0.230
42+
Hungary T-Mobile HU 1270-1422 10.5.A.0.230
43+
Hungary Vodafone HU 1270-9003 10.5.A.0.230
44+
India Generic IN 1275-1562 10.5.A.0.230
45+
Indonesia PT. Sony Indonesia ID 1274-7579 10.5.A.0.230
46+
Indonesia PT. Surya Citra Multimedia 1274-7574 10.5.A.0.230
47+
Internal Commercial and Journalists 1270-4066 10.5.A.0.230
48+
Internal StoreFront 1272-8629 10.1.A.1.350
49+
Ireland 3 IE 1270-6496 10.5.A.0.230
50+
Ireland Meteor IE 1270-5992 10.5.A.0.230
51+
Ireland O2 IE 1270-4638 10.5.A.0.230
52+
Ireland Vodafone IE 1270-9021 10.5.A.0.230
53+
Israel Cellcom IL 1270-4984 10.5.A.0.230
54+
Israel Generic_a IL 1271-6860 10.5.A.0.230
55+
Israel Partner IL 1270-4982 10.4.B.0.569
56+
Israel Pelephone IL 1270-4980 10.4.1.B.0.101
57+
Italy Generic IT 1270-3964 10.5.A.0.230
58+
Italy TIM IT 1270-3966 10.5.A.0.230
59+
Italy Tre IT 1270-6489 10.1.1.A.1.253
60+
Italy Vodafone IT 1270-8438 10.5.A.0.230
61+
Italy WIND IT 1270-3969 10.4.B.0.569
62+
MENA Arabic (b) Generic MEA 1272-3750 10.4.1.B.0.101
63+
Netherlands Generic NL 1270-4975 10.5.A.0.230
64+
Netherlands KPN Mobile NL 1270-4964 10.5.A.0.230
65+
Netherlands T-Mobile NL 1270-3839 10.5.A.0.230
66+
Netherlands Vodafone NL 1270-8442 10.5.A.0.230
67+
New Zealand Telecom NZ 1271-0341 10.5.A.0.230
68+
New Zealand Vodafone NZ 1270-9108 10.5.A.0.230
69+
Nordic Combined (b) Generic NCB 1270-7280 10.5.A.0.230
70+
Norway Telenor Mobil NO 1270-7251 10.5.A.0.230
71+
Philippines Generic PH 1270-1408 10.5.A.0.230
72+
Philippines Smart Communications PH 1273-6065 10.4.B.0.569
73+
Poland Orange PL 1271-0705 10.4.1.B.0.101
74+
Poland PLAY PL 1270-7161 10.5.A.0.230
75+
Poland Polkomtel PLUS PL 1270-6480 10.5.A.0.230
76+
Poland T-Mobile PL 1270-5990 10.5.A.0.230
77+
Portugal Generic PT 1270-7677 10.5.A.0.230
78+
Portugal Optimus PT 1271-1044 10.4.B.0.569
79+
Portugal TMN PT 1270-6350 10.5.A.0.230
80+
Portugal Vodafone PT 1270-9280 10.5.A.0.230
81+
Romania Orange RO 1271-1599 10.4.1.B.0.101
82+
Romania Vodafone RO 1270-9335 10.5.A.0.230
83+
Russia Generic RU 1270-1410 10.5.A.0.230
84+
Singapore Generic SG 1270-1412 10.5.A.0.230
85+
Singapore Singtel SG 1270-0743 10.5.A.0.230
86+
Slovak Republic Orange SK 1271-1609 10.4.1.B.0.101
87+
Slovak Republic T-Mobile SK 1270-1400 10.4.B.0.569
88+
Slovenia MOBITEL SI 1270-7302 10.5.A.0.230
89+
South Africa Generic ZA 1270-8434 10.5.A.0.230
90+
South Africa MTN ZA 1270-7602 10.5.A.0.230
91+
South Africa Vodacom ZA 1270-7290 10.5.A.0.230
92+
Spain Generic ES 1270-6697 10.5.A.0.230
93+
Spain Jazztel ES 1273-3333 10.5.A.0.230
94+
Spain Movistar ES 1271-2566 10.5.A.0.230
95+
Spain Orange ES 1273-1866 10.4.1.B.0.101
96+
Spain Vodafone ES 1270-9282 10.5.A.0.230
97+
Spain Yoigo ES 1270-9718 10.5.A.0.230
98+
Sweden 3 SE 1270-7257 10.5.A.0.230
99+
Sweden Telenor SE 1270-7253 10.5.A.0.230
100+
Switzerland Generic CH 1270-6188 10.5.A.0.230
101+
Switzerland Orange CH 1271-1607 10.5.A.0.230
102+
Switzerland Sunrise CH 1270-6186 10.5.A.0.230
103+
Switzerland Swisscom CH 1270-4647 10.5.A.0.230
104+
Turkey Generic TR 1271-5145 10.5.A.0.230
105+
Turkey Turkcell TR 1272-5481 10.4.1.B.0.101
106+
Ukraine Generic UA 1270-1397 10.5.A.0.230
107+
United Kingdom 3 UK 1270-6263 10.5.A.0.230
108+
United Kingdom Generic UK 1270-7689 10.5.A.0.230
109+
United Kingdom O2 Pay monthly UK 1270-4993 10.5.A.0.230
110+
United Kingdom Vodafone UK 1270-9110 10.5.A.0.230

SUC/XZDB/ZC6606DB

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
USA T-mobile US 1272-8668 10.4.C.0.814

SUC/XZDB/ZC6616DB

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Canada Bell Mobility CA 1275-6311 10.5.A.0.230
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package checkVersion;
2+
3+
import java.io.IOException;
4+
import java.util.ArrayList;
5+
import javax.xml.parsers.ParserConfigurationException;
6+
import javax.xml.stream.XMLStreamException;
7+
import javax.xml.xpath.XPathExpressionException;
8+
import loader.OnlineVersion;
9+
import loaderXperiaZ.WriterC6603;
10+
import org.xml.sax.SAXException;
11+
import risorse.ZC6603;
12+
13+
public class FWCheckVersion {
14+
public WriterC6603 wrC6603 = new WriterC6603();
15+
public ArrayList<ZC6603> phC6603 = new ArrayList<>();
16+
public FWCheckVersion(){
17+
18+
phC6603.addAll(wrC6603.writer("./XZDB/ZC6603DB"));
19+
ArrayList<String> URLZC6603 = new ArrayList<>();
20+
for(int i=0;i<phC6603.size();i++){
21+
URLZC6603.add(phC6603.get(0).getLink() + phC6603.get(i).getSerial());
22+
try {
23+
phC6603.get(i).setNewVersion(OnlineVersion.version(URLZC6603.get(i)));
24+
if(phC6603.get(i).getVersion().equals(phC6603.get(i).getNewVersion())==false){
25+
phC6603.get(i).setState("/img/check.png");
26+
phC6603.get(i).setUpdate(true);
27+
}else{
28+
phC6603.get(i).setState("/img/uncheck.png");
29+
phC6603.get(i).setUpdate(false);
30+
}
31+
} catch (XPathExpressionException | SAXException | IOException
32+
| ParserConfigurationException | XMLStreamException e) {
33+
e.printStackTrace();
34+
}
35+
}
36+
}
37+
}

SUC/src/grafica/APannello.java

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
package grafica;
2+
3+
import java.awt.BorderLayout;
4+
import java.awt.Component;
5+
import java.awt.Font;
6+
import java.awt.event.ActionEvent;
7+
import java.awt.event.ActionListener;
8+
import java.io.IOException;
9+
import java.util.ArrayList;
10+
11+
import javax.swing.ImageIcon;
12+
import javax.swing.JComboBox;
13+
import javax.swing.JPanel;
14+
import javax.swing.JScrollPane;
15+
import javax.swing.JTable;
16+
import javax.swing.JTextArea;
17+
import javax.swing.ScrollPaneConstants;
18+
import javax.swing.table.DefaultTableColumnModel;
19+
import javax.swing.table.DefaultTableModel;
20+
import javax.swing.table.TableCellRenderer;
21+
import javax.swing.table.TableColumn;
22+
23+
import loader.DBWriter;
24+
import risorse.ZC6603;
25+
import checkVersion.FWCheckVersion;
26+
27+
@SuppressWarnings("serial")
28+
public class APannello extends JPanel{
29+
30+
JTextArea areaText = new JTextArea();
31+
JTable table;
32+
FWCheckVersion check;
33+
Object[][] rowData;
34+
Object[][] checkData;
35+
DefaultTableModel model;
36+
DefaultTableModel model1;
37+
DefaultTableModel model2;
38+
ArrayList<ZC6603> phoneC6603;
39+
public APannello(final BPannello p2) throws IOException{
40+
41+
final Object[] columnNames = {"X/V","Nation","Brand","Serial","Version","New Version"};
42+
model = new DefaultTableModel(rowData, columnNames);
43+
44+
table = new JTable(model){
45+
@SuppressWarnings({ "unchecked", "rawtypes" })
46+
public Class getColumnClass(int column){
47+
return getValueAt(0, column).getClass();
48+
}
49+
};
50+
51+
p2.bLoad.addActionListener(new ActionListener() {
52+
53+
@Override
54+
public void actionPerformed(ActionEvent arg0) {
55+
check = new FWCheckVersion();
56+
phoneC6603 = check.phC6603;
57+
rowData = new Object[phoneC6603.size()][6];
58+
for(int i=0; i<phoneC6603.size();i++){
59+
60+
rowData[i][0] = new ImageIcon(getClass().getResource(phoneC6603.get(i).getState()));
61+
rowData[i][1] = phoneC6603.get(i).getNation();
62+
rowData[i][2] = phoneC6603.get(i).getBrand();
63+
rowData[i][3] = phoneC6603.get(i).getSerial();
64+
rowData[i][4] = phoneC6603.get(i).getVersion();
65+
rowData[i][5] = phoneC6603.get(i).getNewVersion();
66+
67+
}
68+
model1 = new DefaultTableModel(rowData, columnNames);
69+
table.setModel(model1);
70+
((DefaultTableModel)table.getModel()).fireTableDataChanged();
71+
/*INIZIO BARBATRUCCO*/
72+
for (int i = 0; i < table.getColumnCount(); i++) {
73+
DefaultTableColumnModel colModel = (DefaultTableColumnModel) table.getColumnModel();
74+
TableColumn col = colModel.getColumn(i);
75+
int width = 0;
76+
77+
TableCellRenderer renderer = col.getHeaderRenderer();
78+
for (int r = 0; r < table.getRowCount(); r++) {
79+
renderer = table.getCellRenderer(r, i);
80+
Component comp = renderer.getTableCellRendererComponent(table, table.getValueAt(r, i),false, false, r, i);
81+
width = Math.max(width, comp.getPreferredSize().width);
82+
}
83+
col.setPreferredWidth(width + 2);
84+
}
85+
/*FINE BARBATRUCCO*/
86+
p2.bUpdate.setVisible(true);
87+
p2.box.setVisible(true);
88+
}
89+
});
90+
p2.bUpdate.addActionListener(new ActionListener() {
91+
92+
@Override
93+
public void actionPerformed(ActionEvent e) {
94+
new DBWriter(phoneC6603);
95+
}
96+
});
97+
98+
p2.box.addActionListener(new ActionListener() {
99+
100+
@SuppressWarnings({ "unchecked" })
101+
@Override
102+
public void actionPerformed(ActionEvent arg0) {
103+
JComboBox<String> combo;
104+
combo = p2.box;
105+
combo = (JComboBox<String>) arg0.getSource();
106+
if(combo.getSelectedItem().equals("ALL Version")){
107+
rowData = new Object[phoneC6603.size()][6];
108+
for(int i=0; i<phoneC6603.size();i++){
109+
110+
rowData[i][0] = new ImageIcon(getClass().getResource(phoneC6603.get(i).getState()));
111+
rowData[i][1] = phoneC6603.get(i).getNation();
112+
rowData[i][2] = phoneC6603.get(i).getBrand();
113+
rowData[i][3] = phoneC6603.get(i).getSerial();
114+
rowData[i][4] = phoneC6603.get(i).getVersion();
115+
rowData[i][5] = phoneC6603.get(i).getNewVersion();
116+
}
117+
validate();
118+
model1 = new DefaultTableModel(rowData, columnNames);
119+
table.setModel(model1);
120+
((DefaultTableModel)table.getModel()).fireTableDataChanged();
121+
}
122+
123+
if(combo.getSelectedItem().equals("Only Update")){
124+
125+
rowData = new Object[phoneC6603.size()][6];
126+
int counter = 0;
127+
ArrayList<Integer> stack = new ArrayList<>();
128+
for(int i=0; i<phoneC6603.size();i++){
129+
if(phoneC6603.get(i).getState().equals("/img/check.png")){
130+
stack.add(i);
131+
counter++;
132+
}
133+
}
134+
checkData = new Object[counter][6];
135+
for(int i=0; i<counter;i++){
136+
checkData[i][0] = new ImageIcon(getClass().getResource(phoneC6603.get(stack.get(i)).getState()));
137+
checkData[i][1] = phoneC6603.get(stack.get(i)).getNation();
138+
checkData[i][2] = phoneC6603.get(stack.get(i)).getBrand();
139+
checkData[i][3] = phoneC6603.get(stack.get(i)).getSerial();
140+
checkData[i][4] = phoneC6603.get(stack.get(i)).getVersion();
141+
checkData[i][5] = phoneC6603.get(stack.get(i)).getNewVersion();
142+
}
143+
validate();
144+
model2 = new DefaultTableModel(checkData, columnNames);
145+
table.setModel(model2);
146+
((DefaultTableModel)table.getModel()).fireTableDataChanged();
147+
}
148+
149+
/*INIZIO BARBATRUCCO*/
150+
for (int i = 0; i < table.getColumnCount(); i++) {
151+
DefaultTableColumnModel colModel = (DefaultTableColumnModel) table.getColumnModel();
152+
TableColumn col = colModel.getColumn(i);
153+
int width = 0;
154+
155+
TableCellRenderer renderer = col.getHeaderRenderer();
156+
for (int r = 0; r < table.getRowCount(); r++) {
157+
renderer = table.getCellRenderer(r, i);
158+
Component comp = renderer.getTableCellRendererComponent(table, table.getValueAt(r, i),false, false, r, i);
159+
width = Math.max(width, comp.getPreferredSize().width);
160+
}
161+
col.setPreferredWidth(width + 2);
162+
}
163+
/*FINE BARBATRUCCO*/
164+
}
165+
});
166+
table.setFont(new Font("monospaced", Font.PLAIN, 12));
167+
JScrollPane scroller = new JScrollPane();
168+
scroller.getViewport().add(table);
169+
scroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
170+
scroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
171+
setLayout(new BorderLayout());
172+
validate();
173+
add(scroller, BorderLayout.CENTER);
174+
}
175+
176+
177+
}

0 commit comments

Comments
 (0)