當前位置: 首頁>>代碼示例>>Java>>正文


Java VerticalPanel.setCellHeight方法代碼示例

本文整理匯總了Java中com.google.gwt.user.client.ui.VerticalPanel.setCellHeight方法的典型用法代碼示例。如果您正苦於以下問題:Java VerticalPanel.setCellHeight方法的具體用法?Java VerticalPanel.setCellHeight怎麽用?Java VerticalPanel.setCellHeight使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.user.client.ui.VerticalPanel的用法示例。


在下文中一共展示了VerticalPanel.setCellHeight方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: OdeLog

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
 * Creates a new output panel for displaying internal messages.
 */
private OdeLog() {
  // Initialize UI
  Button clearButton = new Button(MESSAGES.clearButton());
  clearButton.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      clear();
    }
  });

  text = new HTML();
  text.setWidth("100%");

  VerticalPanel panel = new VerticalPanel();
  panel.add(clearButton);
  panel.add(text);
  panel.setSize("100%", "100%");
  panel.setCellHeight(text, "100%");
  panel.setCellWidth(text, "100%");

  initWidget(panel);
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:26,代碼來源:OdeLog.java

示例2: WikiManager

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
 * WikiManager
 */
public WikiManager(boolean isDashboard) {
	this.isDashboard = isDashboard;
	vPanel = new VerticalPanel();
	toolbar = new TabToolbarWiki(this, isDashboard);

	// Post Editor
	vWikiPanel = new VerticalPanel();
	vWikiPanel.setWidth("100%");
	wikiEditor = new WikiEditor(this);
	wikiEditor.setStyleName("okm-Mail");
	wikiHistory = new WikiHistory(this);
	wikiPage = new WikiPage();
	scrollPanelWiki = new ScrollPanel(vWikiPanel);

	vPanel.add(toolbar); // Always visible

	toolbar.setHeight("" + TOOLBAR_HEADER + "px");
	toolbar.setWidth("100%");
	vPanel.setCellHeight(toolbar, "" + TOOLBAR_HEADER + "px");

	initWidget(vPanel);
}
 
開發者ID:openkm,項目名稱:document-management-system,代碼行數:26,代碼來源:WikiManager.java

示例3: WorkflowManager

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
 * WorkflowManager
 */
public WorkflowManager() {
	workflowGraph = new Image();
	scrollGraphPanel = new ScrollPanel(workflowGraph);
	toolbar = new TabToolbarWorkflow(this);
	workflowTable = new WorkflowTable(this);
	workflowDetailTable = new WorkflowDetailTable();
	vPanel = new VerticalPanel();
	vPanel.add(toolbar); // Always visible

	toolbar.setHeight("" + TOOLBAR_HEADER + "px");
	toolbar.setWidth("100%");
	vPanel.setCellHeight(toolbar, "" + TOOLBAR_HEADER + "px");

	initWidget(vPanel);
}
 
開發者ID:openkm,項目名稱:document-management-system,代碼行數:19,代碼來源:WorkflowManager.java

示例4: LeftPanelWidget

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public LeftPanelWidget(PlannerFormWidget plannerForm,
		ItineraryStackWidget itineraryStack, AlertStackWidget alertStack,
		boolean useScrollPanel) {
	verticalPanel = new VerticalPanel();
	verticalPanel.add(plannerForm);
	if (useScrollPanel) {
		VerticalPanel innerScrollPanel = new VerticalPanel();
		innerScrollPanel.add(alertStack);
		innerScrollPanel.add(itineraryStack);
		ScrollPanel scrollPanel = new ScrollPanel(innerScrollPanel);
		scrollPanel.setHeight("100%");
		verticalPanel.add(scrollPanel);
		verticalPanel.setCellHeight(scrollPanel, "100%");
	} else {
		verticalPanel.add(alertStack);
		verticalPanel.add(itineraryStack);
	}
	initWidget(verticalPanel);
	setWidth("100%");
	if (useScrollPanel) {
		setHeight("100%");
	}
}
 
開發者ID:mecatran,項目名稱:OpenTripPlanner-client-gwt,代碼行數:24,代碼來源:LeftPanelWidget.java

