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


Java Composite類代碼示例

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


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

示例1: attachPage

import com.google.gwt.user.client.ui.Composite; //導入依賴的package包/類
private void attachPage (PageType type,
		final NavigationChangedEvent event) {
	Composite page = null;

	if ((page = getPageFromCache(type)) == null) {
		createAsyncPage(type, event);
	}

	if (page != null) {
		if (!page.isAttached()) {
			pageHolder.clear();
			pageHolder.add(page);
		}

		Scheduler.get().scheduleDeferred( () -> DefaultEventBus.get()
				.fireEventFromSource(event, NavigationController.this));
	}
}
 
開發者ID:billy1380,項目名稱:blogwt,代碼行數:19,代碼來源:NavigationController.java

示例2: getContainedHierarchyRecursively

import com.google.gwt.user.client.ui.Composite; //導入依賴的package包/類
private static void getContainedHierarchyRecursively(final Widget startAt,
                                                     int depth,
                                                     IndentedLineAccumulator result) {
    if (startAt == null) {
        result.append(depth,
                      "(null)");
        return;
    }
    result.append(depth,
                  widgetInfo(startAt));
    if (startAt instanceof HasWidgets) {
        for (Widget child : ((HasWidgets) startAt)) {
            getContainedHierarchyRecursively(child,
                                             depth + 1,
                                             result);
        }
    } else if (startAt instanceof Composite) {
        getContainedHierarchyRecursively(extractWidget(((Composite) startAt)),
                                         depth + 1,
                                         result);
    }
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:23,代碼來源:Layouts.java

示例3: shouldCallNativeMethodsWithoutFailures

import com.google.gwt.user.client.ui.Composite; //導入依賴的package包/類
@Test
public void shouldCallNativeMethodsWithoutFailures() throws Exception {
  class SomeComposite extends Composite {
    public SomeComposite() {
      // initWidget relies on native calls
      initWidget(mock(Widget.class));
    }
    private native boolean runNativeMethod() /*-{
      return true;
    }-*/;
  }

  // Note that the result will be false even though the native method should return true - we
  // can't run the actual javascript and have to return a default value
  assertFalse(new SomeComposite().runNativeMethod());
}
 
開發者ID:google,項目名稱:gwtmockito,代碼行數:17,代碼來源:GwtMockitoTest.java

示例4: createView

import com.google.gwt.user.client.ui.Composite; //導入依賴的package包/類
/**
 * To craete view.
 * 
 * @return Composite
 */
@Override
public Composite createView() {
	this.view = new BatchClassManagementView(this.eventBus);
	this.batchClassManagementPresenter = new BatchClassManagementPresenter(this, view);
	return this.view;
}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:12,代碼來源:BatchClassManagementController.java

示例5: createView

import com.google.gwt.user.client.ui.Composite; //導入依賴的package包/類
/**
 * To create View.
 * 
 * @return Composite
 */
@Override
public Composite createView() {
	this.view = new LandingView();
	this.view.buildLandingPage();
	this.batchListPresenter = new BatchListPresenter(this, view);
	return this.view;
}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:13,代碼來源:BatchListController.java

示例6: createView

import com.google.gwt.user.client.ui.Composite; //導入依賴的package包/類
@Override
public Composite createView() {

	this.customWorkflowManagementView = new CustomWorkflowManagementView();
	this.customWorkflowManagementPresenter = new CustomWorkflowManagementPresenter(this, this.customWorkflowManagementView);

	return this.customWorkflowManagementView;
}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:9,代碼來源:CustomWorkflowController.java

示例7: createView

import com.google.gwt.user.client.ui.Composite; //導入依賴的package包/類
/**
 * To create View.
 */
@Override
public Composite createView() {
	this.batchInstanceView = new BatchInstanceView();
	this.batchInstancePresenter = new BatchInstancePresenter(this, batchInstanceView);
	return this.batchInstanceView;
}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:10,代碼來源:BatchInstanceController.java

示例8: initTabBar

import com.google.gwt.user.client.ui.Composite; //導入依賴的package包/類
private void initTabBar() {
  TabBar tabBar = getTabBar();
  tabBar.addSelectionHandler(
      new SelectionHandler<Integer>() {
        @Override
        public void onSelection(SelectionEvent<Integer> event) {
          if (selectedTab >= 0) {
            tabs.get(selectedTab).registerKeys(false);
          }
          selectedTab = event.getSelectedItem();
          tabs.get(selectedTab).registerKeys(true);
        }
      });

  for (Tab tabInfo : Tab.values()) {
    RelatedChangesTab panel = new RelatedChangesTab(tabInfo);
    add(panel, tabInfo.defaultTitle);
    tabs.add(panel);

    TabBar.Tab tab = tabBar.getTab(tabInfo.ordinal());
    tab.setWordWrap(false);
    ((Composite) tab).setTitle(tabInfo.tooltip);

    setTabEnabled(tabInfo, false);
  }
  getTab(Tab.RELATED_CHANGES).setShowIndirectAncestors(true);
  getTab(Tab.CHERRY_PICKS).setShowBranches(true);
  getTab(Tab.SAME_TOPIC).setShowBranches(true);
  getTab(Tab.SAME_TOPIC).setShowProjects(true);
  getTab(Tab.SAME_TOPIC).setShowSubmittable(true);
  getTab(Tab.SUBMITTED_TOGETHER).setShowBranches(true);
  getTab(Tab.SUBMITTED_TOGETHER).setShowProjects(true);
  getTab(Tab.SUBMITTED_TOGETHER).setShowSubmittable(true);
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:35,代碼來源:RelatedChanges.java

示例9: getContainerWidget

import com.google.gwt.user.client.ui.Composite; //導入依賴的package包/類
private Widget getContainerWidget() {
	if (containerWidget == null) {
		if (getParent() instanceof HasWidgets) {
			containerWidget = this;
		} else if (getParent() instanceof Composite) {
			containerWidget = getParent();
		}
	}
	return containerWidget;
}
 
開發者ID:Putnami,項目名稱:putnami-web-toolkit,代碼行數:11,代碼來源:Modal.java

示例10: animate

import com.google.gwt.user.client.ui.Composite; //導入依賴的package包/類
@Override
public void animate() {
	Animation a = new Animation() {
		@Override
		protected void onUpdate(double progress) {
			Composite c = InfluenceAnswerTextView.this;
			c.getElement().getStyle().setProperty("opacity", String.valueOf(progress));
		}
	};
	a.run(3000);
}
 
開發者ID:jkonert,項目名稱:socom,代碼行數:12,代碼來源:InfluenceAnswerTextView.java

示例11: animate

import com.google.gwt.user.client.ui.Composite; //導入依賴的package包/類
@Override
public void animate() {
	Animation a = new Animation() {
		@Override
		protected void onUpdate(double progress) {
			Composite c = InfluenceAnswerAudioView.this;
			c.getElement().getStyle().setProperty("opacity", String.valueOf(progress));
		}
	};
	a.run(3000);
}
 
開發者ID:jkonert,項目名稱:socom,代碼行數:12,代碼來源:InfluenceAnswerAudioView.java

示例12: getExtensions

import com.google.gwt.user.client.ui.Composite; //導入依賴的package包/類
/**
 * Return a List of Widgets that the NewWorkbenchConfigurationHandler can use to gather additional parameters for the
 * new workbench configuration. The List is of Pairs, where each Pair consists of a String caption and IsWidget editor.
 * @return null if no extension is provided
 */
public List<Pair<String, ? extends Composite>> getExtensions() {
    if ( widgetList == null || widgetList.size() == 0 ) {
        widgetList = new ArrayList<Pair<String, ? extends Composite>>();
    }
    return this.widgetList;
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:12,代碼來源:WorkbenchConfigurationHandler.java

示例13: getWidgetByName

import com.google.gwt.user.client.ui.Composite; //導入依賴的package包/類
/**
 * get specific widget by using widget name
 * @param name : specific widget name
 * @return
 */
public Composite getWidgetByName( final String name ) {
    for ( Pair<String, ? extends Composite> pair : widgetList ) {
        if ( pair.getK1().equals( name ) ) {
            return pair.getK2();
        }
    }
    return null;
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:14,代碼來源:WorkbenchConfigurationHandler.java

示例14: setup

import com.google.gwt.user.client.ui.Composite; //導入依賴的package包/類
private void setup() {
    if ( activeHandler != null ) {
        view.clear();
        activeHandler.loadUserWorkbenchPreferences();
        for ( Pair<String, ? extends Composite> p : activeHandler.getExtensions() ) {
            view.add( p.getK2() );
        }
    }
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:10,代碼來源:WorkbenchConfigurationViewImpl.java

示例15: createView

import com.google.gwt.user.client.ui.Composite; //導入依賴的package包/類
@Override
public Composite createView() {
	this.view = new ReportingView();
	this.reportingPresenter = new ReportingPresenter(this, view);
	return this.view;
}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:7,代碼來源:ReportingController.java


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