Java 类com.google.gwt.user.client.ui.TabPanel 实例源码

项目:synergynet3.1    文件:NumberNetUI.java   
/**
 * Instantiates a new number net ui.
 */
public NumberNetUI()
{
    super();
    sharedInstance = this;
    tabPanel = new TabPanel();

    TableManager tableManagerTab = new TableManager();
    tabPanel.add(tableManagerTab, tableManagerTab.getTitle(), false);
    TargetSetterPanel targetSetterPanel = new TargetSetterPanel();
    tabPanel.add(targetSetterPanel, targetSetterPanel.getTitle(), false);

    // ProjectionControl projectionControlPanel = new ProjectionControl();
    // tabPanel.add(projectionControlPanel,
    // projectionControlPanel.getTitle(), false);

    ExpressionView ev = new ExpressionView();
    tabPanel.add(ev, ev.getTitle(), false);

    tabPanel.selectTab(0);
    add(tabPanel);
}
项目:synergynet3.1    文件:DatabaseControlUI.java   
/**
 * Instantiates a new database control ui.
 */
public DatabaseControlUI()
{
    super();
    sharedInstance = this;
    tabPanel = new TabPanel();

    tabPanel.setWidth("270px");

    studentAdminPanel = new StudentAdministationPanel();
    tabPanel.add(studentAdminPanel, studentAdminPanel.getTitle(), false);

    classSelectionPanel = new ClassSelectionPanel();
    tabPanel.add(classSelectionPanel, classSelectionPanel.getTitle(), false);

    tabPanel.selectTab(0);
    add(tabPanel);
}
项目:switchyard    文件:ServiceEditor.java   
/**
 * @return this editor as a Widget.
 */
public Widget asWidget() {
    VerticalPanel panel = new VerticalPanel();
    panel.add(new ContentGroupLabel(Singleton.MESSAGES.label_serviceDetails()));
    panel.add(new ContentDescription(Singleton.MESSAGES.description_serviceDetails()));
    panel.add(createImplementationDetailsPanel());

    TabPanel tabs = new TabPanel();
    tabs.setStyleName("default-tabpanel"); //$NON-NLS-1$
    tabs.getElement().setAttribute("style", "margin-top:15px;"); //$NON-NLS-1$ //$NON-NLS-2$
    tabs.add(createGatewayDetailsPanel(), Singleton.MESSAGES.label_gateways());
    tabs.add(createThrottlingDetailsPanel(), Singleton.MESSAGES.label_throttling());
    tabs.addBeforeSelectionHandler(new BeforeSelectionHandler<Integer>() {
        @Override
        public void onBeforeSelection(BeforeSelectionEvent<Integer> event) {
            _toolstrip.doCancel();
        }
    });

    panel.add(tabs);
    tabs.selectTab(0);

    return panel;
}
项目:qafe-platform    文件:TabPanelRenderer.java   
public static void setTabVisibility(TabPanel tabs, int index, boolean visible, UIObject tabUI) {
    try {
        if (index >= tabs.getTabBar().getTabCount() || index < 0)
            return;
        // Native Google implementation of TabBar uses an HorizontalPanel,
        // so, the DOM primary element is a table element (with just one tr)
        Element table = tabs.getTabBar().getElement();
        Element tr = DOM.getFirstChild(DOM.getFirstChild(table));
        // (index + 1) to account for 'first' placeholder td.
        Element td = DOM.getChild(tr, index + 1);
        UIObject.setVisible(td, visible);
        tabUI.setVisible(visible);
    } catch (Exception e) {
        LOG.log(Level.WARNING,
            "Not sure what can go wrong, but setting tab visibility might have failed", e);
    }
}
项目:qafe-platform    文件:FocusHandler.java   
private void makeParentVisible(Widget widget) {
    if (widget == null) {
        return;
    }
    Widget parent = widget.getParent();
    if (parent == null) {
        return;
    }
    makeParentVisible(parent);
    if (parent instanceof DeckPanel) {
        DeckPanel deckPanel = (DeckPanel) parent;
        int widgetIndex = deckPanel.getWidgetIndex(widget);
        deckPanel.showWidget(widgetIndex);
        TabPanel tabPanel = (TabPanel) deckPanel.getParent().getParent();
        tabPanel.selectTab(widgetIndex);
    }
}
项目:QMAClone    文件:PanelChat.java   
public PanelChat() {
    setWidth("800px");

    add(new Label("簡易チャット(設定画面から表示をON/OFFできます)"));

    if (SharedData.get().isAdministoratorMode()) {
        final TabPanel panel = new TabPanel();
        panel.setAnimationEnabled(true);
        panel.add(new LazyPanel() {
            @Override
            protected Widget createWidget() {
                return new PanelRealtime();
            }
        }, "リアルタイム");
        panel.add(new LazyPanel() {
            @Override
            protected Widget createWidget() {
                return new PanelPast();
            }
        }, "過去ログ");
        panel.selectTab(0);
        add(panel);
    } else {
        add(new PanelRealtime());
    }
}
项目:appinventor-extensions    文件:GalleryPage.java   
/**
   * Helper method called by constructor to initialize ui components
   */
  private void initComponents() {
    // Initialize UI
    panel = new VerticalPanel();
    panel.setWidth("100%");
    galleryGUI = new FlowPanel();
    appSingle = new FlowPanel();
    appDetails = new FlowPanel();
    appHeader = new FlowPanel();
    appInfo = new FlowPanel();
    appAction = new FlowPanel();
    appAuthor = new FlowPanel();
    appMeta = new FlowPanel();
    appDates = new FlowPanel();
    appPrimaryWrapper = new FlowPanel();
    appSecondaryWrapper = new FlowPanel();
    appDescPanel = new FlowPanel();
    appReportPanel = new FlowPanel();
    appSharePanel = new FlowPanel();
    appActionTabs = new TabPanel();
    sidebarTabs = new TabPanel();
    appComments = new FlowPanel();
    appCommentsList = new FlowPanel();
    appsByAuthor = new FlowPanel();
    appsByTags = new FlowPanel();
    appsRemixes = new FlowPanel();
    returnToGallery = new FlowPanel();
//    tagSelected = "";

    appCreated = new Label();
    appChanged = new Label();
    descBox = new FlowPanel();
    titleBox = new FlowPanel();
    desc = new TextArea();
    titleText = new TextArea();
    moreInfoText = new TextArea();
    creditText = new TextArea();
    ccLicenseRef = new HTML(MESSAGES.galleryCcLicenseRef());
    ccLicenseRef.addStyleName("app-action-html");
  }
