From 5c172f5750080967535e0574756442caa0699841 Mon Sep 17 00:00:00 2001 From: Dan Tracy Date: Tue, 30 Mar 2010 01:19:32 -0400 Subject: [PATCH] Added some simple painting applet --- applet.policy | 3 + build.xml | 148 +++--- build/ZbePaint.html | 28 ++ build/built-jar.properties | 2 + build/classes/.netbeans_automatic_build | 0 .../classes/zbecreate/ZbeCreateAboutBox.class | Bin build/classes/zbecreate/ZbeCreateApp.class | Bin build/classes/zbecreate/ZbeCreateView$1.class | Bin 881 -> 881 bytes build/classes/zbecreate/ZbeCreateView$2.class | Bin 1102 -> 1102 bytes build/classes/zbecreate/ZbeCreateView$3.class | Bin 2272 -> 2272 bytes build/classes/zbecreate/ZbeCreateView.class | Bin 8804 -> 9170 bytes .../classes/zbecreate/ZbePaint$Display.class | Bin 0 -> 6184 bytes build/classes/zbecreate/ZbePaint.class | Bin 0 -> 2276 bytes .../org.jdesktop.application.Application | 0 src/zbecreate/ZbeCreateAboutBox.form | 414 ++++++++--------- src/zbecreate/ZbeCreateAboutBox.java | 280 ++++++------ src/zbecreate/ZbeCreateApp.java | 88 ++-- src/zbecreate/ZbeCreateView.form | 15 +- src/zbecreate/ZbeCreateView.java | 420 +++++++++--------- src/zbecreate/ZbePaint.java | 381 ++++++++++++++++ .../resources/ZbeCreateAboutBox.properties | 28 +- .../resources/ZbeCreateApp.properties | 22 +- .../resources/ZbeCreateView.properties | 66 +-- src/zbecreate/resources/about.png | Bin .../resources/busyicons/busy-icon0.png | Bin .../resources/busyicons/busy-icon1.png | Bin .../resources/busyicons/busy-icon10.png | Bin .../resources/busyicons/busy-icon11.png | Bin .../resources/busyicons/busy-icon12.png | Bin .../resources/busyicons/busy-icon13.png | Bin .../resources/busyicons/busy-icon14.png | Bin .../resources/busyicons/busy-icon2.png | Bin .../resources/busyicons/busy-icon3.png | Bin .../resources/busyicons/busy-icon4.png | Bin .../resources/busyicons/busy-icon5.png | Bin .../resources/busyicons/busy-icon6.png | Bin .../resources/busyicons/busy-icon7.png | Bin .../resources/busyicons/busy-icon8.png | Bin .../resources/busyicons/busy-icon9.png | Bin .../resources/busyicons/idle-icon.png | Bin src/zbecreate/resources/splash.png | Bin 41 files changed, 1159 insertions(+), 736 deletions(-) create mode 100755 applet.policy mode change 100644 => 100755 build.xml create mode 100755 build/ZbePaint.html create mode 100755 build/built-jar.properties mode change 100644 => 100755 build/classes/.netbeans_automatic_build mode change 100644 => 100755 build/classes/zbecreate/ZbeCreateAboutBox.class mode change 100644 => 100755 build/classes/zbecreate/ZbeCreateApp.class mode change 100644 => 100755 build/classes/zbecreate/ZbeCreateView$1.class mode change 100644 => 100755 build/classes/zbecreate/ZbeCreateView$2.class mode change 100644 => 100755 build/classes/zbecreate/ZbeCreateView$3.class mode change 100644 => 100755 build/classes/zbecreate/ZbeCreateView.class create mode 100755 build/classes/zbecreate/ZbePaint$Display.class create mode 100755 build/classes/zbecreate/ZbePaint.class mode change 100644 => 100755 src/META-INF/services/org.jdesktop.application.Application mode change 100644 => 100755 src/zbecreate/ZbeCreateAboutBox.form mode change 100644 => 100755 src/zbecreate/ZbeCreateAboutBox.java mode change 100644 => 100755 src/zbecreate/ZbeCreateApp.java mode change 100644 => 100755 src/zbecreate/ZbeCreateView.form mode change 100644 => 100755 src/zbecreate/ZbeCreateView.java create mode 100755 src/zbecreate/ZbePaint.java mode change 100644 => 100755 src/zbecreate/resources/ZbeCreateAboutBox.properties mode change 100644 => 100755 src/zbecreate/resources/ZbeCreateApp.properties mode change 100644 => 100755 src/zbecreate/resources/ZbeCreateView.properties mode change 100644 => 100755 src/zbecreate/resources/about.png mode change 100644 => 100755 src/zbecreate/resources/busyicons/busy-icon0.png mode change 100644 => 100755 src/zbecreate/resources/busyicons/busy-icon1.png mode change 100644 => 100755 src/zbecreate/resources/busyicons/busy-icon10.png mode change 100644 => 100755 src/zbecreate/resources/busyicons/busy-icon11.png mode change 100644 => 100755 src/zbecreate/resources/busyicons/busy-icon12.png mode change 100644 => 100755 src/zbecreate/resources/busyicons/busy-icon13.png mode change 100644 => 100755 src/zbecreate/resources/busyicons/busy-icon14.png mode change 100644 => 100755 src/zbecreate/resources/busyicons/busy-icon2.png mode change 100644 => 100755 src/zbecreate/resources/busyicons/busy-icon3.png mode change 100644 => 100755 src/zbecreate/resources/busyicons/busy-icon4.png mode change 100644 => 100755 src/zbecreate/resources/busyicons/busy-icon5.png mode change 100644 => 100755 src/zbecreate/resources/busyicons/busy-icon6.png mode change 100644 => 100755 src/zbecreate/resources/busyicons/busy-icon7.png mode change 100644 => 100755 src/zbecreate/resources/busyicons/busy-icon8.png mode change 100644 => 100755 src/zbecreate/resources/busyicons/busy-icon9.png mode change 100644 => 100755 src/zbecreate/resources/busyicons/idle-icon.png mode change 100644 => 100755 src/zbecreate/resources/splash.png diff --git a/applet.policy b/applet.policy new file mode 100755 index 0000000..2fd15c8 --- /dev/null +++ b/applet.policy @@ -0,0 +1,3 @@ +grant { +permission java.security.AllPermission; +}; diff --git a/build.xml b/build.xml old mode 100644 new mode 100755 index 69b53e5..17b5701 --- a/build.xml +++ b/build.xml @@ -1,74 +1,74 @@ - - - - - - - - - - - Builds, tests, and runs the project zbeCreate. - - - + + + + + + + + + + + Builds, tests, and runs the project zbeCreate. + + + diff --git a/build/ZbePaint.html b/build/ZbePaint.html new file mode 100755 index 0000000..df3a640 --- /dev/null +++ b/build/ZbePaint.html @@ -0,0 +1,28 @@ + + + Applet HTML Page + + + + + +


Applet HTML Page

+ +

+ +

