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


Java GWT.log方法代码示例

本文整理汇总了Java中com.google.gwt.core.shared.GWT.log方法的典型用法代码示例。如果您正苦于以下问题:Java GWT.log方法的具体用法?Java GWT.log怎么用?Java GWT.log使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.core.shared.GWT的用法示例。


在下文中一共展示了GWT.log方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getContainerOffsetLeft

import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
protected int getContainerOffsetLeft() {
	if (containerOffsetLeft < 0 || !sync) {
		int scrollLeft = 0;
		Element parent = DOM.getParent(getWidget().getElement());
		while (parent != null) {
			if (getScrollLeft(parent) > 0) {
				scrollLeft += getScrollLeft(parent);
				GWT.log("Scroll left detected : " + scrollLeft);
			}
			if (containerFinder.isContainer(parent)) {
				containerOffsetLeft = DOM.getAbsoluteLeft(parent) - scrollLeft;
			}
			parent = DOM.getParent(parent);
		}
	}
	return containerOffsetLeft;
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:18,代码来源:NodeShape.java

示例2: getContainerOffsetTop

import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
protected int getContainerOffsetTop() {
	if (containerOffsetTop < 0 || !sync) {
		int scrollTop = 0;
		Element parent = DOM.getParent(getWidget().getElement());
		while (parent != null) {
			if (getScrollTop(parent) > 0) {
				scrollTop += getScrollTop(parent);
				GWT.log("Scroll Top detected : " + scrollTop);
			}
			if (containerFinder.isContainer(parent)) {
				containerOffsetTop = DOM.getAbsoluteTop(parent) - scrollTop;
			}
			parent = DOM.getParent(parent);
		}
	}
	return containerOffsetTop;
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:18,代码来源:NodeShape.java

示例3: getNewEntity

import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
private Entity getNewEntity(Object value) {
  String proptype = property.getRange();
  String id = GUID.randomEntityId(software.getId(), proptype);
  
  // Convert software entities to enumerations
  MetadataClass topclass = vocabulary.getType(KBConstants.ONTNS()+"Software");
  MetadataClass eclass = vocabulary.getType(proptype);
  if(vocabulary.isA(eclass, topclass)) {
    proptype = KBConstants.ONTNS()+"EnumerationEntity";
    id = id.replace(software.getName()+"#", "");
  }
  
  try {
    Entity entity = EntityRegistrar.getEntity(id, value, proptype);
    entity.setType(property.getRange());
    return entity;
  } catch (Exception e) {
    GWT.log("Coult not get a new entity", e);
    return null;
  }
}
 
开发者ID:KnowledgeCaptureAndDiscovery,项目名称:ontosoft,代码行数:22,代码来源:PropertyFormGroup.java

示例4: getInput

import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
public static IEntityInput getInput(Entity entity, MetadataProperty mprop, Vocabulary vocabulary) 
    throws Exception {
  String inputClass = inputClasses.get(mprop.getRange());
  if(inputClass != null) {
    Object item = entityFactory.instantiate(inputClass);
    if(item == null) {
      GWT.log("Cannot instantiate input for "+mprop.getRange());
      throw new Exception("Cannot instantiate input for "+mprop.getRange());
    }
    else if(item instanceof IEntityInput) {
      ((IEntityInput) item).createWidget(entity, mprop, vocabulary);
      return (IEntityInput) item;
    }
    else {
      GWT.log("Item not an extension of IEntityInput");
      throw new Exception("Item not an extension of IEntityInput");
    }
  }
  return null;
}
 
开发者ID:KnowledgeCaptureAndDiscovery,项目名称:ontosoft,代码行数:21,代码来源:EntityRegistrar.java

示例5: getEntity

import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
public static Entity getEntity(String id, Object value, String type) 
    throws Exception {
  String entityClass = entityClasses.get(type);
  if(entityClass != null) {
    Object item = entityFactory.instantiate(entityClass);
    if(item == null) {
      GWT.log("Cannot instantiate entity for "+type);
      throw new Exception("Cannot instantiate entity for "+type);
    }
    else if(item instanceof Entity) {
      Entity entity = (Entity) item;
      entity.setId(id);
      entity.setType(type);
      if(value != null)
        entity.setValue(value);
      return entity;
    }
    else {
      GWT.log("Item not an extension of Entity");
      throw new Exception("Item not an extension of Entity");
    }
  }
  return null;
}
 
开发者ID:KnowledgeCaptureAndDiscovery,项目名称:ontosoft,代码行数:25,代码来源:EntityRegistrar.java

示例6: registerEntityInputs

import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
private void registerEntityInputs() {
  final String pkg = EntityInput.class.getName().replaceAll("(.*\\.).*?$", "$1");
  for(MetadataType type : vocabulary.getTypes().values()) {
    ArrayList<String> queue = new ArrayList<String>();
    //GWT.log("-------- "+type.getName());
    queue.add(type.getId());
    boolean registered = false;
    while(!queue.isEmpty()) {
      MetadataType qtype = vocabulary.getType(queue.remove(0));
      if(qtype != null) {
        String qInputWidgetClass = pkg + qtype.getName() + "Input";
        //GWT.log("Checking for "+qtype.getName()+ " = "+qInputWidgetClass);
        if(EntityRegistrar.registerInputClass(type.getId(), qInputWidgetClass)) {
          registered = true;
          break;
        }
        queue.add(qtype.getParent());
      }
    }
    if(!registered)
      GWT.log("** Cannot find adapter for "+type.getId());
  }
}
 
开发者ID:KnowledgeCaptureAndDiscovery,项目名称:ontosoft,代码行数:24,代码来源:SoftwareForm.java

示例7: registerEntities

import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
private void registerEntities() {
  final String pkg = Entity.class.getName().replaceAll("(.*\\.).*?$", "$1");
  for(MetadataType type : vocabulary.getTypes().values()) {
    ArrayList<String> queue = new ArrayList<String>();
    //GWT.log("-------- "+type.getName());
    queue.add(type.getId());
    boolean registered = false;
    while(!queue.isEmpty()) {
      MetadataType qtype = vocabulary.getType(queue.remove(0));
      if(qtype != null) {
        String qInputWidgetClass = pkg + qtype.getName();
        //GWT.log("Checking for "+qtype.getName()+ " = "+qInputWidgetClass);
        if(EntityRegistrar.registerEntityClass(type.getId(), qInputWidgetClass)) {
          registered = true;
          break;
        }
        queue.add(qtype.getParent());
      }
    }
    if(!registered)
      GWT.log("** Cannot find adapter for "+type.getId());
  }
}
 
开发者ID:KnowledgeCaptureAndDiscovery,项目名称:ontosoft,代码行数:24,代码来源:SoftwareForm.java

示例8: decodePage

import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
private boolean decodePage(PageItem pageItem) {
	DjVuPage page = pageItem.page;
	try {
		if (page == null) {
			page = pageItem.page = document.getPage(pageItem.pageNum);
			if (page == null)
				return true; // not downloaded yet
			GWT.log("Decoding page " + pageItem.pageNum);
		}
		if (page.decodeStep()) {
			pageItem.isDecoded = true;
			if (pageItem.info == null) {
				pageItem.setInfo(page.getInfo());
				pageItem.setText(page.getText());
			}
			pageItem.memoryUsage = page.getMemoryUsage();
			pagesMemoryUsage += pageItem.memoryUsage;
		}
		return true;
	} catch (IOException e) {
		GWT.log("Error while decoding page " + pageItem.pageNum, e);
		return false;
	}
}
 
开发者ID:mateusz-matela,项目名称:djvu-html5,代码行数:25,代码来源:PageDecoder.java

示例9: update

import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
/**
 * Update Gantt chart's timeline and content for the given steps. This won't
 * add any steps, but will update the content widths and heights.
 *
 * @param steps
 */
public void update(List<StepWidget> steps) {
    if (startDate < 0 || endDate < 0 || startDate >= endDate) {
        GWT.log("Invalid start and end dates. Gantt chart can't be rendered. Start: " + startDate + ", End: "
                + endDate);
        return;
    }

    content.getStyle().setHeight(contentHeight, Unit.PX);

    GWT.log("GanttWidget's active TimeZone: " + getLocaleDataProvider().getTimeZone().getID() + " (raw offset: "
            + getLocaleDataProvider().getTimeZone().getStandardOffset() + ")");

    // tell timeline to notice vertical scrollbar before updating it
    timeline.setNoticeVerticalScrollbarWidth(isContentOverflowingVertically());
    timeline.update(resolution, startDate, endDate, firstDayOfRange, firstHourOfRange, localeDataProvider);
    setContentMinWidth(timeline.getMinWidth());
    updateContainerStyle();
    updateContentWidth();

    updateStepWidths(steps);

    wasTimelineOverflowingHorizontally = timeline.isTimelineOverflowingHorizontally();
}
 
开发者ID:tltv,项目名称:gantt,代码行数:30,代码来源:GanttWidget.java

示例10: error

import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
@Override
public void error(String tag, String message, Throwable exception) {
	super.error(tag, message, exception);
	GWT.log(message);
	GWT.log(getStackTrace(exception));
	consoleLog(message + exception.toString());
	consoleLog(getStackTrace(exception));
}
 
开发者ID:Namek,项目名称:lets-code-game,代码行数:9,代码来源:GwtLauncher.java

示例11: debug

import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
@Override
public void debug(String tag, String message, Throwable exception) {
	super.debug(tag, message, exception);
	GWT.log(message);
	GWT.log(getStackTrace(exception));
	consoleLog(message + exception.toString());
	consoleLog(getStackTrace(exception));
}
 
开发者ID:Namek,项目名称:lets-code-game,代码行数:9,代码来源:GwtLauncher.java

示例12: equals

import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
@Override
public boolean equals (Object obj) {
	GWT.log(url());
	GWT.log(((Filter) obj).url());
	return obj != null && obj instanceof Filter
			? url().equals(((Filter) obj).url())
			: super.equals(obj);
}
 
开发者ID:billy1380,项目名称:blogwt,代码行数:9,代码来源:Filter.java

示例13: parseFormData

import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
public static FormData parseFormData(String text) {
	FormData data = new FormData();
	
	if ((text != null) && (text.trim().length() > 0)) {
	
		try {
			JSONValue value = JSONParser.parseLenient(text);
			
			if (value != null) {
				JSONObject obj = value.isObject();
			
				if (obj != null) {
					data.version = JsonUtil.parseVersion(obj.get("version"));
					data.main = JsonUtil.parseMap(obj.get("main"));
					data.calculator = JsonUtil.parseMap(obj.get("calculator"));
					data.items = JsonUtil.parseMap(obj.get("items"));
					data.passives = JsonUtil.parseMap(obj.get("passives"));
					data.gems = JsonUtil.parseMap(obj.get("gems"));
					data.specialItems = JsonUtil.parseMap(obj.get("equipment"));
					data.skills = JsonUtil.parseMap(obj.get("skills"));
					data.elementalDamage = JsonUtil.parseMap(obj.get("elementalDamage"));
					data.skillDamage = JsonUtil.parseMap(obj.get("skillDamage"));
					data.hero = null;
					data.career = null;
				}
			}
		} catch (Exception e) {
			ApplicationPanel.showErrorDialog("Error Parsing Form Data");
			GWT.log("Error Parsing JSON Data", e);
		}
		
		
	}
	
	return data;
}
 
开发者ID:dawg6,项目名称:dhcalc,代码行数:37,代码来源:JsonUtil.java

示例14: findStepElement

import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
/**
 * Helper method to find Step element by given starting point and y-position
 * and delta-y. Starting point is there to optimize performance a bit as
 * there's no need to iterate through every single step element.
 *
 * @param startFromBar
 *            Starting point element
 * @param newY
 *            target y-axis position
 * @param deltay
 *            delta-y relative to starting point element.
 * @return Step element at y-axis position. May be same element as given
 *         startFromBar element.
 */
protected Element findStepElement(Element startFromBar, int startTopY, int startBottomY, int newY, double deltay) {
    boolean subStep = isSubBar(startFromBar);
    if (subStep) {
        startFromBar = startFromBar.getParentElement();
    }

    if (isBetween(newY, startTopY, startBottomY)) {
        GWT.log("findStepElement returns same: Y " + newY + " between " + startTopY + "-" + startBottomY);
        return startFromBar;
    }
    int startIndex = getChildIndex(content, startFromBar);
    Element barCanditate;
    int i = startIndex;
    if (deltay > 0) {
        i++;
        for (; i < content.getChildCount(); i++) {
            barCanditate = Element.as(content.getChild(i));
            if (isBetween(newY, barCanditate.getAbsoluteTop(), barCanditate.getAbsoluteBottom())) {
                if (!subStep && i == (startIndex + 1)) {
                    // moving directly over the following step will be
                    // ignored (if not sub-step).
                    return startFromBar;
                }
                return barCanditate;
            }
        }
    } else if (deltay < 0) {
        i--;
        for (; i >= getAdditonalContentElementCount(); i--) {
            barCanditate = Element.as(content.getChild(i));
            if (isBetween(newY, barCanditate.getAbsoluteTop(), barCanditate.getAbsoluteBottom())) {
                return barCanditate;
            }
        }
    }
    return startFromBar;
}
 
开发者ID:tltv,项目名称:gantt,代码行数:52,代码来源:GanttWidget.java

示例15: parseInt

import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
/**
 * Convert a string to an integer
 * 
 * @param str string to convert
 * @return an integer
 */
public static int parseInt(String str) {
  if (str == null)
    return 0;

  str = str.trim();
  int val = 0;
  try {
    val = Integer.parseInt(str, 10);
  } catch (Exception e) {
    GWT.log(e.toString());
  }
  return val;
}
 
开发者ID:csavelief,项目名称:gwt-sandbox,代码行数:20,代码来源:Strings.java


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