项目:qafe-platform    文件:EventFactory.java   
public static SelectionHandler<Integer> createTabPanelListener(final TabPanel tabPanel, final EventListenerGVO ev, final List<InputVariableGVO> input) {
    return new SelectionHandler<Integer>() {
        public void onSelection(SelectionEvent<Integer> event) {
            CallbackHandler.createCallBack(event.getSelectedItem(), QAMLConstants.EVENT_ONCLICK, ev, input);
        }
    };
}
项目:qafe-platform    文件:SetPropertyHandler.java   
private void handleDisplayName(UIObject uiObject, BuiltInComponentGVO builtInComponentGVO,
        String value) {
    if (uiObject instanceof HasDataGridMethods) {
        HasDataGridMethods hasDataGridMethods = (HasDataGridMethods)uiObject;
        String uuid = builtInComponentGVO.getComponentIdUUID();
        if (uuid != null) {
            boolean containsColumn = uuid.contains(".");
            if (containsColumn) {
                String columnId = uuid.replaceFirst(".+\\.", "").replaceFirst("\\|.+", "");
                hasDataGridMethods.setColumnLabel(columnId, value);
            }
        }
    } else if (uiObject instanceof PushButton) {
        ((PushButton)uiObject).getUpFace().setText(value);
        ((PushButton)uiObject).getDownFace().setText(value);
    } else if (uiObject instanceof HasText) {
        HasText t = (HasText)uiObject;
        t.setText(value);
    } else if (uiObject instanceof VerticalPanel) {
        VerticalPanel vp = (VerticalPanel)uiObject;
        Widget tabPanelWidget = vp.getParent().getParent().getParent();
        if (tabPanelWidget instanceof TabPanel) {
            TabPanel tp = (TabPanel)tabPanelWidget;
            TabBar tb = tp.getTabBar();
            int tabCount =tp.getWidgetCount();
            for (int i=0;i < tabCount;i++){
                Widget w = tp.getWidget(i);
                if (w == vp){
                    tb.setTabText(i, value);
                }
            }
        }
    } else if (uiObject instanceof QWindowPanel) {
        QWindowPanel p = (QWindowPanel) uiObject;
        p.setCaption(value);
    }
}
项目:qafe-platform    文件:SetPropertyHandler.java   
private void handleVisible(UIObject uiObject, BuiltInComponentGVO builtInComponentGVO,
        String setPropertyValue) {
    boolean value = Boolean.valueOf(setPropertyValue).booleanValue();
    if(uiObject instanceof HasVisible) {
        ((HasVisible)uiObject).processVisible(value);
    } else if (uiObject instanceof HasDataGridMethods) {
        HasDataGridMethods hasDataGridMethods = (HasDataGridMethods)uiObject;
        boolean resolved = false;
        String uuid = builtInComponentGVO.getComponentIdUUID();
        if (uuid != null) {
            boolean containsColumn = uuid.contains(".");
            if (containsColumn) {
                String columnId = uuid.replaceFirst(".+\\.", "").replaceFirst("\\|.+", "");
                hasDataGridMethods.setColumnVisible(columnId, value);
                resolved = true;
            }
        }
        if (!resolved) {
            uiObject.setVisible(value);
            hasDataGridMethods.redraw();
        }
    } else {
        uiObject.setVisible(value);
        if (uiObject instanceof Panel) {
            Panel p = (Panel) uiObject;
            Widget parent = p.getParent();
            if (parent != null && parent instanceof DeckPanel) {
                DeckPanel deckPanel = (DeckPanel) parent;
                int widgetIndex = deckPanel.getWidgetIndex(p);
                if (widgetIndex != -1) {
                    if (deckPanel.getParent() != null && deckPanel.getParent().getParent() != null && deckPanel.getParent().getParent() instanceof TabPanel) {
                        TabPanel tabs = ((TabPanel) (deckPanel.getParent().getParent()));
                        TabPanelRenderer.setTabVisibility(tabs, widgetIndex, value, uiObject);
                    }
                }
            }
        }
    }
}
项目:qafe-platform    文件:FocusExecute.java   
private void makeParentsVisible(Widget w) {
    if (w.getParent() != null) {
        Widget parent = w.getParent();
        makeParentsVisible(parent);
        if (parent instanceof DeckPanel) {
            DeckPanel dp = (DeckPanel) parent;
            dp.showWidget(dp.getWidgetIndex(w));
            ((TabPanel) dp.getParent().getParent()).selectTab(dp.getWidgetIndex(w));
        }
    }
}
项目:PortlandStateJava    文件:TabPanelExample.java   
public TabPanelExample() {
  super("Tab Panel");

  TabPanel tabs = new TabPanel();
  tabs.add(new Button("One"), "One");
  tabs.add(new Button("Two"), "Two");
  tabs.add(new Button("Three"), "Three");
  tabs.add(new Button("Four"), "Four");
  tabs.selectTab(0);
  add(tabs);
}
项目:EasyML    文件:MonitorView.java   
@Override
public TabPanel getTabPanel(){
    return tabPanel;
}
项目:appinventor-extensions    文件:GalleryList.java   
/**
 * Creates a new GalleryList
 */
public GalleryList() {

  gallery = GalleryClient.getInstance();
  gallery.addListener(this);
  galleryGF = new GalleryGuiFactory();

  selectedApps = new ArrayList<GalleryApp>();

  // Initialize UI
  galleryGUI = new FlowPanel();
  galleryGUI.addStyleName("gallery");
  appTabs = new TabPanel();
  appRecent = new FlowPanel();
  appFeatured = new FlowPanel();
  appPopular = new FlowPanel();
  appSearch = new FlowPanel();
  appTutorial = new FlowPanel();
  appRecentContent = new FlowPanel();
  appFeaturedContent = new FlowPanel();
  appPopularContent = new FlowPanel();
  appSearchContent = new FlowPanel();
  appTutorialContent = new FlowPanel();
  searchText = new TextBox();

  // HTML segment for gallery typeface
  HTML headerExtra = new HTML(
      "<link href='http://fonts.googleapis.com/css?" +
      "family=Roboto:400,300,100' rel='stylesheet' type='text/css'>");
  galleryGUI.add(headerExtra);

  // Add content to panels
  appFeaturedTab = new GalleryAppTab(appFeatured, appFeaturedContent, REQUEST_FEATURED);
  appRecentTab = new GalleryAppTab(appRecent, appRecentContent, REQUEST_RECENT);
  appSearchTab = new GalleryAppTab(appSearch, appSearchContent, REQUEST_SEARCH);
  appPopularTab = new GalleryAppTab(appPopular, appPopularContent, REQUEST_MOSTLIKED);
  appTutorialTab = new GalleryAppTab(appTutorial, appTutorialContent, REQUEST_TUTORIAL);
  // don't think we need because in regular addgallerytab below

  // Add panels to main tabPanel
  appTabs.add(appRecent, "Recent");
  appTabs.add(appTutorial,"Tutorials");
  appTabs.add(appFeatured, "Featured");
  appTabs.add(appPopular, "Popular");
  appTabs.add(appSearch, "Search");
  appTabs.selectTab(0);
  appTabs.addStyleName("gallery-app-tabs");
  galleryGUI.add(appTabs);

  // Initialize top-level GUI
  VerticalPanel panel = new VerticalPanel();
  panel.setWidth("100%");
  panel.add(galleryGUI);

  initWidget(panel);
}
项目:synergynet3.1    文件:SynergyNetWebEntryPoint.java   
@Override
public void onModuleLoad()
{

    Map<String, String> availableAppNamesToClassName = new HashMap<String, String>();
    availableAppNamesToClassName.put("Number Net", "synergynet3.apps.numbernet.NumberNet");
    availableAppNamesToClassName.put("Gravity Sim", "synergynet3.activitypack1.table.gravitysim.GravitySim");
    availableAppNamesToClassName.put("Early Years", "synergynet3.apps.earlyyears.applications.stickerbook.StickerbookApp");

    SynergyNetAppSystemUI appSystemUI = new SynergyNetAppSystemUI();
    appSystemUI.setDelegate(this);
    appSystemUI.setKnownApplicationNamesWithClasses(availableAppNamesToClassName);

    ProjectorControlPanel projectorControlUI = new ProjectorControlPanel();

    DatabaseControlUI databaseControlUI = new DatabaseControlUI();
    databaseControlUI.setDelegate(this);

    MediaControlUI mediaControlUI = new MediaControlUI();

    final RootPanel rootPanel = RootPanel.get();

    tabPanel = new TabPanel();
    tabPanel.add(appSystemUI, "Apps");
    tabPanel.add(projectorControlUI, "Projectors");
    tabPanel.add(mediaControlUI, "Tables");
    tabPanel.add(databaseControlUI, "Students");

    rootPanel.add(tabPanel);
    tabPanel.selectTab(0);

    SynergyNetWebService.Util.getInstance().test("", new AsyncCallback<Void>()
    {

        @Override
        public void onFailure(Throwable caught)
        {
            // System.out.println("unwoot");

        }

        @Override
        public void onSuccess(Void result)
        {
            // System.out.println("woot");
        }
    });
}
项目:onecmdb    文件:TemplateViewScreen.java   
public TemplateViewScreen() {
    super();
    /*
    if (true) {
        styleTwo();
        return;
    }
    */
    vPanel = new VerticalPanel();
    /*
    HorizontalPanel editPanel = new HorizontalPanel();
    HTML edit = new HTML("[<a href='javascript:;'>edit</a>]");
    edit.addClickListener(new ClickListener() {

        public void onClick(Widget sender) {
            getBaseEntryScreen().showScreen(OneCMDBModelCreator.EDIT_TEMPLATE_SCREEN, objectType, new Long(0));

        }

    });
    editPanel.add(edit);
    editPanel.setCellHorizontalAlignment(edit, HorizontalPanel.ALIGN_RIGHT);
    editPanel.setWidth("100%");
    */
    infoPanel = new VerticalPanel();
    infoPanel.setStyleName("mdv-form");
    infoPanel.setWidth("100%");

    attributeScreen.setBaseEntryScreen(OneCMDBModelCreator.get());
    referenceScreen.setBaseEntryScreen(OneCMDBModelCreator.get());
    instancesScreen.setBaseEntryScreen(OneCMDBModelCreator.get());
    tab = new TabPanel();
    tab.add(infoPanel, "Info");
    tab.add(attributeScreen, "Attributes");
    tab.add(referenceScreen, "References");
    tab.add(instancesScreen, "Instances");
    instancesScreen.setNewSupport(true);
    tab.addTabListener(this);
    tab.selectTab(1);

    //vPanel.add(infoPanel);
    vPanel.add(tab);

    dockPanel.add(vPanel, DockPanel.CENTER);
    dockPanel.setCellHeight(vPanel, "100%");
    dockPanel.setSize("100%", "100%");
    //ScrollPanel p = new ScrollPanel(dockPanel);
    //p.setAlwaysShowScrollBars(true);
    initWidget(dockPanel);
}
项目:riscoss-corporate    文件:IndexedTab.java   
public TabPanel getTabPanel() {
    return this.tab;
}
项目:285_02_FA15G4    文件:DiaryLayerDialog.java   
public DiaryLayerDialog(MainWidget master) {
    this.master = master;

    dialog = new DialogBox(false, true);
    tabPanel = new TabPanel();
    passPnl = new ScrollPanel();
    passPnl.setWidth("500px");
    passPnl.setHeight("100px");

    maryView = new SimplePanel();
    johnView = new SimplePanel();

    passThrus = new Label("pass-throughs");
    passThrus.setWidth("100%");
    passThrus.setStyleName("flexTableCellHead");

    MarylblId = new Label();
    JohnJameslblId = new Label();

    MarylblArrivalDate= new Label();
    JohnJameslblArrivalDate = new Label();

    MarylblDepartDate= new Label();
    JohnJameslblDepartDate = new Label();

    MarylblLocation= new Label();
    JohnJameslblLocation = new Label();

    MarylblLink= new Label();
    JohnJameslblLink = new Label();

    MarylblSights= new Label();
    JohnJameslblSights = new Label();

    MarylblLatitude = new Label();
    MarylblLongitude = new Label();
    JohnJameslblLatitude = new Label();
    JohnJameslblLongitude = new Label();

    buildUI();
}
项目:285_02_FA15G4    文件:AllDialog.java   
public AllDialog(MainWidget master) {
    this.master = master;
    dialog = new DialogBox(false, true);
    tabPanel = new TabPanel();
    passPnl = new ScrollPanel();
    passPnl.setWidth("500px");
    passPnl.setHeight("100px");

    maryView = new SimplePanel();
    johnView = new SimplePanel();
    V1View = new SimplePanel();
    V2View = new SimplePanel();
    V3View = new SimplePanel();
    V4View = new SimplePanel();

    passThrus = new Label("pass-throughs");
    passThrus.setWidth("100%");
    passThrus.setStyleName("flexTableCellHead");

    MarylblId = new Label();
    JohnJameslblId = new Label();
    V1lblId = new Label();
    V2lblId = new Label();
    V3lblId = new Label();
    V4lblId = new Label();

    MarylblArrivalDate= new Label();
    JohnJameslblArrivalDate = new Label();
    V1lblArrivalDate= new Label();
    V2lblArrivalDate = new Label();
    V3lblArrivalDate= new Label();
    V4lblArrivalDate = new Label();

    MarylblDepartDate= new Label();
    JohnJameslblDepartDate = new Label();
    V1lblDepartDate= new Label();
    V2lblDepartDate = new Label();
    V3lblDepartDate= new Label();
    V4lblDepartDate = new Label();

    MarylblLocation= new Label();
    JohnJameslblLocation = new Label();
    V1lblLocation= new Label();
    V2lblLocation = new Label();
    V3lblLocation= new Label();
    V4lblLocation = new Label();

    MarylblLink= new Label();
    JohnJameslblLink = new Label();
    V1lblLink= new Label();
    V2lblLink = new Label();
    V3lblLink= new Label();
    V4lblLink = new Label();

    MarylblSights= new Label();
    JohnJameslblSights = new Label();
    V1lblSights= new Label();
    V2lblSights = new Label();
    V3lblSights= new Label();
    V4lblSights = new Label();

    MarylblLatitude = new Label();
    MarylblLongitude = new Label();
    JohnJameslblLatitude = new Label();
    JohnJameslblLongitude = new Label();
    V1lblLatitude = new Label();
    V1lblLongitude = new Label();
    V2lblLatitude = new Label();
    V2lblLongitude = new Label();
    V3lblLatitude = new Label();
    V3lblLongitude = new Label();
    V4lblLatitude = new Label();
    V4lblLongitude = new Label();

    buildUI();
}
项目:285_02_FA15G4    文件:RuskinDialog.java   
public RuskinDialog(MainWidget master) {
    this.master = master;

    dialog = new DialogBox(false, true);
    tabPanel = new TabPanel();
    passPnl = new HorizontalPanel();

    V1View = new SimplePanel();
    V2View = new SimplePanel();
    V3View = new SimplePanel();
    V4View = new SimplePanel();

    passThrus = new Label("pass-throughs");
    passThrus.setWidth("100%");
    passThrus.setStyleName("flexTableCellHead");

    V1lblId = new Label();
    V2lblId = new Label();
    V3lblId = new Label();
    V4lblId = new Label();

    V1lblArrivalDate= new Label();
    V2lblArrivalDate = new Label();
    V3lblArrivalDate= new Label();
    V4lblArrivalDate = new Label();

    V1lblDepartDate= new Label();
    V2lblDepartDate = new Label();
    V3lblDepartDate= new Label();
    V4lblDepartDate = new Label();

    V1lblLocation= new Label();
    V2lblLocation = new Label();
    V3lblLocation= new Label();
    V4lblLocation = new Label();

    V1lblLink= new Label();
    V2lblLink = new Label();
    V3lblLink= new Label();
    V4lblLink = new Label();

    V1lblSights= new Label();
    V2lblSights = new Label();
    V3lblSights= new Label();
    V4lblSights = new Label();

    V1lblLatitude = new Label();
    V1lblLongitude = new Label();
    V2lblLatitude = new Label();
    V2lblLongitude = new Label();
    V3lblLatitude = new Label();
    V3lblLongitude = new Label();
    V4lblLatitude = new Label();
    V4lblLongitude = new Label();

    buildUI();
}
项目:OneCMDBwithMaven    文件:TemplateViewScreen.java   
public TemplateViewScreen() {
    super();
    /*
    if (true) {
        styleTwo();
        return;
    }
    */
    vPanel = new VerticalPanel();
    /*
    HorizontalPanel editPanel = new HorizontalPanel();
    HTML edit = new HTML("[<a href='javascript:;'>edit</a>]");
    edit.addClickListener(new ClickListener() {

        public void onClick(Widget sender) {
            getBaseEntryScreen().showScreen(OneCMDBModelCreator.EDIT_TEMPLATE_SCREEN, objectType, new Long(0));

        }

    });
    editPanel.add(edit);
    editPanel.setCellHorizontalAlignment(edit, HorizontalPanel.ALIGN_RIGHT);
    editPanel.setWidth("100%");
    */
    infoPanel = new VerticalPanel();
    infoPanel.setStyleName("mdv-form");
    infoPanel.setWidth("100%");

    attributeScreen.setBaseEntryScreen(OneCMDBModelCreator.get());
    referenceScreen.setBaseEntryScreen(OneCMDBModelCreator.get());
    instancesScreen.setBaseEntryScreen(OneCMDBModelCreator.get());
    tab = new TabPanel();
    tab.add(infoPanel, "Info");
    tab.add(attributeScreen, "Attributes");
    tab.add(referenceScreen, "References");
    tab.add(instancesScreen, "Instances");
    instancesScreen.setNewSupport(true);
    tab.addTabListener(this);
    tab.selectTab(1);

    //vPanel.add(infoPanel);
    vPanel.add(tab);

    dockPanel.add(vPanel, DockPanel.CENTER);
    dockPanel.setCellHeight(vPanel, "100%");
    dockPanel.setSize("100%", "100%");
    //ScrollPanel p = new ScrollPanel(dockPanel);
    //p.setAlwaysShowScrollBars(true);
    initWidget(dockPanel);
}
项目:synergynet3.1    文件:SynergyNetWebEntryPoint.java   
/**
 * Show last tab.
 *
 * @param tabPanel2
 *            the tab panel2
 */
private void showLastTab(TabPanel tabPanel2)
{
    tabPanel.selectTab(tabPanel.getWidgetCount() - 1);
}
项目:EasyML    文件:MonitorPresenter.java   
TabPanel getTabPanel();