[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [Subclipse-dev] Commit dialog sash form

From: Jörg Eichhorn <jeichhorn_at_gmail.com>
Date: 2006-01-22 11:52:11 CET

In the attachment 'SubclipseCommitCommentDialogs.diff' the labels and
controls are aligned the same (CommitDialog, LockDialog and
BranchTagDialog). I've added another Composite to have the resources
list etc. aligned the same as the commit message elements. Maybe there
is a better way to do this.
I've added the SashForm to the CommitDialog and LockDialog to allow
internal resizing.

The attachment 'SubclipseImportFolderDialog.diff' puts the checkbox
'Recurse through subdirectories' in the ImportFolderDialog into the same
group where the to be imported directory can be entered. I think this
belong to the folder, so it make sense to put it into the group.

Br,
Jörg

Index: src/org/tigris/subversion/subclipse/ui/comments/CommitCommentArea.java
===================================================================
--- src/org/tigris/subversion/subclipse/ui/comments/CommitCommentArea.java (revision 2056)
+++ src/org/tigris/subversion/subclipse/ui/comments/CommitCommentArea.java (working copy)
@@ -39,7 +39,7 @@
 public class CommitCommentArea extends DialogArea {
 
         private static final int WIDTH_HINT = 350;
- private static final int HEIGHT_HINT = 150;
+ private static final int HEIGHT_HINT = 50;
         
         private String enterCommentMessage;
         private String oldComment;
Index: src/org/tigris/subversion/subclipse/ui/dialogs/CommitDialog.java
===================================================================
--- src/org/tigris/subversion/subclipse/ui/dialogs/CommitDialog.java (revision 2056)
+++ src/org/tigris/subversion/subclipse/ui/dialogs/CommitDialog.java (working copy)
@@ -21,6 +21,7 @@
 import org.eclipse.jface.viewers.TableLayout;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -112,12 +113,31 @@
                 Composite composite = new Composite(parent, SWT.NULL);
                 composite.setLayout(new GridLayout());
                 composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ SashForm sashForm = new SashForm(composite, SWT.VERTICAL);
+ sashForm.setLayout(new GridLayout());
+ sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Composite cTop = new Composite(sashForm, SWT.NULL);
+ cTop.setLayout(new GridLayout());
+ cTop.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Composite cBottom1 = new Composite(sashForm, SWT.NULL);
+ cBottom1.setLayout(new GridLayout());
+ cBottom1.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Composite cBottom2 = new Composite(cBottom1, SWT.NULL);
+ cBottom2.setLayout(new GridLayout());
+ cBottom2.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ sashForm.setWeights(new int[] {3, 4});
+
                 
                 if (projectProperties != null) {
- addBugtrackingArea(composite);
+ addBugtrackingArea(cTop);
                 }
 
- commitCommentArea.createArea(composite);
+ commitCommentArea.createArea(cTop);
                 commitCommentArea.addPropertyChangeListener(new IPropertyChangeListener() {
                         public void propertyChange(PropertyChangeEvent event) {
                                 if (event.getProperty() == CommitCommentArea.OK_REQUESTED)
@@ -125,7 +145,7 @@
                         }
                 });
 
- addResourcesArea(composite);
+ addResourcesArea(cBottom2);
                                 
                 // set F1 help
                 WorkbenchHelp.setHelp(composite, IHelpContextIds.RELEASE_COMMENT_DIALOG);
Index: src/org/tigris/subversion/subclipse/ui/dialogs/LockDialog.java
===================================================================
--- src/org/tigris/subversion/subclipse/ui/dialogs/LockDialog.java (revision 2056)
+++ src/org/tigris/subversion/subclipse/ui/dialogs/LockDialog.java (working copy)
@@ -10,6 +10,7 @@
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.graphics.Point;
@@ -79,13 +80,30 @@
                 Composite composite = new Composite(parent, SWT.NULL);
                 composite.setLayout(new GridLayout());
                 composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ SashForm sashForm = new SashForm(composite, SWT.VERTICAL);
+ sashForm.setLayout(new GridLayout());
+ sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Composite cTop = new Composite(sashForm, SWT.NULL);
+ cTop.setLayout(new GridLayout());
+ cTop.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Composite cBottom1 = new Composite(sashForm, SWT.NULL);
+ cBottom1.setLayout(new GridLayout());
+ cBottom1.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Composite cBottom2 = new Composite(cBottom1, SWT.NULL);
+ cBottom2.setLayout(new GridLayout());
+ cBottom2.setLayoutData(new GridData(GridData.FILL_BOTH));
                 
- commitCommentArea.createArea(composite);
+ commitCommentArea.createArea(cTop);
+
+ addResourcesArea(cBottom2);
                 
- stealButton = new Button(composite, SWT.CHECK);
+ stealButton = new Button(cBottom2, SWT.CHECK);
                 stealButton.setText(Policy.bind("LockDialog.stealLock")); //$NON-NLS-1$
                 
- addResourcesArea(composite);
 
                 // set F1 help
                 WorkbenchHelp.setHelp(composite, IHelpContextIds.LOCK_DIALOG);
Index: src/org/tigris/subversion/subclipse/ui/dialogs/BranchTagDialog.java
===================================================================
--- src/org/tigris/subversion/subclipse/ui/dialogs/BranchTagDialog.java (revision 2056)
+++ src/org/tigris/subversion/subclipse/ui/dialogs/BranchTagDialog.java (working copy)
@@ -113,8 +113,12 @@
                 Composite composite = new Composite(parent, SWT.NULL);
                 composite.setLayout(new GridLayout());
                 composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Composite top = new Composite(composite, SWT.NULL);
+ top.setLayout(new GridLayout());
+ top.setLayoutData(new GridData(GridData.FILL_BOTH));
                 
- Group repositoryGroup = new Group(composite, SWT.NULL);
+ Group repositoryGroup = new Group(top, SWT.NULL);
                 repositoryGroup.setText(Policy.bind("BranchTagDialog.repository")); //$NON-NLS-1$
                 repositoryGroup.setLayout(new GridLayout());
                 GridData data = new GridData(GridData.FILL_BOTH);
@@ -231,12 +235,12 @@
                 workingCopyButton.addSelectionListener(selectionListener);
                 
                 if (resource != null) {
- Label label = createWrappingLabel(composite);
+ Label label = createWrappingLabel(top);
                         label.setText(Policy.bind("BranchTagDialog.note")); //$NON-NLS-1$
                 }
                 
                 if (projectProperties != null) {
- addBugtrackingArea(composite);
+ addBugtrackingArea(top);
                 }
                 
                 commitCommentArea.createArea(composite);

Index: src/org/tigris/subversion/subclipse/ui/dialogs/ImportFolderDialog.java
===================================================================
--- src/org/tigris/subversion/subclipse/ui/dialogs/ImportFolderDialog.java (revision 2056)
+++ src/org/tigris/subversion/subclipse/ui/dialogs/ImportFolderDialog.java (working copy)
@@ -104,7 +104,7 @@
                         }
                 });
                 
- recurseButton = new Button(composite, SWT.CHECK);
+ recurseButton = new Button(repositoryGroup, SWT.CHECK);
                 recurseButton.setText(Policy.bind("ImportFolderDialog.recurse"));
                 recurseButton.setSelection(true);
                 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: dev-help@subclipse.tigris.org
Received on Sun Jan 22 11:52:12 2006

This is an archived mail posted to the Subclipse Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.