OpenCores
URL https://opencores.org/ocsvn/adv_debug_sys/adv_debug_sys/trunk

Subversion Repositories adv_debug_sys

[/] [adv_debug_sys/] [trunk/] [Software/] [AdvancedWatchpointControl/] [src/] [advancedWatchpointControl/] [AdvancedWatchpointControl.java] - Blame information for rev 51

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 51 nyawn
package advancedWatchpointControl;
2
 
3
import org.eclipse.swt.widgets.Composite;
4
import org.eclipse.swt.widgets.Display;
5
import org.eclipse.swt.widgets.Shell;
6
import org.eclipse.swt.custom.ScrolledComposite;
7
import org.eclipse.swt.SWT;
8
import org.eclipse.swt.layout.FillLayout;
9
import org.eclipse.swt.layout.RowLayout;
10
 
11
 
12
 
13
public class AdvancedWatchpointControl {
14
 
15
        private static Display mainDisplay = null;
16
        private static Shell mainShell = null;
17
        private static guiServerGroup gServerGroup = null;
18
        private static guiDCRGroup gDCRGroup = null;
19
        private static guiCountRegsGroup gCountGroup = null;
20
        private static guiControlGroup gControlGroup = null;
21
        private static mainControl mCtrl = null;
22
        private static ScrolledComposite mainSC = null;
23
        private static Composite mainComposite = null;
24
 
25
        /**
26
         * This method initializes mainShell
27
         *
28
         */
29
        private static void createMainShell(Display disp, mainControl mc) {
30
                RowLayout mainLayout = new RowLayout();
31
                mainLayout.center = true;
32
                mainLayout.fill = true;
33
                mainLayout.spacing = 5;
34
                mainLayout.wrap = false;
35
                mainLayout.pack = true;
36
                mainLayout.type = SWT.VERTICAL;
37
 
38
                mainShell = new Shell();
39
                mainShell.setText("Advanced Watchpoint Control");
40
                mainShell.setLayout(new FillLayout());
41
 
42
                mainSC = new ScrolledComposite(mainShell, SWT.H_SCROLL|SWT.V_SCROLL);
43
                mainComposite = new Composite(mainSC, SWT.NONE);
44
                mainComposite.setLayout(mainLayout);
45
 
46
                gServerGroup = new guiServerGroup(mainComposite, mc);
47
                gDCRGroup = new guiDCRGroup(mainComposite, mainDisplay, mc);
48
                gCountGroup = new guiCountRegsGroup(mainComposite, mainDisplay, mc);
49
                gControlGroup = new guiControlGroup(mainComposite, mc);
50
 
51
                mainSC.setContent(mainComposite);
52
                // Set the minimum size
53
            mainSC.setMinSize(770, 950);
54
            // Expand both horizontally and vertically
55
            mainSC.setExpandHorizontal(true);
56
            mainSC.setExpandVertical(true);
57
        }
58
 
59
 
60
        /**
61
         * @param args
62
         */
63
        public static void main(String[] args) {
64
 
65
                // Create the main control.
66
                // This also creates the network and RSP subsystems
67
                mCtrl = new mainControl();
68
 
69
                // Create the GUI.  Must be done after main control creation.
70
                mainDisplay = new Display();
71
                createMainShell(mainDisplay, mCtrl);
72
 
73
                // All ready, show the UI
74
                mainShell.pack();
75
                mainShell.open();
76
                while (!mainShell.isDisposed()) {
77
                if (!mainDisplay.readAndDispatch()) mainDisplay.sleep();
78
                }
79
                mainDisplay.dispose();
80
        }
81
 
82
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.