[Pixelle-commit] SF.net SVN: pixelle: [155] trunk/pixelle/src/com/mebigfatguy/pixelle/ dialogs
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2008-07-08 04:02:26
|
Revision: 155
http://pixelle.svn.sourceforge.net/pixelle/?rev=155&view=rev
Author: dbrosius
Date: 2008-07-07 21:02:26 -0700 (Mon, 07 Jul 2008)
Log Message:
-----------
stub in the save algorithm dialog
Modified Paths:
--------------
trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/PixelleExpressionDialog.java
Added Paths:
-----------
trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/SaveAlgorithmDialog.java
Modified: trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/PixelleExpressionDialog.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/PixelleExpressionDialog.java 2008-07-08 03:48:00 UTC (rev 154)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/PixelleExpressionDialog.java 2008-07-08 04:02:26 UTC (rev 155)
@@ -81,6 +81,7 @@
new JLabel(PixelleBundle.getString(PixelleBundle.SELECTION_LABEL))
};
+ PixelleFrame frame;
JButton ok;
JButton cancel;
JButton reset;
@@ -92,6 +93,7 @@
public PixelleExpressionDialog(PixelleFrame owner) {
super(owner, PixelleBundle.getString(PixelleBundle.PIXEL_ALGORITHMS));
+ frame = owner;
initComponents();
initListeners();
}
@@ -206,6 +208,15 @@
}
});
+ save.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent ae) {
+ SaveAlgorithmDialog dialog = new SaveAlgorithmDialog(frame, null);
+ dialog.setLocationRelativeTo(frame);
+ dialog.setModal(true);
+ dialog.setVisible(true);
+ }
+ });
+
ok.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
clickedOK = true;
Added: trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/SaveAlgorithmDialog.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/SaveAlgorithmDialog.java (rev 0)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/SaveAlgorithmDialog.java 2008-07-08 04:02:26 UTC (rev 155)
@@ -0,0 +1,62 @@
+/*
+ * pixelle - Graphics algorithmic editor
+ * Copyright (C) 2008 Dave Brosius
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package com.mebigfatguy.pixelle.dialogs;
+
+import java.awt.BorderLayout;
+import java.awt.Container;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.util.Map;
+
+import javax.swing.JDialog;
+
+import com.mebigfatguy.pixelle.PixelleBundle;
+import com.mebigfatguy.pixelle.PixelleComponent;
+import com.mebigfatguy.pixelle.PixelleFrame;
+
+public class SaveAlgorithmDialog extends JDialog {
+
+ private Map<PixelleComponent, String> algorithm;
+
+ public SaveAlgorithmDialog(PixelleFrame owner, Map<PixelleComponent, String> algorithmToSave) {
+ super(owner, PixelleBundle.getString(PixelleBundle.SAVE_ALGORITHM));
+ algorithm = algorithmToSave;
+ initComponents();
+ initListeners();
+ }
+
+ private void initComponents() {
+ Container cp = getContentPane();
+ cp.setLayout(new BorderLayout(4, 4));
+
+ pack();
+ }
+
+ private void initListeners() {
+ setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent we) {
+ dispose();
+ }
+ });
+
+ }
+}
Property changes on: trunk/pixelle/src/com/mebigfatguy/pixelle/dialogs/SaveAlgorithmDialog.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|