SVN__ProgressDialog.st
changeset 18 acdb425354a7
child 216 4147b10895b1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SVN__ProgressDialog.st	Wed Sep 23 18:44:20 2009 +0200
@@ -0,0 +1,167 @@
+"{ Package: 'cvut:stx/goodies/libsvn' }"
+
+"{ NameSpace: SVN }"
+
+Dialog subclass:#ProgressDialog
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'SVN-UI-Dialogs'
+!
+
+!ProgressDialog class methodsFor:'documentation'!
+
+version_SVN
+    ^'$Id$'
+! !
+
+!ProgressDialog class methodsFor:'interface opening'!
+
+openOn: aBlock 
+
+    ^self openOn: aBlock title: 'Working...'
+
+    "Created: / 28-10-2008 / 14:50:25 / Jan Vrany <vranyj1@fel.cvut.cz>"
+!
+
+openOn: aBlock title: title
+
+    ^self openOn: aBlock title: title subtitle: ''
+
+    "Created: / 28-10-2008 / 14:50:11 / Jan Vrany <vranyj1@fel.cvut.cz>"
+!
+
+openOn: block title: title subtitle: subtitle
+
+    ^self new
+        model: block;
+        title: title;
+        subtitle: subtitle;
+        open
+
+    "Created: / 28-10-2008 / 14:50:03 / Jan Vrany <vranyj1@fel.cvut.cz>"
+    "Modified: / 09-04-2009 / 14:11:37 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!ProgressDialog class methodsFor:'interface specs'!
+
+buttonsSpec
+    "This resource specification was automatically generated
+     by the UIPainter of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the UIPainter may not be able to read the specification."
+
+    "
+     UIPainter new openOnClass:SVN::Dialog andSelector:#buttonsSpec
+     SVN::Dialog new openInterface:#buttonsSpec
+    "
+
+    <resource: #canvas>
+
+    ^ 
+     #(FullSpec
+        name: buttonsSpec
+        window: 
+       (WindowSpec
+          label: 'Buttons'
+          name: 'Buttons'
+          min: (Point 10 10)
+          bounds: (Rectangle 0 0 400 30)
+        )
+        component: 
+       (SpecCollection
+          collection: (
+           (HorizontalPanelViewSpec
+              name: 'ButtonPanel'
+              layout: (LayoutFrame 0 0 0 0 0 1 0 1)
+              horizontalLayout: rightSpace
+              verticalLayout: center
+              horizontalSpace: 3
+              verticalSpace: 3
+              component: 
+             (SpecCollection
+                collection: (
+                 (ActionButtonSpec
+                    label: 'Cancel'
+                    name: 'CancelButton'
+                    translateLabel: true
+                    model: doCancel
+                    extent: (Point 125 22)
+                  )
+                 )
+               
+              )
+            )
+           )
+         
+        )
+      )
+
+    "Created: / 28-10-2008 / 14:53:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!ProgressDialog methodsFor:'accessing'!
+
+answerValueSelector
+    "Superclass SVN::Dialog says that I am responsible to implement this method"
+
+    ^#yourself
+
+    "Created: / 28-10-2008 / 14:59:01 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!ProgressDialog methodsFor:'accessing - defaults'!
+
+defaultContentSpec
+
+
+    ^#progressSpec
+
+    "Created: / 28-10-2008 / 14:51:12 / Jan Vrany <vranyj1@fel.cvut.cz>"
+!
+
+defaultTitle
+    ^'Working...'
+
+    "Created: / 28-10-2008 / 14:55:19 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!ProgressDialog methodsFor:'actions'!
+
+doAccept
+
+    self accept value: true
+
+    "Created: / 19-08-2009 / 14:25:51 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!ProgressDialog methodsFor:'drag & drop'!
+
+dropObjects:aCollectionOfDropObjects in:aComponent
+    "drop manager wants to drop.
+     This is ony sent, if #canDrop: returned true.
+     Must be redefine in order for drop to work."
+
+    self shouldImplement
+
+    "Created: / 28-10-2008 / 14:59:01 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!ProgressDialog methodsFor:'hooks'!
+
+postOpenWith: aUIBuilder
+
+    self showProgressWhile:
+        [self model value.
+        self doAccept]
+
+    "Created: / 28-10-2008 / 14:51:52 / Jan Vrany <vranyj1@fel.cvut.cz>"
+    "Modified: / 19-08-2009 / 14:36:16 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!ProgressDialog class methodsFor:'documentation'!
+
+version
+    ^ '$Header$'
+! !