diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties index 965073e..222ae47 100755 --- a/nbproject/private/private.properties +++ b/nbproject/private/private.properties @@ -1,2 +1,2 @@ -jaxws.endorsed.dir=/usr/local/netbeans-6.1/java2/modules/ext/jaxws21/api -user.properties.file=/home/jdbernard/.netbeans/6.1/build.properties +jaxws.endorsed.dir=C:\\Program Files\\NetBeans 6.1\\java2\\modules\\ext\\jaxws21\\api +user.properties.file=C:\\Documents and Settings\\jbernard\\.netbeans\\6.1\\build.properties diff --git a/src/jdbernard/timestamper/NotesDialog.java b/src/jdbernard/timestamper/NotesDialog.java index 079e03e..2775349 100755 --- a/src/jdbernard/timestamper/NotesDialog.java +++ b/src/jdbernard/timestamper/NotesDialog.java @@ -30,6 +30,7 @@ public class NotesDialog extends JDialog implements MouseMotionListener { thinNotesFont = notesTextArea.getFont().deriveFont(Font.PLAIN); boldNotesFont = notesTextArea.getFont().deriveFont(Font.BOLD); + setLocationRelativeTo(parent.getFrame()); this.parent = parent; } diff --git a/src/jdbernard/timestamper/TimeStamperApp.java b/src/jdbernard/timestamper/TimeStamperApp.java index 2f798b2..a18f460 100755 --- a/src/jdbernard/timestamper/TimeStamperApp.java +++ b/src/jdbernard/timestamper/TimeStamperApp.java @@ -88,7 +88,7 @@ implements Application.ExitListener { */ @Override protected void startup() { show(new TimeStamperView(this)); - getMainFrame().setSize(350, 60); + getMainFrame().setSize(300, 60); getApplication().addExitListener(this); } diff --git a/src/jdbernard/timestamper/TimeStamperView.form b/src/jdbernard/timestamper/TimeStamperView.form index e43b23b..ecf7949 100755 --- a/src/jdbernard/timestamper/TimeStamperView.form +++ b/src/jdbernard/timestamper/TimeStamperView.form @@ -22,33 +22,27 @@ <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="1" attributes="0"> + <Group type="102" alignment="0" attributes="0"> <Component id="totalTimeNow" min="-2" max="-2" attributes="0"/> - <EmptySpace pref="12" max="32767" attributes="0"/> + <EmptySpace pref="29" max="32767" attributes="0"/> <Component id="currentTimeLabel" min="-2" max="-2" attributes="0"/> </Group> - <Component id="taskTextField" alignment="0" pref="229" max="32767" attributes="1"/> - <Group type="102" alignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> <Component id="currentTaskLabel" min="-2" max="-2" attributes="1"/> <EmptySpace max="-2" attributes="0"/> - <Component id="startTimeLabel" min="-2" max="-2" attributes="1"/> + <Component id="startTimeLabel" pref="87" max="32767" attributes="1"/> </Group> + <Component id="taskTextField" alignment="0" pref="246" max="32767" attributes="1"/> </Group> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace pref="109" max="32767" attributes="0"/> - <Component id="optionsButton" min="-2" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="0" max="-2" attributes="0"/> - <Component id="exitButton" min="-2" max="-2" attributes="0"/> - </Group> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Component id="notesButton" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="optionsButton" min="-2" max="-2" attributes="0"/> + <Component id="notesButton" min="-2" max="-2" attributes="0"/> </Group> + <EmptySpace min="-2" pref="0" max="-2" attributes="0"/> + <Component id="exitButton" min="-2" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -58,26 +52,24 @@ <Group type="103" groupAlignment="0" attributes="0"> <Component id="exitButton" alignment="0" min="-2" pref="16" max="-2" attributes="0"/> <Component id="optionsButton" alignment="0" min="-2" max="-2" attributes="0"/> - <Group type="102" alignment="0" attributes="0"> - <Group type="103" groupAlignment="1" attributes="0"> - <Component id="notesButton" alignment="1" min="-2" max="-2" attributes="0"/> - <Group type="102" alignment="1" attributes="0"> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="currentTaskLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="startTimeLabel" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace min="-2" pref="0" max="-2" attributes="0"/> - <Component id="taskTextField" min="-2" max="-2" attributes="0"/> - </Group> - </Group> - <EmptySpace min="-2" pref="0" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="currentTimeLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="totalTimeNow" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> + <Group type="103" alignment="0" groupAlignment="3" attributes="0"> + <Component id="currentTaskLabel" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="startTimeLabel" alignment="3" min="-2" max="-2" attributes="0"/> </Group> </Group> - <EmptySpace pref="31" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="0" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="taskTextField" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="0" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="totalTimeNow" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="currentTimeLabel" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Component id="notesButton" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="312" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -256,6 +248,6 @@ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> <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,0,91,0,0,1,-128"/> + <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,0,83,0,0,1,47"/> </AuxValues> </Form> diff --git a/src/jdbernard/timestamper/TimeStamperView.java b/src/jdbernard/timestamper/TimeStamperView.java index a82ac87..063ddbe 100755 --- a/src/jdbernard/timestamper/TimeStamperView.java +++ b/src/jdbernard/timestamper/TimeStamperView.java @@ -34,6 +34,9 @@ public class TimeStamperView extends FrameView implements MouseMotionListener { getFrame().setUndecorated(true); + getFrame().setIconImage(resourceMap.getImageIcon("Application.icon") + .getImage()); + fileChooser = new JFileChooser(); notesDialog = new NotesDialog(this, false); @@ -193,25 +196,21 @@ public class TimeStamperView extends FrameView implements MouseMotionListener { .addGroup(mainPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup() - .addComponent(totalTimeNow) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE) - .addComponent(currentTimeLabel)) - .addComponent(taskTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE) .addGroup(mainPanelLayout.createSequentialGroup() + .addComponent(totalTimeNow) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE) + .addComponent(currentTimeLabel)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup() .addComponent(currentTaskLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(startTimeLabel))) - .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(mainPanelLayout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 109, Short.MAX_VALUE) - .addComponent(optionsButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, 0) - .addComponent(exitButton)) - .addGroup(mainPanelLayout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(notesButton) - .addContainerGap()))) + .addComponent(startTimeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 87, Short.MAX_VALUE)) + .addComponent(taskTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 246, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(optionsButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(notesButton)) + .addGap(0, 0, 0) + .addComponent(exitButton)) ); mainPanelLayout.setVerticalGroup( mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -219,20 +218,19 @@ public class TimeStamperView extends FrameView implements MouseMotionListener { .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(exitButton, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(optionsButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(currentTaskLabel) + .addComponent(startTimeLabel))) + .addGap(0, 0, 0) + .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(mainPanelLayout.createSequentialGroup() - .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(notesButton) - .addGroup(mainPanelLayout.createSequentialGroup() - .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(currentTaskLabel) - .addComponent(startTimeLabel)) - .addGap(0, 0, 0) - .addComponent(taskTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addComponent(taskTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(currentTimeLabel) - .addComponent(totalTimeNow)))) - .addContainerGap(31, Short.MAX_VALUE)) + .addComponent(totalTimeNow) + .addComponent(currentTimeLabel))) + .addComponent(notesButton)) + .addGap(312, 312, 312)) ); optionsMenu.setName("optionsMenu"); // NOI18N diff --git a/src/jdbernard/timestamper/resources/TimeStamperApp.properties b/src/jdbernard/timestamper/resources/TimeStamperApp.properties index 531d45a..cfe52ad 100755 --- a/src/jdbernard/timestamper/resources/TimeStamperApp.properties +++ b/src/jdbernard/timestamper/resources/TimeStamperApp.properties @@ -9,6 +9,7 @@ Application.description = A simple Java desktop application based on Swing Appli Application.vendorId = Sun Application.id = ${Application.name} Application.lookAndFeel = system +Application.icon=/jdbernard/timestamper/resources/icons/appointment-new-16x16.png quit.Action.text=Exit quit.Action.accelerator=ctrl pressed Q quit.Action.smallIcon=/jdbernard/timestamper/resources/icons/16-em-cross.png diff --git a/src/jdbernard/timestamper/resources/icons/appointment-new-16x16.png b/src/jdbernard/timestamper/resources/icons/appointment-new-16x16.png new file mode 100755 index 0000000..18b7c67 Binary files /dev/null and b/src/jdbernard/timestamper/resources/icons/appointment-new-16x16.png differ