Merge lp:~tapaal-contributor/tapaal/bug959196 into lp:tapaal

Proposed by Mathias Andersen
Status: Merged
Approved by: Kenneth Yrke Jørgensen
Approved revision: 699
Merged at revision: 701
Proposed branch: lp:~tapaal-contributor/tapaal/bug959196
Merge into: lp:tapaal
Diff against target: 136 lines (+44/-36)
2 files modified
src/pipe/gui/widgets/AnnotationPanel.java (+43/-36)
src/pipe/gui/widgets/ConstantsDialogPanel.java (+1/-0)
To merge this branch: bzr merge lp:~tapaal-contributor/tapaal/bug959196
Reviewer Review Type Date Requested Status
Kenneth Yrke Jørgensen Approve
Jiri Srba Approve
Review via email: mp+104016@code.launchpad.net

Commit message

The buttons of the edit annotation dialog has been modified to have a look and feel similar to other dialogs.

Description of the change

The buttons of the edit annotation dialog has been modified to have a look and feel similar to other dialogs.

To post a comment you must log in.
Revision history for this message
Jiri Srba (srba) wrote :

Make new annotation, don't write anything and click "Cancel". The dialog is closed
but an empty square is created on the editing panel.

review: Needs Fixing
Revision history for this message
Jiri Srba (srba) wrote :

I will make a separate bug report for this. The branch improves the layout of the
buttons, so it can be merged to trunk and 2.1 now.

review: Approve
Revision history for this message
Kenneth Yrke Jørgensen (yrke) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/pipe/gui/widgets/AnnotationPanel.java'
--- src/pipe/gui/widgets/AnnotationPanel.java 2011-09-23 21:23:31 +0000
+++ src/pipe/gui/widgets/AnnotationPanel.java 2012-04-29 12:32:18 +0000
@@ -1,8 +1,14 @@
1package pipe.gui.widgets;1package pipe.gui.widgets;
22
3import java.awt.BorderLayout;3import java.awt.BorderLayout;
4import java.awt.Color;
4import java.awt.Dimension;5import java.awt.Dimension;
6import java.awt.GridBagConstraints;
7import java.awt.GridBagLayout;
8import java.awt.Insets;
9import java.awt.event.KeyEvent;
510
11import javax.swing.JPanel;
6import javax.swing.JSplitPane;12import javax.swing.JSplitPane;
713
8import pipe.gui.graphicElements.AnnotationNote;14import pipe.gui.graphicElements.AnnotationNote;
@@ -41,6 +47,10 @@
41 // <editor-fold defaultstate="collapsed"47 // <editor-fold defaultstate="collapsed"
42 // desc=" Generated Code ">//GEN-BEGIN:initComponents48 // desc=" Generated Code ">//GEN-BEGIN:initComponents
43 private void initComponents() {49 private void initComponents() {
50 JPanel container;
51 container = new JPanel();
52 container.setLayout(new GridBagLayout());
53
44 java.awt.GridBagConstraints gridBagConstraints;54 java.awt.GridBagConstraints gridBagConstraints;
4555
46 panel = new javax.swing.JPanel();56 panel = new javax.swing.JPanel();
@@ -66,11 +76,11 @@
66 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;76 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
67 gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);77 gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
68 buttonPanel.setLayout(new java.awt.GridBagLayout());78 buttonPanel.setLayout(new java.awt.GridBagLayout());
69
70 okButton.setText("OK");79 okButton.setText("OK");
71 okButton.setMaximumSize(new java.awt.Dimension(75, 25));80 okButton.setMaximumSize(new java.awt.Dimension(100, 25));
72 okButton.setMinimumSize(new java.awt.Dimension(75, 25));81 okButton.setMinimumSize(new java.awt.Dimension(100, 25));
73 okButton.setPreferredSize(new java.awt.Dimension(75, 25));82 okButton.setPreferredSize(new java.awt.Dimension(100, 25));
83 okButton.setMnemonic(KeyEvent.VK_O);
74 okButton.addActionListener(new java.awt.event.ActionListener() {84 okButton.addActionListener(new java.awt.event.ActionListener() {
75 public void actionPerformed(java.awt.event.ActionEvent evt) {85 public void actionPerformed(java.awt.event.ActionEvent evt) {
76 okButtonActionPerformed(evt);86 okButtonActionPerformed(evt);
@@ -78,50 +88,47 @@
78 });88 });
7989
80 gridBagConstraints = new java.awt.GridBagConstraints();90 gridBagConstraints = new java.awt.GridBagConstraints();
81 gridBagConstraints.gridx = 6;91 gridBagConstraints.gridx = 1;
82 gridBagConstraints.gridy = 0;92 gridBagConstraints.gridy = 0;
83 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;93 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
84 gridBagConstraints.insets = new java.awt.Insets(6, 6, 6, 6);94 gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
85 buttonPanel.add(okButton, gridBagConstraints);95 buttonPanel.add(okButton, gridBagConstraints);
8696
87 cancelButton.setText("Cancel");97 cancelButton.setText("Cancel");
88 cancelButton.setMaximumSize(new java.awt.Dimension(75, 25));98 cancelButton.setMaximumSize(new java.awt.Dimension(100, 25));
89 cancelButton.setMinimumSize(new java.awt.Dimension(75, 25));99 cancelButton.setMinimumSize(new java.awt.Dimension(100, 25));
90 cancelButton.setPreferredSize(new java.awt.Dimension(75, 25));100 cancelButton.setPreferredSize(new java.awt.Dimension(100, 25));
101 cancelButton.setMnemonic(KeyEvent.VK_C);
91 cancelButton.addActionListener(new java.awt.event.ActionListener() {102 cancelButton.addActionListener(new java.awt.event.ActionListener() {
92 public void actionPerformed(java.awt.event.ActionEvent evt) {103 public void actionPerformed(java.awt.event.ActionEvent evt) {
93 cancelButtonActionPerformed(evt);104 cancelButtonActionPerformed(evt);
94 }105 }
95 });106 });
96
97 gridBagConstraints = new java.awt.GridBagConstraints();107 gridBagConstraints = new java.awt.GridBagConstraints();
108 gridBagConstraints.gridx = 0;
109 gridBagConstraints.gridy = 0;
110 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.RELATIVE;
98 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;111 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
99 gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 6);112 gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 6);
100 buttonPanel.add(cancelButton, gridBagConstraints);113 buttonPanel.add(cancelButton, gridBagConstraints);
101114
102 JSplitPaneFix split = new JSplitPaneFix(JSplitPane.VERTICAL_SPLIT,115 GridBagConstraints gbc = new GridBagConstraints();
103 panel, buttonPanel) {116 gbc.gridx = 0;
104 /**117 gbc.gridy = 0;
105 * 118 gbc.weightx = 3;
106 */119 gbc.weighty= 3;
107 private static final long serialVersionUID = -3436043116983340340L;120 gbc.gridwidth = 2;
108121 gbc.fill = GridBagConstraints.BOTH;
109 @Override122 container.add(panel,gbc);
110 public int getMinimumDividerLocation() {123
111 return lastDividerLocation;124 gbc = new GridBagConstraints();
112 }125 gbc.gridx = 1;
113126 gbc.gridy = 1;
114 @Override127 gbc.gridwidth = 1;
115 public int getMaximumDividerLocation() {128 gbc.anchor = GridBagConstraints.EAST;
116 return lastDividerLocation;129 container.add(buttonPanel,gbc);
117 }130
118 };131 add(container); this.setPreferredSize(new Dimension(400, 300));
119 split.setResizeWeight(1.0);
120 split.setDividerLocation(0.88);
121 split.setContinuousLayout(true);
122 split.setDividerSize(0);
123 add(split);
124 this.setPreferredSize(new Dimension(400, 300));
125 }// </editor-fold>//GEN-END:initComponents132 }// </editor-fold>//GEN-END:initComponents
126133
127 private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_cancelButtonActionPerformed134 private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_cancelButtonActionPerformed
128135
=== modified file 'src/pipe/gui/widgets/ConstantsDialogPanel.java'
--- src/pipe/gui/widgets/ConstantsDialogPanel.java 2012-02-28 21:26:27 +0000
+++ src/pipe/gui/widgets/ConstantsDialogPanel.java 2012-04-29 12:32:18 +0000
@@ -1,5 +1,6 @@
1package pipe.gui.widgets;1package pipe.gui.widgets;
22
3import java.awt.Color;
3import java.awt.Dimension;4import java.awt.Dimension;
4import java.awt.GridBagConstraints;5import java.awt.GridBagConstraints;
5import java.awt.GridBagLayout;6import java.awt.GridBagLayout;

Subscribers

People subscribed via source and target branches