summaryrefslogtreecommitdiffstats
path: root/lib/redmine/scm/adapters/git_adapter.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix repository browsing at given revision for various scm and add tests for ↵Jean-Philippe Lang2008-04-061-1/+1
| | | | | | this. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1329 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Always show 'View' and 'Annotate' links on repository files (download will ↵Jean-Philippe Lang2008-03-191-6/+8
| | | | | | be forced when clicking 'View' if the file is binary). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1274 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Prevent unexpected nil error in GitAdapter#info if the repository path is ↵Jean-Philippe Lang2008-03-121-5/+6
| | | | | | invalid. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1239 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Merged Git support branch (r1200 to r1226).Jean-Philippe Lang2008-03-121-0/+261
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1236 e93f8b46-1217-0410-a6f0-8f06a7374b81
uitest/src/main/java/com/vaadin/tests?h=feature/elements'>tests/TestForTabSheet.java
blob: 8d5fe71ed39d16b5107aeb61ea1e53b85d8f8b9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package com.vaadin.tests;

import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Label;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.TabSheet.SelectedTabChangeEvent;

public class TestForTabSheet extends CustomComponent implements
        Button.ClickListener, TabSheet.SelectedTabChangeListener {
    TabSheet tabsheet = new TabSheet();
    Button tab1_root = new Button("Push this button");
    Label tab2_root = new Label("Contents of Second Tab");
    Label tab3_root = new Label("Contents of Third Tab");

    TestForTabSheet() {
        setCompositionRoot(tabsheet);

        tabsheet.addListener(this);

        /* Listen for button click events. */
        tab1_root.addListener(this);
        tabsheet.addTab(tab1_root, "First Tab", null);

        /* A tab that is initially disabled. */
        tab2_root.setEnabled(false);
        tabsheet.addTab(tab2_root, "Second Tab", null);

        /* A tab that is initially disabled. */
        tab3_root.setEnabled(false);
        tabsheet.addTab(tab3_root, "Third tab", null);
    }

    @Override
    public void buttonClick(ClickEvent event) {
        System.out.println("tab2=" + tab2_root.isEnabled() + " tab3="
                + tab3_root.isEnabled());
        tab2_root.setEnabled(true);
        tab3_root.setEnabled(true);
    }

    @Override
    public void selectedTabChange(SelectedTabChangeEvent event) {
        /*
         * Cast to a TabSheet. This isn't really necessary in this example, as
         * we have only one TabSheet component, but would be useful if there
         * were multiple TabSheets.
         */
        TabSheet source = (TabSheet) event.getSource();
        if (source == tabsheet) {
            /* If the first tab was selected. */
            if (source.getSelectedTab() == tab1_root) {
                System.out.println("foo");
                tab2_root.setEnabled(false);
                tab3_root.setEnabled(false);
            }
        }
    }
}