Commit a7244567 authored by claes's avatar claes

Button for eventlog added to operator window menu

parent d6b0bc68
/* /*
* Proview $Id: JopOpWindow.java,v 1.6 2006-03-28 06:14:38 claes Exp $ * Proview $Id: JopOpWindow.java,v 1.7 2007-01-30 06:52:55 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
...@@ -83,6 +83,16 @@ public class JopOpWindow extends JPanel { ...@@ -83,6 +83,16 @@ public class JopOpWindow extends JPanel {
this.add( button); this.add( button);
} }
s = sret.str + ".EnableEventLog";
iret = en.gdh.getObjectInfoInt( s);
if ( iret.evenSts()) return;
if ( iret.value != 0) {
button = new OpWindButton( session, "", "Eventlog",
OpWindButton.EVENTLOG);
this.add( button);
}
s = sret.str + ".EnableNavigator"; s = sret.str + ".EnableNavigator";
iret = en.gdh.getObjectInfoInt( s); iret = en.gdh.getObjectInfoInt( s);
if ( iret.evenSts()) return; if ( iret.evenSts()) return;
...@@ -164,8 +174,9 @@ public class JopOpWindow extends JPanel { ...@@ -164,8 +174,9 @@ public class JopOpWindow extends JPanel {
public static final int LOGIN = 3; public static final int LOGIN = 3;
public static final int NAVIGATOR = 4; public static final int NAVIGATOR = 4;
public static final int ALARMLIST = 5; public static final int ALARMLIST = 5;
public static final int HELP = 6; public static final int EVENTLOG = 6;
public static final int PROVIEW = 7; public static final int HELP = 7;
public static final int PROVIEW = 8;
JopSession session; JopSession session;
String action; String action;
int type; int type;
...@@ -196,6 +207,9 @@ public class JopOpWindow extends JPanel { ...@@ -196,6 +207,9 @@ public class JopOpWindow extends JPanel {
case ALARMLIST: case ALARMLIST:
session.openAlarmList(); session.openAlarmList();
break; break;
case EVENTLOG:
session.openEventLog();
break;
case HELP: case HELP:
session.executeCommand("help index"); session.executeCommand("help index");
break; break;
......
/* /*
* Proview $Id: JopSession.java,v 1.4 2005-09-01 14:57:50 claes Exp $ * Proview $Id: JopSession.java,v 1.5 2007-01-30 06:52:55 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
...@@ -84,6 +84,10 @@ public class JopSession { ...@@ -84,6 +84,10 @@ public class JopSession {
((JopSessionIfc) sessionRep).openAlarmList(); ((JopSessionIfc) sessionRep).openAlarmList();
} }
public void openEventLog() {
((JopSessionIfc) sessionRep).openEventLog();
}
public void openLogin() { public void openLogin() {
((JopSessionIfc) sessionRep).openLogin(); ((JopSessionIfc) sessionRep).openLogin();
} }
......
/* /*
* Proview $Id: JopSessionIfc.java,v 1.4 2005-09-01 14:57:50 claes Exp $ * Proview $Id: JopSessionIfc.java,v 1.5 2007-01-30 06:52:55 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
...@@ -32,6 +32,7 @@ public interface JopSessionIfc { ...@@ -32,6 +32,7 @@ public interface JopSessionIfc {
public void removeUtility( Object utility); public void removeUtility( Object utility);
public void openNavigator( PwrtObjid oid); public void openNavigator( PwrtObjid oid);
public void openAlarmList(); public void openAlarmList();
public void openEventLog();
public void openLogin(); public void openLogin();
public void openGraphFrame( String name, String instance, boolean scrollbar, boolean classGraph); public void openGraphFrame( String name, String instance, boolean scrollbar, boolean classGraph);
public void openFlowFrame( PwrtObjid oid, String center); public void openFlowFrame( PwrtObjid oid, String center);
......
/* /*
* Proview $Id: JopSessionRep.java,v 1.9 2006-06-16 05:09:38 claes Exp $ * Proview $Id: JopSessionRep.java,v 1.10 2007-01-30 06:52:55 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
...@@ -30,6 +30,7 @@ public class JopSessionRep implements JopSessionIfc { ...@@ -30,6 +30,7 @@ public class JopSessionRep implements JopSessionIfc {
JopSession session; JopSession session;
XttTree navigator; XttTree navigator;
MhFrame alarmList; MhFrame alarmList;
HistSearch eventLog;
JopLoginFrame login; JopLoginFrame login;
//Vector<Object> frames = new Vector<Object>(); //Vector<Object> frames = new Vector<Object>();
Vector frames = new Vector(); Vector frames = new Vector();
...@@ -82,6 +83,19 @@ public class JopSessionRep implements JopSessionIfc { ...@@ -82,6 +83,19 @@ public class JopSessionRep implements JopSessionIfc {
} }
} }
public void openEventLog() {
if ( eventLog == null) {
eventLog = new HistSearch("", session);
eventLog.setVisible( true);
}
else {
eventLog.setVisible( true);
eventLog.setState(Frame.NORMAL);
eventLog.toFront();
// alarmList.requestFocus(); // Has no effect...
}
}
public void openLogin() { public void openLogin() {
if ( login == null) { if ( login == null) {
login = new JopLoginFrame( session); login = new JopLoginFrame( session);
......
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