Author: pedro.r.santos
Date: Mon Dec 22 03:24:01 2008
New Revision: 326
Modified:
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/S2O.java
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/bluetooth/S2OBTConnection.java
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/bluetooth/S2OBTConnectionTimeout. java
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OConnectingPopUp.form
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OConnectingPopUp.java
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OGUI.form
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OGUI.java
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OMessagePopUp.form
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OMessagePopUp.java
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/osc/S2OOscClient.java
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/osc/S2OOscListener.java
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/osc/S2OOscServer.java
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/parser/S2OSMSParser.java
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/util/S2OCommPortList.java
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/util/S2OProperties.java
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/util/S2OTableMouseAdapter.java
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/util/S2OTextAreaHandler.java
Log:
Versão final.
Correcções efectuadas
Modified: trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/S2O.java
=========================================================================== ===
--- trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/S2O.java (original)
+++ trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/S2O.java Mon Dec 22 03:24:01
2008
@@ -1,3 +1,28 @@
+/*
+ * DiABlu SMS2OSC
+ * Copyright (C) 2008-2009, CITAR (Research Centre for Science and
Technology in Art)
+ *
+ * This is part of the DiABlu Project, created by Jorge Cardoso -
http://diablu.jorgecardoso.eu
+ *
+ *
+ * Contributors:
+ * - Pedro Santos <psan...@porto.ucp.pt>
+ * - Jorge Cardoso <jccard...@porto.ucp.pt>
+ *
+ * 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 this program;
+ * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+
package pt.citar.diablu.sms2osc;
import java.io.IOException;
@@ -33,10 +58,13 @@
public Thread btConnectionThread;
public S2O() {
+
logger = Logger.getLogger("pt.citar.diablu.sms2osc");
commPortList = new S2OCommPortList();
properties = new S2OProperties(this);
+ logger.setLevel(properties.getLevel());
+
gui = new S2OGUI(this);
setupLogger();
@@ -59,11 +87,12 @@
}
private void setupLogger() {
- logger.setLevel(Level.ALL);
+
- textAreaHandler = new S2OTextAreaHandler(gui.getLogTextArea());
+ textAreaHandler = new S2OTextAreaHandler(this,
gui.getLogTextArea());
try {
- fileHandler = new FileHandler("logs.txt");
+ fileHandler = new FileHandler("logs.txt", true);
+
} catch (IOException ex) {
logger.log(Level.SEVERE, null, ex);
} catch (SecurityException ex) {
Modified:
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/bluetooth/S2OBTConnection.java
=========================================================================== ===
---
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/bluetooth/S2OBTConnection.java
(original)
+++
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/bluetooth/S2OBTConnection.java
Mon Dec 22 03:24:01 2008
@@ -1,3 +1,28 @@
+/*
+ * DiABlu SMS2OSC
+ * Copyright (C) 2008-2009, CITAR (Research Centre for Science and
Technology in Art)
+ *
+ * This is part of the DiABlu Project, created by Jorge Cardoso -
http://diablu.jorgecardoso.eu
+ *
+ *
+ * Contributors:
+ * - Pedro Santos <psan...@porto.ucp.pt>
+ * - Jorge Cardoso <jccard...@porto.ucp.pt>
+ *
+ * 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 this program;
+ * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+
package pt.citar.diablu.sms2osc.bluetooth;
import de.sciss.net.OSCMessage;
Modified:
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/bluetooth/S2OBTConnectionTimeout. java
=========================================================================== ===
---
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/bluetooth/S2OBTConnectionTimeout. java
(original)
+++
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/bluetooth/S2OBTConnectionTimeout. java
Mon Dec 22 03:24:01 2008
@@ -1,3 +1,27 @@
+/*
+ * DiABlu SMS2OSC
+ * Copyright (C) 2008-2009, CITAR (Research Centre for Science and
Technology in Art)
+ *
+ * This is part of the DiABlu Project, created by Jorge Cardoso -
http://diablu.jorgecardoso.eu
+ *
+ *
+ * Contributors:
+ * - Pedro Santos <psan...@porto.ucp.pt>
+ * - Jorge Cardoso <jccard...@porto.ucp.pt>
+ *
+ * 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 this program;
+ * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
package pt.citar.diablu.sms2osc.bluetooth;
import pt.citar.diablu.sms2osc.S2O;
Modified:
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OConnectingPopUp.form
=========================================================================== ===
--- trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OConnectingPopUp.form
(original)
+++ trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OConnectingPopUp.form
Mon Dec 22 03:24:01 2008
@@ -3,6 +3,7 @@
<Form version="1.3" maxVersion="1.7"
type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
<Properties>
<Property name="defaultCloseOperation" type="int" value="3"/>
+ <Property name="title" type="java.lang.String" value="DiABlu SMS2OSC"/>
</Properties>
<SyntheticProperties>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
@@ -43,7 +44,7 @@
<Component id="messageLabel" min="-2" max="-2"
attributes="0"/>
<EmptySpace pref="15" max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
- <Component id="cancelButton" alignment="3" min="-2"
max="-2" attributes="0"/>
+ <Component id="cancelButton" alignment="3" min="-2"
pref="23" max="-2" attributes="0"/>
<Component id="okButton" alignment="3" min="-2" max="-2"
attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
@@ -53,6 +54,9 @@
</Layout>
<SubComponents>
<Component class="javax.swing.JButton" name="cancelButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Cancel"/>
+ </Properties>
<Events>
<EventHandler event="actionPerformed"
listener="java.awt.event.ActionListener"
parameters="java.awt.event.ActionEvent"
handler="cancelButtonActionPerformed"/>
</Events>
Modified:
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OConnectingPopUp.java
=========================================================================== ===
--- trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OConnectingPopUp.java
(original)
+++ trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OConnectingPopUp.java
Mon Dec 22 03:24:01 2008
@@ -1,3 +1,26 @@
+/*
+ * DiABlu SMS2OSC
+ * Copyright (C) 2008-2009, CITAR (Research Centre for Science and
Technology in Art)
+ *
+ * This is part of the DiABlu Project, created by Jorge Cardoso -
http://diablu.jorgecardoso.eu
+ *
+ *
+ * Contributors:
+ * - Pedro Santos <psan...@porto.ucp.pt>
+ * - Jorge Cardoso <jccard...@porto.ucp.pt>
+ *
+ * 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 this program;
+ * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
package pt.citar.diablu.sms2osc.gui;
@@ -29,7 +52,9 @@
okButton = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+ setTitle("DiABlu SMS2OSC");
+ cancelButton.setText("Cancel");
cancelButton.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt) {
cancelButtonActionPerformed(evt);
@@ -67,7 +92,7 @@
.addComponent(messageLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
15,
Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASE LINE)
- .addComponent(cancelButton)
+ .addComponent(cancelButton,
javax.swing.GroupLayout.PREFERRED_SIZE, 23,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(okButton))
.addContainerGap())
);
Modified: trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OGUI.form
=========================================================================== ===
--- trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OGUI.form (original)
+++ trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OGUI.form Mon Dec 22
03:24:01 2008
@@ -7,6 +7,7 @@
</NonVisualComponents>
<Properties>
<Property name="defaultCloseOperation" type="int" value="3"/>
+ <Property name="title" type="java.lang.String" value="DiABlu SMS2OSC"/>
</Properties>
<SyntheticProperties>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
@@ -270,27 +271,25 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
- <Group type="102" alignment="0" attributes="0">
+ <Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0"
attributes="0">
- <Group type="102" attributes="0">
- <Component id="CommPortLabel" min="-2"
pref="70" max="-2" attributes="0"/>
- <EmptySpace max="-2" attributes="0"/>
- <Component id="CommPorts" min="-2"
pref="70" max="-2" attributes="0"/>
- </Group>
- <Group type="102" alignment="1"
attributes="0">
- <Component id="CommPortLabel1" min="-2"
pref="70" max="-2" attributes="0"/>
- <EmptySpace max="-2" attributes="0"/>
- <Component
id="BaudRateFormatedTextField" min="-2" pref="70" max="-2" attributes="0"/>
+ <Group type="103" alignment="0"
groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <Component id="CommPortLabel"
min="-2" pref="70" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="CommPorts" min="-2"
pref="70" max="-2" attributes="0"/>
+ </Group>
+ <Group type="102" alignment="1"
attributes="0">
+ <Component id="CommPortLabel1"
min="-2" pref="70" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component
id="BaudRateFormatedTextField" min="-2" pref="70" max="-2" attributes="0"/>
+ </Group>
</Group>
+ <Component id="Connect" alignment="1"
pref="144" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
- <Group type="102" alignment="1" attributes="0">
- <EmptySpace pref="73" max="32767"
attributes="0"/>
- <Component id="Connect" min="-2" pref="81"
max="-2" attributes="0"/>
- <EmptySpace max="-2" attributes="0"/>
- </Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
@@ -393,12 +392,8 @@
<SubComponents>
<Component class="javax.swing.JTable" name="SMSTable">
<Properties>
- <Property name="model"
type="javax.swing.table.TableModel"
editor="org.netbeans.modules.form.editors2.TableModelEditor">
- <Table columnCount="3" rowCount="20">
- <Column editable="false" title="Number"
type="java.lang.String"/>
- <Column editable="false" title="Direction"
type="java.lang.String"/>
- <Column editable="false" title="Message"
type="java.lang.String"/>
- </Table>
+ <Property name="model"
type="javax.swing.table.TableModel"
editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
+ <Connection code="new
javax.swing.table.DefaultTableModel(to,
 new String [] {

"Number", "Direction", "Message"

}
) {
 Class[] types = new Class [] {

java.lang.String.class, java.lang.String.class,
java.lang.String.class
 };
 boolean[] canEdit = new boolean
[] {
 false, false, false
 };

 public Class
getColumnClass(int columnIndex) {
 return types
[columnIndex];
 }

 public boolean isCellEditable(int
rowIndex, int columnIndex) {
 return canEdit
[columnIndex];
 }
}" type="code"/>
</Property>
<Property name="autoResizeMode" type="int" value="0"/>
<Property name="columnModel"
type="javax.swing.table.TableColumnModel"
editor="org.netbeans.modules.form.editors2.TableColumnModelEditor">
@@ -424,6 +419,9 @@
<TableHeader reorderingAllowed="false"
resizingAllowed="true"/>
</Property>
</Properties>
+ <AuxValues>
+ <AuxValue name="JavaCodeGenerator_InitCodePre"
type="java.lang.String" value="Object[][] to = new
Object[s2o.getProperties().getTableSize()][3];"/>
+ </AuxValues>
</Component>
</SubComponents>
</Container>
@@ -488,6 +486,9 @@
<Events>
<EventHandler event="actionPerformed"
listener="java.awt.event.ActionListener"
parameters="java.awt.event.ActionEvent"
handler="LevelComboBoxActionPerformed"/>
</Events>
+ <AuxValues>
+ <AuxValue name="JavaCodeGenerator_ListenersCodePost"
type="java.lang.String"
value="LevelComboBox.setSelectedItem(s2o.getProperties().getLevel().getName ());"/>
+ </AuxValues>
</Component>
</SubComponents>
</Container>
@@ -606,6 +607,47 @@
</Properties>
</Component>
<Component class="javax.swing.JTextField"
name="numberTextField">
+ </Component>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="AboutPanel">
+ <Constraints>
+ <Constraint
layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneS upportLayout"
value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupport Layout$JTabbedPaneConstraintsDescription">
+ <JTabbedPaneConstraints tabName="About">
+ <Property name="tabTitle" type="java.lang.String"
value="About"/>
+ </JTabbedPaneConstraints>
+ </Constraint>
+ </Constraints>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="Imagem" pref="634" max="32767"
attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="Imagem" pref="206" max="32767"
attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="Imagem">
+ <Properties>
+ <Property name="horizontalAlignment" type="int" value="0"/>
+ <Property name="text" type="java.lang.String"
value="Imagem"/>
+ </Properties>
+ <AccessibilityProperties>
+ <Property name="AccessibleContext.accessibleName"
type="java.lang.String" value="Imagem"/>
+ </AccessibilityProperties>
</Component>
</SubComponents>
</Container>
Modified: trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OGUI.java
=========================================================================== ===
--- trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OGUI.java (original)
+++ trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OGUI.java Mon Dec 22
03:24:01 2008
@@ -1,8 +1,31 @@
+/*
+ * DiABlu SMS2OSC
+ * Copyright (C) 2008-2009, CITAR (Research Centre for Science and
Technology in Art)
+ *
+ * This is part of the DiABlu Project, created by Jorge Cardoso -
http://diablu.jorgecardoso.eu
+ *
+ *
+ * Contributors:
+ * - Pedro Santos <psan...@porto.ucp.pt>
+ * - Jorge Cardoso <jccard...@porto.ucp.pt>
+ *
+ * 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 this program;
+ * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
package pt.citar.diablu.sms2osc.gui;
import de.sciss.net.OSCMessage;
import java.util.logging.Level;
-import javax.swing.JComboBox;
import javax.swing.JTable;
import javax.swing.JTextArea;
import pt.citar.diablu.sms2osc.*;
@@ -74,8 +97,11 @@
sendButton = new javax.swing.JButton();
numberLabel = new javax.swing.JLabel();
numberTextField = new javax.swing.JTextField();
+ AboutPanel = new javax.swing.JPanel();
+ Imagem = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+ setTitle("DiABlu SMS2OSC");
OSCPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("OSC"));
@@ -217,18 +243,16 @@
.addGroup(GatewayPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(GatewayPanelLayout.createParallelGroup(javax.swing.GroupLayout.Al ignment.LEADING)
- .addGroup(GatewayPanelLayout.createSequentialGroup()
- .addComponent(CommPortLabel,
javax.swing.GroupLayout.PREFERRED_SIZE, 70,
javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(CommPorts,
javax.swing.GroupLayout.PREFERRED_SIZE, 70,
javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
GatewayPanelLayout.createSequentialGroup()
- .addComponent(CommPortLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 70,
javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(BaudRateFormatedTextField,
javax.swing.GroupLayout.PREFERRED_SIZE, 70,
javax.swing.GroupLayout.PREFERRED_SIZE)))
- .addContainerGap())
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
GatewayPanelLayout.createSequentialGroup()
- .addContainerGap(73, Short.MAX_VALUE)
- .addComponent(Connect,
javax.swing.GroupLayout.PREFERRED_SIZE, 81,
javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGroup(GatewayPanelLayout.createParallelGroup(javax.swing.GroupLayout.Al ignment.LEADING)
+ .addGroup(GatewayPanelLayout.createSequentialGroup()
+ .addComponent(CommPortLabel,
javax.swing.GroupLayout.PREFERRED_SIZE, 70,
javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(CommPorts,
javax.swing.GroupLayout.PREFERRED_SIZE, 70,
javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
GatewayPanelLayout.createSequentialGroup()
+ .addComponent(CommPortLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 70,
javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(BaudRateFormatedTextField,
javax.swing.GroupLayout.PREFERRED_SIZE, 70,
javax.swing.GroupLayout.PREFERRED_SIZE)))
+ .addComponent(Connect,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, 144, Short.MAX_VALUE))
.addContainerGap())
);
GatewayPanelLayout.setVerticalGroup(
@@ -272,29 +296,8 @@
S2OTabbedPane.addTab("Connection", ConnectionPanel);
- SMSTable.setModel(new javax.swing.table.DefaultTableModel(
- new Object [][] {
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null},
- {null, null, null}
- },
+ Object[][] to = new Object[s2o.getProperties().getTableSize()][3];
+ SMSTable.setModel(new javax.swing.table.DefaultTableModel(to,
new String [] {
"Number", "Direction", "Message"
}
@@ -353,6 +356,7 @@
LevelComboBoxActionPerformed(evt);
}
});
+
LevelComboBox.setSelectedItem(s2o.getProperties().getLevel().getName());
javax.swing.GroupLayout logPannelLayout = new
javax.swing.GroupLayout(logPannel);
logPannel.setLayout(logPannelLayout);
@@ -448,6 +452,30 @@
S2OTabbedPane.addTab("Test", TestPanel);
+ Imagem.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
+ Imagem.setText("Imagem");
+
+ javax.swing.GroupLayout AboutPanelLayout = new
javax.swing.GroupLayout(AboutPanel);
+ AboutPanel.setLayout(AboutPanelLayout);
+ AboutPanelLayout.setHorizontalGroup(
+
AboutPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEAD ING)
+ .addGroup(AboutPanelLayout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(Imagem,
javax.swing.GroupLayout.DEFAULT_SIZE, 634, Short.MAX_VALUE)
+ .addContainerGap())
+ );
+ AboutPanelLayout.setVerticalGroup(
+
AboutPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEAD ING)
+ .addGroup(AboutPanelLayout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(Imagem,
javax.swing.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE)
+ .addContainerGap())
+ );
+
+ Imagem.getAccessibleContext().setAccessibleName("Imagem");
+
+ S2OTabbedPane.addTab("About", AboutPanel);
+
javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
@@ -494,6 +522,7 @@
private void LevelComboBoxActionPerformed(java.awt.event.ActionEvent evt)
{//GEN-FIRST:event_LevelComboBoxActionPerformed
s2o.getLogger().setLevel(Level.parse((String)
LevelComboBox.getSelectedItem()));
+ s2o.getProperties().setProperty("Level", (String)
LevelComboBox.getSelectedItem());
}//GEN-LAST:event_LevelComboBoxActionPerformed
private void sendButtonActionPerformed(java.awt.event.ActionEvent evt)
{//GEN-FIRST:event_sendButtonActionPerformed
@@ -517,6 +546,7 @@
}//GEN-LAST:event_inRadioButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JPanel AboutPanel;
private javax.swing.JFormattedTextField BaudRateFormatedTextField;
private javax.swing.JLabel CommPortLabel;
private javax.swing.JLabel CommPortLabel1;
@@ -524,6 +554,7 @@
private javax.swing.JButton Connect;
private javax.swing.JPanel ConnectionPanel;
private javax.swing.JPanel GatewayPanel;
+ private javax.swing.JLabel Imagem;
private javax.swing.JComboBox LevelComboBox;
private javax.swing.JButton OSCConnectButton;
private javax.swing.JPanel OSCPanel;
@@ -579,22 +610,22 @@
}
public void addMessageRow(String number, String direction, String
message) {
- if (rowNumber < 20) {
+ if (rowNumber < s2o.getProperties().getTableSize()) {
SMSTable.getModel().setValueAt(number, rowNumber, 0);
SMSTable.getModel().setValueAt(direction, rowNumber, 1);
SMSTable.getModel().setValueAt(message, rowNumber, 2);
SMSTable.changeSelection(rowNumber, 0, false, false);
rowNumber++;
} else {
- for (int i = 0; i < 19; i++) {
+ for (int i = 0; i < s2o.getProperties().getTableSize() - 1;
i++) {
SMSTable.getModel().setValueAt(SMSTable.getModel().getValueAt(i + 1, 0), i,
0);
SMSTable.getModel().setValueAt(SMSTable.getModel().getValueAt(i + 1, 1), i,
1);
SMSTable.getModel().setValueAt(SMSTable.getModel().getValueAt(i + 1, 2), i,
2);
}
- SMSTable.getModel().setValueAt(number, 19, 0);
- SMSTable.getModel().setValueAt(direction, 19, 1);
- SMSTable.getModel().setValueAt(message, 19, 2);
- SMSTable.changeSelection(19, 0, false, false);
+ SMSTable.getModel().setValueAt(number,
s2o.getProperties().getTableSize(), 0);
+ SMSTable.getModel().setValueAt(direction,
s2o.getProperties().getTableSize(), 1);
+ SMSTable.getModel().setValueAt(message,
s2o.getProperties().getTableSize(), 2);
+ SMSTable.changeSelection(s2o.getProperties().getTableSize(),
0, false, false);
rowNumber++;
}
}
Modified: trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OMessagePopUp.form
=========================================================================== ===
--- trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OMessagePopUp.form
(original)
+++ trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OMessagePopUp.form Mon
Dec 22 03:24:01 2008
@@ -3,6 +3,7 @@
<Form version="1.3" maxVersion="1.7"
type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
<Properties>
<Property name="defaultCloseOperation" type="int" value="3"/>
+ <Property name="title" type="java.lang.String" value="DiABlu SMS2OSC"/>
</Properties>
<SyntheticProperties>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
Modified: trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OMessagePopUp.java
=========================================================================== ===
--- trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OMessagePopUp.java
(original)
+++ trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/gui/S2OMessagePopUp.java Mon
Dec 22 03:24:01 2008
@@ -1,3 +1,27 @@
+/*
+ * DiABlu SMS2OSC
+ * Copyright (C) 2008-2009, CITAR (Research Centre for Science and
Technology in Art)
+ *
+ * This is part of the DiABlu Project, created by Jorge Cardoso -
http://diablu.jorgecardoso.eu
+ *
+ *
+ * Contributors:
+ * - Pedro Santos <psan...@porto.ucp.pt>
+ * - Jorge Cardoso <jccard...@porto.ucp.pt>
+ *
+ * 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 this program;
+ * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
package pt.citar.diablu.sms2osc.gui;
import javax.swing.JFrame;
@@ -23,6 +47,7 @@
direction = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+ setTitle("DiABlu SMS2OSC");
numberLabel.setText("Number :");
Modified: trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/osc/S2OOscClient.java
=========================================================================== ===
--- trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/osc/S2OOscClient.java
(original)
+++ trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/osc/S2OOscClient.java Mon Dec
22 03:24:01 2008
@@ -1,3 +1,27 @@
+/*
+ * DiABlu SMS2OSC
+ * Copyright (C) 2008-2009, CITAR (Research Centre for Science and
Technology in Art)
+ *
+ * This is part of the DiABlu Project, created by Jorge Cardoso -
http://diablu.jorgecardoso.eu
+ *
+ *
+ * Contributors:
+ * - Pedro Santos <psan...@porto.ucp.pt>
+ * - Jorge Cardoso <jccard...@porto.ucp.pt>
+ *
+ * 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 this program;
+ * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
package pt.citar.diablu.sms2osc.osc;
import de.sciss.net.OSCClient;
Modified: trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/osc/S2OOscListener.java
=========================================================================== ===
--- trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/osc/S2OOscListener.java
(original)
+++ trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/osc/S2OOscListener.java Mon
Dec 22 03:24:01 2008
@@ -1,3 +1,27 @@
+/*
+ * DiABlu SMS2OSC
+ * Copyright (C) 2008-2009, CITAR (Research Centre for Science and
Technology in Art)
+ *
+ * This is part of the DiABlu Project, created by Jorge Cardoso -
http://diablu.jorgecardoso.eu
+ *
+ *
+ * Contributors:
+ * - Pedro Santos <psan...@porto.ucp.pt>
+ * - Jorge Cardoso <jccard...@porto.ucp.pt>
+ *
+ * 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 this program;
+ * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
package pt.citar.diablu.sms2osc.osc;
Modified: trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/osc/S2OOscServer.java
=========================================================================== ===
--- trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/osc/S2OOscServer.java
(original)
+++ trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/osc/S2OOscServer.java Mon Dec
22 03:24:01 2008
@@ -1,3 +1,26 @@
+/*
+ * DiABlu SMS2OSC
+ * Copyright (C) 2008-2009, CITAR (Research Centre for Science and
Technology in Art)
+ *
+ * This is part of the DiABlu Project, created by Jorge Cardoso -
http://diablu.jorgecardoso.eu
+ *
+ *
+ * Contributors:
+ * - Pedro Santos <psan...@porto.ucp.pt>
+ * - Jorge Cardoso <jccard...@porto.ucp.pt>
+ *
+ * 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 this program;
+ * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
package pt.citar.diablu.sms2osc.osc;
Modified: trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/parser/S2OSMSParser.java
=========================================================================== ===
--- trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/parser/S2OSMSParser.java
(original)
+++ trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/parser/S2OSMSParser.java Mon
Dec 22 03:24:01 2008
@@ -1,3 +1,27 @@
+/*
+ * DiABlu SMS2OSC
+ * Copyright (C) 2008-2009, CITAR (Research Centre for Science and
Technology in Art)
+ *
+ * This is part of the DiABlu Project, created by Jorge Cardoso -
http://diablu.jorgecardoso.eu
+ *
+ *
+ * Contributors:
+ * - Pedro Santos <psan...@porto.ucp.pt>
+ * - Jorge Cardoso <jccard...@porto.ucp.pt>
+ *
+ * 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 this program;
+ * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
package pt.citar.diablu.sms2osc.parser;
import de.sciss.net.OSCMessage;
Modified:
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/util/S2OCommPortList.java
=========================================================================== ===
--- trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/util/S2OCommPortList.java
(original)
+++ trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/util/S2OCommPortList.java Mon
Dec 22 03:24:01 2008
@@ -1,3 +1,27 @@
+/*
+ * DiABlu SMS2OSC
+ * Copyright (C) 2008-2009, CITAR (Research Centre for Science and
Technology in Art)
+ *
+ * This is part of the DiABlu Project, created by Jorge Cardoso -
http://diablu.jorgecardoso.eu
+ *
+ *
+ * Contributors:
+ * - Pedro Santos <psan...@porto.ucp.pt>
+ * - Jorge Cardoso <jccard...@porto.ucp.pt>
+ *
+ * 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 this program;
+ * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
package pt.citar.diablu.sms2osc.util;
import java.util.Enumeration;
Modified: trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/util/S2OProperties.java
=========================================================================== ===
--- trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/util/S2OProperties.java
(original)
+++ trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/util/S2OProperties.java Mon
Dec 22 03:24:01 2008
@@ -1,3 +1,27 @@
+/*
+ * DiABlu SMS2OSC
+ * Copyright (C) 2008-2009, CITAR (Research Centre for Science and
Technology in Art)
+ *
+ * This is part of the DiABlu Project, created by Jorge Cardoso -
http://diablu.jorgecardoso.eu
+ *
+ *
+ * Contributors:
+ * - Pedro Santos <psan...@porto.ucp.pt>
+ * - Jorge Cardoso <jccard...@porto.ucp.pt>
+ *
+ * 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 this program;
+ * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
package pt.citar.diablu.sms2osc.util;
import java.io.File;
@@ -34,6 +58,9 @@
properties.setProperty("ComPort",
s2o.getCommPortList().getFirst());
properties.setProperty("UseLoopback", "true");
properties.setProperty("BaudRate", "57600");
+ properties.setProperty("Level", "SEVERE");
+ properties.setProperty("TableSize", "20");
+ properties.setProperty("LogSize", "20");
properties.store(fos, "SMS2OSC Configuration");
} catch (IOException ex) {
@@ -104,6 +131,18 @@
public String getCommandString(String command) {
return properties.getProperty(command, "");
+ }
+
+ public int getTableSize() {
+ return Integer.parseInt(properties.getProperty("TableSize", "20"));
+ }
+
+ public int getLogSize() {
+ return Integer.parseInt(properties.getProperty("LogSize", "20"));
+ }
+
+ public Level getLevel() {
+ return Level.parse(properties.getProperty("Level", "SEVERE"));
}
public void setProperty(String key, String value) {
Modified:
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/util/S2OTableMouseAdapter.java
=========================================================================== ===
---
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/util/S2OTableMouseAdapter.java
(original)
+++
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/util/S2OTableMouseAdapter.java
Mon Dec 22 03:24:01 2008
@@ -1,3 +1,27 @@
+/*
+ * DiABlu SMS2OSC
+ * Copyright (C) 2008-2009, CITAR (Research Centre for Science and
Technology in Art)
+ *
+ * This is part of the DiABlu Project, created by Jorge Cardoso -
http://diablu.jorgecardoso.eu
+ *
+ *
+ * Contributors:
+ * - Pedro Santos <psan...@porto.ucp.pt>
+ * - Jorge Cardoso <jccard...@porto.ucp.pt>
+ *
+ * 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 this program;
+ * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
package pt.citar.diablu.sms2osc.util;
import java.awt.Point;
Modified:
trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/util/S2OTextAreaHandler.java
=========================================================================== ===
--- trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/util/S2OTextAreaHandler.java
(original)
+++ trunk/SMS2OSC/src/pt/citar/diablu/sms2osc/util/S2OTextAreaHandler.java
Mon Dec 22 03:24:01 2008
@@ -1,19 +1,47 @@
+/*
+ * DiABlu SMS2OSC
+ * Copyright (C) 2008-2009, CITAR (Research Centre for Science and
Technology in Art)
+ *
+ * This is part of the DiABlu Project, created by Jorge Cardoso -
http://diablu.jorgecardoso.eu
+ *
+ *
+ * Contributors:
+ * - Pedro Santos <psan...@porto.ucp.pt>
+ * - Jorge Cardoso <jccard...@porto.ucp.pt>
+ *
+ * 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 this program;
+ * if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
package pt.citar.diablu.sms2osc.util;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
import java.util.Vector;
import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import javax.swing.JTextArea;
+import pt.citar.diablu.sms2osc.S2O;
public class S2OTextAreaHandler extends Handler {
- private static int MAXLOGS = 20;
private JTextArea textArea;
private Level level;
private Vector<LogRecord> logs;
+ S2O s2o;
- public S2OTextAreaHandler(JTextArea textArea) {
+ public S2OTextAreaHandler(S2O s2o, JTextArea textArea) {
+ this.s2o = s2o;
this.textArea = textArea;
logs = new Vector<LogRecord>();
this.level = Level.ALL;
@@ -22,7 +50,7 @@
@Override
public void publish(LogRecord record) {
- if (logs.size() == MAXLOGS) {
+ if (logs.size() == s2o.getProperties().getLogSize()) {
logs.remove(0);
}
if (level.intValue() <= record.getLevel().intValue()) {
@@ -33,7 +61,13 @@
if (i != 0) {
textArea.append("\n");
}
- textArea.append(logs.elementAt(i).getMessage());
+ LogRecord logRecord = logs.elementAt(i);
+
+ textArea.append(getTime(logRecord) + " ");
+ textArea.append(logRecord.getSourceClassName() + " ");
+ textArea.append(logRecord.getSourceMethodName() + "\n");
+ textArea.append(logRecord.getLevel().getName() + ": ");
+ textArea.append(logRecord.getMessage());
textArea.setCaretPosition(textArea.getText().length());
}
}
@@ -53,4 +87,14 @@
public void setLevel(Level level) {
this.level = level;
}
+
+ private String getTime(LogRecord logRecord)
+ {
+ Calendar cal = Calendar.getInstance();
+ cal.setTimeInMillis(logRecord.getMillis());
+ SimpleDateFormat df = new SimpleDateFormat("dd/MMM/yyyy HH:mm:ss");
+ return df.format(cal.getTime());
+ }
+
+
}