Commit a11b9e76 authored by claes's avatar claes

*** empty log message ***

parent daf6b1b3
/*
* Proview $Id: AspectRatioListener.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.awt.*;
import java.awt.event.*;
/* This class is used as a ComponentListener for any Component for which
the Aspect Ratio is important and needs to be retained. The constructor
needs to know what Component it is applied to and the original size of it.
From the size the aspect ratio is calculated and every time the Container
is resized. The size is changed so that the aspect ratio matches the,
relatively, smaller one of the new width and height.
syntax : new AspectTarioListener(c)
or new AspectRatioListener(c,size)
where c is the component, and size is the original size of it. */
public class AspectRatioListener implements ComponentListener {
private double ratio;
private Dimension previous;
private Container victim;
public AspectRatioListener(Container c){
victim = c;
previous = (Dimension) c.getSize().clone();
ratio = 1.0*c.getSize().width/c.getSize().height;
}
public AspectRatioListener(Container c, Dimension size){
victim = c;
previous = (Dimension) size.clone();
ratio = 1.0*size.width/size.height;
}
public void componentResized(ComponentEvent e) {
int width = victim.getWidth();
int height = victim.getHeight();
// check if the height or width should be adjusted.
if (!(previous.equals(victim.getSize()))){
if ((width > previous.width) ||
(height > previous.height)){
if ((0.1*height/previous.height)>(0.1*width/previous.width))
width = (int) (ratio*height);
else
height = (int) (width/ratio);
}
else{
if ((0.1*width/previous.width)<(0.1*height/previous.height))
height = (int) (width/ratio);
else
width = (int) (ratio*height);
}
previous = new Dimension(width,height);
victim.setSize(width,height);
}
}
public void componentMoved(ComponentEvent e) {
}
public void componentShown(ComponentEvent e) {
}
public void componentHidden(ComponentEvent e) {
}
}
/*
* Proview $Id: AttrObj.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
//package navigator;
import jpwr.rt.*;
/**
* Description of the Class
*
*@author JN3920
*@created November 12, 2002
*/
public class AttrObj extends TreeObj
{
/** Description of the Field */
int elements = 0;
/** Description of the Field */
int flags;
/** Description of the Field */
// String fullName = null;
/** Description of the Field */
int lengthToSecondCol = 20;
/** Description of the Field */
// String name = null;
/** Description of the Field */
PwrtObjid objid;
/** Description of the Field */
GdhrRefObjectInfo refObj;
/** Description of the Field */
boolean showName = true;
/** Description of the Field */
int size;
/** Description of the Field */
DefaultMutableTreeNode treeNode;
/** Description of the Field */
int type;
/** Description of the Field */
boolean valueBoolean;
/** Description of the Field */
float valueFloat;
/** Description of the Field */
int valueInt;
/** Description of the Field */
String valueString = " ";
/** Description of the Field */
static DefaultTreeModel treeModel;
/**
* Sets the value attribute of the AttrObj object
*
*@param value The new value value
*/
public void setValue(int value)
{
if(this.valueInt == value)
{
return;
}
this.valueInt = value;
treeModel.nodeChanged(this.treeNode);
}
/**
* Sets the value attribute of the AttrObj object
*
*@param value The new value value
*/
public void setValue(float value)
{
if(this.valueFloat == value)
{
return;
}
this.valueFloat = value;
treeModel.nodeChanged(this.treeNode);
}
/**
* Sets the value attribute of the AttrObj object
*
*@param value The new value value
*/
public void setValue(boolean value)
{
if(this.valueBoolean == value)
{
return;
}
this.valueBoolean = value;
treeModel.nodeChanged(this.treeNode);
}
/**
* Sets the value attribute of the AttrObj object
*
*@param value The new value value
*/
public void setValue(String value)
{
if(this.valueString.compareTo(value) == 0)
{
return;
}
this.valueString = value;
treeModel.nodeChanged(this.treeNode);
}
/**
* Description of the Method
*
*@return Description of the Return Value
*/
public String toString()
{
int spaceLength = this.lengthToSecondCol - this.name.length();
String space = " ";
String n = " ";
String s;
if(showName)
{
n = this.name;
while(spaceLength > 1)
{
spaceLength--;
space += " ";
}
}
switch (this.type)
{
case Pwr.eType_Float32:
case Pwr.eType_Float64:
s = n + space + this.valueFloat;
break;
case Pwr.eType_UInt32:
case Pwr.eType_UInt64:
case Pwr.eType_Int32:
case Pwr.eType_Int64:
//s = n + space + this.valueInt;
s = n + space + (new Integer( (this.valueInt & 65535) )).intValue();
break;
case Pwr.eType_UInt16:
s = n + space + (new Integer( (this.valueInt & 65535) )).intValue();
break;
case Pwr.eType_Int8:
case Pwr.eType_UInt8:
s = n + space + (new Integer(this.valueInt)).byteValue();
break;
case Pwr.eType_Int16:
s = n + space + (new Integer(this.valueInt)).shortValue();
break;
case Pwr.eType_Boolean:
if(this.valueBoolean)
{
s = n + space + "1";
}
else
{
s = n + space + "0";
}
break;
default:
s = n + space + this.valueString;
break;
}
return s;
}
}
/*
* Proview $Id: ClickActionEditor.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.beans.*;
/**
* Title:
* Description:
* Copyright: Copyright (c) 2000
* Company:
* @author CS
* @version 1.0
*/
public class ClickActionEditor extends PropertyEditorSupport {
public ClickActionEditor() {
}
private static String[] tagStrings = { "Set", "Reset", "Toggle", "Command", };
public String[] getTags() {
return tagStrings;
}
public String getJavaInitializationString() {
switch (((Number)getValue()).intValue()) {
default:
case Jop.BUTTON_ACTION_SET:
return "Jop.BUTTON_ACTION_SET";
case Jop.BUTTON_ACTION_RESET:
return "Jop.BUTTON_ACTION_RESET";
case Jop.BUTTON_ACTION_TOGGLE:
return "Jop.BUTTON_ACTION_TOGGLE";
case Jop.BUTTON_ACTION_COMMAND:
return "Jop.BUTTON_ACTION_COMMAND";
}
}
public void setAsText(String s) throws IllegalArgumentException {
if (s.equals("Set")) setValue( new Integer(Jop.BUTTON_ACTION_SET));
else if (s.equals("Reset")) setValue( new Integer(Jop.BUTTON_ACTION_RESET));
else if (s.equals("Toggle")) setValue( new Integer(Jop.BUTTON_ACTION_TOGGLE));
else if (s.equals("Command")) setValue( new Integer(Jop.BUTTON_ACTION_COMMAND));
else throw new IllegalArgumentException(s);
}
}
/*
* Proview $Id: CrrFrame.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import jpwr.rt.*;
import java.io.*;
import java.awt.*;
import java.awt.geom.*;
import java.awt.image.*;
import java.awt.font.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.border.*;
import java.awt.event.*;
import java.util.*;
public class CrrFrame extends JFrame {
JScrollPane scrollPane;
JPanel contentPane;
JMenuBar menuBar;
JList crrList;
BorderLayout borderLayout1 = new BorderLayout();
JopSession session;
JopEngine en;
Object root;
private String titles[];
private ImageIcon images[];
public CrrFrame( JopSession sess, String objectName) {
this.session = sess;
en = session.getEngine();
root = session.getRoot();
contentPane = (JPanel) this.getContentPane();
contentPane.setLayout(borderLayout1);
crrList = createList(objectName);
menuBar = createMenu();
contentPane.add( menuBar, BorderLayout.NORTH);
JScrollPane scrollPane = new JScrollPane( crrList);
contentPane.add(scrollPane, BorderLayout.CENTER);
contentPane.setOpaque(true);
this.setTitle(objectName);
setSize( 600, 300);
}
JMenuBar createMenu() {
JMenuBar menuBar = new JMenuBar();
JMenu fileMenu = new JMenu("File");
fileMenu.setMnemonic('F');
MenuAction closeFileAction = new MenuAction("Close");
JMenu functionsMenu = new JMenu("Functions");
fileMenu.setMnemonic('u');
MenuAction openPlcFunctionsAction = new MenuAction("Open Plc");
JMenuItem item;
item = fileMenu.add( closeFileAction);
item.setMnemonic('C');
item = functionsMenu.add( openPlcFunctionsAction);
item.setMnemonic('I');
item.setAccelerator( KeyStroke.getKeyStroke('L', java.awt.Event.CTRL_MASK, false));
menuBar.add( fileMenu);
menuBar.add( functionsMenu);
menuBar.setBorder( new BevelBorder( BevelBorder.RAISED));
return menuBar;
}
class MenuAction extends AbstractAction {
public MenuAction( String text) {
super(text);
}
public void actionPerformed( ActionEvent e) {
if ( e.getActionCommand().equals("Close")) {
dispose();
}
else if ( e.getActionCommand().equals("Open Plc")) {
int selected[] = crrList.getSelectedIndices();
if ( selected.length == 0)
return;
StringTokenizer t = new StringTokenizer( titles[selected[0]]);
String name = t.nextToken();
int idx = name.lastIndexOf('-');
String windowName = name.substring( 0, idx);
String segmentName = name.substring( idx + 1);
CdhrObjid ret = en.gdh.nameToObjid( windowName);
if ( ret.evenSts())
return;
session.openFlowFrame( ret.objid, segmentName);
}
}
}
// Exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
}
}
JList createList( String objectName) {
CdhrObjid oret = en.gdh.nameToObjid( objectName);
if ( oret.evenSts()) return null;
CdhrClassId cret = en.gdh.getObjectClass( oret.objid);
if ( cret.evenSts()) return null;
CdhrString sret;
switch ( cret.classId) {
case Pwrb.cClass_Ai:
case Pwrb.cClass_Ao:
case Pwrb.cClass_Di:
case Pwrb.cClass_Do:
case Pwrb.cClass_Po:
case Pwrb.cClass_Dv:
case Pwrb.cClass_Av:
sret = en.gdh.crrSignal( objectName);
break;
default:
sret = en.gdh.crrObject( objectName);
}
if ( sret.evenSts()) return null;
Image crrRead = JopSpider.getImage( session, "jpwr/jop/crrread.gif");
Image crrWrite = JopSpider.getImage( session, "jpwr/jop/crrwrite.gif");
Image crrReadWrite = JopSpider.getImage( session, "jpwr/jop/crrreadwrite.gif");
ImageIcon crrReadIcon = new ImageIcon( crrRead);
ImageIcon crrWriteIcon = new ImageIcon( crrWrite);
ImageIcon crrReadWriteIcon = new ImageIcon( crrReadWrite);
String delim = new String( new char[] { '\n'});
StringTokenizer tokens = new StringTokenizer( sret.str, delim);
int tokensCnt = tokens.countTokens();
titles = new String[tokensCnt];
images = new ImageIcon[tokensCnt];
for ( int i = 0; i < tokensCnt; i++) {
String token = tokens.nextToken();
titles[i] = token.substring(1);
if ( token.startsWith("0"))
images[i] = crrReadIcon;
else if ( token.startsWith("1"))
images[i] = crrWriteIcon;
else
images[i] = crrReadWriteIcon;
}
final JList list = new JList( titles);
MouseListener mouseListener = new MouseAdapter() {
public void mouseClicked( MouseEvent e) {
if ( e.getClickCount() == 2) {
int index = list.locationToIndex( e.getPoint());
StringTokenizer t = new StringTokenizer( titles[index]);
String name = t.nextToken();
int idx = name.lastIndexOf('-');
String windowName = name.substring( 0, idx);
String segmentName = name.substring( idx + 1);
CdhrObjid ret = en.gdh.nameToObjid( windowName);
if ( ret.evenSts())
return;
session.openFlowFrame( ret.objid, segmentName);
dispose();
}
}
};
list.addMouseListener( mouseListener);
list.setCellRenderer( new CrrCellRenderer());
return list;
}
class CrrCellRenderer extends JLabel implements ListCellRenderer {
Color highlightColor = new Color( 230, 230, 255);
CrrCellRenderer() {
setOpaque( true);
}
public Component getListCellRendererComponent( JList list,
Object object,
int index,
boolean isSelected,
boolean cellHasFocus) {
if ( index == -1) {
int selected = list.getSelectedIndex();
if ( selected == -1)
return this;
else
index = selected;
}
setText( " " + titles[index]);
setIcon( images[index]);
if ( isSelected) {
setBackground( highlightColor);
setForeground( Color.black);
}
else {
setBackground( Color.white);
setForeground( Color.black);
}
return this;
}
}
}
/*
* Proview $Id: DynamicObj.java,v 1.4 2005-12-06 11:17:01 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import javax.swing.tree.DefaultMutableTreeNode;
import jpwr.jop.JopDynamic;
import jpwr.jop.JopEngine;
import jpwr.rt.*;
/**
* Description of the Class
*
*@author JN3920
*@created November 12, 2002
*/
public class DynamicObj extends TreeObj
{
/** Description of the Field */
public XttObjAttr objAttr;
/** Description of the Field */
int classid;
/** Description of the Field */
// String fullName;
/** Description of the Field */
static JopEngine en;
static boolean initDone = false;
/**
* Sets the objectAttributeValue attribute of the DynamicObj object
*
*@param obj The new objectAttributeValue value
*/
public void setObjectAttributeValue(AttrObj obj)
{
switch (obj.type)
{
case Pwr.eType_Float32:
case Pwr.eType_Float64:
Logg.logg("getObjectRefInfoFloat(" + obj.refObj.id + ")", 6);
obj.setValue(en.gdh.getObjectRefInfoFloat(obj.refObj.id));
break;
case Pwr.eType_Int8:
case Pwr.eType_Int16:
case Pwr.eType_Int32:
case Pwr.eType_Int64:
case Pwr.eType_UInt8:
case Pwr.eType_UInt16:
case Pwr.eType_UInt32:
case Pwr.eType_UInt64:
case Pwr.eType_Status:
case Pwr.eType_NetStatus:
case Pwr.eType_Enum:
case Pwr.eType_Mask:
Logg.logg("getObjectRefInfoInt(" + obj.refObj.id + ")", 6);
obj.setValue(en.gdh.getObjectRefInfoInt(obj.refObj.id));
break;
case Pwr.eType_Boolean:
Logg.logg("getObjectRefInfoBoolean(" + obj.refObj.id + ")", 6);
obj.setValue(en.gdh.getObjectRefInfoBoolean(obj.refObj.id));
break;
default:
// Logg.logg(obj.name + " getObjectRefInfoString(" + obj.refObj.id + /*" " + obj.type +*/ ")", 1);
// Logg.logg("getObjectRefInfoString: " + en.gdh.getObjectRefInfoString(obj.refObj.id, obj.type), 1);
obj.setValue(en.gdh.getObjectRefInfoString(obj.refObj.id, obj.type));
break;
}
}
/**
* Sets the typeIdString attribute of the DynamicObj object
*
*@param type The new typeIdString value
*@param size The new typeIdString value
*@return Description of the Return Value
*/
public String setTypeIdString(int type, int size)
{
String suffix = "##";
switch (type)
{
case Pwr.eType_Boolean:
suffix += "BOOLEAN";
break;
case Pwr.eType_Float32:
suffix += "FLOAT32";
break;
case Pwr.eType_Int32:
suffix += "INT32";
break;
case Pwr.eType_UInt32:
suffix += "UINT32";
break;
case Pwr.eType_Int16:
suffix += "INT16";
break;
case Pwr.eType_UInt16:
suffix += "UINT16";
break;
case Pwr.eType_Int8:
suffix += "INT8";
break;
case Pwr.eType_UInt8:
suffix += "UINT8";
break;
case Pwr.eType_Status:
suffix += "STATUS";
break;
case Pwr.eType_NetStatus:
suffix += "NETSTATUS";
break;
case Pwr.eType_Enum:
suffix += "ENUM";
break;
case Pwr.eType_Mask:
suffix += "MASK";
break;
case Pwr.eType_Char:
suffix += "CHAR";
break;
case Pwr.eType_Float64:
suffix += "FLOAT64";
break;
case Pwr.eType_Objid:
suffix += "OBJID";
break;
case Pwr.eType_String:
suffix += "STRING" + size;
break;
case Pwr.eType_Time:
suffix += "TIME";
break;
case Pwr.eType_DeltaTime:
suffix += "DELTATIME";
break;
case Pwr.eType_AttrRef:
suffix += "ATTRREF";
break;
default:
suffix += "STRING" + size;
break;
}
return suffix;
}
static void init(JopEngine en)
{
if(!DynamicObj.initDone)
{
DynamicObj.initDone = true;
DynamicObj.en = en;
}
}
}
/*
* Proview $Id: EventTableCellRender.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.awt.*;
import javax.swing.*;
import javax.swing.table.DefaultTableCellRenderer;
import jpwr.rt.Mh;
import jpwr.rt.MhrEvent;
/* This class is used to make sure an EventTableModel in a JaTable is presented
* in a graphically appealing manner. */
public class EventTableCellRender extends DefaultTableCellRenderer
{
Color ALarmColor = Color.red;
Color BLarmColor = Color.yellow;
Color CLarmColor = Color.blue;
Color DLarmColor = Color.cyan;
Color InfoColor = Color.green;
/**
* Gets the tableCellRendererComponent attribute of the
* EventTableCellRender object
*
*@param table Description of the Parameter
*@param value Description of the Parameter
*@param isSelected Description of the Parameter
*@param hasFocus Description of the Parameter
*@param row Description of the Parameter
*@param column Description of the Parameter
*@return The tableCellRendererComponent value
*/
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column)
{
//I will assume that the number is stored as a string. if it is stored as an Integer, you can change this easily.
//if(column == 0)
//{
String number = (String)value;
//cast to a string
//int val = Integer.parseInt(number);//convert to an integer
MhrEvent ev = ((EventTableModel)table.getModel()).getRowObject(row);
this.setBackground(Color.white);
if(ev == null)
{
this.setText(" ");
return this;
}
boolean setColor = false;
if( ev.eventType == Mh.mh_eEvent_Alarm||ev.eventType == Mh.mh_eEvent_Info )
setColor = true;
//System.out.println("i eventTable.getTableCellRendererComponent(row " + row + "value" + number + ")");
if(number.compareTo("A") == 0)
{
if(setColor)
{
this.setBackground(ALarmColor);
}
this.setText("A");
}
else if(number.compareTo("B") == 0)
{
if(setColor)
{
this.setBackground(BLarmColor);
}
this.setText("B");
}
else if(number.compareTo("C") == 0)
{
if(setColor)
{
this.setBackground(CLarmColor);
}
this.setText("C");
}
else if(number.compareTo("D") == 0)
{
if(setColor)
{
this.setBackground(DLarmColor);
}
this.setText("D");
}
//annars måste det vara ett meddelande qqq??
else
{
if(setColor)
{
this.setBackground(InfoColor);
}
this.setText(" ");
}
//}
//else
// this.setBackground(Color.white);
return this;
}
}
/*
* Proview $Id: EventTableModel.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.awt.*;
import javax.swing.*;
import javax.swing.table.AbstractTableModel;
import jpwr.rt.Mh;
import jpwr.rt.MhData;
import jpwr.rt.MhrEvent;
/* The EventTableModel is an AbstractTableModel designed to keep the
*result from a search made with the AlertSearch engine. The result
*to present is contained in the MhData mhdata.*/
class EventTableModel extends AbstractTableModel
{
MhData mhData = new MhData(0,100);
String[][] columnNamesEventTable = {{"Prio","","Time","Description text","Event name"},{"P",
"Typ",
"Tid",
"Hndelsetext",
"Objekt"}};
int lang;
public final Object[] longValues = {"A", "Kvittens",
"10-12-31 12:12:12.98",
"QWERTYUIOPLK_JHGFDSAZXCVBNM__POIUYTRQWERTYUIOPL",
"QWERTYUIOPLK"};
/**
* Constructor for the EventTableModel object
*/
public EventTableModel() { lang=0; }
// constructor with language support
public EventTableModel(int l) { lang=l; }
/**
* Gets the columnCount attribute of the EventTableModel object
*
*@return The columnCount value
*/
public int getColumnCount()
{
return columnNamesEventTable[lang].length;
}
/**
* Gets the rowCount attribute of the EventTableModel object
*
*@return The rowCount value
*/
public int getRowCount()
{
return mhData.getNrOfEvents();//eventData.size();
}
/**
* Gets the columnName attribute of the EventTableModel object
*
*@param col Description of the Parameter
*@return The columnName value
*/
public String getColumnName(int col)
{
return (String)columnNamesEventTable[lang][col];
}
/**
* Gets the valueAt attribute of the EventTableModel object
*
*@param row Description of the Parameter
*@param col Description of the Parameter
*@return The valueAt value
*/
public Object getValueAt(int row, int col)
{
try
{
MhrEvent ev = mhData.getEvent(row);//(MhrEvent)eventData.get(row);
if(col == 0)
{
//System.out.println("col == 0 i eventTable.getValueAt()");
if(ev.eventPrio == Mh.mh_eEventPrio_A)
{
return "A";
}
if(ev.eventPrio == Mh.mh_eEventPrio_B)
{
return "B";
}
if(ev.eventPrio == Mh.mh_eEventPrio_C)
{
return "C";
}
if(ev.eventPrio == Mh.mh_eEventPrio_D)
{
return "D";
}
else
{
return "U";
}
}
if(col == 1)
{
String returnString = " ";
switch (ev.eventType)
{
case Mh.mh_eEvent_Alarm:
returnString = "Larm";
break;
case Mh.mh_eEvent_Ack:
returnString = "Kvittens";
break;
case Mh.mh_eEvent_Block:
returnString = "Block";
break;
case Mh.mh_eEvent_Cancel:
returnString = "Cancel";
break;
case Mh.mh_eEvent_CancelBlock:
returnString = "CancelBlock";
break;
case Mh.mh_eEvent_Missing:
returnString = "Missing";
break;
case Mh.mh_eEvent_Reblock:
returnString = "Reblock";
break;
case Mh.mh_eEvent_Return:
returnString = "Retur";
break;
case Mh.mh_eEvent_Unblock:
returnString = "Unblock";
break;
case Mh.mh_eEvent_Info:
returnString = "Info";
break;
case Mh.mh_eEvent_:
returnString = "?";
break;
default:
returnString = " ";
break;
}
return returnString;
}
if(col == 2)
{
return ev.eventTime;
}
if(col == 3)
{
return ev.eventText;
}
if(col == 4)
{
return ev.eventName;
}
}
catch(ArrayIndexOutOfBoundsException e)
{
System.out.println(e.toString());
if(col == 1)
{
return new Boolean(false);
}
}
return "FEEELLLL";
}
/**
* Gets the columnClass attribute of the EventTableModel object
*
*@param c Description of the Parameter
*@return The columnClass value
*/
public Class getColumnClass(int c)
{
return longValues[c].getClass();
//return getValueAt(0, c).getClass();
}
/**
* Sets the valueAt attribute of the EventTableModel object
*
*@param value The new valueAt value
*@param row The new valueAt value
*@param col The new valueAt value
*/
public void setValueAt(Object value, int row, int col)
{
//alarmData[row][col] = value;
// fireTableCellUpdated(row, col);
}
/**
* Gets the rowObject attribute of the EventTableModel object
*
*@param row Description of the Parameter
*@return The rowObject value
*/
public MhrEvent getRowObject(int row)
{
try
{
return mhData.getEvent(row);//(MhrEvent)eventData.get(row);
}
catch(ArrayIndexOutOfBoundsException e)
{
System.out.println("eventable.getRowObject " + e.toString());
}
return null;
}
/**
* Description of the Method
*/
public void rowInserted()
{
fireTableRowsInserted(0, 0);
}
/**
* Description of the Method
*
*@param row Description of the Parameter
*/
public void rowRemoved(int row)
{
fireTableRowsDeleted(row, row);
}
/**
* Description of the Method
*/
public void reloadTable()
{
fireTableStructureChanged();
}
/**
* Description of the Method
*/
public void updateTable()
{
fireTableDataChanged();
}
public void setMhData(MhData data)
{
mhData=data;
updateTable();
}
}
This diff is collapsed.
/*
* Proview $Id: FlowAnnot.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class FlowAnnot implements FlowArrayElem {
FlowPoint p;
int draw_type;
int text_size;
int display_level;
int annot_type;
int number;
FlowCmn cmn;
public FlowAnnot( FlowCmn cmn) {
this.cmn = cmn;
p = new FlowPoint(cmn);
}
public void open( BufferedReader reader) {
String line;
StringTokenizer token;
boolean end = false;
try {
while( (line = reader.readLine()) != null) {
token = new StringTokenizer(line);
int key = new Integer(token.nextToken()).intValue();
if ( cmn.debug) System.out.println( "line : " + key);
switch ( key) {
case Flow.eSave_Annot:
break;
case Flow.eSave_Annot_number:
number = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_Annot_draw_type:
draw_type = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_Annot_text_size:
text_size = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_Annot_display_level:
display_level = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_Annot_p:
p.open( reader);
break;
case Flow.eSave_Annot_annot_type:
annot_type = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_End:
end = true;
break;
default:
System.out.println( "Syntax error in FlowAnnot");
break;
}
if ( end)
break;
}
} catch ( Exception e) {
System.out.println( "IOExeption FlowAnnot");
}
}
public void draw( Graphics2D g, FlowPoint p0, String[] annotv, boolean highlight) {
if ( annotv[number] == null)
return;
if ( (display_level & cmn.display_level) == 0)
return;
int tsize;
int idx = (int)(cmn.zoom_factor / cmn.base_zoom_factor * (text_size +4) - 4);
if ( idx < 0) return;
// if ( idx > 8)
// idx = 8;
switch( idx) {
case 0: tsize = 8; break;
case 1: tsize = 10; break;
case 2: tsize = 12; break;
case 3: tsize = 14; break;
case 4: tsize = 14; break;
case 5: tsize = 18; break;
case 6: tsize = 18; break;
case 7: tsize = 18; break;
default: tsize = idx * 3;
}
tsize -= tsize/5;
Font f;
switch ( draw_type) {
case Flow.eDrawType_TextHelveticaBold:
f = new Font("Helvetica", Font.BOLD, tsize);
break;
default:
f = new Font("Helvetica", Font.PLAIN, tsize);
}
char[] c = new char[] { 10 };
StringTokenizer token = new StringTokenizer( annotv[number], new String(c));
g.setColor( Color.black);
if ( highlight)
g.setColor( Color.red);
g.setFont( f);
float x = (float)((p.x + p0.x) * cmn.zoom_factor);
float y = (float)((p.y + p0.y) * cmn.zoom_factor - tsize/4);
while ( token.hasMoreTokens()) {
g.drawString( token.nextToken(), x, y);
y += f.getSize2D() * 1.4;
}
}
}
/*
* Proview $Id: FlowArc.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class FlowArc implements FlowArrayElem {
FlowPoint ll;
FlowPoint ur;
double angel1;
double angel2;
int draw_type;
int line_width;
FlowCmn cmn;
public FlowArc( FlowCmn cmn) {
this.cmn = cmn;
ll = new FlowPoint(cmn);
ur = new FlowPoint(cmn);
}
public void open( BufferedReader reader) {
String line;
StringTokenizer token;
boolean end = false;
try {
while( (line = reader.readLine()) != null) {
token = new StringTokenizer(line);
int key = new Integer(token.nextToken()).intValue();
if ( cmn.debug) System.out.println( "line : " + key);
switch ( key) {
case Flow.eSave_Arc:
break;
case Flow.eSave_Arc_draw_type:
draw_type = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_Arc_line_width:
line_width = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_Arc_angel1:
angel1 = new Double(token.nextToken()).doubleValue();
break;
case Flow.eSave_Arc_angel2:
angel2 = new Double(token.nextToken()).doubleValue();
break;
case Flow.eSave_Arc_ll:
ll.open( reader);
break;
case Flow.eSave_Arc_ur:
ur.open( reader);
break;
case Flow.eSave_End:
end = true;
break;
default:
System.out.println( "Syntax error in FlowArc");
break;
}
if ( end)
break;
}
} catch ( Exception e) {
System.out.println( "IOExeption FlowArc");
}
}
public void draw( Graphics2D g, FlowPoint p, String[] annotv, boolean highlight) {
Arc2D.Double rect = new Arc2D.Double( (ll.x + p.x) * cmn.zoom_factor,
(ll.y + p.y) * cmn.zoom_factor,
(ur.x - ll.x) * cmn.zoom_factor,
(ur.y - ll.y) * cmn.zoom_factor,
angel1, angel2, Arc2D.OPEN);
g.setStroke( new BasicStroke( (float)(cmn.zoom_factor / cmn.base_zoom_factor * line_width)));
g.setColor( Color.black);
if ( highlight)
g.setColor( Color.red);
g.draw( rect);
}
}
/*
* Proview $Id: FlowArray.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class FlowArray {
Vector a = new Vector();
FlowCmn cmn;
public FlowArray( FlowCmn cmn) {
this.cmn = cmn;
}
public void open( BufferedReader reader) {
String line;
StringTokenizer token;
boolean end = false;
try {
while( (line = reader.readLine()) != null) {
token = new StringTokenizer(line);
int key = new Integer(token.nextToken()).intValue();
if ( cmn.debug) System.out.println( "line : " + key);
switch ( key) {
case Flow.eSave_Array:
break;
case Flow.eSave_Rect:
FlowRect rect = new FlowRect( cmn);
rect.open( reader);
a.add( rect);
break;
case Flow.eSave_Line:
FlowLine l = new FlowLine( cmn);
l.open( reader);
a.add( l);
break;
case Flow.eSave_Arc:
FlowArc arc = new FlowArc( cmn);
arc.open( reader);
a.add( arc);
break;
case Flow.eSave_Text:
FlowText text = new FlowText( cmn);
text.open( reader);
a.add( text);
break;
case Flow.eSave_ConPoint:
FlowConPoint cp = new FlowConPoint( cmn);
cp.open( reader);
a.add( cp);
break;
case Flow.eSave_Annot:
FlowAnnot annot = new FlowAnnot( cmn);
annot.open( reader);
a.add( annot);
break;
case Flow.eSave_Arrow:
FlowArrow arrow = new FlowArrow( cmn);
arrow.open( reader);
a.add( arrow);
break;
case Flow.eSave_Point:
FlowPoint point = new FlowPoint( cmn);
point.open( reader);
a.add( point);
break;
case Flow.eSave_End:
end = true;
break;
default:
System.out.println( "Syntax error in FlowArray");
break;
}
if ( end)
break;
}
} catch ( Exception e) {
System.out.println( "IOExeption FlowArray");
}
}
public void draw( Graphics2D g, FlowPoint p, String[] annotv, boolean highlight) {
for ( int i = 0; i < a.size(); i++) {
((FlowArrayElem)a.get(i)).draw( g, p, annotv, highlight);
}
}
public void draw( Graphics2D g, FlowPoint p, int size, boolean highlight) {
for ( int i = 0; i < size; i++) {
((FlowArrayElem)a.get(i)).draw( g, p, null, highlight);
}
}
}
/*
* Proview $Id: FlowArrayElem.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.awt.*;
import javax.swing.*;
public interface FlowArrayElem {
public void draw( Graphics2D g, FlowPoint p, String[] annotv, boolean highlight);
}
/*
* Proview $Id: FlowArrow.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class FlowArrow implements FlowArrayElem {
FlowPoint p1;
FlowPoint p2;
FlowPoint p_dest;
double arrow_width;
double arrow_length;
int draw_type;
int line_width;
FlowCmn cmn;
public FlowArrow( FlowCmn cmn) {
this.cmn = cmn;
p1 = new FlowPoint(cmn);
p2 = new FlowPoint(cmn);
p_dest = new FlowPoint(cmn);
}
public void open( BufferedReader reader) {
String line;
StringTokenizer token;
boolean end = false;
try {
while( (line = reader.readLine()) != null) {
token = new StringTokenizer(line);
int key = new Integer(token.nextToken()).intValue();
if ( cmn.debug) System.out.println( "line : " + key);
switch ( key) {
case Flow.eSave_Arrow:
break;
case Flow.eSave_Arrow_arrow_width:
arrow_width = new Double(token.nextToken()).doubleValue();
break;
case Flow.eSave_Arrow_arrow_length:
arrow_length = new Double(token.nextToken()).doubleValue();
break;
case Flow.eSave_Arrow_draw_type:
draw_type = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_Arrow_line_width:
line_width = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_Arrow_p_dest:
p_dest.open( reader);
break;
case Flow.eSave_Arrow_p1:
p1.open( reader);
break;
case Flow.eSave_Arrow_p2:
p2.open( reader);
break;
case Flow.eSave_End:
end = true;
break;
default:
System.out.println( "Syntax error in FlowArrow");
break;
}
if ( end)
break;
}
} catch ( Exception e) {
System.out.println( "IOExeption FlowArrow");
}
}
public void draw( Graphics2D g, FlowPoint p, String[] annotv, boolean highlight) {
Polygon pol = new Polygon( new int[] {
(int) ((p1.x + p.x) * cmn.zoom_factor),
(int) ((p2.x + p.x) * cmn.zoom_factor),
(int) ((p_dest.x + p.x) * cmn.zoom_factor),
(int) ((p1.x + p.x) * cmn.zoom_factor)},
new int[] {
(int) ((p1.y + p.y) * cmn.zoom_factor),
(int) ((p2.y + p.y) * cmn.zoom_factor),
(int) ((p_dest.y + p.y) * cmn.zoom_factor),
(int) ((p1.y + p.y) * cmn.zoom_factor)},
4);
switch ( draw_type) {
case Flow.eDrawType_LineGray:
g.setColor( Color.lightGray);
break;
case Flow.eDrawType_LineRed:
case Flow.eDrawType_LineDashedRed:
g.setColor( Color.red);
break;
case Flow.eDrawType_LineErase:
return;
default:
g.setColor( Color.black);
}
if ( highlight)
g.setColor( Color.red);
g.fill( pol);
}
}
/*
* Proview $Id: FlowCmn.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import jpwr.rt.*;
import java.io.*;
import java.util.*;
public class FlowCmn {
static final int display_level = Flow.mDisplayLevel_1;
boolean debug;
boolean antiAliasing;
Object ctx;
Gdh gdh;
JopSession session;
double zoom_factor;
double base_zoom_factor;
int offset_x;
int offset_y;
double x_right;
double x_left;
double y_high;
double y_low;
Vector a = new Vector();
Vector a_nc = new Vector();
Vector a_cc = new Vector();
public FlowCmn( Object ctx, Gdh gdh, JopSession session) {
this.ctx = ctx;
this.gdh = gdh;
this.session = session;
this.debug = false;
this.antiAliasing = true;
}
public void unselect() {
((FlowCtxInterface)ctx).unselect();
}
}
/*
* Proview $Id: FlowComponent.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
public interface FlowComponent {
public void setBounds();
public void setSelect( boolean select);
public boolean getSelect();
public String getTraceObject();
public String getName();
}
/*
* Proview $Id: FlowCon.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class FlowCon extends JComponent implements FlowComponent, JopDynamic {
double x_right;
double x_left;
double y_high;
double y_low;
FlowCmn cmn;
FlowConClass cc;
int p_num;
int l_num;
int a_num;
int arrow_num;
int ref_num;
double point_x[] = new double[8];
double point_y[] = new double[8];
FlowArray line_a;
FlowArray arc_a;
FlowArray arrow_a;
FlowArray ref_a;
String c_name;
String trace_object;
String trace_attribute;
int trace_attr_type;
int temporary_ref;
boolean highlight;
FlowCon( FlowCmn cmn) {
this.cmn = cmn;
line_a = new FlowArray(cmn);
arc_a = new FlowArray(cmn);
arrow_a = new FlowArray(cmn);
ref_a = new FlowArray(cmn);
}
public String getName() {
return c_name;
}
public String getTraceObject() {
return trace_object;
}
public void open( BufferedReader reader) {
String line;
StringTokenizer token;
boolean end = false;
int i;
boolean found = false;
try {
while( (line = reader.readLine()) != null) {
token = new StringTokenizer(line);
int key = new Integer(token.nextToken()).intValue();
if ( cmn.debug) System.out.println( "line : " + key);
switch ( key) {
case Flow.eSave_Con:
break;
case Flow.eSave_Con_cc:
String cc_name = token.nextToken();
found = false;
for ( i = 0; i < cmn.a_cc.size(); i++) {
if ( ((FlowConClass)cmn.a_cc.get(i)).cc_name.equals( cc_name)) {
cc = (FlowConClass) cmn.a_cc.get(i);
found = true;
break;
}
}
if ( !found)
System.out.println( "FlowCon: ConClass not found: " + cc_name);
break;
case Flow.eSave_Con_c_name:
if ( token.hasMoreTokens())
c_name = token.nextToken();
else
c_name = new String();
break;
case Flow.eSave_Con_x_right:
x_right = new Double( token.nextToken()).doubleValue();
break;
case Flow.eSave_Con_x_left:
x_left = new Double( token.nextToken()).doubleValue();
break;
case Flow.eSave_Con_y_high:
y_high = new Double( token.nextToken()).doubleValue();
break;
case Flow.eSave_Con_y_low:
y_low = new Double( token.nextToken()).doubleValue();
break;
case Flow.eSave_Con_dest_node:
reader.readLine();
break;
case Flow.eSave_Con_source_node:
reader.readLine();
break;
case Flow.eSave_Con_dest_conpoint:
case Flow.eSave_Con_source_conpoint:
case Flow.eSave_Con_dest_direction:
case Flow.eSave_Con_source_direction:
break;
case Flow.eSave_Con_line_a:
line_a.open( reader);
break;
case Flow.eSave_Con_arc_a:
arc_a.open( reader);
break;
case Flow.eSave_Con_arrow_a:
arrow_a.open( reader);
break;
case Flow.eSave_Con_ref_a:
ref_a.open( reader);
break;
case Flow.eSave_Con_p_num:
p_num = new Integer( token.nextToken()).intValue();
break;
case Flow.eSave_Con_l_num:
l_num = new Integer( token.nextToken()).intValue();
break;
case Flow.eSave_Con_a_num:
a_num = new Integer( token.nextToken()).intValue();
break;
case Flow.eSave_Con_arrow_num:
arrow_num = new Integer( token.nextToken()).intValue();
break;
case Flow.eSave_Con_ref_num:
ref_num = new Integer( token.nextToken()).intValue();
break;
case Flow.eSave_Con_point_x:
for ( i = 0; i < p_num; i++)
point_x[i] = new Double( reader.readLine()).doubleValue();
break;
case Flow.eSave_Con_point_y:
for ( i = 0; i < p_num; i++)
point_y[i] = new Double( reader.readLine()).doubleValue();
break;
case Flow.eSave_Con_source_ref_cnt:
case Flow.eSave_Con_dest_ref_cnt:
break;
case Flow.eSave_Con_trace_object:
if ( token.hasMoreTokens())
trace_object = token.nextToken();
break;
case Flow.eSave_Con_trace_attribute:
if ( token.hasMoreTokens())
trace_attribute = token.nextToken();
break;
case Flow.eSave_Con_trace_attr_type:
trace_attr_type = new Integer( token.nextToken()).intValue();
break;
case Flow.eSave_Con_temporary_ref:
temporary_ref = new Integer( token.nextToken()).intValue();
break;
case Flow.eSave_End:
end = true;
break;
default:
System.out.println( "Syntax error in FlowCon");
break;
}
if ( end)
break;
}
} catch ( Exception e) {
System.out.println( "IOExeption FlowCon");
}
}
public void setBounds() {
// Make extra space for arrows witch is not included in rectangel
int x = (int)((x_left - cmn.x_left) * cmn.zoom_factor) - 3 * Flow.DRAWOFFSET;
int y = (int)((y_low - cmn.y_low) * cmn.zoom_factor) - 3 * Flow.DRAWOFFSET;
int width = (int)((x_right - x_left) * cmn.zoom_factor) + 6 * Flow.DRAWOFFSET;
int height = (int)((y_high - y_low) * cmn.zoom_factor) + 6 * Flow.DRAWOFFSET;
setBounds( x, y, width, height);
}
public boolean getSelect() {
return false;
}
public void setSelect( boolean select) {
}
public void paintComponent( Graphics g1) {
Graphics2D g = (Graphics2D) g1;
if ( cmn.antiAliasing)
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
// Adjust pos to javabean koordinates
FlowPoint p = new FlowPoint(cmn);
p.x = - x_left + ((double) (3 * Flow.DRAWOFFSET)) / cmn.zoom_factor;
p.y = - y_low + ((double) ( 3 * Flow.DRAWOFFSET)) / cmn.zoom_factor;
if ( temporary_ref != 0 || cc.con_type == Flow.eConType_Reference)
ref_a.draw( g, p, null, highlight);
else {
line_a.draw( g, p, l_num, highlight);
arc_a.draw( g, p, a_num, highlight);
arrow_a.draw( g, p, arrow_num, highlight);
}
}
public Object dynamicGetRoot() {
return null;
}
public void dynamicOpen() {
}
public void dynamicClose() {
}
public void dynamicUpdate( boolean animationOnly) {
}
}
/*
* Proview $Id: FlowConClass.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.io.*;
import java.util.*;
public class FlowConClass {
String cc_name;
int con_type;
int corner;
int draw_type;
int line_width;
double arrow_width;
double arrow_length;
double round_corner_amount;
int group;
FlowCmn cmn;
public FlowConClass( FlowCmn cmn) {
this.cmn = cmn;
}
public void open( BufferedReader reader) {
String line;
StringTokenizer token;
boolean end = false;
try {
while( (line = reader.readLine()) != null) {
token = new StringTokenizer(line);
int key = new Integer(token.nextToken()).intValue();
if ( cmn.debug) System.out.println( "line : " + key);
switch ( key) {
case Flow.eSave_ConClass:
break;
case Flow.eSave_ConClass_cc_name:
cc_name = token.nextToken();
break;
case Flow.eSave_ConClass_con_type:
con_type = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_ConClass_corner:
corner = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_ConClass_draw_type:
draw_type = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_ConClass_line_width:
line_width = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_ConClass_arrow_width:
arrow_width = new Double(token.nextToken()).doubleValue();
break;
case Flow.eSave_ConClass_arrow_length:
arrow_length = new Double(token.nextToken()).doubleValue();
break;
case Flow.eSave_ConClass_round_corner_amount:
round_corner_amount = new Double(token.nextToken()).doubleValue();
break;
case Flow.eSave_ConClass_group:
group = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_End:
end = true;
break;
default:
System.out.println( "Syntax error in FlowConClass");
break;
}
if ( end)
break;
}
} catch ( Exception e) {
System.out.println( "IOExeption FlowConClass");
}
}
}
/*
* Proview $Id: FlowConPoint.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class FlowConPoint implements FlowArrayElem {
FlowPoint p;
int number;
int direction;
String trace_attribute;
int trace_attr_type;
FlowCmn cmn;
public FlowConPoint( FlowCmn cmn) {
this.cmn = cmn;
p = new FlowPoint(cmn);
}
public void open( BufferedReader reader) {
String line;
StringTokenizer token;
boolean end = false;
try {
while( (line = reader.readLine()) != null) {
token = new StringTokenizer(line);
int key = new Integer(token.nextToken()).intValue();
if ( cmn.debug) System.out.println( "line : " + key);
switch ( key) {
case Flow.eSave_ConPoint:
break;
case Flow.eSave_ConPoint_number:
number = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_ConPoint_direction:
direction = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_ConPoint_p:
p.open( reader);
break;
case Flow.eSave_ConPoint_trace_attribute:
trace_attribute = reader.readLine();
break;
case Flow.eSave_ConPoint_trace_attr_type:
trace_attr_type = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_End:
end = true;
break;
default:
System.out.println( "Syntax error in FlowConPoint");
break;
}
if ( end)
break;
}
} catch ( Exception e) {
System.out.println( "IOExeption FlowConPoint");
}
}
public void draw( Graphics2D g, FlowPoint p, String[] annotv, boolean highlight) {
}
}
/*
* Proview $Id: FlowCtx.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.io.*;
import java.util.*;
import jpwr.rt.*;
public class FlowCtx implements FlowCtxInterface {
FlowCmn cmn;
String name;
public FlowCtx( Gdh gdh, JopSession session) {
cmn = new FlowCmn( this, gdh, session);
}
public void unselect() {
for ( int i = 0; i < cmn.a.size(); i++)
((FlowComponent)cmn.a.get(i)).setSelect( false);
}
public void open( BufferedReader reader) {
String line;
StringTokenizer token;
boolean end = false;
try {
while( (line = reader.readLine()) != null) {
token = new StringTokenizer(line);
int key = new Integer(token.nextToken()).intValue();
if ( cmn.debug) System.out.println( "line : " + key);
switch ( key) {
case Flow.eSave_Ctx:
break;
case Flow.eSave_Ctx_zoom_factor:
cmn.zoom_factor = new Double(token.nextToken()).doubleValue();
break;
case Flow.eSave_Ctx_base_zoom_factor:
cmn.base_zoom_factor = new Double(token.nextToken()).doubleValue();
break;
case Flow.eSave_Ctx_offset_x:
cmn.offset_x = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_Ctx_offset_y:
cmn.offset_y = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_Ctx_nav_zoom_factor:
case Flow.eSave_Ctx_print_zoom_factor:
case Flow.eSave_Ctx_nav_offset_x:
case Flow.eSave_Ctx_nav_offset_y:
break;
case Flow.eSave_Ctx_x_right:
cmn.x_right = new Double(token.nextToken()).doubleValue();
break;
case Flow.eSave_Ctx_x_left:
cmn.x_left = new Double(token.nextToken()).doubleValue();
break;
case Flow.eSave_Ctx_y_high:
cmn.y_high = new Double(token.nextToken()).doubleValue();
break;
case Flow.eSave_Ctx_y_low:
cmn.y_low = new Double(token.nextToken()).doubleValue();
break;
case Flow.eSave_Ctx_nav_rect_ll_x:
case Flow.eSave_Ctx_nav_rect_ll_y:
case Flow.eSave_Ctx_nav_rect_ur_x:
case Flow.eSave_Ctx_nav_rect_ur_y:
case Flow.eSave_Ctx_nav_rect_hot:
break;
case Flow.eSave_Ctx_name:
name = token.nextToken();
break;
case Flow.eSave_Ctx_user_highlight:
case Flow.eSave_Ctx_grid_size_x:
case Flow.eSave_Ctx_grid_size_y:
case Flow.eSave_Ctx_grid_on:
case Flow.eSave_Ctx_draw_delta:
case Flow.eSave_Ctx_refcon_width:
case Flow.eSave_Ctx_refcon_height:
case Flow.eSave_Ctx_refcon_textsize:
case Flow.eSave_Ctx_refcon_linewidth:
break;
case Flow.eSave_Ctx_a_nc:
FlowVector.open( reader, cmn, cmn.a_nc);
break;
case Flow.eSave_Ctx_a_cc:
FlowVector.open( reader, cmn, cmn.a_cc);
break;
case Flow.eSave_Ctx_a:
FlowVector.open( reader, cmn, cmn.a);
break;
case Flow.eSave_End:
end = true;
break;
default:
System.out.println( "Syntax error in FlowCtx");
break;
}
if ( end)
break;
}
} catch ( Exception e) {
System.out.println( "IOExeption FlowCtx");
}
cmn.zoom_factor = cmn.base_zoom_factor;
}
Object getSelected() {
for ( int i = 0; i < cmn.a.size(); i++) {
if ( ((FlowComponent)cmn.a.get(i)).getSelect())
return cmn.a.get(i);
}
return null;
}
Object getObject( String name) {
for ( int i = 0; i < cmn.a.size(); i++) {
if ( ((FlowComponent)cmn.a.get(i)).getName().equalsIgnoreCase( name))
return cmn.a.get(i);
}
return null;
}
}
/*
* Proview $Id: FlowCtxInterface.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
public interface FlowCtxInterface {
public void unselect();
}
This diff is collapsed.
/*
* Proview $Id: FlowLine.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class FlowLine implements FlowArrayElem {
FlowPoint p1;
FlowPoint p2;
int draw_type;
int line_width;
FlowCmn cmn;
public FlowLine( FlowCmn cmn) {
this.cmn = cmn;
p1 = new FlowPoint(cmn);
p2 = new FlowPoint(cmn);
}
public void open( BufferedReader reader) {
String line;
StringTokenizer token;
boolean end = false;
try {
while( (line = reader.readLine()) != null) {
token = new StringTokenizer(line);
int key = new Integer(token.nextToken()).intValue();
if ( cmn.debug) System.out.println( "line : " + key);
switch ( key) {
case Flow.eSave_Line:
break;
case Flow.eSave_Line_draw_type:
draw_type = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_Line_line_width:
line_width = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_Line_p1:
p1.open( reader);
break;
case Flow.eSave_Line_p2:
p2.open( reader);
break;
case Flow.eSave_End:
end = true;
break;
default:
System.out.println( "Syntax error in FlowLine");
break;
}
if ( end)
break;
}
} catch ( Exception e) {
System.out.println( "IOExeption FlowLine");
}
}
public void draw( Graphics2D g, FlowPoint p, String[] annotv, boolean highlight) {
Line2D.Double line = new Line2D.Double( (p1.x + p.x) * cmn.zoom_factor,
(p1.y + p.y) * cmn.zoom_factor,
(p2.x + p.x) * cmn.zoom_factor,
(p2.y + p.y) * cmn.zoom_factor);
switch ( draw_type) {
case Flow.eDrawType_LineDashed:
case Flow.eDrawType_LineDashedRed:
g.setStroke( new BasicStroke( (float)(cmn.zoom_factor / cmn.base_zoom_factor * line_width),
BasicStroke.CAP_BUTT,
BasicStroke.JOIN_BEVEL, 0,
new float[] { 4F * line_width, 2F * line_width},
0));
break;
default:
g.setStroke( new BasicStroke( (float)(cmn.zoom_factor / cmn.base_zoom_factor * line_width)));
}
switch ( draw_type) {
case Flow.eDrawType_LineGray:
g.setColor( Color.lightGray);
break;
case Flow.eDrawType_LineRed:
case Flow.eDrawType_LineDashedRed:
g.setColor( Color.red);
break;
default:
g.setColor( Color.black);
}
if ( highlight)
g.setColor( Color.red);
g.draw( line);
}
}
/*
* Proview $Id: FlowNode.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import jpwr.rt.*;
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
import java.awt.event.*;
public class FlowNode extends JComponent implements FlowComponent, JopDynamic {
static final int OFFSET = 2;
double x_right;
double x_left;
double y_high;
double y_low;
FlowCmn cmn;
FlowNodeClass nc;
FlowPoint pos;
String n_name;
String annotv[] = new String[10];
int annotsize[] = new int[10];
String trace_object;
String trace_attribute;
int trace_attr_type;
Dimension size;
boolean highlight;
boolean select;
Component component;
public FlowNode( FlowCmn cmn) {
component = this;
this.cmn = cmn;
pos = new FlowPoint( cmn);
size = new Dimension(40,40); // .....todo
}
public boolean getSelect() {
return select;
}
public void setSelect( boolean select) {
boolean redraw = (this.select != select);
this.select = select;
if ( redraw)
repaint();
}
public String getName() {
return n_name;
}
public String getTraceObject() {
return trace_object;
}
public void setHighlight( boolean highlight) {
boolean redraw = (this.highlight != highlight);
this.highlight = highlight;
if ( redraw)
repaint();
}
public void open( BufferedReader reader) {
String line;
StringTokenizer token;
boolean end = false;
boolean found = false;
int i;
try {
while( (line = reader.readLine()) != null) {
token = new StringTokenizer(line);
int key = new Integer(token.nextToken()).intValue();
if ( cmn.debug) System.out.println( "line : " + line);
switch ( key) {
case Flow.eSave_Node_nc:
String nc_name = token.nextToken();
found = false;
for ( i = 0; i < cmn.a_nc.size(); i++) {
if ( ((FlowNodeClass)cmn.a_nc.get(i)).nc_name.equals( nc_name)) {
nc = (FlowNodeClass) cmn.a_nc.get(i);
found = true;
break;
}
}
if ( !found)
System.out.println( "FlowNode: NodeClass not found: " + nc_name);
break;
case Flow.eSave_Node_n_name:
if ( token.hasMoreTokens())
n_name = token.nextToken();
else
n_name = new String();
break;
case Flow.eSave_Node_refcon_cnt:
for ( i = 0; i < 32; i++)
reader.readLine();
break;
case Flow.eSave_Node_x_right:
x_right = new Double( token.nextToken()).doubleValue();
break;
case Flow.eSave_Node_x_left:
x_left = new Double( token.nextToken()).doubleValue();
break;
case Flow.eSave_Node_y_high:
y_high = new Double( token.nextToken()).doubleValue();
break;
case Flow.eSave_Node_y_low:
y_low = new Double( token.nextToken()).doubleValue();
break;
case Flow.eSave_Node_annotsize:
for ( i = 0; i < 10; i++) {
line = reader.readLine();
token = new StringTokenizer(line);
annotsize[i] = new Integer( token.nextToken()).intValue();
}
break;
case Flow.eSave_Node_annotv:
// Annotation are surrouded by quotes. A quote inside a
// annotation is preceded by a backslash. The size is calculated
// without backslashes
for ( i = 0; i < 10; i++) {
if ( annotsize[i] > 0) {
StringBuffer buf = new StringBuffer();
char c_old = 0;
char c;
reader.read();
for ( int j = 0; j < annotsize[i]; j++) {
c = (char) reader.read();
if ( c == '"') {
if ( c_old == '\\') {
buf.setLength( buf.length() - 1);
j--;
}
else
break;
}
buf.append(c);
c_old = c;
}
annotv[i] = new String( buf);
reader.readLine(); // Read linefeed
}
}
break;
case Flow.eSave_Node_pos:
pos.open( reader);
break;
case Flow.eSave_Node_trace_object:
if ( token.hasMoreTokens())
trace_object = token.nextToken();
break;
case Flow.eSave_Node_trace_attribute:
if ( token.hasMoreTokens())
trace_attribute = token.nextToken();
break;
case Flow.eSave_Node_trace_attr_type:
trace_attr_type = new Integer( token.nextToken()).intValue();
break;
case Flow.eSave_Node_obst_x_right:
case Flow.eSave_Node_obst_x_left:
case Flow.eSave_Node_obst_y_high:
case Flow.eSave_Node_obst_y_low:
break;
case Flow.eSave_End:
end = true;
break;
default:
System.out.println( "Syntax error in FlowNode");
break;
}
if ( end)
break;
}
} catch ( Exception e) {
System.out.println( "IOException FlowNode");
}
if ( nc.group == Flow.eNodeGroup_Common) {
this.addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
if ( e.isPopupTrigger()) {
new JopMethodsMenu( cmn.session, trace_object, JopUtility.TRACE,
component, e.getX(), e.getY());
return;
}
}
public void mousePressed(MouseEvent e) {
System.out.println( "Mouse event" + n_name);
if ( e.isPopupTrigger()) {
new JopMethodsMenu( cmn.session, trace_object, JopUtility.TRACE,
component, e.getX(), e.getY());
return;
}
if ( select) {
setSelect( false);
}
else {
cmn.unselect();
setSelect( true);
}
}
public void mouseClicked(MouseEvent e) {
// Detect double click
if ( e.getClickCount() == 2) {
if ( trace_object == null || trace_object.equals(""))
return;
cmn.session.openCrrFrame( trace_object);
}
}
});
}
}
public void setBounds() {
int x = (int)((x_left - cmn.x_left) * cmn.zoom_factor) - Flow.DRAWOFFSET;
int y = (int)((y_low - cmn.y_low) * cmn.zoom_factor) - Flow.DRAWOFFSET;
int width = (int)((x_right - x_left) * cmn.zoom_factor) + 2 * Flow.DRAWOFFSET;
int height = (int)((y_high - y_low) * cmn.zoom_factor) + 2 * Flow.DRAWOFFSET;
setBounds( x, y, width, height);
}
public void paintComponent( Graphics g1) {
Graphics2D g = (Graphics2D) g1;
if ( cmn.antiAliasing)
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
if ( select) {
// Draw blue background
Rectangle2D.Double rect = new Rectangle2D.Double( 0, 0,
(x_right - x_left) * cmn.zoom_factor + Flow.DRAWOFFSET * 2,
(y_high - y_low) * cmn.zoom_factor + Flow.DRAWOFFSET * 2);
g.setColor( new Color(230,230,255)); // Select color lightblue
g.fill( rect);
}
// Adjust pos to javabean koordinates
FlowPoint p = new FlowPoint(cmn);
p.x = pos.x - x_left + ((double) Flow.DRAWOFFSET) / cmn.zoom_factor;
p.y = pos.y - y_low + ((double) Flow.DRAWOFFSET) / cmn.zoom_factor;
nc.draw( g, p, annotv, highlight);
}
boolean attrFound;
PwrtRefId subid;
int refid;
boolean oldValue;
boolean firstScan;
public Object dynamicGetRoot() {
return null;
}
public void dynamicOpen() {
if ( trace_object == null || trace_attribute == null ||
trace_object.equals(""))
return;
if ( trace_attr_type != Flow.eTraceType_Boolean)
return;
String attrName = trace_object + "." + trace_attribute;
GdhrRefObjectInfo ret = cmn.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
attrFound = true;
refid = ret.id;
subid = ret.refid;
}
}
public void dynamicClose() {
if ( attrFound)
cmn.gdh.unrefObjectInfo( subid);
}
public void dynamicUpdate( boolean animationOnly) {
if ( attrFound) {
boolean value = cmn.gdh.getObjectRefInfoBoolean( refid);
if ( value != oldValue || firstScan) {
setHighlight( value);
oldValue = value;
}
}
}
public Dimension getPreferredSize() { return size;}
public Dimension getMinimumSize() { return size;}
}
/*
* Proview $Id: FlowNodeClass.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class FlowNodeClass {
FlowArray a;
String nc_name;
int group;
FlowCmn cmn;
public FlowNodeClass( FlowCmn cmn) {
this.cmn = cmn;
a = new FlowArray( cmn);
}
public void open( BufferedReader reader) {
String line;
StringTokenizer token;
boolean end = false;
try {
while( (line = reader.readLine()) != null) {
token = new StringTokenizer(line);
int key = new Integer(token.nextToken()).intValue();
if ( cmn.debug) System.out.println( "line : " + key);
switch ( key) {
case Flow.eSave_NodeClass_nc_name:
nc_name = token.nextToken();
break;
case Flow.eSave_NodeClass_a:
a.open( reader);
break;
case Flow.eSave_NodeClass_group:
group = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_End:
end = true;
break;
default:
System.out.println( "Syntax error in FlowNodeClass");
break;
}
if ( end)
break;
}
} catch ( Exception e) {
System.out.println( "IOExeption FlowNodeClass");
}
}
public void draw( Graphics2D g, FlowPoint p, String[] annotv, boolean highlight) {
a.draw( g, p, annotv, highlight);
}
}
/*
* Proview $Id: FlowPoint.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.io.*;
import java.util.*;
public class FlowPoint {
double x;
double y;
FlowCmn cmn;
public FlowPoint( FlowCmn cmn) {
this.cmn = cmn;
}
public void open( BufferedReader reader) {
String line;
StringTokenizer token;
boolean end = false;
try {
while( (line = reader.readLine()) != null) {
token = new StringTokenizer(line);
int key = new Integer(token.nextToken()).intValue();
if ( cmn.debug) System.out.println( "line : " + key);
switch ( key) {
case Flow.eSave_Point:
break;
case Flow.eSave_Point_x:
x = new Double(token.nextToken()).doubleValue();
break;
case Flow.eSave_Point_y:
y = new Double(token.nextToken()).doubleValue();
break;
case Flow.eSave_End:
end = true;
break;
default:
System.out.println("Syntax error in FlowPoint");
break;
}
if ( end)
break;
}
} catch ( Exception e) {
System.out.println( "IOExeption FlowRect");
}
}
}
/*
* Proview $Id: FlowRect.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class FlowRect implements FlowArrayElem {
FlowPoint ll;
FlowPoint ur;
int draw_type;
int line_width;
int display_level;
FlowCmn cmn;
public FlowRect( FlowCmn cmn) {
this.cmn = cmn;
ll = new FlowPoint(cmn);
ur = new FlowPoint(cmn);
}
public void open( BufferedReader reader) {
String line;
StringTokenizer token;
boolean end = false;
try {
while( (line = reader.readLine()) != null) {
token = new StringTokenizer(line);
int key = new Integer(token.nextToken()).intValue();
if ( cmn.debug) System.out.println( "line : " + key);
switch ( key) {
case Flow.eSave_Rect_draw_type:
draw_type = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_Rect_line_width:
line_width = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_Rect_display_level:
display_level = new Integer( token.nextToken()).intValue();
break;
case Flow.eSave_Rect_ll:
ll.open( reader);
break;
case Flow.eSave_Rect_ur:
ur.open( reader);
break;
case Flow.eSave_End:
end = true;
break;
default:
System.out.println( "Syntax error in FlowRect");
break;
}
if ( end)
break;
}
} catch ( Exception e) {
System.out.println( "IOExeption FlowRect");
}
}
public void draw( Graphics2D g, FlowPoint p, String[] annotv, boolean highlight) {
if ( (display_level & cmn.display_level) == 0)
return;
Rectangle2D.Double rect = new Rectangle2D.Double( (ll.x + p.x) * cmn.zoom_factor,
(ll.y + p.y) * cmn.zoom_factor,
(ur.x - ll.x) * cmn.zoom_factor,
(ur.y - ll.y) * cmn.zoom_factor);
g.setStroke( new BasicStroke( (float)(cmn.zoom_factor / cmn.base_zoom_factor * line_width)));
switch ( draw_type) {
case Flow.eDrawType_LineGray:
g.setColor( Color.lightGray);
break;
case Flow.eDrawType_LineRed:
case Flow.eDrawType_LineDashedRed:
g.setColor( Color.red);
break;
case Flow.eDrawType_LineErase:
return;
default:
g.setColor( Color.black);
}
if ( highlight)
g.setColor( Color.red);
g.draw( rect);
}
}
/*
* Proview $Id: FlowText.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class FlowText implements FlowArrayElem {
FlowPoint p;
int draw_type;
int text_size;
String text;
FlowCmn cmn;
public FlowText( FlowCmn cmn) {
this.cmn = cmn;
p = new FlowPoint(cmn);
}
public void open( BufferedReader reader) {
String line;
StringTokenizer token;
boolean end = false;
try {
while( (line = reader.readLine()) != null) {
token = new StringTokenizer(line);
int key = new Integer(token.nextToken()).intValue();
if ( cmn.debug) System.out.println( "line : " + key);
switch ( key) {
case Flow.eSave_Text:
break;
case Flow.eSave_Text_text_size:
text_size = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_Text_draw_type:
draw_type = new Integer(token.nextToken()).intValue();
break;
case Flow.eSave_Text_text:
text = token.nextToken();
break;
case Flow.eSave_Text_p:
p.open( reader);
break;
case Flow.eSave_End:
end = true;
break;
default:
System.out.println( "Syntax error in FlowText");
break;
}
if ( end)
break;
}
} catch ( Exception e) {
System.out.println( "IOExeption FlowText");
}
}
public void draw( Graphics2D g, FlowPoint p0, String[] annotv, boolean highlight) {
int tsize;
int idx = (int)(cmn.zoom_factor / cmn.base_zoom_factor * (text_size +4) - 4);
if ( idx < 0) return;
// if ( idx > 8)
// idx = 8;
switch( idx) {
case 0: tsize = 8; break;
case 1: tsize = 10; break;
case 2: tsize = 12; break;
case 3: tsize = 14; break;
case 4: tsize = 14; break;
case 5: tsize = 18; break;
case 6: tsize = 18; break;
case 7: tsize = 18; break;
default: tsize = 3 * idx;
}
tsize -= tsize/5;
Font f = new Font("Helvetica", Font.BOLD, tsize);
g.setColor( Color.black);
if ( highlight)
g.setColor( Color.red);
g.setFont( f);
g.drawString( text, (float)((p.x + p0.x) * cmn.zoom_factor), (float)((p.y + p0.y) * cmn.zoom_factor) - tsize/4);
}
}
/*
* Proview $Id: FlowVector.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.io.*;
import java.util.*;
public class FlowVector {
public FlowVector() {
}
public static void open( BufferedReader reader, FlowCmn cmn, Vector a) {
String line;
StringTokenizer token;
boolean end = false;
try {
while( (line = reader.readLine()) != null) {
token = new StringTokenizer(line);
int key = new Integer(token.nextToken()).intValue();
if ( cmn.debug) System.out.println( "line : " + key);
switch ( key) {
case Flow.eSave_Array:
break;
case Flow.eSave_NodeClass:
FlowNodeClass nc = new FlowNodeClass( cmn);
nc.open( reader);
a.add( nc);
break;
case Flow.eSave_ConClass:
FlowConClass cc = new FlowConClass( cmn);
cc.open( reader);
a.add( cc);
break;
case Flow.eSave_Node:
FlowNode n = new FlowNode( cmn);
n.open( reader);
a.add( n);
break;
case Flow.eSave_Con:
FlowCon c = new FlowCon( cmn);
c.open( reader);
a.add( c);
break;
case Flow.eSave_End:
end = true;
break;
default:
System.out.println( "Syntax error in FlowVector");
break;
}
if ( end)
break;
}
} catch ( Exception e) {
System.out.println( "IOExeption FlowVector");
}
}
}
/*
* Proview $Id: Ge.java,v 1.4 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
public class Ge {
// Directions
public static final int DIRECTION_CENTER = 0;
public static final int DIRECTION_RIGHT = 1;
public static final int DIRECTION_LEFT = 2;
public static final int DIRECTION_UP = 3;
public static final int DIRECTION_DOWN = 4;
public static final int VISIBILITY_VISIBLE = 0;
public static final int VISIBILITY_INVISIBLE = 1;
public static final int VISIBILITY_DIMMED = 2;
public static final float cJBean_Offset = 2;
}
/*
* Proview $Id: GeCFormat.java,v 1.5 2005-09-12 10:48:00 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.text.*;
public class GeCFormat {
public GeCFormat( String format) {
int f_idx, p_idx;
try {
if ( (f_idx = format.indexOf('f')) != -1) {
format_type = FRM_F;
p_idx = format.indexOf('.');
if ( format.charAt(1) == '-')
no_space = 1;
if ( p_idx == -1) {
d = 0;
h = Integer.valueOf(format.substring( 1+no_space, f_idx)).intValue();
}
else {
d = Integer.valueOf(format.substring( p_idx + 1, f_idx)).intValue();
h = Integer.valueOf(format.substring( 1+no_space, p_idx)).intValue();
}
}
else if ( (f_idx = format.indexOf('d')) != -1) {
format_type = FRM_D;
if ( format.charAt(1) == '-')
no_space = 1;
if ( f_idx-no_space != 1) {
h = Integer.valueOf(format.substring( 1+no_space, f_idx)).intValue();
}
else
h = 4;
}
else if ( (f_idx = format.indexOf('s')) != -1) {
format_type = FRM_S;
if ( format.charAt(1) == '-')
no_space = 1;
p_idx = format.indexOf('.');
if ( p_idx == -1) {
d = 0;
if ( f_idx == 1)
h = 0;
else
h = Integer.valueOf(format.substring( 1+no_space, f_idx)).intValue();
}
else {
d = 0;
h = Integer.valueOf(format.substring( 1+no_space, p_idx)).intValue();
}
}
else if ( (f_idx = format.indexOf('o')) != -1) {
if ( f_idx >= 1 && format.charAt(f_idx-1) == '1')
format_type = FRM_1O;
else if ( f_idx >= 1 && format.charAt(f_idx-1) == '2')
format_type = FRM_2O;
else
format_type = FRM_O;
}
else if ( (f_idx = format.indexOf('t')) != -1) {
if ( f_idx >= 1 && format.charAt(f_idx-1) == '1')
format_type = FRM_1T;
else if ( f_idx >= 1 && format.charAt(f_idx-1) == '2')
format_type = FRM_2T;
else if ( f_idx >= 1 && format.charAt(f_idx-1) == '3')
format_type = FRM_3T;
else
format_type = FRM_T;
}
else if ( (f_idx = format.indexOf('m')) != -1) {
if ( f_idx >= 1 && format.charAt(f_idx-1) == '1')
format_type = FRM_1M;
else
format_type = FRM_M;
}
}
catch ( NumberFormatException e) {
System.out.println( "NumberFormatException: " + format);
h = -1;
}
}
int d;
int h;
int no_space = 0;
int format_type;
public static final int FRM_S = 0; // String
public static final int FRM_O = 1; // Objid object name
public static final int FRM_1O = 2; // Objid path
public static final int FRM_2O = 3; // Objid volume and path
public static final int FRM_T = 4; // Time, date and time
public static final int FRM_1T = 5; // Time, only time, no hundredth
public static final int FRM_2T = 6; // Time, only time with hundreth
public static final int FRM_3T = 7; // Time, commpressed date and time, no hundredth
public static final int FRM_M = 8; // Message
public static final int FRM_1M = 9; // Message, text only
public static final int FRM_D = 10; // Integer
public static final int FRM_F = 11; // Float
public int type() {
return format_type;
}
public StringBuffer format( float value, StringBuffer buff) {
int j, len;
int t2 = (int) value;
int m;
buff.setLength(0);
if ( h == -1)
return buff;
buff.append(t2);
len = buff.length();
if ( d > 0) {
if ( no_space == 0) {
for ( j = 0; j < h-d-1-len; j++)
buff.insert(0, " ");
}
buff.append(".");
m = 1;
for ( j = 0; j < d; j++)
m *= 10;
if(value >= 0.0)
t2 = (int)((value - (float)t2) * m + 0.5f);
else
t2 = (int)((value - (float)t2) * m - 0.5f);
t2 = Math.abs( t2);
for ( j = 0; j < d - Integer.toString(t2).length(); j++)
buff.append('0');
buff.append(t2);
}
else {
for ( j = 0; j < h-d-len; j++)
buff.insert(0," ");
}
return buff;
}
public StringBuffer format( int value, StringBuffer buff) {
int j, len;
int t2 = value;
if ( h == -1)
return buff;
buff.setLength(0);
buff.append(value);
len = buff.length();
for ( j = 0; j < h-len; j++)
buff.insert(0," ");
return buff;
}
public StringBuffer format( boolean value, StringBuffer buff) {
buff.setLength(0);
if ( value)
buff.append('1');
else
buff.append('0');
return buff;
}
public StringBuffer format( String value, StringBuffer buff) {
switch( format_type) {
case FRM_S: {
int j, len;
if ( h == -1)
return buff;
len = value.length();
if ( len > h && h != 0)
len = h;
buff.setLength(0);
for ( j = 0; j < len; j++)
buff.append(value.charAt(j));
return buff;
}
case FRM_O: {
int idx, j, len;
len = value.length();
idx = value.lastIndexOf('-');
if ( idx == -1)
idx = 0;
else
idx++;
buff.setLength(0);
for ( j = idx; j < len; j++)
buff.append(value.charAt(j));
return buff;
}
case FRM_1O:
case FRM_2O: {
int j, len;
len = value.length();
buff.setLength(0);
for ( j = 0; j < len; j++)
buff.append(value.charAt(j));
return buff;
}
case FRM_T:
case FRM_1T:
case FRM_2T:
case FRM_3T: {
int j, len;
len = value.length();
buff.setLength(0);
for ( j = 0; j < len; j++)
buff.append(value.charAt(j));
return buff;
}
case FRM_M:
case FRM_1M: {
int j, len;
len = value.length();
buff.setLength(0);
for ( j = 0; j < len; j++)
buff.append(value.charAt(j));
return buff;
}
}
buff.setLength(0);
return buff;
}
}
This diff is collapsed.
/*
* Proview $Id: GeColorBrightnessEditor.java,v 1.2 2005-09-01 14:57:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package jpwr.jop;
import java.beans.*;
/**
* Title:
* Description:
* Copyright: Copyright (c) 2000
* Company:
* @author CS
* @version 1.0
*/
public class GeColorBrightnessEditor extends PropertyEditorSupport {
public GeColorBrightnessEditor() {
}
private static String[] tagStrings = {
"Lighter",
"Darker",
"Reset",
};
public String[] getTags() {
return tagStrings;
}
public String getJavaInitializationString() {
return java.lang.String.valueOf(((Number)getValue()).intValue());
}
public void setAsText(String s) throws IllegalArgumentException {
int value = ((Number)getValue()).intValue();
if (s.equals("Lighter")) {
if ( ++value > 3)
value = 3;
setValue( new Integer(value));
}
else if (s.equals("Darker")) {
if ( --value < -3)
value = -3;
setValue( new Integer(value));
}
else if (s.equals("Reset")) {
setValue( new Integer(0));
}
else throw new IllegalArgumentException(s);
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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