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


Java VerticalPanel.setCellVerticalAlignment方法代碼示例

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


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

示例1: handleDoubleClick

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
protected void handleDoubleClick(TableData.Row row) {
    VerticalPanel vp = new VerticalPanel();
    final Image previewImage = new Image(getFullSizeUrl(row));
    final HTML caption = new HTML(getPopUpCaption(row));
    String title = getThumbnailDesc(row).replace("<em>", "").replace("</em>", "");

    caption.setWidth("320px");

    previewImage.addLoadHandler(new LoadHandler() {
        public void onLoad(LoadEvent ev) {
            caption.setWidth(previewImage.getWidth() + "px");
        }
    });
    GwtUtil.setStyle(vp, "margin", "8px");

    vp.setCellHorizontalAlignment(previewImage, HasHorizontalAlignment.ALIGN_CENTER);
    vp.setCellVerticalAlignment(previewImage, HasVerticalAlignment.ALIGN_MIDDLE);
    vp.add(previewImage);
    vp.add(caption);

    PopupPane popupPane = new PopupPane(title, vp, PopupType.STANDARD, false, false);

    popupPane.show();
}
 
開發者ID:lsst,項目名稱:firefly,代碼行數:25,代碼來源:BasicImageGrid.java

示例2: FilePath

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
 * FilePath
 */
public FilePath() {
	panel = new VerticalPanel();
	path = new HTML(Main.i18n("filebrowser.path") + ": ", false);
	panel.setStyleName("okm-FilePath-Title");
	panel.setSize("100%", "22px");
	panel.add(path);
	panel.setCellVerticalAlignment(path, VerticalPanel.ALIGN_MIDDLE);
	initWidget(panel);

	// Only executes first time when object is created to initalize values
	getRootPath();
}
 
開發者ID:openkm,項目名稱:document-management-system,代碼行數:16,代碼來源:FilePath.java

示例3: 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