+ +
Generated by NetBeans IDE + + diff --git a/build/built-jar.properties b/build/built-jar.properties new file mode 100755 index 0000000..fb70835 --- /dev/null +++ b/build/built-jar.properties @@ -0,0 +1,2 @@ +#Sun Mar 28 21:29:29 EDT 2010 +C\:\\Zoidberg\\zbeCreate= diff --git a/build/classes/.netbeans_automatic_build b/build/classes/.netbeans_automatic_build old mode 100644 new mode 100755 diff --git a/build/classes/zbecreate/ZbeCreateAboutBox.class b/build/classes/zbecreate/ZbeCreateAboutBox.class old mode 100644 new mode 100755 diff --git a/build/classes/zbecreate/ZbeCreateApp.class b/build/classes/zbecreate/ZbeCreateApp.class old mode 100644 new mode 100755 diff --git a/build/classes/zbecreate/ZbeCreateView$1.class b/build/classes/zbecreate/ZbeCreateView$1.class old mode 100644 new mode 100755 index 48c06e6a5aa2889c40a85f547bf6be1b8fcc3125..13b9f57a459fd0f15f2e7b95b47a202285553790 GIT binary patch delta 23 fcmey!_K|JFb0$W`$uF2(Sd|%g7*r-3GCKeOW?lx$ delta 23 fcmey!_K|JFb0$WG$uF2(Sd|!f7?dX)GCKeOWMr6eNnOVl@qQn=YM=mea(WD J`C*q?{Q&$_7wG^1 diff --git a/build/classes/zbecreate/ZbeCreateView.class b/build/classes/zbecreate/ZbeCreateView.class old mode 100644 new mode 100755 index 6fc6cdd444d9b276f315bc168969cfbbb0b16cc6..52f6056ae3de9a3fc4f276ea91f1e3b8cbffeedb GIT binary patch delta 3667 zcmai133yf25&r+T4L=XWL z^ts`Jh=?145_5wD5Us7Pwxw0uYHe#5yV#xD+FC1g=DujC@YyW$&zUpZnKNfz^11W|!{3yAWaIA^{^6i2KDO~s#eX?5p`Y0Jx2`@_`~O(@%t1Cz z*f{B66izu9Ls+B)VZdRKAqP1OTTF7$Pu=IxlDud;7|Vzf$6_Z3MKlhRnWB<&ET%db zh>uka2dJBYk_`vh@Dy`3z+jsfIJ}TUBtH(daZoW=w=YuL5}U(p9I~;`Mw^XoHV#Yf z;u2dWcU2t4i*4L)W6Mk}ulOwBB^rIW!x1c1GBUz4j#6&4k}*myRlTvA`Z(pvRW@G9 z1ihSzN+v0}%;Mzc^8=HaZ7r*;u5GNUCpu4DGrwv z*H$&CcZa9N8zrt)KFGgUo^j|VYNDJm~A+h^ORggaIWFitTdd@1@RM+L7lE)mEl6p zA#&n3g`)9sPIBrZUTd-1a50x?kQ!0U>Nd!5DJ8v!@UY<`))_A2aw02!tW)RsUMEt% zgY_003>(>GxPmJQ_sqH(Jb(ucS81~D>1Q85rLwlF#$Y3Ejlb_igPX89{;5+G+$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LG z$oU_}d^gS_qcn3{{r`bEkJiiWV2P{GMWGF&d0!h~s3nX@-rE=n=Zt~x64i+lQLS1Xg?;c?{s7s^pQZvX%Q literal 0 HcmV?d00001 diff --git a/build/classes/zbecreate/ZbePaint.class b/build/classes/zbecreate/ZbePaint.class new file mode 100755 index 0000000000000000000000000000000000000000..be7f60f16d17a2343b1045ced5cc235374a8510b GIT binary patch literal 2276 zcmZuyOLP-e82)aWbfzJ+5GdFJQb>`uv<-@)P$)E^)IvzH#bWU}NiONYbf!)wDa8l) ze(c=3aO2j6awI*+p2OC2T)EY)TUTz}dHn87h9p4F$({fH_q+e|`)7Xp@0SMvp2gR3 zq;ateIb4ck9C@|O#c>&V4X?z}iFq9hYJWw;t8v6}Q7w5Li#o1qcumJr96h+Eme<9@KzkX%IrAa*71(o7&;0%iaJUk%4$~u;nV^baH750XXn>s8VD>`f)j*e9w z@9JlQVJ#Z2srC(J)LS;`dS~u-K^9$UcrtyhATJxH?a@a@_K`Exm#??8^9p zQ+10nCu`E0vTesRJkzoL43xjLWw2OtHR-x$Nh*J3>CM^|=@GJHXxMj^HrBj!pd=z5 zSUhj48f^`eA6M2Acmc;XtR-*@>j~V(dkMUc4>Wuz(EoVB!b+%XcUZNov_0u2a2Fr3 z`j3}`DblyM%xB(l)pJK1D5!)$_k#2WGDh)c*>$RRNtypRflu(MGW{8EXM;lZw%ra1 zlfZL0Mo`A0g#aWzk~`R4t=(HG}Q#npZ(9y}&kB*^;G!7Sxu8 zDgZwOH1G7NtXf*8(*KI}e7ydT)^BQc)spnu{m?>I4HzRUyK4NlHQC@FkPKVNlxC$B zWgf+-5$h(YvJRVTdy3ZryIPs0PB=f(r9Hpve((>qoa~_|jM0QL++md1m*F<2E31x8 zM-xFH0ly13SWf>&Zv*S=*$lobeEoJ>nkuT<$e9%eDw+1d7Q37u+e^12{EH(kAX2E| zyk&5jN^*r>W<9yWA#ROht{Go!O;Lx)p;`Wh7jb~E$~52J5&lU`u27WX+5w^Fjq8it z9ph8*85`Mv_=!RUFL90g7n6u0j}zP{0uWAOf;)jzG!Rh+A~Q7DN!7y0Jw)p07^x%b zOR-Hdn^v`)QXNU^b#!eazO;cYmqvX=LLH1Iw>A&*W6guHWVe6Nvy|Mnf$b-webFOz zBuD$Ab?msh3F>z$eXK7Q=wnJhvWZ^0*mWPfM}Efc - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/zbecreate/ZbeCreateAboutBox.java b/src/zbecreate/ZbeCreateAboutBox.java old mode 100644 new mode 100755 index fc61722..d508c0f --- a/src/zbecreate/ZbeCreateAboutBox.java +++ b/src/zbecreate/ZbeCreateAboutBox.java @@ -1,140 +1,140 @@ -/* - * ZbeCreateAboutBox.java - */ - -package zbecreate; - -import org.jdesktop.application.Action; - -public class ZbeCreateAboutBox extends javax.swing.JDialog { - - public ZbeCreateAboutBox(java.awt.Frame parent) { - super(parent); - initComponents(); - getRootPane().setDefaultButton(closeButton); - } - - @Action public void closeAboutBox() { - dispose(); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - // //GEN-BEGIN:initComponents - private void initComponents() { - - closeButton = new javax.swing.JButton(); - javax.swing.JLabel appTitleLabel = new javax.swing.JLabel(); - javax.swing.JLabel versionLabel = new javax.swing.JLabel(); - javax.swing.JLabel appVersionLabel = new javax.swing.JLabel(); - javax.swing.JLabel homepageLabel = new javax.swing.JLabel(); - javax.swing.JLabel appHomepageLabel = new javax.swing.JLabel(); - javax.swing.JLabel appDescLabel = new javax.swing.JLabel(); - javax.swing.JLabel imageLabel = new javax.swing.JLabel(); - javax.swing.JLabel zbeVersionLabel = new javax.swing.JLabel(); - javax.swing.JLabel zbeAppVersionLabel = new javax.swing.JLabel(); - - setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); - org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(zbecreate.ZbeCreateApp.class).getContext().getResourceMap(ZbeCreateAboutBox.class); - setTitle(resourceMap.getString("title")); // NOI18N - setModal(true); - setName("aboutBox"); // NOI18N - setResizable(false); - - javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(zbecreate.ZbeCreateApp.class).getContext().getActionMap(ZbeCreateAboutBox.class, this); - closeButton.setAction(actionMap.get("closeAboutBox")); // NOI18N - closeButton.setName("closeButton"); // NOI18N - - appTitleLabel.setFont(appTitleLabel.getFont().deriveFont(appTitleLabel.getFont().getStyle() | java.awt.Font.BOLD, appTitleLabel.getFont().getSize()+4)); - appTitleLabel.setText(resourceMap.getString("Application.title")); // NOI18N - appTitleLabel.setName("appTitleLabel"); // NOI18N - - versionLabel.setFont(versionLabel.getFont().deriveFont(versionLabel.getFont().getStyle() | java.awt.Font.BOLD)); - versionLabel.setText(resourceMap.getString("versionLabel.text")); // NOI18N - versionLabel.setName("versionLabel"); // NOI18N - - appVersionLabel.setText(resourceMap.getString("Application.version")); // NOI18N - appVersionLabel.setName("appVersionLabel"); // NOI18N - - homepageLabel.setFont(homepageLabel.getFont().deriveFont(homepageLabel.getFont().getStyle() | java.awt.Font.BOLD)); - homepageLabel.setText(resourceMap.getString("homepageLabel.text")); // NOI18N - homepageLabel.setName("homepageLabel"); // NOI18N - - appHomepageLabel.setText(resourceMap.getString("Application.homepage")); // NOI18N - appHomepageLabel.setName("appHomepageLabel"); // NOI18N - - appDescLabel.setText(resourceMap.getString("appDescLabel.text")); // NOI18N - appDescLabel.setName("appDescLabel"); // NOI18N - - imageLabel.setIcon(resourceMap.getIcon("imageLabel.icon")); // NOI18N - imageLabel.setName("imageLabel"); // NOI18N - - zbeVersionLabel.setFont(zbeVersionLabel.getFont().deriveFont(zbeVersionLabel.getFont().getStyle() | java.awt.Font.BOLD)); - zbeVersionLabel.setText(resourceMap.getString("zbeVersionLabel.text")); // NOI18N - zbeVersionLabel.setName("zbeVersionLabel"); // NOI18N - - zbeAppVersionLabel.setText(resourceMap.getString("zbeAppVersionLabel.text")); // NOI18N - zbeAppVersionLabel.setName("zbeAppVersionLabel"); // NOI18N - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(imageLabel) - .addGap(18, 18, 18) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(versionLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(appVersionLabel) - .addGap(187, 187, 187)) - .addComponent(appTitleLabel) - .addComponent(appDescLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 363, Short.MAX_VALUE) - .addComponent(closeButton, javax.swing.GroupLayout.Alignment.TRAILING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addComponent(homepageLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(appHomepageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createSequentialGroup() - .addComponent(zbeVersionLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(zbeAppVersionLabel))) - .addContainerGap()) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(imageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 193, Short.MAX_VALUE) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addComponent(appTitleLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(appDescLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(versionLabel) - .addComponent(appVersionLabel)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(zbeVersionLabel) - .addComponent(zbeAppVersionLabel)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(appHomepageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(homepageLabel)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(closeButton) - .addContainerGap()) - ); - - pack(); - }// //GEN-END:initComponents - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JButton closeButton; - // End of variables declaration//GEN-END:variables - -} +/* + * ZbeCreateAboutBox.java + */ + +package zbecreate; + +import org.jdesktop.application.Action; + +public class ZbeCreateAboutBox extends javax.swing.JDialog { + + public ZbeCreateAboutBox(java.awt.Frame parent) { + super(parent); + initComponents(); + getRootPane().setDefaultButton(closeButton); + } + + @Action public void closeAboutBox() { + dispose(); + } + + /** This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + */ + // //GEN-BEGIN:initComponents + private void initComponents() { + + closeButton = new javax.swing.JButton(); + javax.swing.JLabel appTitleLabel = new javax.swing.JLabel(); + javax.swing.JLabel versionLabel = new javax.swing.JLabel(); + javax.swing.JLabel appVersionLabel = new javax.swing.JLabel(); + javax.swing.JLabel homepageLabel = new javax.swing.JLabel(); + javax.swing.JLabel appHomepageLabel = new javax.swing.JLabel(); + javax.swing.JLabel appDescLabel = new javax.swing.JLabel(); + javax.swing.JLabel imageLabel = new javax.swing.JLabel(); + javax.swing.JLabel zbeVersionLabel = new javax.swing.JLabel(); + javax.swing.JLabel zbeAppVersionLabel = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(zbecreate.ZbeCreateApp.class).getContext().getResourceMap(ZbeCreateAboutBox.class); + setTitle(resourceMap.getString("title")); // NOI18N + setModal(true); + setName("aboutBox"); // NOI18N + setResizable(false); + + javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(zbecreate.ZbeCreateApp.class).getContext().getActionMap(ZbeCreateAboutBox.class, this); + closeButton.setAction(actionMap.get("closeAboutBox")); // NOI18N + closeButton.setName("closeButton"); // NOI18N + + appTitleLabel.setFont(appTitleLabel.getFont().deriveFont(appTitleLabel.getFont().getStyle() | java.awt.Font.BOLD, appTitleLabel.getFont().getSize()+4)); + appTitleLabel.setText(resourceMap.getString("Application.title")); // NOI18N + appTitleLabel.setName("appTitleLabel"); // NOI18N + + versionLabel.setFont(versionLabel.getFont().deriveFont(versionLabel.getFont().getStyle() | java.awt.Font.BOLD)); + versionLabel.setText(resourceMap.getString("versionLabel.text")); // NOI18N + versionLabel.setName("versionLabel"); // NOI18N + + appVersionLabel.setText(resourceMap.getString("Application.version")); // NOI18N + appVersionLabel.setName("appVersionLabel"); // NOI18N + + homepageLabel.setFont(homepageLabel.getFont().deriveFont(homepageLabel.getFont().getStyle() | java.awt.Font.BOLD)); + homepageLabel.setText(resourceMap.getString("homepageLabel.text")); // NOI18N + homepageLabel.setName("homepageLabel"); // NOI18N + + appHomepageLabel.setText(resourceMap.getString("Application.homepage")); // NOI18N + appHomepageLabel.setName("appHomepageLabel"); // NOI18N + + appDescLabel.setText(resourceMap.getString("appDescLabel.text")); // NOI18N + appDescLabel.setName("appDescLabel"); // NOI18N + + imageLabel.setIcon(resourceMap.getIcon("imageLabel.icon")); // NOI18N + imageLabel.setName("imageLabel"); // NOI18N + + zbeVersionLabel.setFont(zbeVersionLabel.getFont().deriveFont(zbeVersionLabel.getFont().getStyle() | java.awt.Font.BOLD)); + zbeVersionLabel.setText(resourceMap.getString("zbeVersionLabel.text")); // NOI18N + zbeVersionLabel.setName("zbeVersionLabel"); // NOI18N + + zbeAppVersionLabel.setText(resourceMap.getString("zbeAppVersionLabel.text")); // NOI18N + zbeAppVersionLabel.setName("zbeAppVersionLabel"); // NOI18N + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(imageLabel) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(versionLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(appVersionLabel) + .addGap(187, 187, 187)) + .addComponent(appTitleLabel) + .addComponent(appDescLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 363, Short.MAX_VALUE) + .addComponent(closeButton, javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addComponent(homepageLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(appHomepageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(layout.createSequentialGroup() + .addComponent(zbeVersionLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(zbeAppVersionLabel))) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(imageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 193, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(appTitleLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(appDescLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(versionLabel) + .addComponent(appVersionLabel)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(zbeVersionLabel) + .addComponent(zbeAppVersionLabel)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(appHomepageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(homepageLabel)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(closeButton) + .addContainerGap()) + ); + + pack(); + }// //GEN-END:initComponents + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton closeButton; + // End of variables declaration//GEN-END:variables + +} diff --git a/src/zbecreate/ZbeCreateApp.java b/src/zbecreate/ZbeCreateApp.java old mode 100644 new mode 100755 index 215fde2..f373523 --- a/src/zbecreate/ZbeCreateApp.java +++ b/src/zbecreate/ZbeCreateApp.java @@ -1,44 +1,44 @@ -/* - * ZbeCreateApp.java - */ - -package zbecreate; - -import org.jdesktop.application.Application; -import org.jdesktop.application.SingleFrameApplication; - -/** - * The main class of the application. - */ -public class ZbeCreateApp extends SingleFrameApplication { - - /** - * At startup create and show the main frame of the application. - */ - @Override protected void startup() { - show(new ZbeCreateView(this)); - } - - /** - * This method is to initialize the specified window by injecting resources. - * Windows shown in our application come fully initialized from the GUI - * builder, so this additional configuration is not needed. - */ - @Override protected void configureWindow(java.awt.Window root) { - } - - /** - * A convenient static getter for the application instance. - * @return the instance of ZbeCreateApp - */ - public static ZbeCreateApp getApplication() { - return Application.getInstance(ZbeCreateApp.class); - } - - /** - * Main method launching the application. - */ - public static void main(String[] args) { - launch(ZbeCreateApp.class, args); - } -} +/* + * ZbeCreateApp.java + */ + +package zbecreate; + +import org.jdesktop.application.Application; +import org.jdesktop.application.SingleFrameApplication; + +/** + * The main class of the application. + */ +public class ZbeCreateApp extends SingleFrameApplication { + + /** + * At startup create and show the main frame of the application. + */ + @Override protected void startup() { + show(new ZbeCreateView(this)); + } + + /** + * This method is to initialize the specified window by injecting resources. + * Windows shown in our application come fully initialized from the GUI + * builder, so this additional configuration is not needed. + */ + @Override protected void configureWindow(java.awt.Window root) { + } + + /** + * A convenient static getter for the application instance. + * @return the instance of ZbeCreateApp + */ + public static ZbeCreateApp getApplication() { + return Application.getInstance(ZbeCreateApp.class); + } + + /** + * Main method launching the application. + */ + public static void main(String[] args) { + launch(ZbeCreateApp.class, args); + } +} diff --git a/src/zbecreate/ZbeCreateView.form b/src/zbecreate/ZbeCreateView.form old mode 100644 new mode 100755 index 59f2652..f0ac732 --- a/src/zbecreate/ZbeCreateView.form +++ b/src/zbecreate/ZbeCreateView.form @@ -4,18 +4,21 @@ - + + + + - + - + @@ -87,11 +90,11 @@ - + - + @@ -176,6 +179,6 @@ - + diff --git a/src/zbecreate/ZbeCreateView.java b/src/zbecreate/ZbeCreateView.java old mode 100644 new mode 100755 index 4fdda03..b6ed1d0 --- a/src/zbecreate/ZbeCreateView.java +++ b/src/zbecreate/ZbeCreateView.java @@ -1,208 +1,212 @@ -/* - * ZbeCreateView.java - */ - -package zbecreate; - -import org.jdesktop.application.Action; -import org.jdesktop.application.ResourceMap; -import org.jdesktop.application.SingleFrameApplication; -import org.jdesktop.application.FrameView; -import org.jdesktop.application.TaskMonitor; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import javax.swing.Timer; -import javax.swing.Icon; -import javax.swing.JDialog; -import javax.swing.JFrame; - -/** - * The application's main frame. - */ -public class ZbeCreateView extends FrameView { - - public ZbeCreateView(SingleFrameApplication app) { - super(app); - - initComponents(); - - // status bar initialization - message timeout, idle icon and busy animation, etc - ResourceMap resourceMap = getResourceMap(); - int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout"); - messageTimer = new Timer(messageTimeout, new ActionListener() { - public void actionPerformed(ActionEvent e) { - statusMessageLabel.setText(""); - } - }); - messageTimer.setRepeats(false); - int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate"); - for (int i = 0; i < busyIcons.length; i++) { - busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]"); - } - busyIconTimer = new Timer(busyAnimationRate, new ActionListener() { - public void actionPerformed(ActionEvent e) { - busyIconIndex = (busyIconIndex + 1) % busyIcons.length; - statusAnimationLabel.setIcon(busyIcons[busyIconIndex]); - } - }); - idleIcon = resourceMap.getIcon("StatusBar.idleIcon"); - statusAnimationLabel.setIcon(idleIcon); - progressBar.setVisible(false); - - // connecting action tasks to status bar via TaskMonitor - TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext()); - taskMonitor.addPropertyChangeListener(new java.beans.PropertyChangeListener() { - public void propertyChange(java.beans.PropertyChangeEvent evt) { - String propertyName = evt.getPropertyName(); - if ("started".equals(propertyName)) { - if (!busyIconTimer.isRunning()) { - statusAnimationLabel.setIcon(busyIcons[0]); - busyIconIndex = 0; - busyIconTimer.start(); - } - progressBar.setVisible(true); - progressBar.setIndeterminate(true); - } else if ("done".equals(propertyName)) { - busyIconTimer.stop(); - statusAnimationLabel.setIcon(idleIcon); - progressBar.setVisible(false); - progressBar.setValue(0); - } else if ("message".equals(propertyName)) { - String text = (String)(evt.getNewValue()); - statusMessageLabel.setText((text == null) ? "" : text); - messageTimer.restart(); - } else if ("progress".equals(propertyName)) { - int value = (Integer)(evt.getNewValue()); - progressBar.setVisible(true); - progressBar.setIndeterminate(false); - progressBar.setValue(value); - } - } - }); - } - - @Action - public void showAboutBox() { - if (aboutBox == null) { - JFrame mainFrame = ZbeCreateApp.getApplication().getMainFrame(); - aboutBox = new ZbeCreateAboutBox(mainFrame); - aboutBox.setLocationRelativeTo(mainFrame); - } - ZbeCreateApp.getApplication().show(aboutBox); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - @SuppressWarnings("unchecked") - // //GEN-BEGIN:initComponents - private void initComponents() { - - mainPanel = new javax.swing.JPanel(); - menuBar = new javax.swing.JMenuBar(); - javax.swing.JMenu fileMenu = new javax.swing.JMenu(); - javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem(); - javax.swing.JMenu helpMenu = new javax.swing.JMenu(); - javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem(); - statusPanel = new javax.swing.JPanel(); - javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator(); - statusMessageLabel = new javax.swing.JLabel(); - statusAnimationLabel = new javax.swing.JLabel(); - progressBar = new javax.swing.JProgressBar(); - - mainPanel.setName("mainPanel"); // NOI18N - - javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); - mainPanel.setLayout(mainPanelLayout); - mainPanelLayout.setHorizontalGroup( - mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 400, Short.MAX_VALUE) - ); - mainPanelLayout.setVerticalGroup( - mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 252, Short.MAX_VALUE) - ); - - menuBar.setName("menuBar"); // NOI18N - - org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(zbecreate.ZbeCreateApp.class).getContext().getResourceMap(ZbeCreateView.class); - fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N - fileMenu.setName("fileMenu"); // NOI18N - - javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(zbecreate.ZbeCreateApp.class).getContext().getActionMap(ZbeCreateView.class, this); - exitMenuItem.setAction(actionMap.get("quit")); // NOI18N - exitMenuItem.setName("exitMenuItem"); // NOI18N - fileMenu.add(exitMenuItem); - - menuBar.add(fileMenu); - - helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N - helpMenu.setName("helpMenu"); // NOI18N - - aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N - aboutMenuItem.setName("aboutMenuItem"); // NOI18N - helpMenu.add(aboutMenuItem); - - menuBar.add(helpMenu); - - statusPanel.setName("statusPanel"); // NOI18N - - statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N - - statusMessageLabel.setName("statusMessageLabel"); // NOI18N - - statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); - statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N - - progressBar.setName("progressBar"); // NOI18N - - javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel); - statusPanel.setLayout(statusPanelLayout); - statusPanelLayout.setHorizontalGroup( - statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) - .addGroup(statusPanelLayout.createSequentialGroup() - .addContainerGap() - .addComponent(statusMessageLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 226, Short.MAX_VALUE) - .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(statusAnimationLabel) - .addContainerGap()) - ); - statusPanelLayout.setVerticalGroup( - statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(statusPanelLayout.createSequentialGroup() - .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(statusMessageLabel) - .addComponent(statusAnimationLabel) - .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(3, 3, 3)) - ); - - setComponent(mainPanel); - setMenuBar(menuBar); - setStatusBar(statusPanel); - }// //GEN-END:initComponents - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JPanel mainPanel; - private javax.swing.JMenuBar menuBar; - private javax.swing.JProgressBar progressBar; - private javax.swing.JLabel statusAnimationLabel; - private javax.swing.JLabel statusMessageLabel; - private javax.swing.JPanel statusPanel; - // End of variables declaration//GEN-END:variables - - private final Timer messageTimer; - private final Timer busyIconTimer; - private final Icon idleIcon; - private final Icon[] busyIcons = new Icon[15]; - private int busyIconIndex = 0; - - private JDialog aboutBox; -} +/* + * ZbeCreateView.java + */ + +package zbecreate; + +import org.jdesktop.application.Action; +import org.jdesktop.application.ResourceMap; +import org.jdesktop.application.SingleFrameApplication; +import org.jdesktop.application.FrameView; +import org.jdesktop.application.TaskMonitor; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.Timer; +import javax.swing.Icon; +import javax.swing.JDialog; +import javax.swing.JFrame; + +/** + * The application's main frame. + */ +public class ZbeCreateView extends FrameView { + + public ZbeCreateView(SingleFrameApplication app) { + super(app); + + initComponents(); + initPaintArea(); + + // status bar initialization - message timeout, idle icon and busy animation, etc + ResourceMap resourceMap = getResourceMap(); + int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout"); + messageTimer = new Timer(messageTimeout, new ActionListener() { + public void actionPerformed(ActionEvent e) { + statusMessageLabel.setText(""); + } + }); + messageTimer.setRepeats(false); + int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate"); + for (int i = 0; i < busyIcons.length; i++) { + busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]"); + } + busyIconTimer = new Timer(busyAnimationRate, new ActionListener() { + public void actionPerformed(ActionEvent e) { + busyIconIndex = (busyIconIndex + 1) % busyIcons.length; + statusAnimationLabel.setIcon(busyIcons[busyIconIndex]); + } + }); + idleIcon = resourceMap.getIcon("StatusBar.idleIcon"); + statusAnimationLabel.setIcon(idleIcon); + progressBar.setVisible(false); + + // connecting action tasks to status bar via TaskMonitor + TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext()); + taskMonitor.addPropertyChangeListener(new java.beans.PropertyChangeListener() { + public void propertyChange(java.beans.PropertyChangeEvent evt) { + String propertyName = evt.getPropertyName(); + if ("started".equals(propertyName)) { + if (!busyIconTimer.isRunning()) { + statusAnimationLabel.setIcon(busyIcons[0]); + busyIconIndex = 0; + busyIconTimer.start(); + } + progressBar.setVisible(true); + progressBar.setIndeterminate(true); + } else if ("done".equals(propertyName)) { + busyIconTimer.stop(); + statusAnimationLabel.setIcon(idleIcon); + progressBar.setVisible(false); + progressBar.setValue(0); + } else if ("message".equals(propertyName)) { + String text = (String)(evt.getNewValue()); + statusMessageLabel.setText((text == null) ? "" : text); + messageTimer.restart(); + } else if ("progress".equals(propertyName)) { + int value = (Integer)(evt.getNewValue()); + progressBar.setVisible(true); + progressBar.setIndeterminate(false); + progressBar.setValue(value); + } + } + }); + } + + @Action + public void showAboutBox() { + if (aboutBox == null) { + JFrame mainFrame = ZbeCreateApp.getApplication().getMainFrame(); + aboutBox = new ZbeCreateAboutBox(mainFrame); + aboutBox.setLocationRelativeTo(mainFrame); + } + ZbeCreateApp.getApplication().show(aboutBox); + } + + public void initPaintArea(){ + painter = new ZbePaint(); + painter.init(); + } + + + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + mainPanel = new javax.swing.JPanel(); + menuBar = new javax.swing.JMenuBar(); + javax.swing.JMenu fileMenu = new javax.swing.JMenu(); + javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem(); + javax.swing.JMenu helpMenu = new javax.swing.JMenu(); + javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem(); + statusPanel = new javax.swing.JPanel(); + javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator(); + statusMessageLabel = new javax.swing.JLabel(); + statusAnimationLabel = new javax.swing.JLabel(); + progressBar = new javax.swing.JProgressBar(); + + org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(zbecreate.ZbeCreateApp.class).getContext().getResourceMap(ZbeCreateView.class); + mainPanel.setBackground(resourceMap.getColor("mainPanel.background")); // NOI18N + mainPanel.setName("mainPanel"); // NOI18N + + javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); + mainPanel.setLayout(mainPanelLayout); + mainPanelLayout.setHorizontalGroup( + mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 659, Short.MAX_VALUE) + ); + mainPanelLayout.setVerticalGroup( + mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 348, Short.MAX_VALUE) + ); + + menuBar.setName("menuBar"); // NOI18N + + fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N + fileMenu.setName("fileMenu"); // NOI18N + + javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(zbecreate.ZbeCreateApp.class).getContext().getActionMap(ZbeCreateView.class, this); + exitMenuItem.setAction(actionMap.get("quit")); // NOI18N + exitMenuItem.setName("exitMenuItem"); // NOI18N + fileMenu.add(exitMenuItem); + + menuBar.add(fileMenu); + + helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N + helpMenu.setName("helpMenu"); // NOI18N + + aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N + aboutMenuItem.setName("aboutMenuItem"); // NOI18N + helpMenu.add(aboutMenuItem); + + menuBar.add(helpMenu); + + statusPanel.setName("statusPanel"); // NOI18N + + statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N + + statusMessageLabel.setName("statusMessageLabel"); // NOI18N + + statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N + + progressBar.setName("progressBar"); // NOI18N + + javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel); + statusPanel.setLayout(statusPanelLayout); + statusPanelLayout.setHorizontalGroup( + statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 659, Short.MAX_VALUE) + .addGroup(statusPanelLayout.createSequentialGroup() + .addContainerGap() + .addComponent(statusMessageLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 489, Short.MAX_VALUE) + .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(statusAnimationLabel) + .addContainerGap()) + ); + statusPanelLayout.setVerticalGroup( + statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(statusPanelLayout.createSequentialGroup() + .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(statusMessageLabel) + .addComponent(statusAnimationLabel) + .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(3, 3, 3)) + ); + + setComponent(mainPanel); + setMenuBar(menuBar); + setStatusBar(statusPanel); + }// //GEN-END:initComponents + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JPanel mainPanel; + private javax.swing.JMenuBar menuBar; + private javax.swing.JProgressBar progressBar; + private javax.swing.JLabel statusAnimationLabel; + private javax.swing.JLabel statusMessageLabel; + private javax.swing.JPanel statusPanel; + // End of variables declaration//GEN-END:variables + + private final Timer messageTimer; + private final Timer busyIconTimer; + private final Icon idleIcon; + private final Icon[] busyIcons = new Icon[15]; + private int busyIconIndex = 0; + private ZbePaint painter; + + private JDialog aboutBox; +} diff --git a/src/zbecreate/ZbePaint.java b/src/zbecreate/ZbePaint.java new file mode 100755 index 0000000..3b8c938 --- /dev/null +++ b/src/zbecreate/ZbePaint.java @@ -0,0 +1,381 @@ +package zbecreate; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.MouseMotionListener; +import javax.swing.JApplet; +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JPanel; + +public class ZbePaint extends JApplet { + + JComboBox colorChoice, figureChoice; + + @Override + public void init() { + + setBackground(Color.gray); + getContentPane().setBackground(Color.gray); + + Display canvas = new Display(); + getContentPane().add(canvas,BorderLayout.CENTER); + + JPanel buttonBar = new JPanel(); + buttonBar.setBackground(Color.gray); + getContentPane().add(buttonBar, BorderLayout.SOUTH); + + JPanel choiceBar = new JPanel(); + choiceBar.setBackground(Color.gray); + getContentPane().add(choiceBar, BorderLayout.NORTH); + + JButton fill = new JButton("Set Background"); + fill.addActionListener(canvas); + buttonBar.add(fill); + + JButton clear = new JButton("Clear"); + clear.addActionListener((ActionListener) canvas); + buttonBar.add(clear); + + colorChoice = new JComboBox(); + colorChoice.addItem("Black"); + colorChoice.addItem("Red"); + colorChoice.addItem("Green"); + colorChoice.addItem("Blue"); + colorChoice.addItem("Cyan"); + colorChoice.addItem("Magenta"); + colorChoice.addItem("Yellow"); + colorChoice.addItem("White"); + colorChoice.setBackground(Color.white); + choiceBar.add(colorChoice); + + figureChoice = new JComboBox(); + figureChoice.addItem("Curve"); + figureChoice.addItem("Straight Line"); + figureChoice.addItem("Rectangle"); + figureChoice.addItem("Oval"); + figureChoice.addItem("RoundRect"); + figureChoice.addItem("Filled Rectangle"); + figureChoice.addItem("Filled Oval"); + figureChoice.addItem("Filled RoundRect"); + figureChoice.setBackground(Color.white); + choiceBar.add(figureChoice); + + } // end init() + + @Override + public Insets getInsets() { + return new Insets(3,3,3,3); + } + + private class Display extends JPanel + implements MouseListener, MouseMotionListener, ActionListener { + + private final static int + BLACK = 0, + RED = 1, // Some constants to make + GREEN = 2, // the code more readable. + BLUE = 3, // These numbers code for + CYAN = 4, // the different drawing colors. + MAGENTA = 5, + YELLOW = 6, + WHITE = 7; + + private final static int + CURVE = 0, + LINE = 1, + RECT = 2, // Some constants that code + OVAL = 3, // for the different types of + ROUNDRECT = 4, // figure the program can draw. + FILLED_RECT = 5, + FILLED_OVAL = 6, + FILLED_ROUNDRECT = 7; + + + /* Some variables used for backing up the contents of the panel. */ + + Image OSI; // The off-screen image (created in checkOSI()). + + int widthOfOSI, heightOfOSI; // Current width and height of OSI. These + // are checked against the size of the applet, + // to detect any change in the panel's size. + // If the size has changed, a new OSI is created. + // The picture in the off-screen image is lost + // when that happens. + + + /* The following variables are used when the user is sketching a + curve while dragging a mouse. */ + + private int mouseX, mouseY; // The location of the mouse. + + private int prevX, prevY; // The previous location of the mouse. + + private int startX, startY; // The starting position of the mouse. + // (Not used for drawing curves.) + + private boolean dragging; // This is set to true when the user is drawing. + + private int figure; // What type of figure is being drawn. This is + // specified by the figureChoice menu. + + private Graphics dragGraphics; // A graphics context for the off-screen image, + // to be used while a drag is in progress. + + private Color dragColor; // The color that is used for the figure that is + // being drawn. + + Display() { + // Constructor. When this component is first created, it is set to + // listen for mouse events and mouse motion events from + // itself. The initial background color is white. + addMouseListener(this); + addMouseMotionListener(this); + setBackground(Color.white); + } + + + private void drawFigure(Graphics g, int shape, int x1, int y1, int x2, int y2) { + + if (shape == LINE) { + // For a line, just draw the line between the two points. + g.drawLine(x1,y1,x2,y2); + return; + } + int x, y; // Top left corner of rectangle that contains the figure. + int w, h; // Width and height of rectangle that contains the figure. + if (x1 >= x2) { // x2 is left edge + x = x2; + w = x1 - x2; + } + else { // x1 is left edge + x = x1; + w = x2 - x1; + } + if (y1 >= y2) { // y2 is top edge + y = y2; + h = y1 - y2; + } + else { // y1 is top edge. + y = y1; + h = y2 - y1; + } + switch (shape) { // Draw the appropriate figure. + case RECT: + g.drawRect(x, y, w, h); + break; + case OVAL: + g.drawOval(x, y, w, h); + break; + case ROUNDRECT: + g.drawRoundRect(x, y, w, h, 20, 20); + break; + case FILLED_RECT: + g.fillRect(x, y, w, h); + break; + case FILLED_OVAL: + g.fillOval(x, y, w, h); + break; + case FILLED_ROUNDRECT: + g.fillRoundRect(x, y, w, h, 20, 20); + break; + } + } + + + private void repaintRect(int x1, int y1, int x2, int y2) { + // Call repaint on a rectangle that contains the points (x1,y1) + // and (x2,y2). (Add a 1-pixel border along right and bottom + // edges to allow for the pen overhang when drawing a line.) + int x, y; // top left corner of rectangle that contains the figure + int w, h; // width and height of rectangle that contains the figure + if (x2 >= x1) { // x1 is left edge + x = x1; + w = x2 - x1; + } + else { // x2 is left edge + x = x2; + w = x1 - x2; + } + if (y2 >= y1) { // y1 is top edge + y = y1; + h = y2 - y1; + } + else { // y2 is top edge. + y = y2; + h = y1 - y2; + } + repaint(x,y,w+1,h+1); + } + + + private void checkOSI() { + // This method is responsible for creating the off-screen image. + // It should be called before using the OSI. It will make a new OSI if + // the size of the panel changes. + if (OSI == null || widthOfOSI != getSize().width || heightOfOSI != getSize().height) { + // Create the OSI, or make a new one if panel size has changed. + OSI = null; // (If OSI already exists, this frees up the memory.) + OSI = createImage(getSize().width, getSize().height); + widthOfOSI = getSize().width; + heightOfOSI = getSize().height; + Graphics OSG = OSI.getGraphics(); // Graphics context for drawing to OSI. + OSG.setColor(getBackground()); + OSG.fillRect(0, 0, widthOfOSI, heightOfOSI); + OSG.dispose(); + } + } + + + @Override + public void paintComponent(Graphics g) { + // Copy the off-screen image to the screen, + // after checking to make sure it exists. Then, + // if a shape other than CURVE is being drawn, + // draw it on top of the image from the OSI. + checkOSI(); + g.drawImage(OSI, 0, 0, this); + if (dragging && figure != CURVE) { + g.setColor(dragColor); + drawFigure(g,figure,startX,startY,mouseX,mouseY); + } + } + + + public void actionPerformed(ActionEvent evt) { + // Respond when the user clicks on a button. The + // command must be either "Clear" or "Set Background". + String command = evt.getActionCommand(); + checkOSI(); + if (command.equals("Set Background")) { + // Set background color before clearing. + // Change the selected color so it is different + // from the background color. + setBackground(getCurrentColor()); + if (colorChoice.getSelectedIndex() == BLACK) + colorChoice.setSelectedIndex(WHITE); + else + colorChoice.setSelectedIndex(BLACK); + } + Graphics g = OSI.getGraphics(); + g.setColor(getBackground()); + g.fillRect(0,0,getSize().width,getSize().height); + g.dispose(); + repaint(); + } + + + private Color getCurrentColor() { + // Check the colorChoice menu to find the currently + // selected color, and return the appropriate color + // object. + int currentColor = colorChoice.getSelectedIndex(); + switch (currentColor) { + case BLACK: + return Color.black; + case RED: + return Color.red; + case GREEN: + return Color.green; + case BLUE: + return Color.blue; + case CYAN: + return Color.cyan; + case MAGENTA: + return Color.magenta; + case YELLOW: + return Color.yellow; + default: + return Color.white; + } + } + + + public void mousePressed(MouseEvent evt) { + + if (dragging == true) + return; + + prevX = startX = evt.getX(); // Save mouse coordinates. + prevY = startY = evt.getY(); + + figure = figureChoice.getSelectedIndex(); + dragColor = getCurrentColor(); + dragGraphics = OSI.getGraphics(); + dragGraphics.setColor(dragColor); + + dragging = true; // Start drawing. + + } // end mousePressed() + + + public void mouseReleased(MouseEvent evt) { + + if (dragging == false) + return; // Nothing to do because the user isn't drawing. + dragging = false; + mouseX = evt.getX(); + mouseY = evt.getY(); + if (figure == CURVE) { + // A CURVE is drawn as a series of LINEs + drawFigure(dragGraphics,LINE,prevX,prevY,mouseX,mouseY); + repaintRect(prevX,prevY,mouseX,mouseY); + } + else if (figure == LINE) { + repaintRect(startX,startY,prevX,prevY); + if (mouseX != startX || mouseY != startY) { + // Draw the line only if it has non-zero length. + drawFigure(dragGraphics,figure,startX,startY,mouseX,mouseY); + repaintRect(startX,startY,mouseX,mouseY); + } + } + else { + repaintRect(startX,startY,prevX,prevY); + if (mouseX != startX && mouseY != startY) { + // Draw the shape only if both its height + // and width are both non-zero. + drawFigure(dragGraphics,figure,startX,startY,mouseX,mouseY); + repaintRect(startX,startY,mouseX,mouseY); + } + } + dragGraphics.dispose(); + dragGraphics = null; + } + + + public void mouseDragged(MouseEvent evt) { + + if (dragging == false) + return; + + mouseX = evt.getX(); + mouseY = evt.getY(); + + if (figure == CURVE) { + drawFigure(dragGraphics,LINE,prevX,prevY,mouseX,mouseY); + repaintRect(prevX,prevY,mouseX,mouseY); + } + else { + repaintRect(startX,startY,prevX,prevY); + repaintRect(startX,startY,mouseX,mouseY); + } + + prevX = mouseX; + prevY = mouseY; + + } + + + public void mouseEntered(MouseEvent evt) { } + public void mouseExited(MouseEvent evt) { } + public void mouseClicked(MouseEvent evt) { } + public void mouseMoved(MouseEvent evt) { } + } +} \ No newline at end of file diff --git a/src/zbecreate/resources/ZbeCreateAboutBox.properties b/src/zbecreate/resources/ZbeCreateAboutBox.properties old mode 100644 new mode 100755 index c252db6..87b7523 --- a/src/zbecreate/resources/ZbeCreateAboutBox.properties +++ b/src/zbecreate/resources/ZbeCreateAboutBox.properties @@ -1,14 +1,14 @@ -title = About: ${Application.title} ${Application.version} - -closeAboutBox.Action.text = &Close - -appDescLabel.text=A tool designed to enable you to create your own platform game for the Nintendo DS using the zoidberg engine. - -versionLabel.text=zbeCreate Version: - -homepageLabel.text=Homepage\: - -#NOI18N -imageLabel.icon=about.png -zbeVersionLabel.text=zbe Format Version: -zbeAppVersionLabel.text=0.1 +title = About: ${Application.title} ${Application.version} + +closeAboutBox.Action.text = &Close + +appDescLabel.text=A tool designed to enable you to create your own platform game for the Nintendo DS using the zoidberg engine. + +versionLabel.text=zbeCreate Version: + +homepageLabel.text=Homepage\: + +#NOI18N +imageLabel.icon=about.png +zbeVersionLabel.text=zbe Format Version: +zbeAppVersionLabel.text=0.1 diff --git a/src/zbecreate/resources/ZbeCreateApp.properties b/src/zbecreate/resources/ZbeCreateApp.properties old mode 100644 new mode 100755 index b42a0f1..a6b4cd7 --- a/src/zbecreate/resources/ZbeCreateApp.properties +++ b/src/zbecreate/resources/ZbeCreateApp.properties @@ -1,11 +1,11 @@ -# Application global resources - -Application.name = zbeCreate -Application.title = zbeCreate -Application.version = 0.1 -Application.vendor = Sun Microsystems Inc. -Application.homepage = http://sites.google.com/site/zoidbergengine -Application.description = A simple Java desktop application based on Swing Application Framework. -Application.vendorId = Sun -Application.id = ${Application.name} -Application.lookAndFeel = system +# Application global resources + +Application.name = zbeCreate +Application.title = zbeCreate +Application.version = 0.1 +Application.vendor = Sun Microsystems Inc. +Application.homepage = http://sites.google.com/site/zoidbergengine +Application.description = A simple Java desktop application based on Swing Application Framework. +Application.vendorId = Sun +Application.id = ${Application.name} +Application.lookAndFeel = system diff --git a/src/zbecreate/resources/ZbeCreateView.properties b/src/zbecreate/resources/ZbeCreateView.properties old mode 100644 new mode 100755 index 1a2b7b0..b915f64 --- a/src/zbecreate/resources/ZbeCreateView.properties +++ b/src/zbecreate/resources/ZbeCreateView.properties @@ -1,32 +1,34 @@ -# Resources for the ZbeCreateView class - -# top-level menus - -fileMenu.text = File -helpMenu.text = Help - -# @Action resources - -showAboutBox.Action.text = &About... -showAboutBox.Action.shortDescription = Show the application's information dialog - -# status bar resources - -StatusBar.messageTimeout = 5000 -StatusBar.busyAnimationRate = 30 -StatusBar.idleIcon = busyicons/idle-icon.png -StatusBar.busyIcons[0] = busyicons/busy-icon0.png -StatusBar.busyIcons[1] = busyicons/busy-icon1.png -StatusBar.busyIcons[2] = busyicons/busy-icon2.png -StatusBar.busyIcons[3] = busyicons/busy-icon3.png -StatusBar.busyIcons[4] = busyicons/busy-icon4.png -StatusBar.busyIcons[5] = busyicons/busy-icon5.png -StatusBar.busyIcons[6] = busyicons/busy-icon6.png -StatusBar.busyIcons[7] = busyicons/busy-icon7.png -StatusBar.busyIcons[8] = busyicons/busy-icon8.png -StatusBar.busyIcons[9] = busyicons/busy-icon9.png -StatusBar.busyIcons[10] = busyicons/busy-icon10.png -StatusBar.busyIcons[11] = busyicons/busy-icon11.png -StatusBar.busyIcons[12] = busyicons/busy-icon12.png -StatusBar.busyIcons[13] = busyicons/busy-icon13.png -StatusBar.busyIcons[14] = busyicons/busy-icon14.png +# Resources for the ZbeCreateView class + +# top-level menus + +fileMenu.text = File +helpMenu.text = Help + +# @Action resources + +showAboutBox.Action.text = &About... +showAboutBox.Action.shortDescription = Show the application's information dialog + +# status bar resources + +StatusBar.messageTimeout = 5000 +StatusBar.busyAnimationRate = 30 +StatusBar.idleIcon = busyicons/idle-icon.png +StatusBar.busyIcons[0] = busyicons/busy-icon0.png +StatusBar.busyIcons[1] = busyicons/busy-icon1.png +StatusBar.busyIcons[2] = busyicons/busy-icon2.png +StatusBar.busyIcons[3] = busyicons/busy-icon3.png +StatusBar.busyIcons[4] = busyicons/busy-icon4.png +StatusBar.busyIcons[5] = busyicons/busy-icon5.png +StatusBar.busyIcons[6] = busyicons/busy-icon6.png +StatusBar.busyIcons[7] = busyicons/busy-icon7.png +StatusBar.busyIcons[8] = busyicons/busy-icon8.png +StatusBar.busyIcons[9] = busyicons/busy-icon9.png +StatusBar.busyIcons[10] = busyicons/busy-icon10.png +StatusBar.busyIcons[11] = busyicons/busy-icon11.png +StatusBar.busyIcons[12] = busyicons/busy-icon12.png +StatusBar.busyIcons[13] = busyicons/busy-icon13.png +StatusBar.busyIcons[14] = busyicons/busy-icon14.png +#NOI18N +mainPanel.background=255, 255, 255 diff --git a/src/zbecreate/resources/about.png b/src/zbecreate/resources/about.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/busyicons/busy-icon0.png b/src/zbecreate/resources/busyicons/busy-icon0.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/busyicons/busy-icon1.png b/src/zbecreate/resources/busyicons/busy-icon1.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/busyicons/busy-icon10.png b/src/zbecreate/resources/busyicons/busy-icon10.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/busyicons/busy-icon11.png b/src/zbecreate/resources/busyicons/busy-icon11.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/busyicons/busy-icon12.png b/src/zbecreate/resources/busyicons/busy-icon12.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/busyicons/busy-icon13.png b/src/zbecreate/resources/busyicons/busy-icon13.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/busyicons/busy-icon14.png b/src/zbecreate/resources/busyicons/busy-icon14.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/busyicons/busy-icon2.png b/src/zbecreate/resources/busyicons/busy-icon2.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/busyicons/busy-icon3.png b/src/zbecreate/resources/busyicons/busy-icon3.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/busyicons/busy-icon4.png b/src/zbecreate/resources/busyicons/busy-icon4.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/busyicons/busy-icon5.png b/src/zbecreate/resources/busyicons/busy-icon5.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/busyicons/busy-icon6.png b/src/zbecreate/resources/busyicons/busy-icon6.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/busyicons/busy-icon7.png b/src/zbecreate/resources/busyicons/busy-icon7.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/busyicons/busy-icon8.png b/src/zbecreate/resources/busyicons/busy-icon8.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/busyicons/busy-icon9.png b/src/zbecreate/resources/busyicons/busy-icon9.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/busyicons/idle-icon.png b/src/zbecreate/resources/busyicons/idle-icon.png old mode 100644 new mode 100755 diff --git a/src/zbecreate/resources/splash.png b/src/zbecreate/resources/splash.png old mode 100644 new mode 100755