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


Java Env.WINDOW_MAIN属性代码示例

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


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

示例1: createEvaluationContext

private Evaluatee createEvaluationContext()
{
	final Evaluatee evalCtx = Evaluatees.mapBuilder()
			.put(Env.CTXNAME_AD_Language, getAD_Language())
			.put(AccessSqlStringExpression.PARAM_UserRolePermissionsKey.getName(), getPermissionsKey())
			.build();

	final Evaluatee parentEvalCtx;
	if (parentDocument != null)
	{
		parentEvalCtx = parentDocument.asEvaluatee();
	}
	else
	{
		final Properties ctx = getCtx();
		final int windowNo = Env.WINDOW_MAIN; // TODO: get the proper windowNo
		final boolean onlyWindow = false;
		parentEvalCtx = Evaluatees.ofCtx(ctx, windowNo, onlyWindow);
	}

	return Evaluatees.compose(evalCtx, parentEvalCtx);
}
 
开发者ID:metasfresh,项目名称:metasfresh-webui-api,代码行数:22,代码来源:SqlDocumentQueryBuilder.java

示例2: getWindowNo

private int getWindowNo()
{
	//
	// Get WindowNo from editor
	final VEditor editor = menuCtx.getEditor();
	if(editor != null)
	{
		if(editor instanceof java.awt.Component)
		{
			return Env.getWindowNo((java.awt.Component)editor);
		}
	}

	// Fallback
	return Env.WINDOW_MAIN;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:16,代码来源:EditorContextPopupMenu.java

示例3: reset

/**
 * Reset the context to it's initial state (all settings have default values, services are removed etc).
 *
 * NOTE:
 * <ul>
 * <li>after invoking this method, the context will not be usable anymore because it needs to be reconfigured.
 * <li>you can call this method right before destroying the terminal context
 * </ul>
 */
private void reset()
{
	ctx = null;

	assertAllReferencesDeleted();

	disposeAllServices();

	if (terminalFactory != null)
	{
		terminalFactory.dispose();
		terminalFactory = null;
	}

	terminalFactoryHardRef = null;

	windowNo = Env.WINDOW_MAIN;
	adUserId = -1;

	defaultFontSize = DEFAULT_FontSize;

	screenWidth = DEFAULT_ScreenWidth;
	screenHeight = DEFAULT_ScreenHeight;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:33,代码来源:TerminalContext.java

示例4: handleExceptionInUI

@Override
public void handleExceptionInUI(final IClientUIAsyncExecutor<PropertyChangeEvent, ResultType, PartialResultType> executor, final Throwable ex)
{
	final ITerminalFactory terminalFactory = terminalFactoryRef.get();

	// If terminalFactory reference expired, we fallback to IClientUI
	if (terminalFactory == null)
	{
		final int windowNo = Env.WINDOW_MAIN;
		Services.get(IClientUI.class).warn(windowNo, ex);
	}
	else
	{
		final IComponent parent = parentRef.get();
		terminalFactory.showWarning(parent, "Error", ex);
	}
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:17,代码来源:UIAsyncPropertyChangeListener.java

示例5: handleException

private void handleException(final Exception e)
{
	final ITerminalFactory terminalFactory = terminalFactoryRef.get();
	final IComponent parent = parentRef.get();

	// If terminalFactory reference expired, we fallback to IClientUI
	if (terminalFactory == null)
	{
		final int windowNo = Env.WINDOW_MAIN;
		Services.get(IClientUI.class).warn(windowNo, e);
	}
	else
	{
		terminalFactory.showWarning(parent, "Error", e);
	}
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:16,代码来源:UIPropertyChangeListener.java

示例6: getWindowNo

public int getWindowNo()
{
	final Object windowNoObj = get(VAR_WindowNo);
	if (windowNoObj instanceof Number)
	{
		return ((Number)windowNoObj).intValue();
	}
	else
	{
		return Env.WINDOW_MAIN;
	}
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:12,代码来源:MADBoilerPlate.java

示例7: GridTabValidationContext

public GridTabValidationContext(final Properties ctx, final int windowNo, final int tabNo, final String tableName)
{
	Check.assume(ctx != null, "context not null");
	// any windowNo, even Env.WINDOW_None is allowed
	Check.assume(tableName != null, "tableName not null");

	if (windowNo == Env.WINDOW_MAIN && tabNo <= 0)
	{
		final AdempiereException ex = new AdempiereException("Possible invalid definition of GridTabValidationContext: windowNo=" + windowNo + ", tabNo=" + tabNo + ", tableName=" + tableName);
		logger.warn(ex.getLocalizedMessage(), ex);
	}

	this.ctx = ctx;
	this.windowNo = windowNo;
	this.tabNo = tabNo;
	this.tableName = tableName;

	final int contextTableId = Env.getContextAsInt(ctx, windowNo, tabNo, GridTab.CTX_AD_Table_ID, true);
	if (contextTableId <= 0)
	{
		this.contextTableName = null;
		// accept even if there is no tableId found, because maybe we are using the field in custom interfaces
		// throw new AdempiereException("No AD_Table_ID found for WindowNo=" + windowNo + ", TabNo=" + tabNo);
	}
	else
	{
		this.contextTableName = Services.get(IADTableDAO.class).retrieveTableName(contextTableId);
		if (Check.isEmpty(contextTableName, true))
		{
			throw new AdempiereException("No TableName found for AD_Table_ID=" + contextTableId);
		}
	}
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:33,代码来源:GridTabValidationContext.java

示例8: getParentWindowNo

private final int getParentWindowNo()
{
	final Integer parentWindowNo = _parentWindowNoSupplier.get();
	return parentWindowNo == null ? Env.WINDOW_MAIN : parentWindowNo;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:5,代码来源:InfoWindowMenuBuilder.java


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