示例4: LoginScreen

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public LoginScreen() {
    VerticalPanel vPanel = new VerticalPanel();
    txtPassword.setConvertToUpper(false);
    txtLogin.setConvertToUpper(false);
    
	txtLogin.setRequired(true);
    vp.add(txtLogin);
    vp.add(txtPassword);
    
    addExtraInputFields(vp);
    
    rememberMe.setChecked(true);
    rememberMe.setStyleName("one-remember-me");
    vp.add(rememberMe);
    vp.setCellHorizontalAlignment(rememberMe, HorizontalPanel.ALIGN_RIGHT);
    
    ButtonPanel btnPanel = new ButtonPanel();
    btnPanel.addSaveButton("Login");
    btnPanel.addClearButton();
    btnPanel.setCallback(this);
    vp.add(btnPanel);
    vp.setCellHorizontalAlignment(btnPanel, HorizontalPanel.ALIGN_LEFT);

    setTitleText("Please Login");
    

    //dockPanel.add(vp, DockPanel.NORTH);
    vPanel.add(vp);
    vPanel.setCellHorizontalAlignment(vp, HorizontalPanel.ALIGN_CENTER);
    vPanel.setCellVerticalAlignment(vp, HorizontalPanel.ALIGN_MIDDLE);
    vPanel.setStyleName("mdv-form");
    
    dockPanel.add(vPanel, NORTH);
    dockPanel.setCellHeight(vPanel, "100%");
    initWidget(dockPanel);

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

示例5: addMotd

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
private void addMotd(VerticalPanel panel) {
  MotdBox motdBox = MotdBox.getMotdBox();
  panel.add(motdBox);
  panel.setCellHorizontalAlignment(motdBox, HorizontalPanel.ALIGN_RIGHT);
  panel.setCellVerticalAlignment(motdBox, HorizontalPanel.ALIGN_BOTTOM);
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:7,代碼來源:TopPanel.java

示例6: HeaderScreen

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public HeaderScreen() {
    HorizontalPanel outer = new HorizontalPanel();
    VerticalPanel inner = new VerticalPanel();
    outer.setWidth("100%");
    outer.setHeight("3em");
    
    //outer.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
    inner.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
    inner.setWidth("100%");
    inner.setHeight("100%");
    
    
    HorizontalPanel authInfo = new HorizontalPanel();
    //authInfo.setSpacing(4);
    logout.setStyleName("logout-style");
    authInfo.add(welcomeString);
    authInfo.add(logout);
    logout.setVisible(false);
    logout.addClickListener(this);
    inner.add(authInfo);
 
    HorizontalPanel actionPanel = new HorizontalPanel();
    actionPanel.setStyleName("onecmdb-header-label");
    actionPanel.setSpacing(10);
    actionPanel.add(getFeedbackWidget());
    actionPanel.add(getCheckUpdateWidget());
    
    actionPanel.add(getHomeWidegt());
    actionPanel.add(getHelpWidget());
    
    inner.add(actionPanel);
    inner.setCellVerticalAlignment(actionPanel, VerticalPanel.ALIGN_BOTTOM);
    inner.setCellVerticalAlignment(authInfo, VerticalPanel.ALIGN_TOP);
     
    
    //DockPanel iconPanel = new DockPanel();
    //iconPanel.setWidth("100%");
    //welcomePanel.setSpacing(10);
    //iconPanel.add(icon,DockPanel.EAST);
//    welcomePanel.add(new HTML("<b>&nbsp;</b>"),DockPanel.CENTER);
    outer.add(icon);
    outer.setCellHorizontalAlignment(icon, HorizontalPanel.ALIGN_LEFT);
    outer.add(inner);
    outer.setCellHorizontalAlignment(inner, HorizontalPanel.ALIGN_RIGHT);
    
    
    // Show welcome page.
    icon.addClickListener(new ClickListener() {
		public void onClick(Widget sender) {
			getBaseEntryScreen().showScreen(OneCMDBApplication.WELCOME_SCREEN);
		}
    });
    
    initWidget(outer);
    //outer.setStyleName("one-top-panel");
  }
 
開發者ID:luox12,項目名稱:onecmdb,代碼行數:57,代碼來源:HeaderScreen.java

示例7: 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

示例8: setupTable

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
protected void setupTable() {
	if (this.template == null) {
		return;
	}
	setTitleText("Instances of ");
	setTitleWidget(new CIIconDisplayNameWidget(this.template));
	
	
	vPanel.clear();
	table = null;
	if (isNewSupport()) {
		HorizontalPanel actionPanel = new HorizontalPanel();
		HTML add = new HTML("[<a href='javascript:;'>new</a>]");
		add.setTitle("Create a new instance");
		actionPanel.add(add);
		add.addClickListener(new ClickListener() {

			public void onClick(Widget sender) {
				getBaseEntryScreen().showScreen(OneCMDBApplication.NEW_CI_SCREEN, template.getAlias(), new Long(0));
			}
		
		});
		actionPanel.add(add);
		actionPanel.setCellHorizontalAlignment(add, HorizontalPanel.ALIGN_RIGHT);
		actionPanel.setWidth("100%");
		vPanel.add(actionPanel);
	}
	VerticalPanel tablePanel = new VerticalPanel();
	tablePanel.setStyleName("onecmdb-table-panel");

	if (table == null) {
		table = new CITablePanel();
		table.addTableListener(ListCIScreen.this);
		table.addLoadListener(ListCIScreen.this);
		CITablePageControlPanel tablePageControl = new CITablePageControlPanel(table);
		tablePanel.add(tablePageControl);
		tablePanel.add(table);
		tablePanel.setCellVerticalAlignment(tablePageControl, VerticalPanel.ALIGN_TOP);
		tablePanel.setCellVerticalAlignment(table, VerticalPanel.ALIGN_TOP);
	}
	vPanel.add(tablePanel);
	table.setAttributeRender(getAttributeRender());
	
	table.setTabelControl(getTableControl(this.template));
	table.load();
}
 
開發者ID:luox12,項目名稱:onecmdb,代碼行數:47,代碼來源:ListCIScreen.java

示例9: init

import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
private void init(String resolvers[]) {

        helpWidget = getHelp();
        SimpleInputField posWrap = SimpleInputField.createByProp(POSITION_KEY);
        posField = posWrap.getField();
        posFd = (PositionFieldDef) posField.getFieldDef();


        Resolver r;
        for (String rStr : resolvers) {
            r = Resolver.parse(rStr);
            if (r != Resolver.NONE) _supportedResolvers.add(r);
        }
        if (_supportedResolvers.size() == 0) {
            _supportedResolvers.add(Resolver.NED);
            _supportedResolvers.add(Resolver.Simbad);
        }
        resolveByField = createResolverField(_supportedResolvers);
//        resolveByField = FormBuilder.createField(RESOLVED_BY_KEY);

        String resolveByPref = Preferences.get(RESOLVE_BY_PREF);


        if (!StringUtils.isEmpty(resolveByPref)) {
            Resolver def = parseResolver(resolveByPref);
            if (def != Resolver.NONE) setResolver(def);
        }


        addChangeListeners();

        feedback.setSize("400px", "3em");
//        feedback.setWidth("400px");
        GwtUtil.setStyle(resolveByField, "marginTop", "6px ");

        HorizontalPanel top = new HorizontalPanel();
        top.add(posWrap);
        top.add(resolveByField);
        top.setSpacing(1);

        mainPanel = new VerticalPanel();
        mainPanel.add(top);
        mainPanel.add(feedback);
        mainPanel.setCellVerticalAlignment(top, VerticalPanel.ALIGN_MIDDLE);
        mainPanel.setCellVerticalAlignment(feedback, VerticalPanel.ALIGN_TOP);
        updateFeedback();
    }
 
開發者ID:lsst,項目名稱:firefly,代碼行數:48,代碼來源:SimpleTargetPanel.java

示例10: init

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

        helpWidget= getHelp();

//        FieldDef fd= FieldDefCreator.makeFieldDef(NAIF_NAME_KEY);
        StringFieldDef fd= new NaifFieldDef();
        FieldDefSource fds= new WebPropFieldDefSource(NAIF_NAME_KEY);
        FieldDefCreator.setStringFieldAttributes(fd,fds);
//        fd.setErrMsg("You must choose a name and ID pair");
//        fd.setMaxWidth(0);
//        fd.setPreferWidth(0);
//        fd.setName("NaifTargetPanel.field.naifName");
//        fd.setLabel("Object Name or ID");
//        fd.setShortDesc("Enter the NAIF name or ID to look up");


        naifField= new NaifInputField(fd,new NaifOracle());



        posWrap= new SimpleInputField(naifField,true);





        addChangeListeners();

        feedback.setSize("400px","3em");
        HorizontalPanel top= new HorizontalPanel();
        top.add(posWrap);
        top.setSpacing(1);

        mainPanel = new VerticalPanel();
        mainPanel.add(top);
        mainPanel.add(feedback);
        mainPanel.setCellVerticalAlignment(top, VerticalPanel.ALIGN_MIDDLE);
        mainPanel.setCellVerticalAlignment(feedback, VerticalPanel.ALIGN_TOP);
        updateFeedback();
    }
 
開發者ID:lsst,項目名稱:firefly,代碼行數:41,代碼來源:NaifTargetPanel.java


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