|
From: <de...@us...> - 2010-10-22 22:06:32
|
Revision: 6001
http://fudaa.svn.sourceforge.net/fudaa/?rev=6001&view=rev
Author: deniger
Date: 2010-10-22 22:06:26 +0000 (Fri, 22 Oct 2010)
Log Message:
-----------
Modified Paths:
--------------
trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluTableExportAction.java
trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluTableExportPanel.java
trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/PopupMenuReceiver.java
Property Changed:
----------------
trunk/framework/ctulu-fu/
trunk/framework/ctulu-gis/
trunk/framework/ctulu-video/
trunk/framework/dodico-common/
trunk/framework/ebli-1d/
trunk/framework/ebli-2d/
trunk/framework/ebli-3d/
trunk/framework/ebli-common/
trunk/framework/fudaa-common-courbe/
trunk/framework/fudaa-common-save/
trunk/framework/fudaa-dico/server/
trunk/framework/fudaa-dico/ui/
Property changes on: trunk/framework/ctulu-fu
___________________________________________________________________
Modified: svn:ignore
- .classpath
.project
target
+ .classpath
.project
target
.settings
Property changes on: trunk/framework/ctulu-gis
___________________________________________________________________
Modified: svn:ignore
- .classpath
.project
target
+ .classpath
.project
target
.settings
Modified: trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluTableExportAction.java
===================================================================
--- trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluTableExportAction.java 2010-10-22 22:00:20 UTC (rev 6000)
+++ trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluTableExportAction.java 2010-10-22 22:06:26 UTC (rev 6001)
@@ -20,6 +20,7 @@
private final CtuluUI ui;
private final JTable table;
+ private char separator='\t';
/**
* @param ui
@@ -35,8 +36,22 @@
}
public void actionPerformed(ActionEvent e) {
- CtuluTableExportPanel.doExport(table, ui,CtuluLibSwing.getActiveWindow());
+ CtuluTableExportPanel.doExport(separator,table, ui,CtuluLibSwing.getActiveWindow());
}
+ /**
+ * @return the separator
+ */
+ public char getSeparator() {
+ return separator;
+ }
+
+ /**
+ * @param separator the separator to set
+ */
+ public void setSeparator(char separator) {
+ this.separator = separator;
+ }
+
}
Modified: trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluTableExportPanel.java
===================================================================
--- trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluTableExportPanel.java 2010-10-22 22:00:20 UTC (rev 6000)
+++ trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluTableExportPanel.java 2010-10-22 22:06:26 UTC (rev 6001)
@@ -33,7 +33,6 @@
import org.fudaa.ctulu.CsvWriter;
import org.fudaa.ctulu.CtuluLib;
-import org.fudaa.ctulu.CtuluLibArray;
import org.fudaa.ctulu.CtuluLibString;
import org.fudaa.ctulu.CtuluResource;
import org.fudaa.ctulu.CtuluTaskDelegate;
@@ -50,6 +49,8 @@
@SuppressWarnings("serial")
public final class CtuluTableExportPanel extends CtuluDialogPanel implements ItemListener {
+ private static final char DEFAULT_SEPARATOR = '\t';
+
JList cbModel_;
BuRadioButton cbOnlySelected_;
@@ -64,27 +65,44 @@
JDialog parentDial_;
- public static void showExportDialog(final JTable _table, final File _dest, final boolean _xsl, final CtuluUI _ui) {
+ char separator = '\t';
+
+ public static void showExportDialog(final char separator, final JTable _table, final File _dest, final boolean _xsl,
+ final CtuluUI _ui) {
showExportDialog(_table, _dest, _xsl, _ui, CtuluLibSwing.getFrameAncestor(_ui.getParentComponent()));
}
public static void showExportDialog(final JTable _table, final File _dest, final boolean _xsl, final CtuluUI _ui,
final Window windowParent) {
+ showExportDialog('\t', _table, _dest, _xsl, _ui, windowParent);
+ }
+
+ public static void showExportDialog(final char separator, final JTable _table, final File _dest, final boolean _xsl,
+ final CtuluUI _ui, final Window windowParent) {
final CtuluTableExportPanel pn = new CtuluTableExportPanel(_table, _dest, _xsl, _ui);
+ pn.separator = separator;
final CtuluDialog dial = CtuluDialogPanel.createDialog(windowParent, pn);
pn.setParentDial(dial);
dial.afficheDialogModal();
}
public static void doExport(final JTable _t, final CtuluUI _ui, final Window _f) {
+ doExport(DEFAULT_SEPARATOR, _t, _ui, _f);
+ }
+
+ public static void doExport(final char separator, final JTable _t, final CtuluUI _ui, final Window _f) {
final CtuluFileChooserCsvExcel choose = new CtuluFileChooserCsvExcel(_ui);
final File f = choose.getDestFile();
if (f == null) { return; }
- CtuluTableExportPanel.showExportDialog(_t, f, choose.isExcelChoosen(), _ui);
+ CtuluTableExportPanel.showExportDialog(separator, _t, f, choose.isExcelChoosen(), _ui);
}
+ public static void doExport(char separator, final JTable _t, final CtuluUI _ui) {
+ doExport(separator, _t, _ui, CtuluLibSwing.getFrameAncestor(_ui.getParentComponent()));
+ }
+
public static void doExport(final JTable _t, final CtuluUI _ui) {
- doExport(_t, _ui, CtuluLibSwing.getFrameAncestor(_ui.getParentComponent()));
+ doExport('\t', _t, _ui, CtuluLibSwing.getFrameAncestor(_ui.getParentComponent()));
}
@SuppressWarnings("serial")
@@ -185,7 +203,7 @@
final CtuluTableExcelWriter w = new CtuluTableExcelWriter(m, dest_);
w.write(task.getStateReceiver());
} else {
- final CtuluTableCsvWriter w = new CtuluTableCsvWriter(new CsvWriter(dest_), m);
+ final CtuluTableCsvWriter w = new CtuluTableCsvWriter(new CsvWriter(dest_), m,separator);
w.write(task.getStateReceiver());
}
} catch (final Exception e) {
Modified: trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/PopupMenuReceiver.java
===================================================================
--- trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/PopupMenuReceiver.java 2010-10-22 22:00:20 UTC (rev 6000)
+++ trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/PopupMenuReceiver.java 2010-10-22 22:06:26 UTC (rev 6001)
@@ -85,8 +85,8 @@
public void install(JComponent component, CtuluUI ui) {
this.ui=ui;
+ this.component = component;
assert this.component != null;
- this.component = component;
new CtuluPopupListener(this, component);
}
Property changes on: trunk/framework/ctulu-video
___________________________________________________________________
Modified: svn:ignore
- .classpath
.project
target
+ .classpath
.project
target
.settings
Property changes on: trunk/framework/dodico-common
___________________________________________________________________
Modified: svn:ignore
- .classpath
.project
target
+ .classpath
.project
target
.settings
Property changes on: trunk/framework/ebli-1d
___________________________________________________________________
Modified: svn:ignore
- .classpath
.project
target
+ .classpath
.project
target
.settings
Property changes on: trunk/framework/ebli-2d
___________________________________________________________________
Modified: svn:ignore
- .classpath
.project
target
+ .classpath
.project
target
.settings
Property changes on: trunk/framework/ebli-3d
___________________________________________________________________
Modified: svn:ignore
- .classpath
.project
target
.settings
+ .classpath
.project
target
Property changes on: trunk/framework/ebli-common
___________________________________________________________________
Modified: svn:ignore
- nb-configuration.xml
.classpath
.project
target
.settings
+ nb-configuration.xml
.classpath
.project
target
Property changes on: trunk/framework/fudaa-common-courbe
___________________________________________________________________
Modified: svn:ignore
- .classpath
.project
target
+ .classpath
.project
target
.settings
Property changes on: trunk/framework/fudaa-common-save
___________________________________________________________________
Modified: svn:ignore
- .classpath
.project
target
+ .classpath
.project
target
.settings
Property changes on: trunk/framework/fudaa-dico/server
___________________________________________________________________
Modified: svn:ignore
- target
.classpath
.project
+ target
.classpath
.project
.settings
Property changes on: trunk/framework/fudaa-dico/ui
___________________________________________________________________
Modified: svn:ignore
- target
.project
.classpath
+ target
.project
.classpath
.settings
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|