Commit 510dc20b authored by claes's avatar claes

Revering to 1.4 Vector style

parent a233ecb0
/* /*
* Proview $Id: FlowArray.java,v 1.3 2006-06-14 10:41:53 claes Exp $ * Proview $Id: FlowArray.java,v 1.4 2006-06-16 05:09:38 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -27,7 +27,8 @@ import javax.swing.*; ...@@ -27,7 +27,8 @@ import javax.swing.*;
public class FlowArray { public class FlowArray {
Vector<Object> a = new Vector<Object>(); //Vector<Object> a = new Vector<Object>();
Vector a = new Vector();
FlowCmn cmn; FlowCmn cmn;
public FlowArray( FlowCmn cmn) { public FlowArray( FlowCmn cmn) {
......
/* /*
* Proview $Id: FlowCmn.java,v 1.3 2006-06-14 10:41:53 claes Exp $ * Proview $Id: FlowCmn.java,v 1.4 2006-06-16 05:09:38 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -39,9 +39,12 @@ public class FlowCmn { ...@@ -39,9 +39,12 @@ public class FlowCmn {
double y_high; double y_high;
double y_low; double y_low;
Vector<Object> a = new Vector<Object>(); //Vector<Object> a = new Vector<Object>();
Vector<Object> a_nc = new Vector<Object>(); Vector a = new Vector();
Vector<Object> a_cc = new Vector<Object>(); //Vector<Object> a_nc = new Vector<Object>();
Vector a_nc = new Vector();
//Vector<Object> a_cc = new Vector<Object>();
Vector a_cc = new Vector();
public FlowCmn( Object ctx, Gdh gdh, JopSession session) { public FlowCmn( Object ctx, Gdh gdh, JopSession session) {
this.ctx = ctx; this.ctx = ctx;
......
/* /*
* Proview $Id: FlowVector.java,v 1.3 2006-06-14 10:41:53 claes Exp $ * Proview $Id: FlowVector.java,v 1.4 2006-06-16 05:09:38 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -27,7 +27,8 @@ public class FlowVector { ...@@ -27,7 +27,8 @@ public class FlowVector {
public FlowVector() { public FlowVector() {
} }
public static void open( BufferedReader reader, FlowCmn cmn, Vector<Object> a) { //public static void open( BufferedReader reader, FlowCmn cmn, Vector<Object> a) {
public static void open( BufferedReader reader, FlowCmn cmn, Vector a) {
String line; String line;
StringTokenizer token; StringTokenizer token;
boolean end = false; boolean end = false;
......
/* /*
* Proview $Id: HistStatModel1.java,v 1.3 2006-06-14 10:41:53 claes Exp $ * Proview $Id: HistStatModel1.java,v 1.4 2006-06-16 05:09:38 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB. * Copyright (C) 2005 SSAB Oxelösund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -27,7 +27,8 @@ import jpwr.rt.*; ...@@ -27,7 +27,8 @@ import jpwr.rt.*;
public class HistStatModel1 extends AbstractTableModel{ public class HistStatModel1 extends AbstractTableModel{
// The List storing the resulting statistics. // The List storing the resulting statistics.
public List<MhrEvent> result; //public List<MhrEvent> result;
public List result;
private String[][] freqNames={{"Object", "Nr. of alarms" },{"Objekt","Antal larm"}}; private String[][] freqNames={{"Object", "Nr. of alarms" },{"Objekt","Antal larm"}};
int lang; int lang;
...@@ -39,7 +40,8 @@ public class HistStatModel1 extends AbstractTableModel{ ...@@ -39,7 +40,8 @@ public class HistStatModel1 extends AbstractTableModel{
} }
public void clearData(){ public void clearData(){
result = new ArrayList<MhrEvent>(); //result = new ArrayList<MhrEvent>();
result = new ArrayList();
} }
public void setData(MhData m){ public void setData(MhData m){
...@@ -92,11 +94,16 @@ public class HistStatModel1 extends AbstractTableModel{ ...@@ -92,11 +94,16 @@ public class HistStatModel1 extends AbstractTableModel{
public void sortData(){ public void sortData(){
//sortData sorts the result List. Largest number of times found first. //sortData sorts the result List. Largest number of times found first.
Collections.sort(result, new Comparator<MhrEvent>(){ //Collections.sort(result, new Comparator<MhrEvent>(){
public int compare(MhrEvent o1, MhrEvent o2){ // public int compare(MhrEvent o1, MhrEvent o2){
if (o1.eventFlags < o2.eventFlags) // if (o1.eventFlags < o2.eventFlags)
// return 1;
// else if (o1.eventFlags > o2.eventFlags)
Collections.sort(result, new Comparator(){
public int compare(Object o1, Object o2){
if (((MhrEvent)o1).eventFlags < ((MhrEvent)o2).eventFlags)
return 1; return 1;
else if (o1.eventFlags > o2.eventFlags) else if (((MhrEvent)o1).eventFlags > ((MhrEvent)o2).eventFlags)
return -1; return -1;
else return 0; else return 0;
} }
......
/* /*
* Proview $Id: HistStatModel2.java,v 1.4 2006-06-14 10:41:53 claes Exp $ * Proview $Id: HistStatModel2.java,v 1.5 2006-06-16 05:09:38 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB. * Copyright (C) 2005 SSAB Oxelösund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -29,7 +29,8 @@ import jpwr.rt.*; ...@@ -29,7 +29,8 @@ import jpwr.rt.*;
public class HistStatModel2 extends AbstractTableModel{ public class HistStatModel2 extends AbstractTableModel{
// The List holding the statistics // The List holding the statistics
List<MhrEvent> result; //List<MhrEvent> result;
List result;
private String[][] names={{"Object", "Duration time" },{"Objekt", "Varaktighet"}}; private String[][] names={{"Object", "Duration time" },{"Objekt", "Varaktighet"}};
int lang; int lang;
...@@ -42,7 +43,8 @@ public class HistStatModel2 extends AbstractTableModel{ ...@@ -42,7 +43,8 @@ public class HistStatModel2 extends AbstractTableModel{
} }
public void clearData(){ public void clearData(){
result = new ArrayList<MhrEvent>(); //result = new ArrayList<MhrEvent>();
result = new ArrayList();
} }
public void setData(MhData m){ public void setData(MhData m){
...@@ -158,10 +160,14 @@ public class HistStatModel2 extends AbstractTableModel{ ...@@ -158,10 +160,14 @@ public class HistStatModel2 extends AbstractTableModel{
//eventFlags).Longest duration on top.) //eventFlags).Longest duration on top.)
public void sortData(){ public void sortData(){
Collections.sort(result, new Comparator<MhrEvent>(){ //Collections.sort(result, new Comparator<MhrEvent>(){
public int compare(MhrEvent o1, MhrEvent o2){ // public int compare(MhrEvent o1, MhrEvent o2){
if (o1.eventFlags < o2.eventFlags) return 1; // if (o1.eventFlags < o2.eventFlags) return 1;
else if (o1.eventFlags > o2.eventFlags) return -1; // else if (o1.eventFlags > o2.eventFlags) return -1;
Collections.sort(result, new Comparator(){
public int compare(Object o1, Object o2){
if (((MhrEvent)o1).eventFlags < ((MhrEvent)o2).eventFlags) return 1;
else if (((MhrEvent)o1).eventFlags > ((MhrEvent)o2).eventFlags) return -1;
else return 0; else return 0;
} }
}); });
......
/* /*
* Proview $Id: JopEngine.java,v 1.4 2006-06-14 10:41:53 claes Exp $ * Proview $Id: JopEngine.java,v 1.5 2006-06-16 05:09:38 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -35,7 +35,8 @@ import jpwr.rt.*; ...@@ -35,7 +35,8 @@ import jpwr.rt.*;
public class JopEngine implements ActionListener { public class JopEngine implements ActionListener {
int scanTime; int scanTime;
int animationScanTime; int animationScanTime;
Vector<Object> updateVector; //Vector<Object> updateVector;
Vector updateVector;
Timer timer; Timer timer;
public Gdh gdh; public Gdh gdh;
public LocalDb ldb = null; public LocalDb ldb = null;
...@@ -52,7 +53,8 @@ public class JopEngine implements ActionListener { ...@@ -52,7 +53,8 @@ public class JopEngine implements ActionListener {
public JopEngine( int scantime, Object root) { public JopEngine( int scantime, Object root) {
scanTime = scantime; scanTime = scantime;
animationScanTime = scantime; animationScanTime = scantime;
updateVector = new Vector<Object>( 50, 50); //updateVector = new Vector<Object>( 50, 50);
updateVector = new Vector( 50, 50);
timer = new Timer( scantime, this); timer = new Timer( scantime, this);
timer.start(); timer.start();
gdh = new Gdh( root); gdh = new Gdh( root);
......
/* /*
* Proview $Id: JopSessionRep.java,v 1.8 2006-06-14 10:41:53 claes Exp $ * Proview $Id: JopSessionRep.java,v 1.9 2006-06-16 05:09:38 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -31,7 +31,8 @@ public class JopSessionRep implements JopSessionIfc { ...@@ -31,7 +31,8 @@ public class JopSessionRep implements JopSessionIfc {
XttTree navigator; XttTree navigator;
MhFrame alarmList; MhFrame alarmList;
JopLoginFrame login; JopLoginFrame login;
Vector<Object> frames = new Vector<Object>(); //Vector<Object> frames = new Vector<Object>();
Vector frames = new Vector();
public JopSessionRep() { public JopSessionRep() {
} }
......
/* /*
* Proview $Id: LocalDb.java,v 1.3 2006-06-14 05:07:48 claes Exp $ * Proview $Id: LocalDb.java,v 1.4 2006-06-16 05:11:42 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -62,7 +62,8 @@ public class LocalDb { ...@@ -62,7 +62,8 @@ public class LocalDb {
} }
} }
Vector<LocalSub> subscriptions = new Vector<LocalSub>(); //Vector<LocalSub> subscriptions = new Vector<LocalSub>();
Vector subscriptions = new Vector();
int subscriptionCount = 1; int subscriptionCount = 1;
public LocalDb() { public LocalDb() {
......
/* /*
* Proview $Id: MhTable.java,v 1.4 2006-06-14 10:41:53 claes Exp $ * Proview $Id: MhTable.java,v 1.5 2006-06-16 05:09:38 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -931,13 +931,15 @@ public class MhTable extends JPanel ...@@ -931,13 +931,15 @@ public class MhTable extends JPanel
int nrOfAlarms = in.readInt(); int nrOfAlarms = in.readInt();
if(nrOfAlarms > 0) if(nrOfAlarms > 0)
{ {
mhData.alarmVec = (Vector<MhrEvent>)in.readObject(); //mhData.alarmVec = (Vector<MhrEvent>)in.readObject();
mhData.alarmVec = (Vector)in.readObject();
((AlarmTableModel)alarmTable.getModel()).updateTable(); ((AlarmTableModel)alarmTable.getModel()).updateTable();
} }
int nrOfEvents = in.readInt(); int nrOfEvents = in.readInt();
if(nrOfEvents > 0) if(nrOfEvents > 0)
{ {
mhData.eventVec = (Vector<MhrEvent>)in.readObject(); //mhData.eventVec = (Vector<MhrEvent>)in.readObject();
mhData.eventVec = (Vector)in.readObject();
((EventTableModel)eventTable.getModel()).updateTable(); ((EventTableModel)eventTable.getModel()).updateTable();
} }
} }
......
/* /*
* Proview $Id: RatioLayout.java,v 1.4 2006-06-14 10:41:53 claes Exp $ * Proview $Id: RatioLayout.java,v 1.5 2006-06-16 05:09:38 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB. * Copyright (C) 2005 SSAB Oxelösund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -40,10 +40,12 @@ import java.beans.Beans; ...@@ -40,10 +40,12 @@ import java.beans.Beans;
public class RatioLayout implements LayoutManager2 { public class RatioLayout implements LayoutManager2 {
// track the ratios for each object of form "xratio,yratio;wratio,hratio" // track the ratios for each object of form "xratio,yratio;wratio,hratio"
Vector<Proportion> ratios = new Vector<Proportion>(1); //Vector<Proportion> ratios = new Vector<Proportion>(1);
Vector ratios = new Vector(1);
// track the components also so we can remove associated modifier // track the components also so we can remove associated modifier
// if necessary. // if necessary.
Vector<Component> components = new Vector<Component>(1); //Vector<Component> components = new Vector<Component>(1);
Vector components = new Vector(1);
public void addLayoutComponent(String r, Component comp) { public void addLayoutComponent(String r, Component comp) {
} }
...@@ -72,8 +74,10 @@ public class RatioLayout implements LayoutManager2 { ...@@ -72,8 +74,10 @@ public class RatioLayout implements LayoutManager2 {
} }
//Reset the Layout //Reset the Layout
public void invalidateLayout(Container target){ public void invalidateLayout(Container target){
ratios = new Vector<Proportion>(1); //ratios = new Vector<Proportion>(1);
components = new Vector<Component>(1); //components = new Vector<Component>(1);
ratios = new Vector(1);
components = new Vector(1);
} }
......
/* /*
* Proview $Id: XttObj.java,v 1.4 2006-06-14 10:41:53 claes Exp $ * Proview $Id: XttObj.java,v 1.5 2006-06-16 05:09:38 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -174,7 +174,8 @@ public class XttObj extends DynamicObj implements JopDynamic ...@@ -174,7 +174,8 @@ public class XttObj extends DynamicObj implements JopDynamic
XttObjAttr obj; XttObjAttr obj;
String suffix; String suffix;
GdhrRefObjectInfo ret; GdhrRefObjectInfo ret;
Vector<String> refVec = new Vector<String>(); //Vector<String> refVec = new Vector<String>();
Vector refVec = new Vector();
for(int i = 0; i < attrVector.size(); i++) for(int i = 0; i < attrVector.size(); i++)
{ {
obj = ((XttObjAttr)attrVector.get(i)); obj = ((XttObjAttr)attrVector.get(i));
......
/* /*
* Proview $Id: XttTree.java,v 1.10 2006-06-14 10:41:53 claes Exp $ * Proview $Id: XttTree.java,v 1.11 2006-06-16 05:09:38 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -377,9 +377,11 @@ public class XttTree extends JPanel ...@@ -377,9 +377,11 @@ public class XttTree extends JPanel
return; return;
} }
//anvnds utifall anvndaren angett debug //anvnds utifall anvndaren angett debug
Vector<String> ref_vec = new Vector<String>(); //Vector<String> ref_vec = new Vector<String>();
Vector ref_vec = new Vector();
//anvnds utifall anvndaren angett debug //anvnds utifall anvndaren angett debug
Vector<XttRefObj> o_vec = new Vector<XttRefObj>(); //Vector<XttRefObj> o_vec = new Vector<XttRefObj>();
Vector o_vec = new Vector();
//loopa igenom resultat-vektorn //loopa igenom resultat-vektorn
for(int i = 0; i < v.size(); i++) for(int i = 0; i < v.size(); i++)
...@@ -513,7 +515,8 @@ public class XttTree extends JPanel ...@@ -513,7 +515,8 @@ public class XttTree extends JPanel
Logg.logg("XttTree: Vector == null efter getAllClassAttributes", 4); Logg.logg("XttTree: Vector == null efter getAllClassAttributes", 4);
return; return;
} }
Vector<XttObjAttr> xttObjAttrVec = new Vector<XttObjAttr>(); //Vector<XttObjAttr> xttObjAttrVec = new Vector<XttObjAttr>();
Vector xttObjAttrVec = new Vector();
for(int i = 0; i < v.size(); i++) for(int i = 0; i < v.size(); i++)
{ {
...@@ -822,7 +825,8 @@ public class XttTree extends JPanel ...@@ -822,7 +825,8 @@ public class XttTree extends JPanel
//what we are looking for //what we are looking for
TreePath selectedPath = this.tree.getSelectionPath(); TreePath selectedPath = this.tree.getSelectionPath();
Vector<String> pathVec = createPathVec(objectName); //Vector<String> pathVec = createPathVec(objectName);
Vector pathVec = createPathVec(objectName);
int ret = 1; int ret = 1;
DefaultMutableTreeNode tn = this.rootNode; DefaultMutableTreeNode tn = this.rootNode;
TreePath tp; TreePath tp;
...@@ -839,9 +843,11 @@ public class XttTree extends JPanel ...@@ -839,9 +843,11 @@ public class XttTree extends JPanel
} }
} }
//public Vector createPathVec(String name)
public Vector<String> createPathVec(String name) public Vector<String> createPathVec(String name)
{ {
Vector<String> pathVec = new Vector<String>(); //Vector<String> pathVec = new Vector<String>();
Vector pathVec = new Vector();
int strIndex; int strIndex;
int i = 0; int i = 0;
strIndex = name.indexOf('-'); strIndex = name.indexOf('-');
...@@ -956,7 +962,8 @@ public class XttTree extends JPanel ...@@ -956,7 +962,8 @@ public class XttTree extends JPanel
XttObj obj = ((XttObj)tn.getUserObject()); XttObj obj = ((XttObj)tn.getUserObject());
if(obj.debug) if(obj.debug)
{ {
Vector<PwrtRefId> unref_vec = new Vector<PwrtRefId>(); //Vector<PwrtRefId> unref_vec = new Vector<PwrtRefId>();
Vector unref_vec = new Vector();
obj.debug = false; obj.debug = false;
Enumeration enm = tn.children(); Enumeration enm = tn.children();
while(enm.hasMoreElements()) while(enm.hasMoreElements())
...@@ -1693,9 +1700,11 @@ public class XttTree extends JPanel ...@@ -1693,9 +1700,11 @@ public class XttTree extends JPanel
tn.remove(tc); tn.remove(tc);
GdhrRefObjectInfo ret; GdhrRefObjectInfo ret;
XttObjAttr obj = (XttObjAttr)tn.getUserObject(); XttObjAttr obj = (XttObjAttr)tn.getUserObject();
Vector<String> ref_vec = new Vector<String>(); //Vector<String> ref_vec = new Vector<String>();
Vector ref_vec = new Vector();
Vector ret_vec; Vector ret_vec;
Vector<XttArrayAttr> attr_vec = new Vector<XttArrayAttr>(); //Vector<XttArrayAttr> attr_vec = new Vector<XttArrayAttr>();
Vector attr_vec = new Vector();
//qqq borde lggas i egen trd??? //qqq borde lggas i egen trd???
for(int j = 0; j < obj.elements; j++) for(int j = 0; j < obj.elements; j++)
{ {
......
/* /*
* Proview $Id: Gdh.java,v 1.8 2006-06-14 10:41:53 claes Exp $ * Proview $Id: Gdh.java,v 1.9 2006-06-16 05:09:38 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -130,7 +130,8 @@ public class Gdh { ...@@ -130,7 +130,8 @@ public class Gdh {
return false; return false;
} }
public Vector<CdhrObjAttr> getAllClassAttributes( int classid, PwrtObjid objid_obj ) public Vector getAllClassAttributes( int classid, PwrtObjid objid_obj )
//public Vector<CdhrObjAttr> getAllClassAttributes( int classid, PwrtObjid objid_obj )
{ {
//System.out.println("getAllClassAttributes" + classid + " " + objid_obj.oix + " " + objid_obj.vid); //System.out.println("getAllClassAttributes" + classid + " " + objid_obj.oix + " " + objid_obj.vid);
//CdhrObjid co = this.classIdToObjid(classid); //CdhrObjid co = this.classIdToObjid(classid);
...@@ -142,7 +143,8 @@ public class Gdh { ...@@ -142,7 +143,8 @@ public class Gdh {
GdhrsAttrDef[] gdhrsAttrDefArr = this.getObjectBodyDef(classid, objid_obj); GdhrsAttrDef[] gdhrsAttrDefArr = this.getObjectBodyDef(classid, objid_obj);
Vector<CdhrObjAttr> v = new Vector<CdhrObjAttr>(); //Vector<CdhrObjAttr> v = new Vector<CdhrObjAttr>();
Vector v = new Vector();
for(int i = 0;i<gdhrsAttrDefArr.length;i++) for(int i = 0;i<gdhrsAttrDefArr.length;i++)
{ {
if(gdhrsAttrDefArr[i] == null) if(gdhrsAttrDefArr[i] == null)
...@@ -176,7 +178,8 @@ public class Gdh { ...@@ -176,7 +178,8 @@ public class Gdh {
return v; return v;
} }
public Vector<CdhrObjAttr> getAllClassAttributes( String name ) //public Vector<CdhrObjAttr> getAllClassAttributes( String name )
public Vector getAllClassAttributes( String name )
{ {
System.out.println("getAllClassAttributes" + name); System.out.println("getAllClassAttributes" + name);
...@@ -191,7 +194,8 @@ public class Gdh { ...@@ -191,7 +194,8 @@ public class Gdh {
return this.getAllClassAttributes(this.getObjectClass(this.nameToObjid(name).objid).classId, this.nameToObjid(name).objid ); return this.getAllClassAttributes(this.getObjectClass(this.nameToObjid(name).objid).classId, this.nameToObjid(name).objid );
} }
Vector<CdhrObjAttr> v = new Vector<CdhrObjAttr>(); //Vector<CdhrObjAttr> v = new Vector<CdhrObjAttr>();
Vector v = new Vector();
for(int i = 0;i<gdhrsAttrDefArr.length;i++) for(int i = 0;i<gdhrsAttrDefArr.length;i++)
{ {
if(gdhrsAttrDefArr[i] == null) if(gdhrsAttrDefArr[i] == null)
...@@ -229,10 +233,12 @@ public class Gdh { ...@@ -229,10 +233,12 @@ public class Gdh {
public Vector<CdhrObjid> getAllSiblings( PwrtObjid objid ) //public Vector<CdhrObjid> getAllSiblings( PwrtObjid objid )
public Vector getAllSiblings( PwrtObjid objid )
{ {
CdhrObjid sibling = (CdhrObjid)this.getNextSibling(objid); CdhrObjid sibling = (CdhrObjid)this.getNextSibling(objid);
Vector<CdhrObjid> v = new Vector<CdhrObjid>(); //Vector<CdhrObjid> v = new Vector<CdhrObjid>();
Vector v = new Vector();
while(sibling.oddSts()) while(sibling.oddSts())
{ {
v.add(sibling); v.add(sibling);
...@@ -241,7 +247,8 @@ public class Gdh { ...@@ -241,7 +247,8 @@ public class Gdh {
return v; return v;
} }
public Vector<GdhrGetXttObj> getAllXttSiblings( PwrtObjid objid ) //public Vector<GdhrGetXttObj> getAllXttSiblings( PwrtObjid objid )
public Vector getAllXttSiblings( PwrtObjid objid )
{ {
String name = null; String name = null;
String fullName = null; String fullName = null;
...@@ -251,7 +258,8 @@ public class Gdh { ...@@ -251,7 +258,8 @@ public class Gdh {
CdhrClassId cdhrClassId; CdhrClassId cdhrClassId;
int sts = 2; int sts = 2;
boolean hasChildren = false; boolean hasChildren = false;
Vector<GdhrGetXttObj> v = new Vector<GdhrGetXttObj>(); //Vector<GdhrGetXttObj> v = new Vector<GdhrGetXttObj>();
Vector v = new Vector();
CdhrObjid classObj; CdhrObjid classObj;
...@@ -294,7 +302,8 @@ public class Gdh { ...@@ -294,7 +302,8 @@ public class Gdh {
} }
return v; return v;
} }
public Vector<GdhrGetXttObj> getAllXttChildren( PwrtObjid objid ) //public Vector<GdhrGetXttObj> getAllXttChildren( PwrtObjid objid )
public Vector getAllXttChildren( PwrtObjid objid )
{ {
String name = null; String name = null;
String fullName = null; String fullName = null;
...@@ -304,7 +313,8 @@ public class Gdh { ...@@ -304,7 +313,8 @@ public class Gdh {
CdhrClassId cdhrClassId; CdhrClassId cdhrClassId;
int sts = 2; int sts = 2;
boolean hasChildren = false; boolean hasChildren = false;
Vector<GdhrGetXttObj> v = new Vector<GdhrGetXttObj>(); //Vector<GdhrGetXttObj> v = new Vector<GdhrGetXttObj>();
Vector v = new Vector();
CdhrObjid classObj; CdhrObjid classObj;
System.out.println("getAllXttChildren"); System.out.println("getAllXttChildren");
...@@ -350,9 +360,11 @@ public class Gdh { ...@@ -350,9 +360,11 @@ public class Gdh {
return v; return v;
} }
public Vector<GdhrRefObjectInfo> refObjectInfo_Vector( Vector vec ) //public Vector<GdhrRefObjectInfo> refObjectInfo_Vector( Vector vec )
public Vector refObjectInfo_Vector( Vector vec )
{ {
Vector<GdhrRefObjectInfo> retVec = new Vector<GdhrRefObjectInfo>(); //Vector<GdhrRefObjectInfo> retVec = new Vector<GdhrRefObjectInfo>();
Vector retVec = new Vector();
for(int i = 0;i < vec.size();i++) for(int i = 0;i < vec.size();i++)
{ {
//System.out.println("refObjectInfo_vector: " + (String)vec.get(i)); //System.out.println("refObjectInfo_vector: " + (String)vec.get(i));
......
/* /*
* Proview $Id: GdhServer.java,v 1.14 2006-06-14 10:41:53 claes Exp $ * Proview $Id: GdhServer.java,v 1.15 2006-06-16 05:09:38 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -98,7 +98,8 @@ public class GdhServer ...@@ -98,7 +98,8 @@ public class GdhServer
public final static int __IO_EXCEPTION = 2000; public final static int __IO_EXCEPTION = 2000;
public final static int __UNREFED = 0; public final static int __UNREFED = 0;
static ArrayList<SubElement> subscriptions = new ArrayList<SubElement>(); //static ArrayList<SubElement> subscriptions = new ArrayList<SubElement>();
static ArrayList subscriptions = new ArrayList();
static int subscriptionCount = 0; static int subscriptionCount = 0;
...@@ -331,7 +332,8 @@ public class GdhServer ...@@ -331,7 +332,8 @@ public class GdhServer
private class GdhThread extends Thread private class GdhThread extends Thread
{ {
Socket clientSocket; Socket clientSocket;
public Vector<Sub> thSub = new Vector<Sub>(); //public Vector<Sub> thSub = new Vector<Sub>();
public Vector thSub = new Vector();
int maxConnections; int maxConnections;
int threadNumber; int threadNumber;
...@@ -634,7 +636,8 @@ public class GdhServer ...@@ -634,7 +636,8 @@ public class GdhServer
break; break;
} }
String attrName; String attrName;
Vector<Sub> gdhRet = new Vector<Sub>(vec.size()); //Vector<Sub> gdhRet = new Vector<Sub>(vec.size());
Vector gdhRet = new Vector(vec.size());
for(int j = 0; j < vec.size(); j++) for(int j = 0; j < vec.size(); j++)
{ {
attrName = (String)vec.get(j); attrName = (String)vec.get(j);
...@@ -1497,7 +1500,8 @@ public class GdhServer ...@@ -1497,7 +1500,8 @@ public class GdhServer
try try
{ {
String name = in.readUTF(); String name = in.readUTF();
Vector<CdhrObjAttr> v = gdh.getAllClassAttributes(name); //Vector<CdhrObjAttr> v = gdh.getAllClassAttributes(name);
Vector v = gdh.getAllClassAttributes(name);
out.writeObject(v); out.writeObject(v);
out.flush(); out.flush();
} }
...@@ -1511,7 +1515,8 @@ public class GdhServer ...@@ -1511,7 +1515,8 @@ public class GdhServer
{ {
PwrtObjid objid = (PwrtObjid)in.readObject(); PwrtObjid objid = (PwrtObjid)in.readObject();
CdhrObjid sibling = (CdhrObjid)gdh.getNextSibling(objid); CdhrObjid sibling = (CdhrObjid)gdh.getNextSibling(objid);
Vector<CdhrObjid> v = new Vector<CdhrObjid>(); //Vector<CdhrObjid> v = new Vector<CdhrObjid>();
Vector v = new Vector();
while(sibling.oddSts()) while(sibling.oddSts())
{ {
v.add(sibling); v.add(sibling);
...@@ -1542,7 +1547,8 @@ public class GdhServer ...@@ -1542,7 +1547,8 @@ public class GdhServer
CdhrClassId cdhrClassId; CdhrClassId cdhrClassId;
int sts = 2; int sts = 2;
boolean hasChildren = false; boolean hasChildren = false;
Vector<GdhrGetXttObj> v = new Vector<GdhrGetXttObj>(); //Vector<GdhrGetXttObj> v = new Vector<GdhrGetXttObj>();
Vector v = new Vector();
CdhrObjid classObj; CdhrObjid classObj;
cdhrObjId = (CdhrObjid)gdh.getNextSibling(objid); cdhrObjId = (CdhrObjid)gdh.getNextSibling(objid);
...@@ -1610,7 +1616,8 @@ public class GdhServer ...@@ -1610,7 +1616,8 @@ public class GdhServer
CdhrClassId cdhrClassId; CdhrClassId cdhrClassId;
int sts = 2; int sts = 2;
boolean hasChildren = false; boolean hasChildren = false;
Vector<GdhrGetXttObj> v = new Vector<GdhrGetXttObj>(); //Vector<GdhrGetXttObj> v = new Vector<GdhrGetXttObj>();
Vector v = new Vector();
CdhrObjid classObj; CdhrObjid classObj;
......
/* /*
* Proview $Id: MhData.java,v 1.4 2006-06-14 10:41:53 claes Exp $ * Proview $Id: MhData.java,v 1.5 2006-06-16 05:09:38 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -31,16 +31,20 @@ public class MhData ...@@ -31,16 +31,20 @@ public class MhData
public int maxNrOfAlarms; public int maxNrOfAlarms;
public int maxNrOfEvents; public int maxNrOfEvents;
public Vector<MhrEvent> alarmVec; //public Vector<MhrEvent> alarmVec;
public Vector<MhrEvent> eventVec; public Vector alarmVec;
//public Vector<MhrEvent> eventVec;
public Vector eventVec;
public MhData(int maxNrOfAlarms, int maxNrOfEvents) public MhData(int maxNrOfAlarms, int maxNrOfEvents)
{ {
this.maxNrOfAlarms = maxNrOfAlarms; this.maxNrOfAlarms = maxNrOfAlarms;
this.maxNrOfEvents = maxNrOfEvents; this.maxNrOfEvents = maxNrOfEvents;
this.alarmVec = new Vector<MhrEvent>(maxNrOfAlarms); //this.alarmVec = new Vector<MhrEvent>(maxNrOfAlarms);
this.eventVec = new Vector<MhrEvent>(maxNrOfEvents); this.alarmVec = new Vector(maxNrOfAlarms);
//this.eventVec = new Vector<MhrEvent>(maxNrOfEvents);
this.eventVec = new Vector(maxNrOfEvents);
} }
public int getNrOfAlarms() public int getNrOfAlarms()
{ {
...@@ -58,9 +62,11 @@ public class MhData ...@@ -58,9 +62,11 @@ public class MhData
{ {
return (MhrEvent)eventVec.get(i); return (MhrEvent)eventVec.get(i);
} }
public void addMessToVectorInSortedOrder(Vector<MhrEvent> v, MhrEvent ev) //public void addMessToVectorInSortedOrder(Vector<MhrEvent> v, MhrEvent ev)
public void addMessToVectorInSortedOrder(Vector v, MhrEvent ev)
{ {
ListIterator<MhrEvent> iter = v.listIterator(); //ListIterator<MhrEvent> iter = v.listIterator();
ListIterator iter = v.listIterator();
MhrEvent vEv; MhrEvent vEv;
while(iter.hasNext()) while(iter.hasNext())
{ {
......
/* /*
* Proview $Id: Gdh.java,v 1.10 2006-06-14 10:41:53 claes Exp $ * Proview $Id: Gdh.java,v 1.11 2006-06-16 05:09:38 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -96,7 +96,8 @@ public class Gdh ...@@ -96,7 +96,8 @@ public class Gdh
Socket gdhSocket; Socket gdhSocket;
ObjectOutputStream out; ObjectOutputStream out;
ObjectInputStream in; ObjectInputStream in;
Vector<Sub> subscriptions = new Vector<Sub>(); //Vector<Sub> subscriptions = new Vector<Sub>();
Vector subscriptions = new Vector();
int subscriptionCount = 0; int subscriptionCount = 0;
boolean listSent = false; boolean listSent = false;
int subLate = 0; int subLate = 0;
...@@ -560,7 +561,8 @@ public class Gdh ...@@ -560,7 +561,8 @@ public class Gdh
out.writeObject(vec); out.writeObject(vec);
out.flush(); out.flush();
Vector<GdhrRefObjectInfo> retVec = (Vector<GdhrRefObjectInfo>)in.readObject(); //Vector<GdhrRefObjectInfo> retVec = (Vector<GdhrRefObjectInfo>)in.readObject();
Vector retVec = (Vector)in.readObject();
if(retVec == null) if(retVec == null)
{ {
locked = false; locked = false;
...@@ -590,7 +592,8 @@ public class Gdh ...@@ -590,7 +592,8 @@ public class Gdh
System.out.println("REF_OBJECT_INFO_VECTOR: IO_Exception"); System.out.println("REF_OBJECT_INFO_VECTOR: IO_Exception");
locked = false; locked = false;
notify(); notify();
Vector<GdhrRefObjectInfo> retVec = new Vector<GdhrRefObjectInfo>(); //Vector<GdhrRefObjectInfo> retVec = new Vector<GdhrRefObjectInfo>();
Vector retVec = new Vector();
retVec.add(new GdhrRefObjectInfo(null, 0, __IO_EXCEPTION, 0)); retVec.add(new GdhrRefObjectInfo(null, 0, __IO_EXCEPTION, 0));
return retVec; return retVec;
} }
...@@ -861,7 +864,8 @@ public class Gdh ...@@ -861,7 +864,8 @@ public class Gdh
out.writeInt(refid.nid); out.writeInt(refid.nid);
} }
out.flush(); out.flush();
Vector<PwrtStatus> ret_vec = new Vector<PwrtStatus>(); //Vector<PwrtStatus> ret_vec = new Vector<PwrtStatus>();
Vector ret_vec = new Vector();
//System.out.println("unrefObjectInfo_VEctor i: " + i); //System.out.println("unrefObjectInfo_VEctor i: " + i);
while(i > 0) while(i > 0)
{ {
......
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