示例5: init

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
protected void init(String msg, String title) {
	this.setTitle("stdErr");
	this.setGlassEnabled(true);

	HTML closeButton = new HTML("X");
	closeButton.setSize("10px", "10px");
	closeButton.setStyleName("closebtn");
	closeButton.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			StdPanel.this.hide();
		}
	});

	ScrollPanel scvp = new ScrollPanel();
	VerticalPanel verticalPanel = new VerticalPanel();

	verticalPanel.add(closeButton);
	verticalPanel.setCellHeight(closeButton, "30px");
	verticalPanel.setStyleName("vpanel");
	HTML desc = new HTML(title);
	desc.setStyleName("popupTitle");
	verticalPanel.add(desc);
	verticalPanel.setCellHeight(desc, "30px");

	TextArea label = new TextArea();
	label.setText(msg);
	label.setReadOnly(true);
	label.setSize("650px", "400px");
	verticalPanel.add(label);
	scvp.add(verticalPanel);
	this.add(scvp);
	this.setStyleName("loading_container");
	this.center();
	this.show();
}
 
開發者ID:ICT-BDA,項目名稱:EasyML,代碼行數:37,代碼來源:StdPanel.java

示例6: MotdUi

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
 * Creates a new output panel for MOTD.
 */
private MotdUi() {
  // Initialize UI
  text = new HTML();
  text.setSize("100%", "100%");
  text.setStylePrimaryName("ode-Motd");

  panel = new VerticalPanel();
  panel.add(text);
  panel.setSize("100%", "100%");
  panel.setCellHeight(text, "100%");
  panel.setCellWidth(text, "100%");

  initWidget(panel);
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:18,代碼來源:MotdUi.java

示例7: MessagesOutput

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
 * Creates a new output panel for messages.
 */
private MessagesOutput() {
  // Initialize UI
  text = new HTML();
  text.setSize("100%", "100%");
  text.setStylePrimaryName("ode-MessagesOutput");

  panel = new VerticalPanel();
  panel.add(text);
  panel.setSize("100%", "100%");
  panel.setCellHeight(text, "100%");
  panel.setCellWidth(text, "100%");

  initWidget(panel);
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:18,代碼來源:MessagesOutput.java

示例8: MultiConstraintHardSoftMatchRuleModellerWidget

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public MultiConstraintHardSoftMatchRuleModellerWidget(final RuleModeller mod,
                                                      final EventBus eventBus,
                                                      final ActionMultiConstraintHardSoftMatch actionConstraintMatch,
                                                      final TranslationService translationService,
                                                      final Boolean readOnly) {
    super(mod,
          eventBus,
          translationService);
    hardConstraintMatchInputWidget = new ConstraintMatchInputWidget(actionConstraintMatch.getActionHardConstraintMatch());
    hardConstraintMatchInputWidget
            .addConstraintMatchValueChangeHandler(new ConstraintMatchValueChangeHandler(actionConstraintMatch.getActionHardConstraintMatch()));
    softConstraintMatchInputWidget = new ConstraintMatchInputWidget(actionConstraintMatch.getActionSoftConstraintMatch());
    softConstraintMatchInputWidget
            .addConstraintMatchValueChangeHandler(new ConstraintMatchValueChangeHandler(actionConstraintMatch.getActionSoftConstraintMatch()));

    VerticalPanel verticalPanel = new VerticalPanel();

    HorizontalPanel labelPanel = createLabelPanel(translationService.getTranslation(GuidedRuleEditorConstants.RuleModellerActionPlugin_MultiConstraintMatch));
    verticalPanel.add(labelPanel);
    verticalPanel.setCellHeight(labelPanel,
                                "25px");

    verticalPanel.add(getItemPanel(translationService.getTranslation(GuidedRuleEditorConstants.RuleModellerActionPlugin_HardScore),
                                   hardConstraintMatchInputWidget));

    verticalPanel.add(getItemPanel(translationService.getTranslation(GuidedRuleEditorConstants.RuleModellerActionPlugin_SoftScore),
                                   softConstraintMatchInputWidget));

    verticalPanel.setStyleName(GuidedRuleEditorResources.INSTANCE.css().multiConstraintMatch());

    initWidget(verticalPanel);
}
 
開發者ID:kiegroup,項目名稱:optaplanner-wb,代碼行數:33,代碼來源:MultiConstraintHardSoftMatchRuleModellerWidget.java

示例9: load

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public void load() {
	VerticalPanel panel = new VerticalPanel();
	HorizontalPanel header = new HorizontalPanel();
	header.setStyleName("one-select-popup-header");
	header.setWidth("100%");
	Label headerLabel = new Label(title);
	Image close = new Image("images/eclipse/close.gif");
	header.add(headerLabel);
	header.add(close);
	
	header.setCellHorizontalAlignment(headerLabel, HorizontalPanel.ALIGN_LEFT);
	header.setCellHorizontalAlignment(close, HorizontalPanel.ALIGN_RIGHT);
	header.setCellVerticalAlignment(close, HorizontalPanel.ALIGN_MIDDLE);
	
	// Add drag control.
	new DragControl(this, headerLabel);
	
	close.addClickListener(new ClickListener() {
		public void onClick(Widget sender) {
			hide();	
		}
	});
	panel.add(header);
	panel.add(content);
	
	panel.setCellVerticalAlignment(header, VerticalPanel.ALIGN_TOP);
	panel.setCellVerticalAlignment(content, VerticalPanel.ALIGN_TOP);
	panel.setCellHeight(content, "100%");
	setWidget(panel);
}
 
開發者ID:luox12,項目名稱:onecmdb,代碼行數:31,代碼來源:DragablePopup.java

示例10: makeSideHeader

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
protected Widget makeSideHeader() {

        Widget close = makeCloseButton(false);

        SimplePanel panel= new SimplePanel();
        panel.addStyleName(_ffCss.titleBgColor());
        panel.addStyleName(_ffCss.titleColor());
        panel.setHeight("100%");


        VerticalPanel header = new VerticalPanel();
        titleLabel.addStyleName("title-label");
        titleLabel.setHeight("100%");
        DOM.setStyleAttribute(titleLabel.getElement(), "cursor", "default");

        GwtUtil.setStyle(header, "paddingTop", "3px");

        titleLabel.setHTML(" ");

        header.addStyleName(_ffCss.popupTitleVerticalBackground());
        header.addStyleName(_ffCss.titleBgColor());
        header.addStyleName(_ffCss.titleColor());
//        header.addStyleName(_ffCss.popupBackground());

        header.add(close);
        header.add(titleLabel);
        header.setCellHeight(titleLabel, "100%");
        header.setWidth("15px");
        header.setHeight("100%");

        panel.setWidget(header);
        return panel;
    }
 
開發者ID:lsst,項目名稱:firefly,代碼行數:34,代碼來源:PopupPane.java

示例11: init

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
 * Initialize
 * 
 * @param path  Result root address
 */
protected void init(String path) {
	this.setSize("650px", "400px");
	this.setGlassEnabled(true);
	this.setModal(true);
	closeButton.setSize("10px", "10px");
	closeButton.setStyleName("closebtn");
	closeButton.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			PreviewPopupPanel.this.hide();
		}
	});
	VerticalPanel verticalPanel = new VerticalPanel();
	verticalPanel.add(closeButton);
	verticalPanel.setCellHeight(closeButton, "13px");
	verticalPanel.setStyleName("vpanel");
	desc.setStyleName("popupTitle");
	verticalPanel.add(desc);
	verticalPanel.setCellHeight(desc, "30px");

	HorizontalPanel hPanel = new HorizontalPanel();
	savebtn.setStyleName("popupsavebtn");
	savebtn.setVisible(false);
	refreshBtn.setStyleName("popuprefreshbtn");
	refreshBtn.setVisible(false);
	uploadSubmitButton.setVisible(false);
	hPanel.add(uploadSubmitButton);
	hPanel.add(savebtn);
	hPanel.add(refreshBtn);
	hPanel.setCellVerticalAlignment(uploadSubmitButton,
			HasVerticalAlignment.ALIGN_BOTTOM);

	tabPanel.getElement().getStyle().setMarginBottom(10.0, Unit.PX);
	tabPanel.setSize("650px", "355px");
	dirPanel = new HorizontalPanel();
	resultDirTree = PopupRetDirTreeLoad.load(path);
	resultDirTree.getRoot().setState(false);
	ScrollPanel dirScrollPanel = new ScrollPanel();
	dirScrollPanel.add(resultDirTree);
	dirScrollPanel.setAlwaysShowScrollBars(true);
	dirScrollPanel.setSize("300px", "320px");

	VerticalPanel fileViewPanel = new VerticalPanel();
	fileLabel.setText("Please select a file to view!");
	fileLabel.setStyleName("popupFileSelectName");
	fileViewPanel.add(fileLabel);
	fileTextArea.setStyleName("popupMsg");
	fileTextArea.setSize("342px", "298px");
	fileTextArea.getElement().setAttribute("wrap", "off");    
	fileTextArea.setReadOnly(true);
	fileViewPanel.add(fileTextArea);
	dirPanel.add(dirScrollPanel);
	dirPanel.add(fileViewPanel);
	tabPanel.add(dirPanel,"Results directory");

	AbsolutePanel bottomPanel = new AbsolutePanel(); 
	bottomPanel.setSize("650px", "360px");
	bottomPanel.add(tabPanel, 0, 0);
	bottomPanel.add(hPanel,460,3);

	fileSizeLabel.setStyleName("popupFileSelectName");
	verticalPanel.add(bottomPanel); 
	verticalPanel.add(fileSizeLabel);
	this.add(verticalPanel);
	this.setStyleName("loading_container");
}
 
