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


Java ScrollPanel.setStyleName方法代碼示例

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


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

示例1: setCourseDetails

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
@Override
public void setCourseDetails(CourseFinderCourseDetails... details) {
	iDetails = details;
	int tabIndex = 0;
	for (CourseFinderCourseDetails detail: iDetails) {
		ScrollPanel panel = new ScrollPanel(detail.asWidget());
		panel.setStyleName("unitime-ScrollPanel-inner");
		panel.addStyleName("course-info");
		iCourseDetailsTabBar.addTab(detail.getName(), true);
		Character ch = UniTimeHeaderPanel.guessAccessKey(detail.getName());
		if (ch != null)
			iTabAccessKeys.put(ch, tabIndex);
		tabIndex++;
	}
	selectLastTab();
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:17,代碼來源:CourseFinderCourses.java

示例2: addAvatarSectionBody

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
/**
 * Allows to add a new avatar's section into the avatar's section dialog
 * @param avatarSectionsTabPanel the decorated panel storing the smile section
 * @param avatarSection the avatar section descriptor
 */
private void addAvatarSectionBody( final DecoratedTabPanel avatarSectionsTabPanel,
								   final PresetAvatarImages.AvatarSectionDescriptor avatarSection ) {
	//Initialize the scroll panel
	final ScrollPanel scrollPanel = new ScrollPanel();
	scrollPanel.setStyleName( CommonResourcesContainer.CHOOSE_AVATAR_PANEL_STYLE );
	
	//Add to the tab panel
	final PriceTagWidget minMoneyTitle = new PriceTagWidget( null, avatarSection.price, true, false );
	avatarSectionsTabPanel.add( scrollPanel, minMoneyTitle );
	
	//Store the tab to section mapping
	tabsToSections.put( avatarSectionsTabPanel.getWidgetIndex( scrollPanel ) , avatarSection );
	//Store the tab to price tab mapping
	pricedSectionTitles.put( avatarSectionsTabPanel.getWidgetIndex( scrollPanel ), minMoneyTitle );
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:21,代碼來源:ChooseAvatarDialogUI.java

示例3: asWidget

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
/**
 * @return the widget
 */
public Widget asWidget() {
    _bindingConfiguration = DOM.createElement("pre"); //$NON-NLS-1$

    Element code = DOM.createElement("code"); //$NON-NLS-1$
    code.appendChild(_bindingConfiguration);

    HTML html = new HTML();
    html.getElement().appendChild(code);
    html.setSize("100%", "100%"); //$NON-NLS-1$ //$NON-NLS-2$

    ScrollPanel panel = new ScrollPanel();
    panel.setStyleName("fill-layout-width"); //$NON-NLS-1$
    panel.add(html);
    panel.setSize("100%", "100%"); //$NON-NLS-1$ //$NON-NLS-2$

    return panel;
}
 
開發者ID:jboss-switchyard,項目名稱:switchyard,代碼行數:21,代碼來源:BindingDetailsWidget.java

示例4: populateDialog

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
@Override
protected void populateDialog() {
	//ADD THE MAIN DATA FIELDS
	if( isTopicView ) {
		addNewGrid( 2, 2, false, "", true);
	} else {
		addNewGrid( 1, 1, false, "", true);
	}
	
	//Make a wrapper scroll panel around the message because it can be too long
	VerticalPanel centeringPanel = new VerticalPanel();
	centeringPanel.addStyleName( CommonResourcesContainer.MAXIMUM_WIDTH_FOR_MESSAGE_VIEW_STYLE );
	centeringPanel.setHeight("100%");
	centeringPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
	centeringPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
	centeringPanel.add( forumMessageUI );
	
	ScrollPanel wrapperPanel = new ScrollPanel();
	wrapperPanel.setStyleName( CommonResourcesContainer.SCROLLABLE_SIMPLE_PANEL );
	//Force the maximum viewable area for the displayed forum message
	wrapperPanel.addStyleName( CommonResourcesContainer.MAXIMUM_SIZE_FOR_MESSAGE_VIEW_STYLE );
	wrapperPanel.add( centeringPanel );
	
	if( isTopicView ) {
		addToGrid( this.getCurrentGridIndex(), FIRST_COLUMN_INDEX, 2, wrapperPanel, false, false );
		
		//Add the grid action buttons
		this.addGridActionElements(true, true);
	} else {
		addToGrid( FIRST_COLUMN_INDEX, wrapperPanel, false, false );
	}
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:33,代碼來源:ViewMessageDialogUI.java

示例5: WgtGameLogs

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
/**
 * 
 */
public WgtGameLogs()
{
  ScrollPanel panel = new ScrollPanel();
  panel.setStyleName( "fmp-log-panel" );
  panel.add( m_tree );
  m_tree.addSelectionHandler( this );
  initWidget( panel );
  redraw();
}
 
開發者ID:kroc702,項目名稱:fullmetalgalaxy,代碼行數:13,代碼來源:WgtGameLogs.java

示例6: WgtPlayers

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public WgtPlayers()
{
  super();
  
  m_btnChat.addClickHandler( this );
  initPlayerPanel();
  ScrollPanel m_scrollPanel = new ScrollPanel();
  m_scrollPanel.setStyleName( "fmp-players-panel" );
  m_scrollPanel.add( m_playerPanel );
  initWidget( m_scrollPanel );
}
 
開發者ID:kroc702,項目名稱:fullmetalgalaxy,代碼行數:12,代碼來源:WgtPlayers.java

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

示例8: AlertsWidget

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
/**
 * Constructs alert widget with default and additionally provided alert type available for filtering.<br>
 * Usually should be used by projects that have extended the Alerts
 * 
 * @param types - additional alert types
 */
public AlertsWidget(IAlertType[]... types) {
    super("Alerts:", 20000, (AlertsServiceAsync) GWT.create(AlertsService.class));

    Set<IAlertType> alertTypesSet = new HashSet<IAlertType>();

    // default alert types
    alertTypesSet.addAll(new HashSet<IAlertType>(Arrays.asList(AlertType.values())));

    // all the custom alert types
    for (IAlertType[] arr : types) {
        alertTypesSet.addAll(new HashSet<IAlertType>(Arrays.asList(arr)));
    }

    addStyleName("alertsWidget");
    ScrollPanel sp = new ScrollPanel();
    sp.setStyleName("alertsWidgetData");
    getDataPanel().add(sp);
    sp.add(alertsTable);

    // creating title
    HorizontalPanel title = new HorizontalPanel();
    title.setStyleName("serversHeader");
    title.add(new HTML("Alerts:&nbsp;"));
    title.add(new HTML("Filter:"));
    typesListBox = getTypesListBox(alertTypesSet);
    title.add(typesListBox);
    title.add(getExportButton());
    title.add(getRefProg());

    setTitleWidget(title);

    initAlertTable();
}
 
開發者ID:armangal,項目名稱:SmartMonitoring,代碼行數:40,代碼來源:AlertsWidget.java

示例9: appendTreeNode

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
/**
 * Create a new {@link TreeNodeImpl} and append it to the end of the
 * LayoutPanel.
 *
 * @param <C> the data type of the children
 * @param nodeInfo the info about the node
 * @param value the value of the open node
 */
private <C> TreeNode appendTreeNode(final NodeInfo<C> nodeInfo, Object value) {
  // Create the list view.
  final int level = treeNodes.size();
  final BrowserCellList<C> view = createDisplay(nodeInfo, level);

  // Create a pager and wrap the components in a scrollable container. Set the
  // tabIndex to -1 so the user can tab between lists without going through
  // the scrollable.
  ScrollPanel scrollable = new ScrollPanel();
  scrollable.getElement().setTabIndex(-1);
  final Widget pager = createPager(view);
  if (pager != null) {
    FlowPanel flowPanel = new FlowPanel();
    flowPanel.add(view);
    flowPanel.add(pager);
    scrollable.setWidget(flowPanel);
  } else {
    scrollable.setWidget(view);
  }
  scrollable.setStyleName(style.cellBrowserColumn());
  if (level == 0) {
    scrollable.addStyleName(style.cellBrowserFirstColumn());
  }

  // Create a TreeNode.
  TreeNodeImpl<C> treeNode = new TreeNodeImpl<C>(nodeInfo, value, view, scrollable);
  treeNodes.add(treeNode);

  /*
   * Attach the view to the selection model and node info. Nullify the default
   * selection manager because it is provided by the node info.
   */
  view.setSelectionModel(nodeInfo.getSelectionModel(), null);
  nodeInfo.setDataDisplay(view);

  // Add the view to the LayoutPanel.
  SplitLayoutPanel splitPanel = getSplitLayoutPanel();
  splitPanel.insertLineStart(scrollable, defaultWidth, null);
  splitPanel.setWidgetMinSize(scrollable, minWidth);
  splitPanel.forceLayout();

  // Scroll to the right.
  animation.scrollToEnd();
  return treeNode;
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:54,代碼來源:CellBrowser.java


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