[Pixelle-commit] SF.net SVN: pixelle: [100] trunk/pixelle/src/com/mebigfatguy/pixelle/ actions/Tra
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2008-06-28 21:46:36
|
Revision: 100
http://pixelle.svn.sourceforge.net/pixelle/?rev=100&view=rev
Author: dbrosius
Date: 2008-06-28 14:46:45 -0700 (Sat, 28 Jun 2008)
Log Message:
-----------
new item
Added Paths:
-----------
trunk/pixelle/src/com/mebigfatguy/pixelle/actions/TransformNewWindowAction.java
Added: trunk/pixelle/src/com/mebigfatguy/pixelle/actions/TransformNewWindowAction.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/actions/TransformNewWindowAction.java (rev 0)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/actions/TransformNewWindowAction.java 2008-06-28 21:46:45 UTC (rev 100)
@@ -0,0 +1,51 @@
+/*
+ * 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.actions;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.ImageIcon;
+import javax.swing.JCheckBoxMenuItem;
+
+import com.mebigfatguy.pixelle.PixelleBundle;
+import com.mebigfatguy.pixelle.PixelleFrame;
+
+public class TransformNewWindowAction extends AbstractAction {
+ private static final long serialVersionUID = -906223935291758331L;
+ private static final String CHECKBOX_UNSELECTED_URL = "/com/mebigfatguy/pixelle/resources/checkboxunselected.png";
+ private static final String CHECKBOX_SELECTED_URL = "/com/mebigfatguy/pixelle/resources/checkbox_selected.png";
+
+ PixelleFrame frame;
+
+ public TransformNewWindowAction(PixelleFrame pf) {
+ super(PixelleBundle.getString(PixelleBundle.TRANSFORM_NEW_ITEM),
+ new ImageIcon(TransformNewWindowAction.class.getResource(CHECKBOX_SELECTED_URL)));
+ frame = pf;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ JCheckBoxMenuItem item = (JCheckBoxMenuItem)e.getSource();
+ boolean select = !item.isSelected();
+ item.setSelected(select);
+ item.setIcon(new ImageIcon(select ? TransformNewWindowAction.class.getResource(CHECKBOX_SELECTED_URL)
+ : TransformNewWindowAction.class.getResource(CHECKBOX_UNSELECTED_URL)));
+ }
+
+}
Property changes on: trunk/pixelle/src/com/mebigfatguy/pixelle/actions/TransformNewWindowAction.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.
|