開發者ID:ICT-BDA,項目名稱:EasyML,代碼行數:72,代碼來源:PreviewPopupPanel.java

示例12: init

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
 * UI Initialization
 */
protected void init() {
	this.setSize("850px", "400px");
	this.setGlassEnabled(true);
	this.setModal(true);

	desc.setText(desc.getText()+"  Job Id - "+bdaJobId);
	closeButton.setSize("10px", "10px");
	closeButton.setStyleName("closebtn");

	VerticalPanel topPanel = new VerticalPanel(); //Outermost vertical panel
	topPanel.add(closeButton);
	topPanel.setCellHeight(closeButton, "13px");
	topPanel.setStyleName("vpanel");
	desc.setStyleName("popupTitle");
	topPanel.add(desc);
	topPanel.setCellHeight(desc, "30px");

	HorizontalPanel optPanel = new HorizontalPanel(); //Operation panel(include search, batch delete.etc)
	optPanel.addStyleName("run-history-optPanel");
	DateTimeFormat pickerFormat = DateTimeFormat.getFormat("yyyy-MM-dd");
	startTimeBox.setFormat(new DateBox.DefaultFormat(pickerFormat));
	startTimeBox.getDatePicker().addStyleName("run-history-datepicker-popup");
	endTimeBox.setFormat(new DateBox.DefaultFormat(pickerFormat));
	endTimeBox.getDatePicker().addStyleName("run-history-datepicker-popup");
	searchBtn.removeStyleName("gwt-Button");
	searchBtn.addStyleName("run-history-search-button");
	//The initial time is set to 2016-1-1
	endTime = new Date();
	DateTimeFormat tmpFormatter = DateTimeFormat.getFormat("yyyy-MM-dd");
	startTime = tmpFormatter.parse("2016-01-01");
	selectAllChkBox.setVisible(false);
	batchDelBtn.removeStyleName("gwt-Button");
	batchDelBtn.addStyleName("run-history-batch-del-button");

	optPanel.add(startTimeLabel); 
	optPanel.add(startTimeBox);
	optPanel.add(endTimeLabel);
	optPanel.add(endTimeBox);
	optPanel.add(searchBtn);
	if(isExample && !AppController.power.equals("111"))  //Example job only can be deleted by administrator privileges
	{}
	else
		optPanel.add(batchDelBtn);
	optPanel.add(selectAllChkBox);

	runHistoryGrid.addStyleName("run-history-table"); //Data view
	runHistoryGrid.addStyleName("table-striped");
	runHistoryGrid.addStyleName("table-hover");
	runHistoryGrid.resize(rowNum, colNum);
	for(int i=0;i<colNum;i++)
	{
		runHistoryGrid.setText(0, i, columns[i]);
	}
	initGridData();

	topPanel.add(optPanel);
	topPanel.add(runHistoryGrid);

	VerticalPanel bottomPanel = new VerticalPanel(); //Paging control
	bottomPanel.add(pageGrid);
	bottomPanel.addStyleName("run-history-bottomPanel");

	VerticalPanel panel = new VerticalPanel();
	panel.add(topPanel);
	panel.add(bottomPanel);

	this.add(panel);
	this.setStyleName("loading_container");
}
 
開發者ID:ICT-BDA,項目名稱:EasyML,代碼行數:73,代碼來源:HistoryPopupPanel.java

示例13: init

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
 * UI initialization
 */
public void init()
{
	this.setSize("480px", "100px");

	//Dialog box title
	closeButton.setSize("10px", "10px");
	closeButton.setStyleName("closebtn");

	//Selection dialog
	HorizontalPanel typeListPanel = new HorizontalPanel();
	typeListPanel.setStyleName("popupDatatypeSelectPanel");
	typeListBox = new ListBox();
	typeListBox.setWidth("120px");
	typeListBox.addItem("----");
	typeListBox.addItem(DatasetType.GENERAL.getDesc());
	typeListBox.addItem(DatasetType.CSV.getDesc());
	typeListBox.addItem(DatasetType.TSV.getDesc());
	typeListBox.addItem(DatasetType.JSON.getDesc());
	if(dataset.getContenttype() == null || dataset.getContenttype() .equals(""))
		typeListBox.setSelectedIndex(0);
	else
	{
		for(int i = 0 ; i<typeListBox.getItemCount() ; i++)
		{
			if(typeListBox.getItemText(i).equals(dataset.getContenttype()))
			{
				typeListBox.setSelectedIndex(i);
				break;
			}
		}
	}
	Label selectLabel = new Label("Select data type: ");
	typeListPanel.add(selectLabel);
	typeListPanel.add(typeListBox);

	//Ok and cancel button
	HorizontalPanel buttonPanel = new HorizontalPanel();
	buttonPanel.setStyleName("popupDatatypeButtonPanel");
	okBtn = new Button("Ok");
	okBtn.setStyleName("button-style");
	cancelBtn = new Button("Cancel");
	cancelBtn.setStyleName("button-style");
	buttonPanel.add(okBtn);
	buttonPanel.add(cancelBtn);

	//Overall arrangement
	VerticalPanel topPanel = new VerticalPanel();
	topPanel.add(closeButton);
	topPanel.setCellHeight(closeButton, "13px");
	topPanel.setStyleName("vpanel");
	desc.setStyleName("popupDatatypeSelectTitle");
	topPanel.add(desc);
	topPanel.setCellHeight(desc, "30px");
	topPanel.add(typeListPanel);
	topPanel.add(buttonPanel);

	this.setGlassEnabled(true);
	this.setModal(true);
	this.add(topPanel);
	this.center();
	this.setStyleName("loading-panel");
}
 
開發者ID:ICT-BDA,項目名稱:EasyML,代碼行數:66,代碼來源:DataTypeSelectPanel.java

示例14: update

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
protected void update() {
	setTitleWidget(new CIIconDisplayNameWidget(bean));
	relationPanel.clear();
	InstanceReferenceTreeControl outboundTreeControl = new InstanceReferenceTreeControl();
	outboundTreeControl.setClickListener(getReferenceClickListener());
	outboundTreeControl.setRootInstance(bean);
	outboundTreeControl.setHideRoot(true);
	CITreeWidget outboundTreeWidget = new CITreeWidget(outboundTreeControl);
	
	Label outboundLabel = new Label("Outbound References");
	outboundLabel.setStyleName("one-screen-header-title");
	/*
	HTML click = new HTML("<a href ='javascript:;'>inbound</a>");
	click.addClickListener(new ClickListener() {

		public void onClick(Widget sender) {
			getBaseEntryScreen().showScreen(OneCMDBApplication.REFERENCE_CI_SCREEN, control.getBase().getAlias(), new Long(0));
		}
	});
	*/
	VerticalPanel outboundPanel = new VerticalPanel();
	outboundPanel.setHeight("100%");
	outboundPanel.setStyleName("mdv-form");
	outboundPanel.add(outboundLabel);
	outboundPanel.add(outboundTreeWidget);
	outboundPanel.setCellHeight(outboundTreeWidget, "100%");
	outboundPanel.setCellVerticalAlignment(outboundTreeWidget, VerticalPanel.ALIGN_TOP);

	
	
	Label inboundLabel = new Label("Inbound References");
	inboundLabel.setStyleName("one-screen-header-title");
	
	InstanceInboundReferenceTreeControl inboundTreeControl = new InstanceInboundReferenceTreeControl(bean);
	inboundTreeControl.setClickListener(getReferenceClickListener());
	inboundTreeControl.setHideRoot(true);
	inboundTreeControl.setShowSearch(false);
	
	ReverseTreeTable inboundTreeWidget = new ReverseTreeTable(inboundTreeControl);
	

	VerticalPanel inboundPanel = new VerticalPanel();
	inboundPanel.setHeight("100%");
	inboundPanel.setStyleName("mdv-form");
	inboundPanel.add(inboundLabel);
	inboundPanel.add(inboundTreeWidget);
	inboundPanel.setCellHeight(inboundTreeWidget, "100%");
	inboundPanel.setCellVerticalAlignment(inboundTreeWidget, VerticalPanel.ALIGN_TOP);
	
	VerticalPanel centerPanel = new VerticalPanel();
	centerPanel.setHeight("100%");
	centerPanel.setStyleName("mdv-form");
	Label centerLabel = new Label("CI");
	centerLabel.setStyleName("one-screen-header-title");
	centerPanel.add(centerLabel);
	CIIconDisplayNameWidget widget = new CIIconDisplayNameWidget(bean, getCenterClickListener());
	centerPanel.add(widget);
	centerPanel.setCellHeight(widget, "100%");
	centerPanel.setCellVerticalAlignment(widget, VerticalPanel.ALIGN_TOP);
	
	relationPanel.add(inboundPanel);
	relationPanel.add(centerPanel);
	relationPanel.add(outboundPanel);

}
 
開發者ID:luox12,項目名稱:onecmdb,代碼行數:66,代碼來源:ReferenceCIScreen.java

示例15: layout

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public void layout(String rootId) {

        init();

        Region loginRegion = null;
        if (Application.getInstance().getLoginManager()!=null) {
            loginRegion = Application.getInstance().getLoginManager().makeLoginRegion();
        }

        HorizontalPanel hp = new HorizontalPanel();
        hp.add(getSmallIcon().getDisplay());
        hp.add(getSmallIcon2().getDisplay());
        VerticalPanel fp = new VerticalPanel();
        if (loginRegion!=null) {
            fp.add(loginRegion.getDisplay());
            fp.setCellHeight(loginRegion.getDisplay(), "20px");
            fp.setCellHorizontalAlignment(loginRegion.getDisplay(), HorizontalPanel.ALIGN_RIGHT);
        }
        fp.add(hp);
        fp.setCellHeight(hp, "52px");
        fp.setCellHorizontalAlignment(hp, VerticalPanel.ALIGN_CENTER);
        fp.setStyleName("user-info");
        RootPanel.get("user-info").add(fp);


        Widget north = makeNorth();
        Widget center = makeCenter();
        Widget south = makeSouth();
        if (north != null) {
            mainPanel.add(north, DockPanel.NORTH);
            mainPanel.setCellHeight(north, "10px");
//            GwtUtil.DockLayout.setWidgetSize(north, getNorthHeight());
        }

//        if (south != null) {
//            mainPanel.add(south, DockPanel.SOUTH);
//            mainPanel.setCellHeight(south, "60px");
//        }
//
        if (center != null) {
            mainPanel.add(center, DockPanel.CENTER);
            GwtUtil.setStyle(center, "padding", "0 10px");
        }


        if (rootId != null) {
            RootPanel root = RootPanel.get(rootId);
            if (root == null) {
                throw new RuntimeException("Application is not setup correctly; unable to find " + rootId);
            }
            root.add(mainPanel);
        } else {
            RootPanel.get().add(mainPanel);
        }
//        mainPanel.add(resizer, DockPanel.WEST);
//        mainPanel.setCellWidth(resizer, "15px");

        mainPanel.setSize("100%", "100%");

//        // now.. add the menu to the top
        getMenu().setDisplay(Application.getInstance().getToolBar().getWidget());
        resize();

    }
 
開發者ID:lsst,項目名稱:firefly,代碼行數:65,代碼來源:ResizableLayoutManager.java


注:本文中的com.google.gwt.user.client.ui.VerticalPanel.setCellHeight方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。