Revision: 4914
http://sourceforge.net/p/jump-pilot/code/4914
Author: ma15569
Date: 2016-05-14 06:36:10 +0000 (Sat, 14 May 2016)
Log Message:
-----------
small enhancement to HTMLPanel
Modified Paths:
--------------
core/trunk/src/com/vividsolutions/jump/workbench/ui/HTMLPanel.java
Modified: core/trunk/src/com/vividsolutions/jump/workbench/ui/HTMLPanel.java
===================================================================
--- core/trunk/src/com/vividsolutions/jump/workbench/ui/HTMLPanel.java
2016-05-07 13:55:26 UTC (rev 4913)
+++ core/trunk/src/com/vividsolutions/jump/workbench/ui/HTMLPanel.java
2016-05-14 06:36:10 UTC (rev 4914)
@@ -7,7 +7,9 @@
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.io.File;
+import java.text.SimpleDateFormat;
import java.util.ArrayList;
+import java.util.Calendar;
import javax.swing.JButton;
import javax.swing.JEditorPane;
@@ -30,6 +32,7 @@
private JScrollPane scrollPane = new JScrollPane();
private JEditorPane editorPane = new JEditorPane();
private int currentIndex = -1;
+ private JButton saveButton = new JButton();
public HTMLPanel() {
@@ -46,7 +49,11 @@
return recordPanel;
}
- public int getCurrentIndex() {
+ public JButton getSaveButton() {
+ return saveButton;
+ }
+
+ public int getCurrentIndex() {
return currentIndex;
}
@@ -121,7 +128,7 @@
editorPane.setContentType("text/html");
southPanel.setLayout(gridBagLayout1);
scrollPane
-
.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+
.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
okButton.setText("OK");
add(scrollPane, BorderLayout.CENTER);
@@ -140,7 +147,7 @@
* Giuseppe Aruta 2015_01_03
* Add Button to save view as HTML
*/
- JButton saveButton = new JButton(
+ saveButton = new JButton(
I18N.get("deejump.plugin.SaveLegendPlugIn.Save"));
//$NON-NLS-1$
saveButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
@@ -176,7 +183,10 @@
try {
String texto = history.get(currentIndex).toString();
- FileUtil.setContents(archivo.getAbsolutePath(), texto);
+ String timeStamp = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss")
+ .format(Calendar.getInstance().getTime());
+ String all = texto + "<B>" + timeStamp+"</B>";
+ FileUtil.setContents(archivo.getAbsolutePath(), all);
} catch (Exception e1) {
Logger.error(e1);
JUMPWorkbench
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel