当前位置: 首页>>代码示例>>Java>>正文


Java GXT类代码示例

本文整理汇总了Java中com.extjs.gxt.ui.client.GXT的典型用法代码示例。如果您正苦于以下问题:Java GXT类的具体用法?Java GXT怎么用?Java GXT使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GXT类属于com.extjs.gxt.ui.client包,在下文中一共展示了GXT类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initTab

import com.extjs.gxt.ui.client.GXT; //导入依赖的package包/类
/**
 * Inits the tab.
 */
private void initTab() {
    setAutoWidth(true);
    //System.out.println(super.getHeight());
    if(this.height!=null)System.out.println("height: "+height);
    if(this.getParent()!=null)System.out.println("getParent().getOffsetHeight(): "+this.getParent().getOffsetHeight());
    if(GXT.isIE || GXT.isIE7 || GXT.isIE8){
            System.out.println("this.getOffsetHeight=="+this.getOffsetHeight());
            System.out.println("this.getElement().getClientHeight()=="+this.getElement().getClientHeight());
    }
    setAutoHeight(true);
    setHeight("95%");
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:16,代码来源:TabWidget.java

示例2: validate

import com.extjs.gxt.ui.client.GXT; //导入依赖的package包/类
@Override
public String validate(Field<?> field, String value) {
	if(indicator != null && indicator.getAggregation() != IndicatorDTO.AGGREGATE_MULTINOMIAL) {
		try {
			format.parse(value);
		
		} catch(NumberFormatException e) {
			return GXT.MESSAGES.numberField_nanText(value);
		}
	}
	return null;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:13,代码来源:IndicatorValueField.java

示例3: onModuleLoad

import com.extjs.gxt.ui.client.GXT; //导入依赖的package包/类
public void onModuleLoad() {
    ThemeManager.register(Theme.GRAY);
    GXT.setDefaultTheme(Theme.GRAY, true);

    if (!GWT.isScript()) { // hosted
        GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {
            public void onUncaughtException(Throwable e) {
                e.printStackTrace();
            }
        });
    }

    // loading system delegate
    AmDelegateAsync amDelegate = (AmDelegateAsync) GWT.create(AmDelegate.class);
    ((ServiceDefTarget) amDelegate).setServiceEntryPoint(GWT.getModuleBaseURL() + FinanceConstants.ENDPOINT_AM);
    Registry.register(FinanceConstants.DELEGATE_AM, amDelegate);

    SoDelegateAsync soDelegate = (SoDelegateAsync) GWT.create(SoDelegate.class);
    ((ServiceDefTarget) amDelegate).setServiceEntryPoint(GWT.getModuleBaseURL() + FinanceConstants.ENDPOINT_SO);
    Registry.register(FinanceConstants.DELEGATE_SO, soDelegate);

    DdDelegateAsync ddDelegate = (DdDelegateAsync) GWT.create(DdDelegate.class);
    ((ServiceDefTarget) ddDelegate).setServiceEntryPoint(GWT.getModuleBaseURL() + FinanceConstants.ENDPOINT_DD);
    Registry.register(FinanceConstants.DELEGATE_DD, ddDelegate);

    // add main application controller
    // trigger InitApplicationModel event
    Dispatcher dispatcher = Dispatcher.get();
    dispatcher.addController(new FinanceController());
    dispatcher.dispatch(FinanceEvents.InitApplicationModel);
}
 
开发者ID:rafizanbaharum,项目名称:cfi-gov,代码行数:32,代码来源:Finance.java

示例4: onRender

import com.extjs.gxt.ui.client.GXT; //导入依赖的package包/类
@Override
protected void onRender(Element target, int index) {
  if (el() != null) {
    super.onRender(target, index);
    return;
  }
  input = new El(DOM.createInputText());
  input.disable();
  wrap = new El(DOM.createDiv());
  wrap.dom.setClassName("x-form-field-wrap");

  input.addStyleName(fieldStyle);

  trigger = new El(DOM.createImg());
  trigger.dom.setClassName("x-form-trigger " + triggerStyle);
  trigger.dom.setPropertyString("src", GXT.BLANK_IMAGE_URL);
  wrap.dom.appendChild(input.dom);
  wrap.dom.appendChild(trigger.dom);
  setElement(wrap.dom, target, index);

  if (isHideTrigger()) {
    trigger.setVisible(false);
  }

  super.onRender(target, index);

  triggerListener = new EventListener() {
    public void onBrowserEvent(Event event) {
      if (!disabled) {
        FieldEvent ce = new FieldEvent(AdaptableTriggerField.this);
        ce.event = event;
        ce.type = DOM.eventGetType(event);
        ce.stopEvent();
        onTriggerEvent(ce);
      }
    }
  };
  DOM.sinkEvents(wrap.dom, Event.FOCUSEVENTS);
  DOM.sinkEvents(trigger.dom, Event.ONCLICK | Event.MOUSEEVENTS);

  if (width == null) {
    setWidth(150);
  }
 
  focusPreview = new BaseEventPreview();

  new KeyNav<FieldEvent>(this) {
    public void onDown(FieldEvent fe) {
      AdaptableTriggerField.this.onDown(fe);
    }
  };

}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:54,代码来源:AdaptableTriggerField.java

示例5: onModuleLoad

import com.extjs.gxt.ui.client.GXT; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void onModuleLoad() {

	if (Log.isDebugEnabled()) {
		Log.debug("Application > Client init start.");
	}
	
	// Listening ApplicationCache events.
	// Done early to avoid missing some events and to keep track of the
	// last update date.
	ApplicationCacheManager.ensureHandlers();
	
	// GIN injector instantiation.
	if (Log.isDebugEnabled()) {
		Log.debug("Application > Creates GIN injector.");
	}
	injector = GWT.create(Injector.class);
	

	// Set GXT theme.
	if (Log.isDebugEnabled()) {
		Log.debug("Application > Sets GWT default theme.");
	}
	GXT.setDefaultTheme(injector.getTheme(), true);
	

	// Uncaught exception handler.
	GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {

		@Override
		public void onUncaughtException(final Throwable e) {
			if (Log.isErrorEnabled()) {
				Log.error("Uncaught exception on client-side.", e);
			}
			// TODO [i18n] Uncaught exception error message.
			N10N.error("An unexpected error has occured.");
		}
	});

	clientInitializing();
	
	Profiler.INSTANCE.setAuthenticationProvider(injector.getAuthenticationProvider());
	Profiler.INSTANCE.setApplicationStateManager(injector.getApplicationStateManager());

	if (Log.isDebugEnabled()) {
		Log.debug("Application > Client init end.");
	}

}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:53,代码来源:Sigmah.java

示例6: onModuleLoad

import com.extjs.gxt.ui.client.GXT; //导入依赖的package包/类
public void onModuleLoad() {
	GXT.hideLoadingPanel("loading");

	dispatcher = Dispatcher.get();

	dispatcher.addController(new AppController());

	ConfigurationRemote.Util.getInstance().initServerConfiguration(
			new AsyncCallback<GeofenceGlobalConfiguration>() {

				public void onSuccess(GeofenceGlobalConfiguration result) {
					GeofenceUtils.getInstance().setGlobalConfiguration(
							result);
					Dispatcher
							.forwardEvent(GeofenceEvents.INIT_GEOFENCE_WIDGET);

				}

				public void onFailure(Throwable caught) {
					Info.display("Configuration Service Error",
							caught.getMessage());

				}
			});

	// Dispatcher.forwardEvent(GeofenceEvents.INIT_GEOFENCE_WIDGET);

}
 
开发者ID:geoserver,项目名称:geofence,代码行数:29,代码来源:Application.java


注:本文中的com.extjs.gxt.ui.client.GXT类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。