[Polycasso-commit] SF.net SVN: polycasso:[157] trunk/polycasso/src/com/mebigfatguy/polycasso/ JavaS
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2009-12-07 14:21:48
|
Revision: 157
http://polycasso.svn.sourceforge.net/polycasso/?rev=157&view=rev
Author: dbrosius
Date: 2009-12-07 14:21:37 +0000 (Mon, 07 Dec 2009)
Log Message:
-----------
complete the template
Added Paths:
-----------
trunk/polycasso/src/com/mebigfatguy/polycasso/JavaSaver.template
Copied: trunk/polycasso/src/com/mebigfatguy/polycasso/JavaSaver.template (from rev 155, trunk/polycasso/src/JavaSaver.template)
===================================================================
--- trunk/polycasso/src/com/mebigfatguy/polycasso/JavaSaver.template (rev 0)
+++ trunk/polycasso/src/com/mebigfatguy/polycasso/JavaSaver.template 2009-12-07 14:21:37 UTC (rev 157)
@@ -0,0 +1,55 @@
+/*
+ * polycasso - Cubism Artwork generator
+ * Copyright 2009 MeBigFatGuy.com
+ * Copyright 2009 Dave Brosius
+ * Inspired by work by Roger Alsing
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and limitations
+ * under the License.
+ */
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Container;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Polygon;
+
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+
+public class {0} {
+
+ public static void main(String[] args) {
+ JFrame frame = new JFrame() {
+ {
+ Container cp = getContentPane();
+ cp.add(new JPanel() {
+ @Override
+ public void paintComponent(Graphics g) {
+ super.paintComponent(g);
+ Graphics2D g2d = (Graphics2D) g;
+ g2d.setColor(Color.BLACK);
+ g2d.fillRect(0, 0, {1}, {2});
+ Polygon poly = new Polygon();
+ AlphaComposite composite;
+ Color color;
+{3}
+ }
+ });
+ pack();
+ }
+ };
+ frame.setSize({1}, {2} + 20);
+ frame.setLocationRelativeTo(null);
+ frame.setVisible(true);
+ }
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|