imagetools-commit Mailing List for Image Tools (Page 3)
Status: Beta
Brought to you by:
cmarcum
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
(41) |
May
(14) |
Jun
(15) |
Jul
(15) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: <cm...@us...> - 2009-04-25 16:57:40
|
Revision: 36 http://imagetools.svn.sourceforge.net/imagetools/?rev=36&view=rev Author: cmarcum Date: 2009-04-25 16:57:32 +0000 (Sat, 25 Apr 2009) Log Message: ----------- modified logging and added showError to fileOpen method Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-22 01:01:15 UTC (rev 35) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-25 16:57:32 UTC (rev 36) @@ -922,6 +922,8 @@ FileImageInputStream inputStream = null; BufferedImage bi = null; + Logger logger = Logger.getLogger(ImageToolsView.class.getName()); + // Present the "open" file chooser without any file selected. // If the user cancels this file chooser, exit this method. @@ -946,14 +948,17 @@ inputStream = new FileImageInputStream(file); } catch (FileNotFoundException ex) { - Logger.getLogger(ImageToolsView.class.getName()).log(Level.SEVERE, null, ex); + logger.log(Level.SEVERE, null, ex); + showError("File not found " + ex); } catch (IOException ex) { - Logger.getLogger(ImageToolsView.class.getName()).log(Level.SEVERE, null, ex); + logger.log(Level.SEVERE, null, ex); + showError("IOException " + ex); } try { bi = ImageIO.read(inputStream); } catch (IOException ex) { - Logger.getLogger(ImageToolsView.class.getName()).log(Level.SEVERE, null, ex); + logger.log(Level.SEVERE, null, ex); + showError("IOException " + ex); } itModel.setImage(bi); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-22 01:01:17
|
Revision: 35 http://imagetools.svn.sourceforge.net/imagetools/?rev=35&view=rev Author: cmarcum Date: 2009-04-22 01:01:15 +0000 (Wed, 22 Apr 2009) Log Message: ----------- Added license line to about box Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsAboutBox.form trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsAboutBox.java Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsAboutBox.form =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsAboutBox.form 2009-04-19 20:03:13 UTC (rev 34) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsAboutBox.form 2009-04-22 01:01:15 UTC (rev 35) @@ -29,31 +29,33 @@ <Group type="102" alignment="0" attributes="0"> <Component id="imageLabel" min="-2" max="-2" attributes="0"/> <EmptySpace type="separate" min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="1" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="appTitleLabel" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="appDescLabel" alignment="0" pref="340" max="32767" attributes="0"/> + <Component id="closeButton" alignment="1" min="-2" max="-2" attributes="0"/> <Group type="102" alignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0"> <Component id="versionLabel" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="vendorLabel" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="homepageLabel" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="licenseLabel" min="-2" max="-2" attributes="0"/> </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> + <Component id="appLicenseLabel" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="appVersionLabel" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="appVendorLabel" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="appHomepageLabel" alignment="0" min="-2" max="-2" attributes="0"/> </Group> </Group> - <Component id="appTitleLabel" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="appDescLabel" alignment="0" pref="340" max="32767" attributes="0"/> - <Component id="closeButton" alignment="1" min="-2" max="-2" attributes="0"/> </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="imageLabel" min="-2" pref="183" max="32767" attributes="0"/> + <Component id="imageLabel" min="-2" pref="219" max="32767" attributes="0"/> <Group type="102" alignment="0" attributes="0"> <EmptySpace max="-2" attributes="0"/> <Component id="appTitleLabel" min="-2" max="-2" attributes="0"/> @@ -74,9 +76,16 @@ <Component id="homepageLabel" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="appHomepageLabel" alignment="3" min="-2" max="-2" attributes="0"/> </Group> - <EmptySpace max="32767" attributes="0"/> - <Component id="closeButton" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="appLicenseLabel" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="21" max="32767" attributes="0"/> + <Component id="closeButton" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="licenseLabel" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -201,5 +210,17 @@ <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> </AuxValues> </Component> + <Component class="javax.swing.JLabel" name="licenseLabel"> + <Properties> + <Property name="text" type="java.lang.String" resourceKey="licenseLabel.text"/> + <Property name="name" type="java.lang.String" value="licenseLabel" noResource="true"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="appLicenseLabel"> + <Properties> + <Property name="text" type="java.lang.String" resourceKey="appLicenseLabel.text"/> + <Property name="name" type="java.lang.String" value="appLicenseLabel" noResource="true"/> + </Properties> + </Component> </SubComponents> </Form> Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsAboutBox.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsAboutBox.java 2009-04-19 20:03:13 UTC (rev 34) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsAboutBox.java 2009-04-22 01:01:15 UTC (rev 35) @@ -57,6 +57,8 @@ javax.swing.JLabel appHomepageLabel = new javax.swing.JLabel(); javax.swing.JLabel appDescLabel = new javax.swing.JLabel(); javax.swing.JLabel imageLabel = new javax.swing.JLabel(); + licenseLabel = new javax.swing.JLabel(); + appLicenseLabel = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(net.codebuilders.desktop.imagetools.ImageToolsApp.class).getContext().getResourceMap(ImageToolsAboutBox.class); @@ -101,6 +103,12 @@ imageLabel.setIcon(resourceMap.getIcon("camera_unmount128.icon")); // NOI18N imageLabel.setName("imageLabel"); // NOI18N + licenseLabel.setText(resourceMap.getString("licenseLabel.text")); // NOI18N + licenseLabel.setName("licenseLabel"); // NOI18N + + appLicenseLabel.setText(resourceMap.getString("appLicenseLabel.text")); // NOI18N + appLicenseLabel.setName("appLicenseLabel"); // NOI18N + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( @@ -108,25 +116,27 @@ .addGroup(layout.createSequentialGroup() .addComponent(imageLabel) .addGap(18, 18, 18) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(appTitleLabel) + .addComponent(appDescLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 340, Short.MAX_VALUE) + .addComponent(closeButton, javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(versionLabel) .addComponent(vendorLabel) - .addComponent(homepageLabel)) + .addComponent(homepageLabel) + .addComponent(licenseLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(appLicenseLabel) .addComponent(appVersionLabel) .addComponent(appVendorLabel) - .addComponent(appHomepageLabel))) - .addComponent(appTitleLabel, javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(appDescLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 340, Short.MAX_VALUE) - .addComponent(closeButton)) + .addComponent(appHomepageLabel)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(imageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 183, Short.MAX_VALUE) + .addComponent(imageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 219, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(appTitleLabel) @@ -144,8 +154,13 @@ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(homepageLabel) .addComponent(appHomepageLabel)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(closeButton) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(appLicenseLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 21, Short.MAX_VALUE) + .addComponent(closeButton)) + .addComponent(licenseLabel)) .addContainerGap()) ); @@ -153,7 +168,9 @@ }// </editor-fold>//GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel appLicenseLabel; private javax.swing.JButton closeButton; + private javax.swing.JLabel licenseLabel; // End of variables declaration//GEN-END:variables } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-19 20:03:27
|
Revision: 34 http://imagetools.svn.sourceforge.net/imagetools/?rev=34&view=rev Author: cmarcum Date: 2009-04-19 20:03:13 +0000 (Sun, 19 Apr 2009) Log Message: ----------- Updated methods to clear selection for draw button group if we cropped, closed, or undo, redo and set mouse listeners. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-19 19:34:17 UTC (rev 33) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-19 20:03:13 UTC (rev 34) @@ -590,6 +590,9 @@ statusMessageLabel.setText("Select area to crop."); + // set mouse listener for crop rectangle + imageArea.setMouseEvtType(ImageArea.DRAW_CROP_RECTANGLE); + // setup button enabled status after a capture this.setFileOpenEnabled(false); this.setFileSaveEnabled(true); @@ -639,6 +642,9 @@ @Action(enabledProperty = "cropEnabled", selectedProperty = "cropSelected") public void cropImage() { + // in case we were drawing + drawButtonGroup.clearSelection(); + // setup the mouse event for rectangle imageArea.setMouseEvtType(ImageArea.DRAW_CROP_RECTANGLE); @@ -791,7 +797,7 @@ * @param message the message to be presented */ public static void showError(String message) { - + JOptionPane.showMessageDialog(null, message, "Image Tools", JOptionPane.ERROR_MESSAGE, errorIcon); } @@ -854,7 +860,7 @@ ImageToolsApp.getApplication().show(drawTextBox); // override the size saved by application - drawTextBox.setPreferredSize(new Dimension(320,200)); + drawTextBox.setPreferredSize(new Dimension(320, 200)); drawTextBox.pack(); imageArea.setMouseEvtType(ImageArea.DRAW_TEXT); @@ -872,6 +878,10 @@ @Action(enabledProperty = "undoEnabled", selectedProperty = "undoSelected") public void undo() { + // in case we were drawing + drawButtonGroup.clearSelection(); + imageArea.tearDownMouseListeners(); + // ImageToolsModel itModel = ImageToolsApp.getApplication().getItModel(); // itModel.setImage((BufferedImage) imageArea.getImage()); itModel.undo(); @@ -889,6 +899,10 @@ @Action(enabledProperty = "redoEnabled", selectedProperty = "redoSelected") public void redo() { + // in case we were drawing + drawButtonGroup.clearSelection(); + imageArea.tearDownMouseListeners(); + // ImageToolsModel itModel = ImageToolsApp.getApplication().getItModel(); // itModel.setImage((BufferedImage) imageArea.getImage()); itModel.redo(); @@ -946,28 +960,28 @@ imageArea.setImage(itModel.getImage(), false); - JScrollPane scrollPane = new JScrollPane(imageArea); + JScrollPane scrollPane = new JScrollPane(imageArea); - // switch to new panel with image - this.setComponent(scrollPane); + // switch to new panel with image + this.setComponent(scrollPane); - statusMessageLabel.setText("Select area to crop."); + statusMessageLabel.setText("Select area to crop."); - // setup button enabled status after a capture - this.setFileOpenEnabled(false); - this.setFileSaveEnabled(true); - this.setFileCloseEnabled(true); - this.setCaptureEnabled(false); - this.setCropEnabled(true); - this.setDrawLineEnabled(true); - this.setDrawRectangleEnabled(true); - this.setDrawTextEnabled(true); - this.setUndoEnabled(!itModel.undoQueue.isEmpty()); - this.setRedoEnabled(!itModel.redoQueue.isEmpty()); - - // force a re-layout - this.getRootPane().validate(); - + // setup button enabled status after a capture + this.setFileOpenEnabled(false); + this.setFileSaveEnabled(true); + this.setFileCloseEnabled(true); + this.setCaptureEnabled(false); + this.setCropEnabled(true); + this.setDrawLineEnabled(true); + this.setDrawRectangleEnabled(true); + this.setDrawTextEnabled(true); + this.setUndoEnabled(!itModel.undoQueue.isEmpty()); + this.setRedoEnabled(!itModel.redoQueue.isEmpty()); + + // force a re-layout + this.getRootPane().validate(); + } else { showError("File to open is not a usable image"); } @@ -976,7 +990,11 @@ @Action(enabledProperty = "fileCloseEnabled", selectedProperty = "fileCloseSelected") public void fileClose() { - + + // in case we were drawing + drawButtonGroup.clearSelection(); + imageArea.tearDownMouseListeners(); + // put the label back in this.setComponent(jLabel1); // empty the queues @@ -1001,7 +1019,7 @@ this.getRootPane().validate(); // resize the frame this.getFrame().pack(); - + } @Action @@ -1294,7 +1312,6 @@ private javax.swing.JButton undoButton; private javax.swing.JMenuItem usingMenuItem; // End of variables declaration//GEN-END:variables - // more variables private static Icon errorIcon; private static Icon infoIcon; @@ -1303,7 +1320,6 @@ private final Timer busyIconTimer; private final Icon idleIcon; private final Icon[] busyIcons = new Icon[15]; - private int busyIconIndex = 0; private JDialog aboutBox; private JDialog usingBox; @@ -1314,5 +1330,4 @@ private final JFileChooser imageChooser; // added to test new events 2009-03-20 private ImageToolsModel itModel; - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-19 19:34:20
|
Revision: 33 http://imagetools.svn.sourceforge.net/imagetools/?rev=33&view=rev Author: cmarcum Date: 2009-04-19 19:34:17 +0000 (Sun, 19 Apr 2009) Log Message: ----------- Updated text box height to hide vertical scrollbar. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-19 19:30:55 UTC (rev 32) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-19 19:34:17 UTC (rev 33) @@ -854,7 +854,7 @@ ImageToolsApp.getApplication().show(drawTextBox); // override the size saved by application - drawTextBox.setPreferredSize(new Dimension(320,180)); + drawTextBox.setPreferredSize(new Dimension(320,200)); drawTextBox.pack(); imageArea.setMouseEvtType(ImageArea.DRAW_TEXT); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-19 19:31:10
|
Revision: 32 http://imagetools.svn.sourceforge.net/imagetools/?rev=32&view=rev Author: cmarcum Date: 2009-04-19 19:30:55 +0000 (Sun, 19 Apr 2009) Log Message: ----------- Update to DrawTextBox.properties. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/DrawTextBox.properties Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/DrawTextBox.properties =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/DrawTextBox.properties 2009-04-19 19:29:31 UTC (rev 31) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/DrawTextBox.properties 2009-04-19 19:30:55 UTC (rev 32) @@ -1,2 +1,13 @@ okButton.text=OK closeButton.text=Close +Form.title=Image Tools Text Annotation +setText.Action.largeIcon=/net/codebuilders/desktop/imagetools/resources/button_ok24.png +setText.Action.smallIcon=/net/codebuilders/desktop/imagetools/resources/button_ok16.png +setText.Action.icon=/net/codebuilders/desktop/imagetools/resources/button_ok16.png +setText.Action.shortDescription= +setText.Action.text= +closeDrawTextBox.Action.largeIcon=/net/codebuilders/desktop/imagetools/resources/button_cancel24.png +closeDrawTextBox.Action.smallIcon=/net/codebuilders/desktop/imagetools/resources/button_cancel16.png +closeDrawTextBox.Action.icon=/net/codebuilders/desktop/imagetools/resources/button_cancel16.png +closeDrawTextBox.Action.shortDescription= +closeDrawTextBox.Action.text= This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-19 19:29:39
|
Revision: 31 http://imagetools.svn.sourceforge.net/imagetools/?rev=31&view=rev Author: cmarcum Date: 2009-04-19 19:29:31 +0000 (Sun, 19 Apr 2009) Log Message: ----------- Added preferred size, and pack of drawTextBox after it is shown to override saved size. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-19 19:26:46 UTC (rev 30) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-19 19:29:31 UTC (rev 31) @@ -24,6 +24,7 @@ */ package net.codebuilders.desktop.imagetools; +import java.awt.Dimension; import java.awt.event.KeyListener; import java.io.FileNotFoundException; import java.util.logging.Level; @@ -852,6 +853,10 @@ } ImageToolsApp.getApplication().show(drawTextBox); + // override the size saved by application + drawTextBox.setPreferredSize(new Dimension(320,180)); + drawTextBox.pack(); + imageArea.setMouseEvtType(ImageArea.DRAW_TEXT); // imageArea.setupTextMouseListeners(); done in setMouseEvtType statusMessageLabel.setText("Hold LMB to drag, release to place."); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-19 19:26:48
|
Revision: 30 http://imagetools.svn.sourceforge.net/imagetools/?rev=30&view=rev Author: cmarcum Date: 2009-04-19 19:26:46 +0000 (Sun, 19 Apr 2009) Log Message: ----------- Removed preferred size, validate, and pack. Set isResizable back to true. Override of size saved by application has to be after application shows the dialog in ImageToolsView. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/DrawTextBox.form trunk/imagetools/src/net/codebuilders/desktop/imagetools/DrawTextBox.java Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/DrawTextBox.form =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/DrawTextBox.form 2009-04-19 19:08:11 UTC (rev 29) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/DrawTextBox.form 2009-04-19 19:26:46 UTC (rev 30) @@ -5,7 +5,6 @@ <Property name="defaultCloseOperation" type="int" value="2"/> <Property name="title" type="java.lang.String" resourceKey="Form.title"/> <Property name="name" type="java.lang.String" value="Form" noResource="true"/> - <Property name="resizable" type="boolean" value="false"/> </Properties> <SyntheticProperties> <SyntheticProperty name="formSizePolicy" type="int" value="1"/> Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/DrawTextBox.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/DrawTextBox.java 2009-04-19 19:08:11 UTC (rev 29) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/DrawTextBox.java 2009-04-19 19:26:46 UTC (rev 30) @@ -41,16 +41,7 @@ super(parent); initComponents(); getRootPane().setDefaultButton(closeButton); - // this.itModel = itModel; - - this.getRootPane().setPreferredSize(new Dimension(320,175)); - - // force a re-layout - this.getRootPane().validate(); - // fix size - this.pack(); - } @Action public void closeDrawTextBox() { @@ -75,7 +66,6 @@ org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(net.codebuilders.desktop.imagetools.ImageToolsApp.class).getContext().getResourceMap(DrawTextBox.class); setTitle(resourceMap.getString("Form.title")); // NOI18N setName("Form"); // NOI18N - setResizable(false); scrollPane.setName("scrollPane"); // NOI18N This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-19 19:08:23
|
Revision: 29 http://imagetools.svn.sourceforge.net/imagetools/?rev=29&view=rev Author: cmarcum Date: 2009-04-19 19:08:11 +0000 (Sun, 19 Apr 2009) Log Message: ----------- Set preferred size, validate, and pack. Set isResizable false to fix override of size to last size saved by application. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/DrawTextBox.form trunk/imagetools/src/net/codebuilders/desktop/imagetools/DrawTextBox.java Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/DrawTextBox.form =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/DrawTextBox.form 2009-04-19 16:26:41 UTC (rev 28) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/DrawTextBox.form 2009-04-19 19:08:11 UTC (rev 29) @@ -3,7 +3,9 @@ <Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo"> <Properties> <Property name="defaultCloseOperation" type="int" value="2"/> + <Property name="title" type="java.lang.String" resourceKey="Form.title"/> <Property name="name" type="java.lang.String" value="Form" noResource="true"/> + <Property name="resizable" type="boolean" value="false"/> </Properties> <SyntheticProperties> <SyntheticProperty name="formSizePolicy" type="int" value="1"/> @@ -26,10 +28,10 @@ <Group type="102" alignment="1" attributes="0"> <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="1" attributes="0"> - <Component id="scrollPane" alignment="0" pref="376" max="32767" attributes="0"/> + <Component id="scrollPane" alignment="0" pref="296" max="32767" attributes="0"/> <Group type="102" alignment="1" attributes="0"> <Component id="okButton" min="-2" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="38" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> <Component id="closeButton" min="-2" max="-2" attributes="0"/> </Group> </Group> @@ -41,11 +43,11 @@ <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="1" attributes="0"> <EmptySpace max="-2" attributes="0"/> - <Component id="scrollPane" pref="160" max="32767" attributes="0"/> + <Component id="scrollPane" pref="99" max="32767" attributes="0"/> <EmptySpace type="separate" max="-2" attributes="0"/> <Group type="103" groupAlignment="3" attributes="0"> + <Component id="closeButton" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="okButton" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="closeButton" alignment="3" min="-2" max="-2" attributes="0"/> </Group> <EmptySpace max="-2" attributes="0"/> </Group> Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/DrawTextBox.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/DrawTextBox.java 2009-04-19 16:26:41 UTC (rev 28) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/DrawTextBox.java 2009-04-19 19:08:11 UTC (rev 29) @@ -27,6 +27,7 @@ package net.codebuilders.desktop.imagetools; +import java.awt.Dimension; import org.jdesktop.application.Action; /** @@ -42,6 +43,14 @@ getRootPane().setDefaultButton(closeButton); // this.itModel = itModel; + + this.getRootPane().setPreferredSize(new Dimension(320,175)); + + // force a re-layout + this.getRootPane().validate(); + // fix size + this.pack(); + } @Action public void closeDrawTextBox() { @@ -63,7 +72,10 @@ closeButton = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(net.codebuilders.desktop.imagetools.ImageToolsApp.class).getContext().getResourceMap(DrawTextBox.class); + setTitle(resourceMap.getString("Form.title")); // NOI18N setName("Form"); // NOI18N + setResizable(false); scrollPane.setName("scrollPane"); // NOI18N @@ -74,7 +86,6 @@ javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(net.codebuilders.desktop.imagetools.ImageToolsApp.class).getContext().getActionMap(DrawTextBox.class, this); okButton.setAction(actionMap.get("setText")); // NOI18N - org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(net.codebuilders.desktop.imagetools.ImageToolsApp.class).getContext().getResourceMap(DrawTextBox.class); okButton.setText(resourceMap.getString("okButton.text")); // NOI18N okButton.setName("okButton"); // NOI18N @@ -89,10 +100,10 @@ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(scrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE) + .addComponent(scrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(okButton) - .addGap(38, 38, 38) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(closeButton))) .addContainerGap()) ); @@ -100,11 +111,11 @@ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() - .addComponent(scrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE) + .addComponent(scrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(okButton) - .addComponent(closeButton)) + .addComponent(closeButton) + .addComponent(okButton)) .addContainerGap()) ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-19 16:26:50
|
Revision: 28 http://imagetools.svn.sourceforge.net/imagetools/?rev=28&view=rev Author: cmarcum Date: 2009-04-19 16:26:41 +0000 (Sun, 19 Apr 2009) Log Message: ----------- Updated homepage to sourceforge project Modified Paths: -------------- trunk/imagetools/nbproject/project.properties Modified: trunk/imagetools/nbproject/project.properties =================================================================== --- trunk/imagetools/nbproject/project.properties 2009-04-19 16:24:19 UTC (rev 27) +++ trunk/imagetools/nbproject/project.properties 2009-04-19 16:26:41 UTC (rev 28) @@ -1,8 +1,11 @@ application.desc=An Application to capture an image of the desktop, crop if necessary,a and save the image. -application.homepage=http://www.codebuilders.net -application.splash=resources/splash.png +application.homepage=http://imagetools.sourceforge.net +application.splash=/home/carl/svn_work/imagetools/src/net/codebuilders/desktop/imagetools/resources/splash.png application.title=Image Tools by CodeBuilders.net application.vendor=CodeBuilders.net +auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=8 +auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=80 +auxiliary.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=default build.classes.dir=${build.dir}/classes build.classes.excludes=**/*.java,**/*.form # This directory is removed when the project is cleaned: @@ -24,12 +27,13 @@ includes=** jar.compress=false javac.classpath=\ - ${libs.swing-app-framework.classpath} + ${libs.swing-app-framework.classpath}:\ + ${libs.absolutelayout.classpath} # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false -javac.source=1.5 -javac.target=1.5 +javac.source=1.6 +javac.target=1.6 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir}:\ @@ -47,7 +51,7 @@ javadoc.version=false javadoc.windowtitle= jnlp.codebase.type=local -jnlp.codebase.url=file:/home/carl/dev/nb6.5/java/desktop/imagetools/dist/ +jnlp.codebase.url=file:/home/carl/svn_work/imagetools/dist/ jnlp.descriptor=application jnlp.enabled=false jnlp.offline-allowed=false This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-19 16:24:29
|
Revision: 27 http://imagetools.svn.sourceforge.net/imagetools/?rev=27&view=rev Author: cmarcum Date: 2009-04-19 16:24:19 +0000 (Sun, 19 Apr 2009) Log Message: ----------- Updated the using box with scroll pane and absolute layout. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsUsingBox.form trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsUsingBox.java trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsUsingBox.properties Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsUsingBox.form =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsUsingBox.form 2009-04-19 14:25:15 UTC (rev 26) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsUsingBox.form 2009-04-19 16:24:19 UTC (rev 27) @@ -26,52 +26,11 @@ <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="24" max="-2" attributes="0"/> - <Component id="jLabel3" pref="364" max="32767" attributes="0"/> - </Group> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/> - </Group> - </Group> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="jLabel6" alignment="0" min="-2" max="-2" attributes="0"/> - <Group type="102" attributes="0"> - <EmptySpace min="12" pref="12" max="12" attributes="0"/> - <Component id="jLabel7" pref="364" max="32767" attributes="1"/> - </Group> - </Group> - </Group> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace min="12" pref="12" max="12" attributes="0"/> - <Component id="jLabel5" min="-2" pref="364" max="-2" attributes="0"/> - </Group> - <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/> - </Group> - </Group> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace min="12" pref="12" max="12" attributes="0"/> - <Component id="jLabel9" pref="364" max="32767" attributes="0"/> - </Group> - <Component id="jLabel8" alignment="0" min="-2" max="-2" attributes="0"/> - </Group> - </Group> - <Group type="102" alignment="1" attributes="0"> - <EmptySpace pref="319" max="32767" attributes="0"/> - <Component id="closeButton" min="-2" max="-2" attributes="0"/> - </Group> + <Component id="jScrollPane1" alignment="1" pref="456" max="32767" attributes="0"/> + <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="closeButton" alignment="1" min="-2" max="-2" attributes="0"/> </Group> <EmptySpace max="-2" attributes="0"/> </Group> @@ -79,28 +38,14 @@ </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> + <Group type="102" attributes="0"> <EmptySpace max="-2" attributes="0"/> <Component id="jLabel1" min="-2" max="-2" attributes="0"/> - <EmptySpace type="separate" max="-2" attributes="0"/> - <Component id="jLabel2" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> - <Component id="jLabel3" min="-2" pref="49" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="jLabel4" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="jLabel5" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane1" min="-2" pref="275" max="-2" attributes="0"/> <EmptySpace type="separate" max="-2" attributes="0"/> - <Component id="jLabel6" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="jLabel7" min="-2" pref="50" max="-2" attributes="0"/> - <EmptySpace type="separate" max="-2" attributes="0"/> - <Component id="jLabel8" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="jLabel9" min="-2" max="-2" attributes="0"/> - <EmptySpace pref="71" max="32767" attributes="0"/> <Component id="closeButton" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -114,68 +59,6 @@ <Property name="name" type="java.lang.String" value="jLabel1" noResource="true"/> </Properties> </Component> - <Component class="javax.swing.JLabel" name="jLabel2"> - <Properties> - <Property name="icon" type="javax.swing.Icon" resourceKey="jLabel2.icon"/> - <Property name="text" type="java.lang.String" resourceKey="jLabel2.text"/> - <Property name="name" type="java.lang.String" value="jLabel2" noResource="true"/> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="jLabel3"> - <Properties> - <Property name="font" type="java.awt.Font" resourceKey="jLabel3.font"/> - <Property name="text" type="java.lang.String" resourceKey="jLabel3.text"/> - <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[350, 50]"/> - </Property> - <Property name="name" type="java.lang.String" value="jLabel3" noResource="true"/> - <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[350, 15]"/> - </Property> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="jLabel4"> - <Properties> - <Property name="icon" type="javax.swing.Icon" resourceKey="jLabel4.icon"/> - <Property name="text" type="java.lang.String" resourceKey="jLabel4.text"/> - <Property name="name" type="java.lang.String" value="jLabel4" noResource="true"/> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="jLabel5"> - <Properties> - <Property name="font" type="java.awt.Font" resourceKey="jLabel5.font"/> - <Property name="text" type="java.lang.String" resourceKey="jLabel5.text"/> - <Property name="name" type="java.lang.String" value="jLabel5" noResource="true"/> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="jLabel6"> - <Properties> - <Property name="icon" type="javax.swing.Icon" resourceKey="jLabel6.icon"/> - <Property name="text" type="java.lang.String" resourceKey="jLabel6.text"/> - <Property name="name" type="java.lang.String" value="jLabel6" noResource="true"/> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="jLabel7"> - <Properties> - <Property name="font" type="java.awt.Font" resourceKey="jLabel7.font"/> - <Property name="text" type="java.lang.String" resourceKey="jLabel7.text"/> - <Property name="name" type="java.lang.String" value="jLabel7" noResource="true"/> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="jLabel8"> - <Properties> - <Property name="icon" type="javax.swing.Icon" resourceKey="jLabel8.icon"/> - <Property name="text" type="java.lang.String" resourceKey="jLabel8.text"/> - <Property name="name" type="java.lang.String" value="jLabel8" noResource="true"/> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="jLabel9"> - <Properties> - <Property name="font" type="java.awt.Font" resourceKey="jLabel9.font"/> - <Property name="text" type="java.lang.String" resourceKey="jLabel9.text"/> - <Property name="name" type="java.lang.String" value="jLabel9" noResource="true"/> - </Properties> - </Component> <Component class="javax.swing.JButton" name="closeButton"> <Properties> <Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor"> @@ -184,5 +67,277 @@ <Property name="name" type="java.lang.String" value="closeButton" noResource="true"/> </Properties> </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <Properties> + <Property name="name" type="java.lang.String" value="jScrollPane1" noResource="true"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[440, 800]"/> + </Property> + </Properties> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="name" type="java.lang.String" value="jPanel1" noResource="true"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[440, 800]"/> + </Property> + </Properties> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="false"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="fileSaveHeading"> + <Properties> + <Property name="icon" type="javax.swing.Icon" resourceKey="fileSaveHeading.icon"/> + <Property name="text" type="java.lang.String" resourceKey="fileSaveHeading.text"/> + <Property name="name" type="java.lang.String" value="fileSaveHeading" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="20" y="80" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="fileSaveText"> + <Properties> + <Property name="font" type="java.awt.Font" resourceKey="fileSaveText.font"/> + <Property name="text" type="java.lang.String" resourceKey="fileSaveText.text"/> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[350, 50]"/> + </Property> + <Property name="name" type="java.lang.String" value="fileSaveText" noResource="true"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[350, 15]"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="100" width="400" height="40"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="fileExitHeading"> + <Properties> + <Property name="icon" type="javax.swing.Icon" resourceKey="fileExitHeading.icon"/> + <Property name="text" type="java.lang.String" resourceKey="fileExitHeading.text"/> + <Property name="name" type="java.lang.String" value="fileExitHeading" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="10" y="140" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="fileExitText"> + <Properties> + <Property name="font" type="java.awt.Font" resourceKey="fileExitText.font"/> + <Property name="text" type="java.lang.String" resourceKey="fileExitText.text"/> + <Property name="name" type="java.lang.String" value="fileExitText" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="170" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="imageCaptureHeading"> + <Properties> + <Property name="icon" type="javax.swing.Icon" resourceKey="imageCaptureHeading.icon"/> + <Property name="text" type="java.lang.String" resourceKey="imageCaptureHeading.text"/> + <Property name="name" type="java.lang.String" value="imageCaptureHeading" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="10" y="190" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="imageCaptureText"> + <Properties> + <Property name="font" type="java.awt.Font" resourceKey="imageCaptureText.font"/> + <Property name="text" type="java.lang.String" resourceKey="imageCaptureText.text"/> + <Property name="name" type="java.lang.String" value="imageCaptureText" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="220" width="400" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="imageCropHeading"> + <Properties> + <Property name="icon" type="javax.swing.Icon" resourceKey="imageCropHeading.icon"/> + <Property name="text" type="java.lang.String" resourceKey="imageCropHeading.text"/> + <Property name="name" type="java.lang.String" value="imageCropHeading" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="10" y="270" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="imageCropText"> + <Properties> + <Property name="font" type="java.awt.Font" resourceKey="imageCropText.font"/> + <Property name="text" type="java.lang.String" resourceKey="imageCropText.text"/> + <Property name="name" type="java.lang.String" value="imageCropText" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="300" width="400" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="fileOpenHeading"> + <Properties> + <Property name="icon" type="javax.swing.Icon" resourceKey="fileOpenHeading.icon"/> + <Property name="text" type="java.lang.String" resourceKey="fileOpenHeading.text"/> + <Property name="name" type="java.lang.String" value="fileOpenHeading" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="10" y="10" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="fileOpenText"> + <Properties> + <Property name="font" type="java.awt.Font" resourceKey="fileOpenText.font"/> + <Property name="text" type="java.lang.String" resourceKey="fileOpenText.text"/> + <Property name="name" type="java.lang.String" value="fileOpenText" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="30" width="400" height="40"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="drawLineHeading"> + <Properties> + <Property name="icon" type="javax.swing.Icon" resourceKey="drawLineHeading.icon"/> + <Property name="text" type="java.lang.String" resourceKey="drawLineHeading.text"/> + <Property name="name" type="java.lang.String" value="drawLineHeading" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="10" y="370" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="drawLineText"> + <Properties> + <Property name="font" type="java.awt.Font" resourceKey="drawLineText.font"/> + <Property name="text" type="java.lang.String" resourceKey="drawLineText.text"/> + <Property name="name" type="java.lang.String" value="drawLineText" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="400" width="400" height="40"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="drawRectangleHeading"> + <Properties> + <Property name="icon" type="javax.swing.Icon" resourceKey="drawRectangleHeading.icon"/> + <Property name="text" type="java.lang.String" resourceKey="drawRectangleHeading.text"/> + <Property name="name" type="java.lang.String" value="drawRectangleHeading" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="10" y="440" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="drawRectangleText"> + <Properties> + <Property name="font" type="java.awt.Font" resourceKey="drawRectangleText.font"/> + <Property name="text" type="java.lang.String" resourceKey="drawRectangleText.text"/> + <Property name="name" type="java.lang.String" value="drawRectangleText" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="470" width="400" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="drawTextHeading"> + <Properties> + <Property name="icon" type="javax.swing.Icon" resourceKey="drawTextHeading.icon"/> + <Property name="text" type="java.lang.String" resourceKey="drawTextHeading.text"/> + <Property name="name" type="java.lang.String" value="drawTextHeading" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="10" y="510" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="drawTextText"> + <Properties> + <Property name="font" type="java.awt.Font" resourceKey="drawTextText.font"/> + <Property name="text" type="java.lang.String" resourceKey="drawTextText.text"/> + <Property name="name" type="java.lang.String" value="drawTextText" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="540" width="400" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="editUndoHeading"> + <Properties> + <Property name="icon" type="javax.swing.Icon" resourceKey="editUndoHeading.icon"/> + <Property name="text" type="java.lang.String" resourceKey="editUndoHeading.text"/> + <Property name="name" type="java.lang.String" value="editUndoHeading" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="10" y="580" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="editRedoHeading"> + <Properties> + <Property name="icon" type="javax.swing.Icon" resourceKey="editRedoHeading.icon"/> + <Property name="text" type="java.lang.String" resourceKey="editRedoHeading.text"/> + <Property name="name" type="java.lang.String" value="editRedoHeading" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="10" y="680" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="editUndoText"> + <Properties> + <Property name="font" type="java.awt.Font" resourceKey="editUndoText.font"/> + <Property name="text" type="java.lang.String" resourceKey="editUndoText.text"/> + <Property name="name" type="java.lang.String" value="editUndoText" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="610" width="400" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="editRedoText"> + <Properties> + <Property name="font" type="java.awt.Font" resourceKey="editRedoText.font"/> + <Property name="text" type="java.lang.String" resourceKey="editRedoText.text"/> + <Property name="name" type="java.lang.String" value="editRedoText" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="710" width="400" height="-1"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> </SubComponents> </Form> Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsUsingBox.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsUsingBox.java 2009-04-19 14:25:15 UTC (rev 26) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsUsingBox.java 2009-04-19 16:24:19 UTC (rev 27) @@ -49,15 +49,29 @@ private void initComponents() { jLabel1 = new javax.swing.JLabel(); - jLabel2 = new javax.swing.JLabel(); - jLabel3 = new javax.swing.JLabel(); - jLabel4 = new javax.swing.JLabel(); - jLabel5 = new javax.swing.JLabel(); - jLabel6 = new javax.swing.JLabel(); - jLabel7 = new javax.swing.JLabel(); - jLabel8 = new javax.swing.JLabel(); - jLabel9 = new javax.swing.JLabel(); closeButton = new javax.swing.JButton(); + jScrollPane1 = new javax.swing.JScrollPane(); + jPanel1 = new javax.swing.JPanel(); + fileSaveHeading = new javax.swing.JLabel(); + fileSaveText = new javax.swing.JLabel(); + fileExitHeading = new javax.swing.JLabel(); + fileExitText = new javax.swing.JLabel(); + imageCaptureHeading = new javax.swing.JLabel(); + imageCaptureText = new javax.swing.JLabel(); + imageCropHeading = new javax.swing.JLabel(); + imageCropText = new javax.swing.JLabel(); + fileOpenHeading = new javax.swing.JLabel(); + fileOpenText = new javax.swing.JLabel(); + drawLineHeading = new javax.swing.JLabel(); + drawLineText = new javax.swing.JLabel(); + drawRectangleHeading = new javax.swing.JLabel(); + drawRectangleText = new javax.swing.JLabel(); + drawTextHeading = new javax.swing.JLabel(); + drawTextText = new javax.swing.JLabel(); + editUndoHeading = new javax.swing.JLabel(); + editRedoHeading = new javax.swing.JLabel(); + editUndoText = new javax.swing.JLabel(); + editRedoText = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(net.codebuilders.desktop.imagetools.ImageToolsApp.class).getContext().getResourceMap(ImageToolsUsingBox.class); @@ -70,82 +84,131 @@ jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N - jLabel2.setIcon(resourceMap.getIcon("jLabel2.icon")); // NOI18N - jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N - jLabel2.setName("jLabel2"); // NOI18N + javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(net.codebuilders.desktop.imagetools.ImageToolsApp.class).getContext().getActionMap(ImageToolsUsingBox.class, this); + closeButton.setAction(actionMap.get("closeUsingBox")); // NOI18N + closeButton.setName("closeButton"); // NOI18N - jLabel3.setFont(resourceMap.getFont("jLabel3.font")); // NOI18N - jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N - jLabel3.setMaximumSize(new java.awt.Dimension(350, 50)); - jLabel3.setName("jLabel3"); // NOI18N - jLabel3.setPreferredSize(new java.awt.Dimension(350, 15)); + jScrollPane1.setName("jScrollPane1"); // NOI18N + jScrollPane1.setPreferredSize(new java.awt.Dimension(440, 800)); - jLabel4.setIcon(resourceMap.getIcon("jLabel4.icon")); // NOI18N - jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N - jLabel4.setName("jLabel4"); // NOI18N + jPanel1.setName("jPanel1"); // NOI18N + jPanel1.setPreferredSize(new java.awt.Dimension(440, 800)); + jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); - jLabel5.setFont(resourceMap.getFont("jLabel5.font")); // NOI18N - jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N - jLabel5.setName("jLabel5"); // NOI18N + fileSaveHeading.setIcon(resourceMap.getIcon("fileSaveHeading.icon")); // NOI18N + fileSaveHeading.setText(resourceMap.getString("fileSaveHeading.text")); // NOI18N + fileSaveHeading.setName("fileSaveHeading"); // NOI18N + jPanel1.add(fileSaveHeading, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, -1, -1)); - jLabel6.setIcon(resourceMap.getIcon("jLabel6.icon")); // NOI18N - jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N - jLabel6.setName("jLabel6"); // NOI18N + fileSaveText.setFont(resourceMap.getFont("fileSaveText.font")); // NOI18N + fileSaveText.setText(resourceMap.getString("fileSaveText.text")); // NOI18N + fileSaveText.setMaximumSize(new java.awt.Dimension(350, 50)); + fileSaveText.setName("fileSaveText"); // NOI18N + fileSaveText.setPreferredSize(new java.awt.Dimension(350, 15)); + jPanel1.add(fileSaveText, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 100, 400, 40)); - jLabel7.setFont(resourceMap.getFont("jLabel7.font")); // NOI18N - jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N - jLabel7.setName("jLabel7"); // NOI18N + fileExitHeading.setIcon(resourceMap.getIcon("fileExitHeading.icon")); // NOI18N + fileExitHeading.setText(resourceMap.getString("fileExitHeading.text")); // NOI18N + fileExitHeading.setName("fileExitHeading"); // NOI18N + jPanel1.add(fileExitHeading, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 140, -1, -1)); - jLabel8.setIcon(resourceMap.getIcon("jLabel8.icon")); // NOI18N - jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N - jLabel8.setName("jLabel8"); // NOI18N + fileExitText.setFont(resourceMap.getFont("fileExitText.font")); // NOI18N + fileExitText.setText(resourceMap.getString("fileExitText.text")); // NOI18N + fileExitText.setName("fileExitText"); // NOI18N + jPanel1.add(fileExitText, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 170, -1, -1)); - jLabel9.setFont(resourceMap.getFont("jLabel9.font")); // NOI18N - jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N - jLabel9.setName("jLabel9"); // NOI18N + imageCaptureHeading.setIcon(resourceMap.getIcon("imageCaptureHeading.icon")); // NOI18N + imageCaptureHeading.setText(resourceMap.getString("imageCaptureHeading.text")); // NOI18N + imageCaptureHeading.setName("imageCaptureHeading"); // NOI18N + jPanel1.add(imageCaptureHeading, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 190, -1, -1)); - javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(net.codebuilders.desktop.imagetools.ImageToolsApp.class).getContext().getActionMap(ImageToolsUsingBox.class, this); - closeButton.setAction(actionMap.get("closeUsingBox")); // NOI18N - closeButton.setName("closeButton"); // NOI18N + imageCaptureText.setFont(resourceMap.getFont("imageCaptureText.font")); // NOI18N + imageCaptureText.setText(resourceMap.getString("imageCaptureText.text")); // NOI18N + imageCaptureText.setName("imageCaptureText"); // NOI18N + jPanel1.add(imageCaptureText, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 220, 400, -1)); + imageCropHeading.setIcon(resourceMap.getIcon("imageCropHeading.icon")); // NOI18N + imageCropHeading.setText(resourceMap.getString("imageCropHeading.text")); // NOI18N + imageCropHeading.setName("imageCropHeading"); // NOI18N + jPanel1.add(imageCropHeading, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 270, -1, -1)); + + imageCropText.setFont(resourceMap.getFont("imageCropText.font")); // NOI18N + imageCropText.setText(resourceMap.getString("imageCropText.text")); // NOI18N + imageCropText.setName("imageCropText"); // NOI18N + jPanel1.add(imageCropText, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 300, 400, -1)); + + fileOpenHeading.setIcon(resourceMap.getIcon("fileOpenHeading.icon")); // NOI18N + fileOpenHeading.setText(resourceMap.getString("fileOpenHeading.text")); // NOI18N + fileOpenHeading.setName("fileOpenHeading"); // NOI18N + jPanel1.add(fileOpenHeading, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, -1, -1)); + + fileOpenText.setFont(resourceMap.getFont("fileOpenText.font")); // NOI18N + fileOpenText.setText(resourceMap.getString("fileOpenText.text")); // NOI18N + fileOpenText.setName("fileOpenText"); // NOI18N + jPanel1.add(fileOpenText, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 30, 400, 40)); + + drawLineHeading.setIcon(resourceMap.getIcon("drawLineHeading.icon")); // NOI18N + drawLineHeading.setText(resourceMap.getString("drawLineHeading.text")); // NOI18N + drawLineHeading.setName("drawLineHeading"); // NOI18N + jPanel1.add(drawLineHeading, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 370, -1, -1)); + + drawLineText.setFont(resourceMap.getFont("drawLineText.font")); // NOI18N + drawLineText.setText(resourceMap.getString("drawLineText.text")); // NOI18N + drawLineText.setName("drawLineText"); // NOI18N + jPanel1.add(drawLineText, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 400, 400, 40)); + + drawRectangleHeading.setIcon(resourceMap.getIcon("drawRectangleHeading.icon")); // NOI18N + drawRectangleHeading.setText(resourceMap.getString("drawRectangleHeading.text")); // NOI18N + drawRectangleHeading.setName("drawRectangleHeading"); // NOI18N + jPanel1.add(drawRectangleHeading, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 440, -1, -1)); + + drawRectangleText.setFont(resourceMap.getFont("drawRectangleText.font")); // NOI18N + drawRectangleText.setText(resourceMap.getString("drawRectangleText.text")); // NOI18N + drawRectangleText.setName("drawRectangleText"); // NOI18N + jPanel1.add(drawRectangleText, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 470, 400, -1)); + + drawTextHeading.setIcon(resourceMap.getIcon("drawTextHeading.icon")); // NOI18N + drawTextHeading.setText(resourceMap.getString("drawTextHeading.text")); // NOI18N + drawTextHeading.setName("drawTextHeading"); // NOI18N + jPanel1.add(drawTextHeading, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 510, -1, -1)); + + drawTextText.setFont(resourceMap.getFont("drawTextText.font")); // NOI18N + drawTextText.setText(resourceMap.getString("drawTextText.text")); // NOI18N + drawTextText.setName("drawTextText"); // NOI18N + jPanel1.add(drawTextText, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 540, 400, -1)); + + editUndoHeading.setIcon(resourceMap.getIcon("editUndoHeading.icon")); // NOI18N + editUndoHeading.setText(resourceMap.getString("editUndoHeading.text")); // NOI18N + editUndoHeading.setName("editUndoHeading"); // NOI18N + jPanel1.add(editUndoHeading, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 580, -1, -1)); + + editRedoHeading.setIcon(resourceMap.getIcon("editRedoHeading.icon")); // NOI18N + editRedoHeading.setText(resourceMap.getString("editRedoHeading.text")); // NOI18N + editRedoHeading.setName("editRedoHeading"); // NOI18N + jPanel1.add(editRedoHeading, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 680, -1, -1)); + + editUndoText.setFont(resourceMap.getFont("editUndoText.font")); // NOI18N + editUndoText.setText(resourceMap.getString("editUndoText.text")); // NOI18N + editUndoText.setName("editUndoText"); // NOI18N + jPanel1.add(editUndoText, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 610, 400, -1)); + + editRedoText.setFont(resourceMap.getFont("editRedoText.font")); // NOI18N + editRedoText.setText(resourceMap.getString("editRedoText.text")); // NOI18N + editRedoText.setName("editRedoText"); // NOI18N + jPanel1.add(editRedoText, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 710, 400, -1)); + + jScrollPane1.setViewportView(jPanel1); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() + .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(24, 24, 24) - .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 364, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jLabel1) - .addComponent(jLabel2))) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jLabel6) - .addGroup(layout.createSequentialGroup() - .addGap(12, 12, 12) - .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, 364, Short.MAX_VALUE)))) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(12, 12, 12) - .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 364, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(jLabel4))) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(12, 12, 12) - .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, 364, Short.MAX_VALUE)) - .addComponent(jLabel8))) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addContainerGap(319, Short.MAX_VALUE) - .addComponent(closeButton))) + .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 456, Short.MAX_VALUE) + .addComponent(jLabel1) + .addComponent(closeButton, javax.swing.GroupLayout.Alignment.TRAILING)) .addContainerGap()) ); layout.setVerticalGroup( @@ -153,25 +216,11 @@ .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1) - .addGap(18, 18, 18) - .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jLabel4) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabel5) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) - .addComponent(jLabel6) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addComponent(jLabel8) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabel9) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 71, Short.MAX_VALUE) .addComponent(closeButton) - .addContainerGap()) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); @@ -181,15 +230,29 @@ // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton closeButton; + private javax.swing.JLabel drawLineHeading; + private javax.swing.JLabel drawLineText; + private javax.swing.JLabel drawRectangleHeading; + private javax.swing.JLabel drawRectangleText; + private javax.swing.JLabel drawTextHeading; + private javax.swing.JLabel drawTextText; + private javax.swing.JLabel editRedoHeading; + private javax.swing.JLabel editRedoText; + private javax.swing.JLabel editUndoHeading; + private javax.swing.JLabel editUndoText; + private javax.swing.JLabel fileExitHeading; + private javax.swing.JLabel fileExitText; + private javax.swing.JLabel fileOpenHeading; + private javax.swing.JLabel fileOpenText; + private javax.swing.JLabel fileSaveHeading; + private javax.swing.JLabel fileSaveText; + private javax.swing.JLabel imageCaptureHeading; + private javax.swing.JLabel imageCaptureText; + private javax.swing.JLabel imageCropHeading; + private javax.swing.JLabel imageCropText; private javax.swing.JLabel jLabel1; - private javax.swing.JLabel jLabel2; - private javax.swing.JLabel jLabel3; - private javax.swing.JLabel jLabel4; - private javax.swing.JLabel jLabel5; - private javax.swing.JLabel jLabel6; - private javax.swing.JLabel jLabel7; - private javax.swing.JLabel jLabel8; - private javax.swing.JLabel jLabel9; + private javax.swing.JPanel jPanel1; + private javax.swing.JScrollPane jScrollPane1; // End of variables declaration//GEN-END:variables } Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsUsingBox.properties =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsUsingBox.properties 2009-04-19 14:25:15 UTC (rev 26) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsUsingBox.properties 2009-04-19 16:24:19 UTC (rev 27) @@ -4,31 +4,71 @@ jLabel1.font=Dialog-Bold-16 #NOI18N jLabel1.foreground=83, 130, 161 -jLabel2.text=File > Save +jButton1.text=jButton1 +closeUsingBox.Action.shortDescription=Close dialog box +closeUsingBox.Action.text=Close +Form.title=Using Image Tools +Annotate\ >\ Text.text=jLabel16 +fileSaveHeading.text=File > Save #NOI18N -jLabel2.icon=filesave24.png -jLabel3.text=<html>Launches a File Chooser dialog to select directory and filename of image to save. Filename must include .jpg or .jpeg extension. +fileSaveHeading.icon=filesave24.png +fileOpenHeading.text=File > Open #NOI18N -jLabel3.font=Dialog-Plain-12 -jLabel4.text=File > Exit +fileOpenHeading.icon=fileopen24.png +fileSaveText.text=<html>Launches a File Chooser dialog to select directory and filename of image to save. File extension .jpg is added if missing. #NOI18N -jLabel4.icon=exit24.png -jLabel5.text=<html>Closes all windows without saving, and exits the application. +fileSaveText.font=Dialog-Plain-12 +fileOpenText.text=<html>Launches a File Chooser dialog to select directory and filename of image to open. Filename must include .jpg or .jpeg extension. #NOI18N -jLabel5.font=Dialog-Plain-12 -jLabel6.text=Image > Capture +fileOpenText.font=Dialog-Plain-12 +fileExitHeading.text=File > Exit #NOI18N -jLabel6.icon=camera_unmount24.png -jLabel7.text=<html>Hides the application frame, waits 4 seconds, then captures the display as an image. The image is returned in the application frame to be cropped and/or saved as necessary. +fileExitHeading.icon=exit24.png +drawLineText.text=<html>Click and hold LMB to start line and drag cursor to end location and release. #NOI18N -jLabel7.font=Dialog-Plain-12 -jLabel8.text=Image > Crop +drawLineText.font=Dialog-Plain-12 +drawTextText.text=<html>Click and hold LMB and drag preview to location and release to place text. #NOI18N -jLabel8.icon=editcut24.png -jLabel9.text=<html>Prepare to crop image by pre-selecting a rectangular area using LMB (left mouse button) - hold - drag motion. Unselect area by LMB click anywhere on image. Crop image to selection by command from menubar or toolbar. +drawTextText.font=Dialog-Plain-12 +fileExitText.text=<html>Closes all windows without saving, and exits the application. #NOI18N -jLabel9.font=Dialog-Plain-12 -jButton1.text=jButton1 -closeUsingBox.Action.shortDescription=Close dialog box -closeUsingBox.Action.text=Close -Form.title=Using Image Tools +fileExitText.font=Dialog-Plain-12 +drawRectangleHeading.text=Annotate > Rectangle +#NOI18N +drawRectangleHeading.icon=draw_rectangle24.png +imageCaptureHeading.text=Image > Capture +#NOI18N +imageCaptureHeading.icon=camera_unmount24.png +drawRectangleText.text=<html>Click and hold LMB to start rectangle and drag cursor to location of opposite corner and release. +#NOI18N +drawRectangleText.font=Dialog-Plain-12 +imageCaptureText.text=<html>Hides the application frame, waits 4 seconds, then captures the display as an image. The image is returned in the application frame to be cropped and/or saved as necessary. +#NOI18N +imageCaptureText.font=Dialog-Plain-12 +imageCropHeading.text=Image > Crop +#NOI18N +imageCropHeading.icon=editcut24.png +imageCropText.text=<html>Prepare to crop image by pre-selecting a rectangular area using LMB (left mouse button) - hold - drag motion. Unselect area by LMB click anywhere on image. Crop image to selection by command from menubar or toolbar. +#NOI18N +imageCropText.font=Dialog-Plain-12 +drawLineHeading.text=Annotate > Line +#NOI18N +drawLineHeading.icon=draw_line24.png +drawTextHeading.text=Annotate > Text +#NOI18N +drawTextHeading.icon=draw_text24.png +editUndoHeading.text=Edit > Undo +#NOI18N +editUndoHeading.icon=undo24.png +editUndoText.text=<html>Displays a previously stored image from the undo queue. Repeating undo will display succesive images going back to capture or open. Editing image from queue will empty the queue and set the edited image current. +#NOI18N +editUndoText.font=Dialog-Plain-12 +editRedoHeading.text=Edit > Redo +#NOI18N +editRedoHeading.icon=redo24.png +editRedoText.text=<html>Displays previously stored images from the redo queue. Images are added to this queue by the undo command. Repeating redo will display succesive images going forward until the current image. Editing image from queue will empty the queue and set the edited image current. +#NOI18N +editRedoText.font=Dialog-Plain-12 +closeUsingBox.Action.largeIcon=/net/codebuilders/desktop/imagetools/resources/fileclose24.png +closeUsingBox.Action.smallIcon=/net/codebuilders/desktop/imagetools/resources/fileclose16.png +closeUsingBox.Action.icon=/net/codebuilders/desktop/imagetools/resources/fileclose16.png This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-19 14:25:18
|
Revision: 26 http://imagetools.svn.sourceforge.net/imagetools/?rev=26&view=rev Author: cmarcum Date: 2009-04-19 14:25:15 +0000 (Sun, 19 Apr 2009) Log Message: ----------- Added SplashScreen-Image to manifest template and a copy of splash.png under src due to path to resources was getting line wrapped in manifest file. Modified Paths: -------------- trunk/imagetools/manifest.mf Added Paths: ----------- trunk/imagetools/src/splash.png Modified: trunk/imagetools/manifest.mf =================================================================== --- trunk/imagetools/manifest.mf 2009-04-18 19:57:22 UTC (rev 25) +++ trunk/imagetools/manifest.mf 2009-04-19 14:25:15 UTC (rev 26) @@ -1,3 +1,4 @@ Manifest-Version: 1.0 X-COMMENT: Main-Class will be added automatically by build +SplashScreen-Image: splash.png Added: trunk/imagetools/src/splash.png =================================================================== (Binary files differ) Property changes on: trunk/imagetools/src/splash.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-18 19:57:24
|
Revision: 25 http://imagetools.svn.sourceforge.net/imagetools/?rev=25&view=rev Author: cmarcum Date: 2009-04-18 19:57:22 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Changed CodeBuilders logo to small founded and supported by. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/splash.png trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/splash.xcf Added Paths: ----------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/codebuilderslogo2_165x35.png trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/splash_codebuilders.xcf Added: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/codebuilderslogo2_165x35.png =================================================================== (Binary files differ) Property changes on: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/codebuilderslogo2_165x35.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/splash.png =================================================================== (Binary files differ) Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/splash.xcf =================================================================== (Binary files differ) Added: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/splash_codebuilders.xcf =================================================================== (Binary files differ) Property changes on: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/splash_codebuilders.xcf ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-18 17:08:37
|
Revision: 24 http://imagetools.svn.sourceforge.net/imagetools/?rev=24&view=rev Author: cmarcum Date: 2009-04-18 17:08:34 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Removed comment about copyright Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageFileFilter.java Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageFileFilter.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageFileFilter.java 2009-04-18 17:06:45 UTC (rev 23) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageFileFilter.java 2009-04-18 17:08:34 UTC (rev 24) @@ -6,9 +6,6 @@ * an article by Jeff Friesen, JavaWorld.com, 04/24/06 * http://www.javaworld.com/javaworld/jw-04-2006/jw-0424-funandgames.html * - * - * Modified for use with Image Tools - * Copyright applies to modifications only. */ package net.codebuilders.desktop.imagetools; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-18 17:06:46
|
Revision: 23 http://imagetools.svn.sourceforge.net/imagetools/?rev=23&view=rev Author: cmarcum Date: 2009-04-18 17:06:45 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Added message icons Added Paths: ----------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/messagebox_critical24.png trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/messagebox_info24.png trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/messagebox_warning24.png Added: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/messagebox_critical24.png =================================================================== (Binary files differ) Property changes on: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/messagebox_critical24.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/messagebox_info24.png =================================================================== (Binary files differ) Property changes on: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/messagebox_info24.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/messagebox_warning24.png =================================================================== (Binary files differ) Property changes on: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/messagebox_warning24.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-18 17:05:46
|
Revision: 22 http://imagetools.svn.sourceforge.net/imagetools/?rev=22&view=rev Author: cmarcum Date: 2009-04-18 17:05:40 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Added properties and variables for custom message icons Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsView.properties Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-18 16:06:28 UTC (rev 21) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-18 17:05:40 UTC (rev 22) @@ -192,9 +192,10 @@ } }); + errorIcon = resourceMap.getIcon("message.error.icon"); + infoIcon = resourceMap.getIcon("message.info.icon"); + warningIcon = resourceMap.getIcon("message.warning.icon"); - - } // end constructor @Action @@ -789,8 +790,9 @@ * @param message the message to be presented */ public static void showError(String message) { + JOptionPane.showMessageDialog(null, message, "Image Tools", - JOptionPane.ERROR_MESSAGE); + JOptionPane.ERROR_MESSAGE, errorIcon); } /** @@ -800,9 +802,19 @@ */ public static void showInfo(String message) { JOptionPane.showMessageDialog(null, message, "Image Tools", - JOptionPane.INFORMATION_MESSAGE); + JOptionPane.INFORMATION_MESSAGE, infoIcon); } + /** + * Present an information message via a dialog box. + * + * @param message the message to be presented + */ + public static void showWarning(String message) { + JOptionPane.showMessageDialog(null, message, "Image Tools", + JOptionPane.WARNING_MESSAGE); + } + @Action public void showUsingBox() { if (usingBox == null) { @@ -1277,10 +1289,16 @@ private javax.swing.JButton undoButton; private javax.swing.JMenuItem usingMenuItem; // End of variables declaration//GEN-END:variables + + // more variables + private static Icon errorIcon; + private static Icon infoIcon; + private static Icon warningIcon; 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; private JDialog usingBox; @@ -1291,4 +1309,5 @@ private final JFileChooser imageChooser; // added to test new events 2009-03-20 private ImageToolsModel itModel; + } Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsView.properties =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsView.properties 2009-04-18 16:06:28 UTC (rev 21) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsView.properties 2009-04-18 17:05:40 UTC (rev 22) @@ -124,3 +124,9 @@ showAboutBox.Action.largeIcon=/net/codebuilders/desktop/imagetools/resources/help24.png showAboutBox.Action.smallIcon=/net/codebuilders/desktop/imagetools/resources/help16.png showAboutBox.Action.icon=/net/codebuilders/desktop/imagetools/resources/help16.png +#error icon for showError +message.error.icon=/net/codebuilders/desktop/imagetools/resources/messagebox_critical24.png +#error icon for showInfo +message.info.icon=/net/codebuilders/desktop/imagetools/resources/messagebox_info24.png +#error icon for showWarning +message.warning.icon=/net/codebuilders/desktop/imagetools/resources/messagebox_warning24.png This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-18 16:06:32
|
Revision: 21 http://imagetools.svn.sourceforge.net/imagetools/?rev=21&view=rev Author: cmarcum Date: 2009-04-18 16:06:28 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Remove copyright from ImageArea and documented where it and ImageFileFilter originated. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageArea.java trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageFileFilter.java Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageArea.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageArea.java 2009-04-18 12:32:25 UTC (rev 20) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageArea.java 2009-04-18 16:06:28 UTC (rev 21) @@ -1,31 +1,15 @@ /* - * Copyright (C) 2009 Carl B. Marcum - CodeBuilders.net - * Phone (937) 242-6519 - <http://www.codebuilders.net> + * ImageArea.java * - * This file is part of "Image Tools by CodeBuilders.net" - * hereafter referered to as "Image Tools". + * This is a heavily modified version of a file downloaded + * From JavaWorld jw-0424-funandgames.zip that accompanied + * an article by Jeff Friesen, JavaWorld.com, 04/24/06 + * http://www.javaworld.com/javaworld/jw-04-2006/jw-0424-funandgames.html * - * Image Tools is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Image Tools 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Image Tools. If not, see <http://www.gnu.org/licenses/>. + * + * Modified for use with Image Tools */ -// ImageArea.java -// started from code downloaded -// From JavaWorld jw-0424-funandgames.zip -// and article by Jeff Friesen, JavaWorld.com, 04/24/06 -// http://www.javaworld.com/javaworld/jw-04-2006/jw-0424-funandgames.html -// original was crop only -// added the paint lines, text etc. package net.codebuilders.desktop.imagetools; import java.awt.*; Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageFileFilter.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageFileFilter.java 2009-04-18 12:32:25 UTC (rev 20) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageFileFilter.java 2009-04-18 16:06:28 UTC (rev 21) @@ -1,6 +1,15 @@ -// ImageFileFilter.java -// From JavaWorld jw-0424-funandgames.zip -// and article by ??? +/* + * ImageFileFilter.java + * + * This is a file downloaded + * From JavaWorld jw-0424-funandgames.zip that accompanied + * an article by Jeff Friesen, JavaWorld.com, 04/24/06 + * http://www.javaworld.com/javaworld/jw-04-2006/jw-0424-funandgames.html + * + * + * Modified for use with Image Tools + * Copyright applies to modifications only. + */ package net.codebuilders.desktop.imagetools; import java.io.*; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-18 12:32:40
|
Revision: 20 http://imagetools.svn.sourceforge.net/imagetools/?rev=20&view=rev Author: cmarcum Date: 2009-04-18 12:32:25 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Removed 'by CodeBuilders.net' from application title property. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsAboutBox.form trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsAboutBox.java trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsApp.properties trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsView.properties Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsAboutBox.form =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsAboutBox.form 2009-04-18 12:14:31 UTC (rev 19) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsAboutBox.form 2009-04-18 12:32:25 UTC (rev 20) @@ -53,7 +53,7 @@ </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="imageLabel" min="-2" pref="177" max="32767" attributes="0"/> + <Component id="imageLabel" min="-2" pref="183" max="32767" attributes="0"/> <Group type="102" alignment="0" attributes="0"> <EmptySpace max="-2" attributes="0"/> <Component id="appTitleLabel" min="-2" max="-2" attributes="0"/> @@ -74,7 +74,7 @@ <Component id="homepageLabel" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="appHomepageLabel" alignment="3" min="-2" max="-2" attributes="0"/> </Group> - <EmptySpace pref="9" max="32767" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> <Component id="closeButton" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> </Group> Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsAboutBox.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsAboutBox.java 2009-04-18 12:14:31 UTC (rev 19) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsAboutBox.java 2009-04-18 12:32:25 UTC (rev 20) @@ -126,7 +126,7 @@ ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(imageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 177, Short.MAX_VALUE) + .addComponent(imageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 183, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(appTitleLabel) @@ -144,7 +144,7 @@ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(homepageLabel) .addComponent(appHomepageLabel)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(closeButton) .addContainerGap()) ); Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsApp.properties =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsApp.properties 2009-04-18 12:14:31 UTC (rev 19) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsApp.properties 2009-04-18 12:32:25 UTC (rev 20) @@ -1,10 +1,10 @@ # Application global resources Application.name = imagetools -Application.title = Image Tools by CodeBuilders.net +Application.title = Image Tools Application.version = 1.2.0 Application.vendor = CodeBuilders.net -Application.homepage = http://www.codebuilders.net +Application.homepage = http://imagetools.sourceforge.net Application.description = An application to capture an image of the display, \ crop if necessary, and save the image. Application.vendorId = CodeBuilders.net Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsView.properties =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsView.properties 2009-04-18 12:14:31 UTC (rev 19) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsView.properties 2009-04-18 12:32:25 UTC (rev 20) @@ -4,10 +4,7 @@ fileMenu.text = File helpMenu.text = Help - -# @Action resources - -showAboutBox.Action.text = &About... +showAboutBox.Action.text = About... showAboutBox.Action.shortDescription = Show the application's information dialog # status bar resources @@ -121,3 +118,9 @@ rectangleButton.text= textButton.text= lineButton.text= +drawLineItem.text=Line +drawRectangleItem.text=Rectangle +drawTextItem.text=Text +showAboutBox.Action.largeIcon=/net/codebuilders/desktop/imagetools/resources/help24.png +showAboutBox.Action.smallIcon=/net/codebuilders/desktop/imagetools/resources/help16.png +showAboutBox.Action.icon=/net/codebuilders/desktop/imagetools/resources/help16.png This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-18 12:14:35
|
Revision: 19 http://imagetools.svn.sourceforge.net/imagetools/?rev=19&view=rev Author: cmarcum Date: 2009-04-18 12:14:31 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Added icon to closeAboutBox action Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsAboutBox.properties Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsAboutBox.properties =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsAboutBox.properties 2009-04-18 11:49:48 UTC (rev 18) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsAboutBox.properties 2009-04-18 12:14:31 UTC (rev 19) @@ -1,6 +1,6 @@ title = About: ${Application.title} ${Application.version} -closeAboutBox.Action.text = &Close +closeAboutBox.Action.text = Close appDescLabel.text=<html>${Application.description} @@ -13,3 +13,7 @@ camera_unmount128.icon=camera_unmount128.png #NOI18N appTitleLabel.foreground=83, 130, 161 +closeAboutBox.Action.shortDescription=Close about box +closeAboutBox.Action.largeIcon=/net/codebuilders/desktop/imagetools/resources/fileclose24.png +closeAboutBox.Action.smallIcon=/net/codebuilders/desktop/imagetools/resources/fileclose16.png +closeAboutBox.Action.icon=/net/codebuilders/desktop/imagetools/resources/fileclose16.png This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-18 11:49:50
|
Revision: 18 http://imagetools.svn.sourceforge.net/imagetools/?rev=18&view=rev Author: cmarcum Date: 2009-04-18 11:49:48 +0000 (Sat, 18 Apr 2009) Log Message: ----------- Added draw menu items to Annotate menu in the menu bar. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.form trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.form =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.form 2009-04-10 21:07:07 UTC (rev 17) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.form 2009-04-18 11:49:48 UTC (rev 18) @@ -166,6 +166,35 @@ <Property name="text" type="java.lang.String" resourceKey="drawMenu.text"/> <Property name="name" type="java.lang.String" value="drawMenu" noResource="true"/> </Properties> + <SubComponents> + <MenuItem class="javax.swing.JMenuItem" name="drawLineItem"> + <Properties> + <Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor"> + <action class="net.codebuilders.desktop.imagetools.ImageToolsView" id="drawLine" methodName="drawLine"/> + </Property> + <Property name="text" type="java.lang.String" resourceKey="drawLineItem.text"/> + <Property name="name" type="java.lang.String" value="drawLineItem" noResource="true"/> + </Properties> + </MenuItem> + <MenuItem class="javax.swing.JMenuItem" name="drawRectangleItem"> + <Properties> + <Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor"> + <action class="net.codebuilders.desktop.imagetools.ImageToolsView" id="drawRectangle" methodName="drawRectangle"/> + </Property> + <Property name="text" type="java.lang.String" resourceKey="drawRectangleItem.text"/> + <Property name="name" type="java.lang.String" value="drawRectangleItem" noResource="true"/> + </Properties> + </MenuItem> + <MenuItem class="javax.swing.JMenuItem" name="drawTextItem"> + <Properties> + <Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor"> + <action class="net.codebuilders.desktop.imagetools.ImageToolsView" id="drawText" methodName="drawText"/> + </Property> + <Property name="text" type="java.lang.String" resourceKey="drawTextItem.text"/> + <Property name="name" type="java.lang.String" value="drawTextItem" noResource="true"/> + </Properties> + </MenuItem> + </SubComponents> </Menu> <Menu class="javax.swing.JMenu" name="helpMenu"> <Properties> Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-10 21:07:07 UTC (rev 17) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-18 11:49:48 UTC (rev 18) @@ -232,6 +232,9 @@ imageCaptureItem = new javax.swing.JMenuItem(); imageCropItem = new javax.swing.JMenuItem(); drawMenu = new javax.swing.JMenu(); + drawLineItem = new javax.swing.JMenuItem(); + drawRectangleItem = new javax.swing.JMenuItem(); + drawTextItem = new javax.swing.JMenuItem(); javax.swing.JMenu helpMenu = new javax.swing.JMenu(); usingMenuItem = new javax.swing.JMenuItem(); javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem(); @@ -345,6 +348,22 @@ drawMenu.setText(resourceMap.getString("drawMenu.text")); // NOI18N drawMenu.setName("drawMenu"); // NOI18N + + drawLineItem.setAction(actionMap.get("drawLine")); // NOI18N + drawLineItem.setText(resourceMap.getString("drawLineItem.text")); // NOI18N + drawLineItem.setName("drawLineItem"); // NOI18N + drawMenu.add(drawLineItem); + + drawRectangleItem.setAction(actionMap.get("drawRectangle")); // NOI18N + drawRectangleItem.setText(resourceMap.getString("drawRectangleItem.text")); // NOI18N + drawRectangleItem.setName("drawRectangleItem"); // NOI18N + drawMenu.add(drawRectangleItem); + + drawTextItem.setAction(actionMap.get("drawText")); // NOI18N + drawTextItem.setText(resourceMap.getString("drawTextItem.text")); // NOI18N + drawTextItem.setName("drawTextItem"); // NOI18N + drawMenu.add(drawTextItem); + menuBar.add(drawMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N @@ -1224,7 +1243,10 @@ private javax.swing.JButton closeButton; private javax.swing.JButton cropButton; private javax.swing.ButtonGroup drawButtonGroup; + private javax.swing.JMenuItem drawLineItem; private javax.swing.JMenu drawMenu; + private javax.swing.JMenuItem drawRectangleItem; + private javax.swing.JMenuItem drawTextItem; private javax.swing.JMenu editMenu; private javax.swing.JMenuItem editRedoItem; private javax.swing.JMenuItem editUndoItem; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-10 21:07:10
|
Revision: 17 http://imagetools.svn.sourceforge.net/imagetools/?rev=17&view=rev Author: cmarcum Date: 2009-04-10 21:07:07 +0000 (Fri, 10 Apr 2009) Log Message: ----------- Changed status message to explain text dragging. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-10 21:05:49 UTC (rev 16) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-10 21:07:07 UTC (rev 17) @@ -823,7 +823,7 @@ imageArea.setMouseEvtType(ImageArea.DRAW_TEXT); // imageArea.setupTextMouseListeners(); done in setMouseEvtType - statusMessageLabel.setText("Pick text origin - ESC to cancel."); + statusMessageLabel.setText("Hold LMB to drag, release to place."); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-10 21:05:57
|
Revision: 16 http://imagetools.svn.sourceforge.net/imagetools/?rev=16&view=rev Author: cmarcum Date: 2009-04-10 21:05:49 +0000 (Fri, 10 Apr 2009) Log Message: ----------- Added mouseDragged method to textMouseListener and paintText method to allow dragging text before placement. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageArea.java Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageArea.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageArea.java 2009-04-10 19:48:49 UTC (rev 15) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageArea.java 2009-04-10 21:05:49 UTC (rev 16) @@ -80,12 +80,21 @@ * for drawing a line */ private Line2D lineSelection; + /** * Location and extents of selection point. * for drawing text */ private Point2D pointSelection; + /** + * Location and extents of selection point. + * for drawing text + */ + private String drawText; + + + /** * Ready to crop, usually after rectangle selection */ private boolean readyToCrop; @@ -107,31 +116,26 @@ // Create a selection Rectangle. It's better to create one Rectangle // here than a Rectangle each time paintComponent() is called, to reduce // unnecessary object creation. - rectSelection = new Rectangle(); lineSelection = new Line2D.Float(); - + pointSelection = new Point2D.Float(); // Define the stroke for drawing selection rectangle outline. - bsSelect = new BasicStroke(5, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 0, new float[]{12, 12}, 0); // Define the gradient paint for coloring selection rectangle outline. - gpSelect = new GradientPaint(0.0f, 0.0f, Color.red, 1.0f, 1.0f, Color.white, true); // Define the stroke for drawing annotation. - bsAnnotate = new BasicStroke(2, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND); // Define the gradient paint for coloring annotation. - gpAnnotate = new GradientPaint(0.0f, 0.0f, Color.red, 1.0f, 1.0f, Color.white, true); @@ -249,7 +253,7 @@ break; case DRAW_TEXT: - ; + this.paintText(g); break; case DRAW_RECTANGLE: @@ -317,9 +321,24 @@ g2d.dispose(); + } // end if + } + // called by paintComponent + public void paintText(Graphics g) { + // paint text + // Draw the text if the mouse has moved. + if (srcx != destx || srcy != desty) { + + // Draw selection line. + Graphics2D g2d = (Graphics2D) g; + + g2d.setColor(Color.DARK_GRAY); + g2d.drawString(drawText, destx, desty); + g2d.dispose(); + } // end if } @@ -501,7 +520,7 @@ } - + // draw the real rectangle g2d.setStroke(bsAnnotate); // g2d.setPaint(gpAnnotate); @@ -649,6 +668,11 @@ if (image == null) { return; } + + // save a local copy of the text + // get the model to get text from + ImageToolsModel itModel = ImageToolsApp.getApplication().getItModel(); + drawText = itModel.getText(); destx = srcx = e.getX(); desty = srcy = e.getY(); @@ -658,7 +682,6 @@ @Override public void mouseReleased(MouseEvent e) { - // BufferedImage bi = (BufferedImage) getImage(); int width = image.getWidth(null); int height = image.getHeight(null); @@ -667,8 +690,6 @@ BufferedImage.TYPE_INT_RGB); Graphics2D g2d = biNew.createGraphics(); - //Graphics2D g2d = bi.createGraphics(); - // Copy current image to old try { BufferedImage biOld = (BufferedImage) image; @@ -682,26 +703,36 @@ } - - // get the model to get text from - ImageToolsModel itModel = ImageToolsApp.getApplication().getItModel(); - - - // draw the real line - // g2d.setStroke(bsAnnotate); - // g2d.setPaint(gpAnnotate); g2d.setColor(Color.RED); - // g2d.draw(lineSelection); // TODO add font info - g2d.drawString(itModel.getText(), srcx, srcy); + g2d.drawString(drawText, destx, desty); setImage(biNew, true); } }; this.addMouseListener(ml); + this.mml = new MouseMotionAdapter() { + @Override + public void mouseDragged(MouseEvent e) { + // When you start Capture, there is no captured image. + // Therefore, it makes no sense to try and select a + // subimage. This is the reason for the if (image == null) + // test. + if (image == null) { + return; + } + + destx = e.getX(); + desty = e.getY(); + + repaint(); + } + }; + this.addMouseMotionListener(mml); + } public void tearDownMouseListeners() { @@ -738,7 +769,7 @@ this.setupTextMouseListeners(); break; - case DRAW_RECTANGLE: + case DRAW_RECTANGLE: this.setupRectangleMouseListeners(); break; } // end switch This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-10 19:49:08
|
Revision: 15 http://imagetools.svn.sourceforge.net/imagetools/?rev=15&view=rev Author: cmarcum Date: 2009-04-10 19:48:49 +0000 (Fri, 10 Apr 2009) Log Message: ----------- Added body to fileClose method. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.form trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.form =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.form 2009-04-10 19:10:50 UTC (rev 14) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.form 2009-04-10 19:48:49 UTC (rev 15) @@ -24,8 +24,8 @@ <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> <EmptySpace max="-2" attributes="0"/> - <Component id="jLabel1" min="-2" pref="338" max="-2" attributes="0"/> - <EmptySpace pref="13" max="32767" attributes="0"/> + <Component id="jLabel1" min="-2" pref="310" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -33,6 +33,7 @@ <SubComponents> <Component class="javax.swing.JLabel" name="jLabel1"> <Properties> + <Property name="horizontalAlignment" type="int" value="0"/> <Property name="icon" type="javax.swing.Icon" resourceKey="splash.icon"/> <Property name="text" type="java.lang.String" resourceKey="jLabel1.text"/> <Property name="name" type="java.lang.String" value="jLabel1" noResource="true"/> @@ -453,6 +454,6 @@ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="2"/> <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> - <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-62,0,0,1,-84"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-94,0,0,1,-84"/> </AuxValues> </Form> Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-10 19:10:50 UTC (rev 14) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-10 19:48:49 UTC (rev 15) @@ -44,7 +44,6 @@ import java.util.Iterator; import javax.imageio.IIOImage; import javax.imageio.ImageIO; -import javax.imageio.ImageReader; import javax.imageio.ImageWriteParam; import javax.imageio.ImageWriter; import javax.imageio.stream.FileImageInputStream; @@ -260,6 +259,7 @@ mainPanel.setName("mainPanel"); // NOI18N mainPanel.setPreferredSize(new java.awt.Dimension(425, 350)); + jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(net.codebuilders.desktop.imagetools.ImageToolsApp.class).getContext().getResourceMap(ImageToolsView.class); jLabel1.setIcon(resourceMap.getIcon("splash.icon")); // NOI18N jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N @@ -278,8 +278,8 @@ mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(mainPanelLayout.createSequentialGroup() .addContainerGap() - .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 338, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(13, Short.MAX_VALUE)) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 310, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); menuBar.setName("menuBar"); // NOI18N @@ -940,7 +940,32 @@ @Action(enabledProperty = "fileCloseEnabled", selectedProperty = "fileCloseSelected") public void fileClose() { - // TODO fileClose method + + // put the label back in + this.setComponent(jLabel1); + // empty the queues + itModel.undoQueue.clear(); + itModel.redoQueue.clear(); + + statusMessageLabel.setText("Open file or capture image."); + + // setup button enabled status after a capture + this.setFileOpenEnabled(true); + this.setFileSaveEnabled(false); + this.setFileCloseEnabled(false); + this.setCaptureEnabled(true); + this.setCropEnabled(false); + this.setDrawLineEnabled(false); + this.setDrawRectangleEnabled(false); + this.setDrawTextEnabled(false); + this.setUndoEnabled(!itModel.undoQueue.isEmpty()); + this.setRedoEnabled(!itModel.redoQueue.isEmpty()); + + // force a re-layout + this.getRootPane().validate(); + // resize the frame + this.getFrame().pack(); + } @Action This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-10 19:10:53
|
Revision: 14 http://imagetools.svn.sourceforge.net/imagetools/?rev=14&view=rev Author: cmarcum Date: 2009-04-10 19:10:50 +0000 (Fri, 10 Apr 2009) Log Message: ----------- Added body to fileOpen method. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-10 14:51:48 UTC (rev 13) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-10 19:10:50 UTC (rev 14) @@ -25,6 +25,9 @@ package net.codebuilders.desktop.imagetools; import java.awt.event.KeyListener; +import java.io.FileNotFoundException; +import java.util.logging.Level; +import java.util.logging.Logger; import org.jdesktop.application.Action; import org.jdesktop.application.ResourceMap; import org.jdesktop.application.SingleFrameApplication; @@ -41,8 +44,10 @@ import java.util.Iterator; import javax.imageio.IIOImage; import javax.imageio.ImageIO; +import javax.imageio.ImageReader; import javax.imageio.ImageWriteParam; import javax.imageio.ImageWriter; +import javax.imageio.stream.FileImageInputStream; import javax.imageio.stream.ImageOutputStream; import javax.swing.Timer; import javax.swing.Icon; @@ -68,10 +73,10 @@ // filter, and restrict the files that can be selected to those ending // with .jpg or .jpeg extensions. - fcSave = new JFileChooser(); - fcSave.setCurrentDirectory(new File(System.getProperty("user.dir"))); - fcSave.setAcceptAllFileFilterUsed(false); - fcSave.setFileFilter(new ImageFileFilter()); + imageChooser = new JFileChooser(); + imageChooser.setCurrentDirectory(new File(System.getProperty("user.dir"))); + imageChooser.setAcceptAllFileFilterUsed(false); + imageChooser.setFileFilter(new ImageFileFilter()); itModel = new ImageToolsModel(); @@ -188,9 +193,9 @@ } }); - - + + } // end constructor @Action @@ -518,7 +523,7 @@ private void lineButtonKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_lineButtonKeyPressed // if ESC key, unselect button - if(evt.getKeyCode() == KeyEvent.VK_ESCAPE) { + if (evt.getKeyCode() == KeyEvent.VK_ESCAPE) { drawButtonGroup.clearSelection(); imageArea.tearDownMouseListeners(); } @@ -527,7 +532,7 @@ private void rectangleButtonKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_rectangleButtonKeyPressed // if ESC key, unselect button - if(evt.getKeyCode() == KeyEvent.VK_ESCAPE) { + if (evt.getKeyCode() == KeyEvent.VK_ESCAPE) { drawButtonGroup.clearSelection(); imageArea.tearDownMouseListeners(); } @@ -535,7 +540,7 @@ private void textButtonKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_textButtonKeyPressed // if ESC key, unselect button - if(evt.getKeyCode() == KeyEvent.VK_ESCAPE) { + if (evt.getKeyCode() == KeyEvent.VK_ESCAPE) { drawButtonGroup.clearSelection(); imageArea.tearDownMouseListeners(); } @@ -667,8 +672,8 @@ // Present the "save" file chooser without any file selected. // If the user cancels this file chooser, exit this method. - fcSave.setSelectedFile(null); - if (fcSave.showSaveDialog(mainFrame) != + imageChooser.setSelectedFile(null); + if (imageChooser.showSaveDialog(mainFrame) != JFileChooser.APPROVE_OPTION) { return; } @@ -677,8 +682,8 @@ // must be .jpg or .jpeg. If extension not present, append // .jpg extension. - File file = fcSave.getSelectedFile(); - + File file = imageChooser.getSelectedFile(); + String path = file.getAbsolutePath(); // temp path changed to lowercase String tempPath = path.toLowerCase(); @@ -862,7 +867,75 @@ @Action(enabledProperty = "fileOpenEnabled", selectedProperty = "fileOpenSelected") public void fileOpen() { - // TODO fileOpen method + + File file = null; + FileImageInputStream inputStream = null; + BufferedImage bi = null; + + // Present the "open" file chooser without any file selected. + // If the user cancels this file chooser, exit this method. + + imageChooser.setSelectedFile(null); + if (imageChooser.showOpenDialog(mainFrame) != + JFileChooser.APPROVE_OPTION) { + return; + } + + // Obtain the selected file. Validate its extension, which + // must be .jpg or .jpeg. If extension not present, append + // .jpg extension. + + file = imageChooser.getSelectedFile(); + + // check if file exists and make sure it's an image(or .jpg) + // if not show an error box + // TODO see if file is jpg - user can still type in a filename in chooser + if (file.exists()) { + // open it + try { + + inputStream = new FileImageInputStream(file); + } catch (FileNotFoundException ex) { + Logger.getLogger(ImageToolsView.class.getName()).log(Level.SEVERE, null, ex); + } catch (IOException ex) { + Logger.getLogger(ImageToolsView.class.getName()).log(Level.SEVERE, null, ex); + } + try { + bi = ImageIO.read(inputStream); + } catch (IOException ex) { + Logger.getLogger(ImageToolsView.class.getName()).log(Level.SEVERE, null, ex); + } + + itModel.setImage(bi); + + imageArea.setImage(itModel.getImage(), false); + + JScrollPane scrollPane = new JScrollPane(imageArea); + + // switch to new panel with image + this.setComponent(scrollPane); + + statusMessageLabel.setText("Select area to crop."); + + // setup button enabled status after a capture + this.setFileOpenEnabled(false); + this.setFileSaveEnabled(true); + this.setFileCloseEnabled(true); + this.setCaptureEnabled(false); + this.setCropEnabled(true); + this.setDrawLineEnabled(true); + this.setDrawRectangleEnabled(true); + this.setDrawTextEnabled(true); + this.setUndoEnabled(!itModel.undoQueue.isEmpty()); + this.setRedoEnabled(!itModel.redoQueue.isEmpty()); + + // force a re-layout + this.getRootPane().validate(); + + } else { + showError("File to open is not a usable image"); + } + } @Action(enabledProperty = "fileCloseEnabled", selectedProperty = "fileCloseSelected") @@ -1168,7 +1241,7 @@ // private ImageToolsModel itModel; ref from app private JFrame mainFrame; private ImageArea imageArea; - private final JFileChooser fcSave; + private final JFileChooser imageChooser; // added to test new events 2009-03-20 private ImageToolsModel itModel; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-10 14:52:00
|
Revision: 13 http://imagetools.svn.sourceforge.net/imagetools/?rev=13&view=rev Author: cmarcum Date: 2009-04-10 14:51:48 +0000 (Fri, 10 Apr 2009) Log Message: ----------- Fixed cropImage to use the DRAW_CROP_RECTANGLE due to changing the constant name in ImageArea. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-09 00:47:18 UTC (rev 12) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/ImageToolsView.java 2009-04-10 14:51:48 UTC (rev 13) @@ -614,7 +614,7 @@ public void cropImage() { // setup the mouse event for rectangle - imageArea.setMouseEvtType(ImageArea.DRAW_RECTANGLE); + imageArea.setMouseEvtType(ImageArea.DRAW_CROP_RECTANGLE); if (imageArea.isReadyToCrop()) { boolean succeeded = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2009-04-09 00:47:31
|
Revision: 12 http://imagetools.svn.sourceforge.net/imagetools/?rev=12&view=rev Author: cmarcum Date: 2009-04-09 00:47:18 +0000 (Thu, 09 Apr 2009) Log Message: ----------- Added path to splash.icon property. Modified Paths: -------------- trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsApp.properties Modified: trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsApp.properties =================================================================== --- trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsApp.properties 2009-04-09 00:42:06 UTC (rev 11) +++ trunk/imagetools/src/net/codebuilders/desktop/imagetools/resources/ImageToolsApp.properties 2009-04-09 00:47:18 UTC (rev 12) @@ -11,7 +11,7 @@ Application.id = imagetools Application.lookAndFeel = system #NOI18N -splash.icon=splash.png +splash.icon=/net/codebuilders/desktop/imagetools/resources/splash.png quit.Action.smallIcon=/net/codebuilders/desktop/imagetools/resources/exit16.png quit.Action.icon=/net/codebuilders/desktop/imagetools/resources/exit16.png quit.Action.shortDescription=Exit the application This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |