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


Java ScrollPanel.setWidth方法代碼示例

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


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

示例1: createLyricsDialog

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
private void createLyricsDialog()
{
	lyricsDialog = new DialogBox();
	VerticalPanel vPanel = new VerticalPanel();
	vPanel.setHeight( "100%" );
	vPanel.setHorizontalAlignment( VerticalPanel.ALIGN_CENTER );
	vPanel.setVerticalAlignment( VerticalPanel.ALIGN_MIDDLE );
	lyricsDialog.add( vPanel );
	
	lyrics = new HTML();
	ScrollPanel scrollPanel = new ScrollPanel();
	scrollPanel.setWidth( "300px" );
	scrollPanel.setHeight( "250px" );
	scrollPanel.add( lyrics );
	vPanel.add( scrollPanel );
	
	Button close = new NativeButton( "Close" );
	close.addClickListener( new ClickListener() {
		public void onClick( Widget arg0 ) {
			lyricsDialog.hide();
		}
	} );
	vPanel.add( close );
}
 
開發者ID:jolie,項目名稱:jolie,代碼行數:25,代碼來源:Echoes.java

示例2: BaseViewImpl

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public BaseViewImpl(boolean useDetailsPanel) {
    errorPanel = new AlertPanel(Type.ERROR);
    sandboxStyle = Utils.sandboxStyle;
    avroUiStyle = Utils.avroUiStyle;
    initWidget(createAndBindUi());
    setTitle(getViewTitle());
    if (useDetailsPanel) {
        detailsPanel = new VerticalPanel();
        detailsPanel.setWidth("100%");
        detailsPanel.addStyleName(sandboxStyle.contentPanel());
        ScrollPanel scroll = new ScrollPanel();
        scroll.setWidth("100%");
        scroll.add(detailsPanel);
        centerPanel.setWidget(scroll);
    }
    initCenterPanel();        
    clearError();
}
 
開發者ID:kaaproject,項目名稱:sandbox-frame,代碼行數:19,代碼來源:BaseViewImpl.java

示例3: ScrollContainer

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public ScrollContainer() {
		super.setHeight("100%");
		super.setWidth("100%");
//		HTML html  = new HTML(" ");
//		html.setSize("100%", "100%");
//		super.add(html, 0, 0);
		//static, 
//	    DOM.setStyleAttribute(html.getElement(), "position", "relative");
//		html.getElement().getStyle().setProperty(name, value)
		scrollPanel = new ScrollPanel();
		scrollPanel.setWidth("100%");
		scrollPanel.setAlwaysShowScrollBars(true);
		super.add(scrollPanel, 0, 0);
		DOM.setStyleAttribute(getElement(), "overflow", "hidden");
		resetHeight();
	}
 
開發者ID:Antokolos,項目名稱:iambookmaster,代碼行數:17,代碼來源:ScrollContainer.java

示例4: DiagramController

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public DiagramController(int canvasWidth, int canvasHeight, int frameWidth,
		int frameHeight) {
	this(canvasWidth, canvasHeight);
	scrollPanel = new ScrollPanel(getView());
	scrollPanel.setWidth(frameWidth-30 + "px");
	scrollPanel.setHeight(frameHeight + "px");

}
 
開發者ID:ICT-BDA,項目名稱:EasyML,代碼行數:9,代碼來源:DiagramController.java

示例5: onUpdate

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
@Override
public void onUpdate(int width, int height) {
	ScrollPanel panel = (ScrollPanel)getWidget();
	panel.setHeight(height + "px");
	panel.setWidth(width + "px");
	container.setWidth("100%");
	for (ListItem item : items) {
		item.onUpdate(width, height);
	}
}
 
開發者ID:openremote,項目名稱:WebConsole,代碼行數:11,代碼來源:ListPanelComponent.java

示例6: initCenterPanel

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
@Override
protected void initCenterPanel() {
    ScrollPanel centerScroll = new ScrollPanel();
    centerScroll.setWidth("100%");
    centerPanel.setWidget(centerScroll);        
    demoProjectsView = new DemoProjectsWidget();
    centerScroll.add(demoProjectsView);
    Element scrollContainer = demoProjectsView.getElement().getParentElement();
    scrollContainer.getStyle().setPaddingTop(15, Unit.PX);
    scrollContainer.getStyle().setPaddingBottom(15, Unit.PX);
    scrollContainer.getStyle().setPaddingLeft(30, Unit.PX);
    scrollContainer.getStyle().setPaddingRight(30, Unit.PX);
}
 
開發者ID:kaaproject,項目名稱:sandbox-frame,代碼行數:14,代碼來源:MainViewImpl.java

示例7: render

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public UIObject render(ComponentGVO component, String uuid, String parent, String context) {		
	QRootPanel qRootPanel = null;
	if (component != null) {
		if (component instanceof WindowGVO) {
			WindowGVO gvo = (WindowGVO) component;
			qRootPanel = new QRootPanel();
			RendererHelper.addId(component, qRootPanel,uuid,parent, context, false);
			RendererHelper.addUUID(component, qRootPanel, uuid);
			RendererHelper.addEvents(component, qRootPanel, uuid);
			
			Widget rootPanel = (Widget)super.renderChildComponent(gvo.getRootPanel(), uuid,gvo.getId(), context);
			Widget menuAndToolbar = createMenuAndToolbar(qRootPanel,gvo.getRootPanel(), uuid, parent);				
			Widget messageBox = new MessageBox();
			
			ScrollPanel sp = new ScrollPanel();
			if (ClientApplicationContext.getInstance().isMDI()){
				sp.setHeight(gvo.getHeight());
				sp.setWidth(gvo.getWidth());
			} else {
				sp.setHeight(Window.getClientHeight()+"px");
				sp.setWidth(Window.getClientWidth()+"px");
			}
			sp.add(rootPanel);				
			
			qRootPanel.setMenuAndToolBar(menuAndToolbar);
			qRootPanel.setRootPanel(sp);
			qRootPanel.setMessageBox(messageBox);
			qRootPanel.add(menuAndToolbar,0,0);
			int yPosition = toolbarHeight != null ? Integer.parseInt(toolbarHeight)+ 20 : 0;
			if(qRootPanel.getMenuBar() != null){
				yPosition+=22;
			}
			qRootPanel.add(sp,0,yPosition);
			
			qRootPanel.add(messageBox,200,0);
		}
	}
	return qRootPanel;
}
 
開發者ID:qafedev,項目名稱:qafe-platform,代碼行數:40,代碼來源:WindowRenderer.java

示例8: show

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
/**
 * Creates the preview wadl dialog
 * @param html The xhtml string containig the syntax-highlighted wadl
 */
public static void show(String html) {
  final DialogBox dialog = new DialogBox();
  dialog.setText(GuiFactory.strings.wadlPreviewDialog());
  
  VerticalPanel preview = new VerticalPanel();      
  ScrollPanel scrollPanel = new ScrollPanel();
  scrollPanel.setStyleName("restDescribe-wadlArea");
  scrollPanel.setHeight(Math.floor(Window.getClientHeight() * 0.75) + "px");
  scrollPanel.setWidth(Math.floor(Window.getClientWidth() * 0.9) + "px");    
  scrollPanel.add(new HTML(html));      
  preview.add(scrollPanel);
  
  Button closeButton = new Button(GuiFactory.strings.close());
  closeButton.addClickListener(new ClickListener() {
    public void onClick(Widget sender) {
      dialog.hide();
      GuiFactory.blockScreen(false);
    }
  });
  preview.add(new HTML("<br />"));
  preview.add(closeButton);
  preview.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_CENTER);
  
  dialog.setWidget(preview);
  dialog.setPopupPosition((int) Math.floor(Window.getClientWidth() * 0.05), (int) Math.floor(Window.getClientHeight() * 0.05));    
  GuiFactory.blockScreen(true);
  dialog.show();
}
 
開發者ID:tomayac,項目名稱:rest-describe-and-compile,代碼行數:33,代碼來源:WadlPreviewDialog.java

示例9: createPreviewArea

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
private void createPreviewArea(TabLayoutPanel tab) {
	previewPanel = new VerticalPanel();//really need?
	previewPanel.setSize("100%","100%");
	ScrollPanel scroll=new ScrollPanel();
	scroll.setWidth("100%");
	previewPanel.add(scroll);
	scroll.setHeight("100%");
	
	previewHTML = new HTML();
	
	//scroll.setWidget(previewHTML);
	scroll.setWidget(htmlContainer);
	
	tab.add(previewPanel,"Preview");
}
 
開發者ID:akjava,項目名稱:GWTMarkdownEditor,代碼行數:16,代碼來源:MarkdownEditor.java

示例10: setTableUI

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
private void setTableUI(final FlexTable flexTable, final DataTable dataTable) {
	ScrollPanel panel = new ScrollPanel();
	if (dataTable.getRows().getRow().size() == 0) {
		setEmptyTableView(flexTable, dataTable.getHeaderRow());
	}

	panel.add(flexTable);
	panel.setHeight("150px");
	panel.setWidth("400px");
	panel.setTitle(dataTable.getName());
	HorizontalPanel hPanel = new HorizontalPanel();
	insertRowButton = new Button();
	deleteRowButton = new Button();
	deleteAllRowButton = new Button();
	manualExtractionButton = new Button();
	setButtonsText();

	onInsertButtonClicked(insertRowButton, dataTable);
	onDeleteButtonClicked(deleteRowButton, dataTable);
	onDeleteAllButtonClicked(deleteAllRowButton, dataTable);
	onManualExtractionButtonClicked(manualExtractionButton, dataTable);

	final String tableName = dataTable.getName();
	tableNameVsButtonMap.put(insertRowButton, tableName);
	tableNameVsButtonMap.put(deleteRowButton, tableName);
	tableNameVsButtonMap.put(deleteAllRowButton, tableName);
	tableNameVsButtonMap.put(manualExtractionButton, tableName);
	Label label = new Label();
	label.setWidth(GAP_BETWEEN_BUTTONS);
	hPanel.add(insertRowButton);
	hPanel.add(label);
	label = new Label();
	label.setWidth(GAP_BETWEEN_BUTTONS);
	hPanel.add(deleteRowButton);
	hPanel.add(label);
	label = new Label();
	label.setWidth(GAP_BETWEEN_BUTTONS);
	hPanel.add(deleteAllRowButton);
	hPanel.add(label);
	hPanel.add(manualExtractionButton);
	Label emptyLabel = new Label();
	emptyLabel.setHeight("20px");
	verticalPanel.add(emptyLabel);
	emptyLabel = new Label();
	emptyLabel.setText(dataTable.getName());
	verticalPanel.add(emptyLabel);
	verticalPanel.add(hPanel);
	emptyLabel = new Label();
	emptyLabel.setHeight("10px");
	verticalPanel.add(emptyLabel);
	verticalPanel.add(panel);

}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:54,代碼來源:TableExtractionView.java

示例11: DiaryLayerDialog

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
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();
}
 
開發者ID:selu285-2015,項目名稱:285_02_FA15G4,代碼行數:42,代碼來源:DiaryLayerDialog.java

示例12: AllDialog

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
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();
}
 
開發者ID:selu285-2015,項目名稱:285_02_FA15G4,代碼行數:77,代碼來源:AllDialog.java

示例13: AppScreen

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public AppScreen()
{
    verticalPanel = new VerticalPanel();
    initWidget(verticalPanel);
    verticalPanel.setWidth("100%");
    verticalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
    verticalPanel.setSpacing(0);
    
    topBar = new TopBar();
    verticalPanel.add(topBar);
    
    loginScreen = new LoginScreen();
    verticalPanel.add(loginScreen);
    
    flexTable = new FlexTable();
    flexTable.setWidth("100%");
    
    int row = 0; int col = 0;
    
    verticalPanel.add(flexTable);

    row = 0; col = 0;
    horizontalPanel = new HorizontalPanel();
    horizontalPanel.setSpacing(4);
    flexTable.setWidget(row, col, horizontalPanel);
    
    btnMe = new Button("me");
    horizontalPanel.add(btnMe);
    btnMe.setWidth("110px");
    btnMe.setStyleName(css.buttonsStyle());
    
    btnAccessToken = new Button("Access Token");
    horizontalPanel.add(btnAccessToken);
    btnAccessToken.setWidth("110px");
    btnAccessToken.setStyleName(css.buttonsStyle());
    
    btnClear = new Button("Clear");
    btnClear.setText("Clear Log");
    horizontalPanel.add(btnClear);
    btnClear.setWidth("110px");
    btnClear.setStyleName(css.buttonsStyle());
    
    lblLoggedInAs = new Label("                            ");
    lblLoggedInAs.setWordWrap(false);
    horizontalPanel.add(lblLoggedInAs);
    
    btnAbout = new Button("About...");
    horizontalPanel.add(btnAbout);
    btnAbout.setWidth("110px");
    btnAbout.setStyleName(css.buttonsStyle());
    
    
    authProviderImage = new Image("1x1.png");
    authProviderImage.setAltText("Logged in using");
    horizontalPanel.add(authProviderImage);
    
    row = 1; col = 0;
    scrollPanel = new ScrollPanel();
    scrollPanel.scrollToBottom();
    flexTable.setWidget(row, col, scrollPanel);
    scrollPanel.setWidth("100%");
    
    textArea = new TextArea();
    scrollPanel.setWidget(textArea);
    textArea.setSize("99%", "400px");
    flexTable.getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT);
    flexTable.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP);


 
}
 
開發者ID:muquit,項目名稱:gwtoauthlogindemo,代碼行數:72,代碼來源:AppScreen.java


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