Skip to content
Snippets Groups Projects
Commit 0c191ad9 authored by Arthur Coolen's avatar Arthur Coolen
Browse files

BugID: 604

This was the first OTB gui for the demo, has been replaced with the OTB
framework in OTB. Moved to the Attic.
parent 0c7183d6
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 4483 deletions
SUBDIRS=src test
include $(top_srcdir)/Makefile.common
#!/bin/sh
../../../autoconf_share/bootstrap ../../../autoconf_share
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<project name="GUI" default="default" basedir=".">
<description>Builds, tests, and runs the project GUI.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="GUI-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>
dnl
dnl Process this file with autoconf to produce a configure script.
dnl
AC_INIT
dnl AC_CONFIG_AUX_DIR(config)
dnl AM_CONFIG_HEADER(config/config.h)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(GUI, 1.0, no-define)
dnl Initialize for LOFAR (may set compilers)
lofar_INIT
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_YACC
AC_PROG_CC
AC_PROG_CXX
AM_PROG_LEX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_DISABLE_SHARED
AC_PROG_LIBTOOL
dnl Checks for libraries.
dnl dnl Replace `main' with a function in -lfl:
dnl AC_CHECK_LIB(fl, main)
dnl dnl Replace `main' with a function in -lcosev_r:
dnl AC_CHECK_LIB(cosev_r, main)
dnl dnl Replace `main' with a function in -lcosnm_r:
dnl AC_CHECK_LIB(cosnm_r, main)
dnl dnl Replace `main' with a function in -lorb_r:
dnl AC_CHECK_LIB(orb_r, main)
dnl dnl Replace `main' with a function in -lpthread:
dnl AC_CHECK_LIB(pthread, main)
dnl dnl Replace `main' with a function in -lvport_r:
dnl AC_CHECK_LIB(vport_r, main)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
dnl Checks for library functions.
AC_FUNC_VPRINTF
dnl
dnl Check for LOFAR specific things
dnl
lofar_GENERAL
dnl lofar_BLITZ
dnl lofar_MPI
dnl lofar_PACKAGE(LCS/Common)
dnl
dnl Output Makefiles
dnl
AC_OUTPUT(
src/Makefile
test/Makefile
Makefile
)
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
This diff is collapsed.
build.xml.data.CRC32=813fad3b
build.xml.script.CRC32=edd0f162
build.xml.stylesheet.CRC32=e2435cb5
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=813fad3b
nbproject/build-impl.xml.script.CRC32=fa8a9cf1
nbproject/build-impl.xml.stylesheet.CRC32=3b89b5a6
application.args=
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/GUI.jar
dist.javadoc.dir=${dist.dir}/javadoc
file.reference.build-classes=../jOTDB/build/classes
file.reference.GUI-src=src
file.reference.jOTDB-src=../jOTDB/src
file.reference.src-jOTDB=../jOTDB/src/jOTDB
jar.compress=false
javac.classpath=\
${libs.absolutelayout.classpath}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.source=${default.javac.source}
javac.target=${default.javac.target}
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
${libs.junit.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=gui.Main
manifest.file=manifest.mf
platform.active=default_platform
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
src.classes.dir=${file.reference.build-classes}
src.dir=${file.reference.GUI-src}
src.src.dir=${file.reference.jOTDB-src}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/2">
<name>GUI</name>
<minimum-ant-version>1.6</minimum-ant-version>
<source-roots>
<root id="src.classes.dir"/>
<root id="src.src.dir"/>
<root id="src.dir"/>
</source-roots>
<test-roots/>
</data>
</configuration>
</project>
// \ingroup OTB
// \defgroup GUI GUI Description
# if HAVE_SHMEM
# SUBDIRS = shmem .
# endif
INSTHDRS =
NOINSTHDRS =
TCCHDRS =
nobase_pkginclude_HEADERS = $(INSTHDRS) $(TCCHDRS)
noinst_HEADERS = $(NOINSTHDRS)
DOCHDRS = $(INSTHDRS) $(NOINSTHDRS)
lib_LTLIBRARIES = libgui.la
libgui_la_SOURCES =
# AM_YFLAGS = -d -p KeyParse
# AM_LFLAGS = -PKeyTokenize
# LEX_OUTPUT_ROOT = lex.KeyTokenize
# if HAVE_SHMEM
# libgui_la_LIBADD = shmem/libshmem.la
# endif
bin_PROGRAMS =
glishdir = $(libexecdir)/glish
dist_glish_SCRIPTS =
pythondir = $(bindir)
dist_python_SCRIPTS =
scriptdir = $(bindir)
dist_script_SCRIPTS =
include $(top_srcdir)/Makefile.common
/*
* LogTableModel.java
*
* Created on September 23, 2005, 11:55 AM
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package gui;
import jOTDB.jOTDBvalue;
import jOTDB.jTreeValueInterface;
import java.util.Vector;
import javax.swing.table.AbstractTableModel;
/**
*
* @author coolen
*/
public class LogTableModel extends AbstractTableModel {
String headers[] = {"Name","Value","TimeStamp"};
Object data[][];
boolean itsDebugFlag=false;
public void setDebugFlag(boolean aFlag) {
itsDebugFlag=aFlag;
}
public LogTableModel(jTreeValueInterface anInterface, Vector aLogList){
setLogList(anInterface, aLogList);
}
public int getRowCount() {
return data.length;
}
public String getColumnName(int c) {
return headers[c];
}
public int getColumnCount() {
return headers.length;
}
public Object getValueAt(int r, int c) {
return data[r][c];
}
public void setLogList(jTreeValueInterface aRemoteValue,Vector aLogList) {
data = new Object[aLogList.size()][headers.length];
for (int k=0; k< aLogList.size();k++) {
String [] aS=((jOTDBvalue)aLogList.elementAt(k)).name.split("[.]");
String aName=aS[aS.length-1];
data[k][0]=aName;
data[k][1]=((jOTDBvalue)aLogList.elementAt(k)).value;
data[k][2]=((jOTDBvalue)aLogList.elementAt(k)).time;
}
fireTableDataChanged();
}
}
/*
* Main.java
*
* Created on September 9, 2005, 2:21 PM
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package gui;
/**
*
* @author coolen
*/
public class Main {
/** Creates a new instance of Main */
public Main() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
otbgui aGui = new otbgui();
aGui.setSize(1280,1024);
aGui.setVisible(true);
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.0" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
<SyntheticProperties>
<SyntheticProperty name="formSizePolicy" type="int" value="2"/>
</SyntheticProperties>
<AuxValues>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout">
<Property name="useNullLayout" type="boolean" value="false"/>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="RMIServerNameLabel">
<Properties>
<Property name="text" type="java.lang.String" value="RMI Server Name"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
<AbsoluteConstraints x="20" y="20" width="-1" height="-1"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JTextField" name="RMIServerNameText">
<Properties>
<Property name="toolTipText" type="java.lang.String" value="give host(name or ip) where to find the RMI server"/>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JTextField(otbgui.RMIServerName);"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
<AbsoluteConstraints x="140" y="20" width="190" height="20"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JLabel" name="RMIServerPortLabel">
<Properties>
<Property name="text" type="java.lang.String" value="RMI Server Port"/>
<Property name="toolTipText" type="java.lang.String" value=""/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
<AbsoluteConstraints x="20" y="45" width="-1" height="-1"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JTextField" name="RMIServerPortText">
<Properties>
<Property name="toolTipText" type="java.lang.String" value="Port on RMI Server to use"/>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JTextField(otbgui.RMIServerPort);"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
<AbsoluteConstraints x="140" y="45" width="60" height="-1"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JLabel" name="RMIRegistryNameLabel">
<Properties>
<Property name="text" type="java.lang.String" value="RMI Registry Name"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
<AbsoluteConstraints x="20" y="70" width="-1" height="-1"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JTextField" name="RMIRegistryNameText">
<Properties>
<Property name="toolTipText" type="java.lang.String" value="Name used in Registry on Server for this port"/>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JTextField(otbgui.RMIRegistryName);"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
<AbsoluteConstraints x="140" y="70" width="190" height="-1"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JLabel" name="OTDBUserNameLabel">
<Properties>
<Property name="text" type="java.lang.String" value="OTDB UserName"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
<AbsoluteConstraints x="20" y="95" width="-1" height="-1"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JTextField" name="OTDBUserNameText">
<Properties>
<Property name="toolTipText" type="java.lang.String" value="UserName for OTDB Database"/>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JTextField(otbgui.OTDBUserName);"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
<AbsoluteConstraints x="140" y="95" width="190" height="-1"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JLabel" name="OTDBPasswordLabel">
<Properties>
<Property name="text" type="java.lang.String" value="OTDB Password"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
<AbsoluteConstraints x="20" y="120" width="-1" height="-1"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JPasswordField" name="OTDBPasswordText">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Tahoma" size="11" style="0"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="OTDB Database Password"/>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JPasswordField(otbgui.OTDBPassword);&#xa;"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
<AbsoluteConstraints x="140" y="120" width="190" height="-1"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JLabel" name="OTDBDBNameLabel">
<Properties>
<Property name="text" type="java.lang.String" value="OTDB DBName"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
<AbsoluteConstraints x="20" y="145" width="-1" height="-1"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JTextField" name="OTDBDBNameText">
<Properties>
<Property name="toolTipText" type="java.lang.String" value="OTDB Database Name"/>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JTextField(otbgui.OTDBDBName);"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
<AbsoluteConstraints x="140" y="145" width="190" height="-1"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="SettingsDialogOkButton">
<Properties>
<Property name="text" type="java.lang.String" value="Ok"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="SettingsDialogOkButtonActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
<AbsoluteConstraints x="20" y="200" width="-1" height="-1"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="SettingsDialogCancelButton">
<Properties>
<Property name="text" type="java.lang.String" value="Cancel"/>
<Property name="toolTipText" type="java.lang.String" value="Reset to Default and quit dialog"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="SettingsDialogCancelButtonActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
<AbsoluteConstraints x="70" y="200" width="-1" height="-1"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="SettingsDialogApplyButton">
<Properties>
<Property name="text" type="java.lang.String" value="Apply"/>
<Property name="toolTipText" type="java.lang.String" value="Apply the filled in values"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="SettingsDialogApplyButtonActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
<AbsoluteConstraints x="140" y="200" width="-1" height="-1"/>
</Constraint>
</Constraints>
</Component>
</SubComponents>
</Form>
/*
* SettingsDialog.java
*
* Created on 15 september 2005, 12:41
*/
package gui;
/**
*
* @author Arthur Coolen
*/
public class SettingsDialog extends javax.swing.JDialog {
/**
* Creates new form SettingsDialog
*/
public SettingsDialog() {
initComponents();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
RMIServerNameLabel = new javax.swing.JLabel();
RMIServerNameText = new javax.swing.JTextField(otbgui.RMIServerName);
RMIServerPortLabel = new javax.swing.JLabel();
RMIServerPortText = new javax.swing.JTextField(otbgui.RMIServerPort);
RMIRegistryNameLabel = new javax.swing.JLabel();
RMIRegistryNameText = new javax.swing.JTextField(otbgui.RMIRegistryName);
OTDBUserNameLabel = new javax.swing.JLabel();
OTDBUserNameText = new javax.swing.JTextField(otbgui.OTDBUserName);
OTDBPasswordLabel = new javax.swing.JLabel();
OTDBPasswordText = new javax.swing.JPasswordField(otbgui.OTDBPassword);
OTDBDBNameLabel = new javax.swing.JLabel();
OTDBDBNameText = new javax.swing.JTextField(otbgui.OTDBDBName);
SettingsDialogOkButton = new javax.swing.JButton();
SettingsDialogCancelButton = new javax.swing.JButton();
SettingsDialogApplyButton = new javax.swing.JButton();
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
RMIServerNameLabel.setText("RMI Server Name");
getContentPane().add(RMIServerNameLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, -1, -1));
RMIServerNameText.setToolTipText("give host(name or ip) where to find the RMI server");
getContentPane().add(RMIServerNameText, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 20, 190, 20));
RMIServerPortLabel.setText("RMI Server Port");
RMIServerPortLabel.setToolTipText("");
getContentPane().add(RMIServerPortLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 45, -1, -1));
RMIServerPortText.setToolTipText("Port on RMI Server to use");
getContentPane().add(RMIServerPortText, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 45, 60, -1));
RMIRegistryNameLabel.setText("RMI Registry Name");
getContentPane().add(RMIRegistryNameLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 70, -1, -1));
RMIRegistryNameText.setToolTipText("Name used in Registry on Server for this port");
getContentPane().add(RMIRegistryNameText, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 70, 190, -1));
OTDBUserNameLabel.setText("OTDB UserName");
getContentPane().add(OTDBUserNameLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 95, -1, -1));
OTDBUserNameText.setToolTipText("UserName for OTDB Database");
OTDBUserNameText.setEnabled(false);
getContentPane().add(OTDBUserNameText, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 95, 190, -1));
OTDBPasswordLabel.setText("OTDB Password");
getContentPane().add(OTDBPasswordLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 120, -1, -1));
OTDBPasswordText.setFont(new java.awt.Font("Tahoma", 0, 11));
OTDBPasswordText.setToolTipText("OTDB Database Password");
OTDBPasswordText.setEnabled(false);
getContentPane().add(OTDBPasswordText, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 120, 190, -1));
OTDBDBNameLabel.setText("OTDB DBName");
getContentPane().add(OTDBDBNameLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 145, -1, -1));
OTDBDBNameText.setToolTipText("OTDB Database Name");
OTDBDBNameText.setEnabled(false);
getContentPane().add(OTDBDBNameText, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 145, 190, -1));
SettingsDialogOkButton.setText("Ok");
SettingsDialogOkButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
SettingsDialogOkButtonActionPerformed(evt);
}
});
getContentPane().add(SettingsDialogOkButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 200, -1, -1));
SettingsDialogCancelButton.setText("Cancel");
SettingsDialogCancelButton.setToolTipText("Reset to Default and quit dialog");
SettingsDialogCancelButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
SettingsDialogCancelButtonActionPerformed(evt);
}
});
getContentPane().add(SettingsDialogCancelButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 200, -1, -1));
SettingsDialogApplyButton.setText("Apply");
SettingsDialogApplyButton.setToolTipText("Apply the filled in values");
SettingsDialogApplyButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
SettingsDialogApplyButtonActionPerformed(evt);
}
});
getContentPane().add(SettingsDialogApplyButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 200, -1, -1));
}
// </editor-fold>//GEN-END:initComponents
private void SettingsDialogApplyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SettingsDialogApplyButtonActionPerformed
otbgui.RMIServerName = RMIServerNameText.getText();
otbgui.RMIServerPort = RMIServerPortText.getText();
otbgui.RMIRegistryName= RMIRegistryNameText.getText();
otbgui.OTDBUserName = OTDBUserNameText.getText();
char[] duh = OTDBPasswordText.getPassword();
String aS = new String(duh);
otbgui.OTDBPassword= aS;
otbgui.OTDBDBName = OTDBDBNameText.getText();
}//GEN-LAST:event_SettingsDialogApplyButtonActionPerformed
private void SettingsDialogCancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SettingsDialogCancelButtonActionPerformed
RMIServerNameText.setText(otbgui.RMIServerName);
RMIServerPortText.setText(otbgui.RMIServerPort);
RMIRegistryNameText.setText(otbgui.RMIRegistryName);
OTDBUserNameText.setText(otbgui.OTDBUserName);
OTDBPasswordText.setText(otbgui.OTDBPassword);
OTDBDBNameText.setText(otbgui.OTDBDBName);
}//GEN-LAST:event_SettingsDialogCancelButtonActionPerformed
private void SettingsDialogOkButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SettingsDialogOkButtonActionPerformed
otbgui.RMIServerName = RMIServerNameText.getText();
otbgui.RMIServerPort = RMIServerPortText.getText();
otbgui.RMIRegistryName= RMIRegistryNameText.getText();
otbgui.OTDBUserName = OTDBUserNameText.getText();
char[] duh = OTDBPasswordText.getPassword();
String aS = new String(duh);
otbgui.OTDBPassword = aS;
otbgui.OTDBDBName = OTDBDBNameText.getText();
this.dispose();
}//GEN-LAST:event_SettingsDialogOkButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel OTDBDBNameLabel;
private javax.swing.JTextField OTDBDBNameText;
private javax.swing.JLabel OTDBPasswordLabel;
private javax.swing.JPasswordField OTDBPasswordText;
private javax.swing.JLabel OTDBUserNameLabel;
private javax.swing.JTextField OTDBUserNameText;
private javax.swing.JLabel RMIRegistryNameLabel;
private javax.swing.JTextField RMIRegistryNameText;
private javax.swing.JLabel RMIServerNameLabel;
private javax.swing.JTextField RMIServerNameText;
private javax.swing.JLabel RMIServerPortLabel;
private javax.swing.JTextField RMIServerPortText;
private javax.swing.JButton SettingsDialogApplyButton;
private javax.swing.JButton SettingsDialogCancelButton;
private javax.swing.JButton SettingsDialogOkButton;
// End of variables declaration//GEN-END:variables
}
This diff is collapsed.
This diff is collapsed.
/*
* treeModel.java
*
* Created on September 23, 2005, 11:55 AM
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package gui;
import jOTDB.jOTDBinterface;
import jOTDB.jOTDBtree;
import jOTDB.jConverterInterface;
import java.util.Vector;
import javax.swing.table.AbstractTableModel;
import java.rmi.Naming;
/**
*
* @author coolen
*/
public class treeModel extends AbstractTableModel {
boolean itsDebugFlag=false;
String headers[] = {"TreeID", "Creator", "CreationDate", "Classification",
"Type", "State", "MomID","Campaign", "Start Time", "Stop Time"};
Object data[][];
public void setDebugFlag(boolean aFlag) {
itsDebugFlag=aFlag;
}
public treeModel(jOTDBinterface aRemoteOTDB, Vector aTreeList){
setTreeList(aRemoteOTDB,aTreeList);
}
public int getRowCount() {
return data.length;
}
public String getColumnName(int c) {
return headers[c];
}
public int getColumnCount() {
return headers.length;
}
public Object getValueAt(int r, int c) {
return data[r][c];
}
public void setTreeList(jOTDBinterface aRemoteOTDB,Vector aTreeList) {
data = new Object[aTreeList.size()][headers.length];
try {
String aRMC="rmi://"+otbgui.RMIServerName+":"+otbgui.RMIServerPort+"/"+otbgui.RMIConverterName;
jConverterInterface types = (jConverterInterface) Naming.lookup (aRMC);
if (aTreeList.size() == 0) {
if (itsDebugFlag) System.out.println("Error:" + aRemoteOTDB.errorMsg());
} else {
if (itsDebugFlag) System.out.println("Collected tree list");
}
for (int k=0; k< aTreeList.size();k++) {
// if (itsDebugFlag) System.out.println("getTreeInfo(aTreeList.elementAt("+k+"),false)");
// Integer i = new Integer((Integer)aTreeList.elementAt(k));
// jOTDBtree tInfo = aRemoteOTDB.getTreeInfo(i.intValue(), false);
// if (tInfo.treeID()==0) {
// if (itsDebugFlag) System.out.println("No such tree found!");
// } else {
// if (itsDebugFlag) System.out.println("Gathered info for ID: "+tInfo.treeID());
jOTDBtree tInfo=(jOTDBtree) aTreeList.get(k);
data[k][0]=new Integer(tInfo.treeID());
data[k][1]=new String(tInfo.creator);
data[k][2]=new String(tInfo.creationDate);
data[k][3]=new String(types.getClassif(tInfo.classification));
data[k][4]=new String(types.getTreeType(tInfo.type));
data[k][5]=new String(types.getTreeState(tInfo.state));
data[k][6]=new Integer(tInfo.momID);
data[k][7]=new String(tInfo.campaign);
data[k][8]=new String(tInfo.starttime);
data[k][9]=new String(tInfo.stoptime);
// }
}
fireTableDataChanged();
}
catch (Exception e)
{
System.out.println ("Remote OTDB via RMI and JNI failed: " + e);
}
}
}
check_PROGRAMS =
# programs to run through supplied checktools
CHECKTOOLPROGS =
#ENDCHECKTOOLPROGS
TESTS =
XFAIL_TESTS =
TESTS_ENVIRONMENT = lofar_sharedir=$(lofar_sharedir)
include $(top_srcdir)/Makefile.common
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment