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


Java Env.getWindowNo方法代码示例

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


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

示例1: windowClosed

import org.compiere.util.Env; //导入方法依赖的package包/类
@Override
public final void windowClosed(final WindowEvent e)
{
	// NOTE: we need to make sure we are not throwing events from here because
	// it might prevent other listeners to be executed.
	// Most dangerous is org.compiere.apps.AEnv.showCenterWindowModal(JFrame, JFrame, Runnable)
	try
	{
		windowClosed0();
	}
	catch (Exception ex)
	{
		final int windowNo = Env.getWindowNo(e.getWindow());
		Services.get(IClientUI.class).error(windowNo, ex);
	}
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:17,代码来源:ReadPaymentDialogWindowAdapter.java

示例2: getWindowNo

import org.compiere.util.Env; //导入方法依赖的package包/类
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,代码行数:17,代码来源:EditorContextPopupMenu.java

示例3: stopCellEditing

import org.compiere.util.Env; //导入方法依赖的package包/类
@Override
public boolean stopCellEditing()
{
	try
	{
		return super.stopCellEditing();
	}
	catch (Exception e)
	{
		final Component comp = (Component)m_editor;
		final int windowNo = Env.getWindowNo(comp);
		Services.get(IClientUI.class).warn(windowNo, e);
	}

	return false;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:17,代码来源:AnnotatedTableModelCellEditor.java

示例4: initTreeUI

import org.compiere.util.Env; //导入方法依赖的package包/类
private void initTreeUI()
{
	final int adTreeId = adInfoWindowBL.getAD_Tree_ID(infoWindow);
	if (adTreeId <= 0)
	{
		return;
	}
	
	final VTreePanel treePanel = new VTreePanel(Env.getWindowNo(this), false, false);
	treePanel.setBorder(BorderFactory.createEmptyBorder(2, 3, 2, 3));

	treePanel.initTree(adTreeId);
	treePanel.addPropertyChangeListener(VTreePanel.PROPERTY_ExecuteNode, treeNodeSelectedListener);
	treePanel.setPreferredSize(new Dimension(200, treePanel.getPreferredSize().height));

	setTreePanel(treePanel, 200);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:18,代码来源:InfoSimple.java

示例5: onActionPerformed

import org.compiere.util.Env; //导入方法依赖的package包/类
protected void onActionPerformed()
{
	if (!isEnabled())
	{
		return;
	}

	setEnabled(false);
	try
	{
		action.setToggled(isChecked());
		action.execute();
	}
	catch (Exception e)
	{
		final int windowNo = Env.getWindowNo(this);
		Services.get(IClientUI.class).error(windowNo, e);
	}
	finally
	{
		setEnabled(true);
	}
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:24,代码来源:CheckableSideActionComponent.java

示例6: onActionPerformed

import org.compiere.util.Env; //导入方法依赖的package包/类
private void onActionPerformed()
{
	if (!isEnabled())
	{
		return;
	}

	setEnabled(false);
	try
	{
		action.execute();
	}
	catch (Exception e)
	{
		final int windowNo = Env.getWindowNo(this);
		Services.get(IClientUI.class).error(windowNo, e);
	}
	finally
	{
		setEnabled(true);
	}
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:23,代码来源:HyperlinkSideActionComponent.java

示例7: VLocatorDialog

import org.compiere.util.Env; //导入方法依赖的package包/类
/**
 *	Constructor
 *  @param frame frame
 *  @param title title
 *  @param mLocator locator
 *  @param M_Locator_ID locator id
 * 	@param mandatory mandatory
 * 	@param only_Warehouse_ID of not 0 restrict warehouse
 */
public VLocatorDialog (Frame frame, String title, MLocatorLookup mLocator,
	int M_Locator_ID, boolean mandatory, int only_Warehouse_ID)
{
	super (frame, title, true);
	m_WindowNo = Env.getWindowNo(frame);
	try
	{
		jbInit();
		setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
	}
	catch(Exception ex)
	{
		log.error("VLocatorDialog", ex);
	}
	//
	m_mLocator = mLocator;
	m_M_Locator_ID = M_Locator_ID;
	m_mandatory = mandatory;
	m_only_Warehouse_ID = only_Warehouse_ID;
	//
	initLocator();
	AEnv.positionCenterWindow(frame, this);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:33,代码来源:VLocatorDialog.java

示例8: setParentComponent

import org.compiere.util.Env; //导入方法依赖的package包/类
@Override
public final IClientUIInvoker setParentComponent(final Object parentComponent)
{
	final Component componentSwing = (Component)parentComponent;
	final int windowNo = Env.getWindowNo(componentSwing);
	setParentComponent(windowNo, componentSwing);
	return this;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:9,代码来源:SwingClientUIInvoker.java

示例9: addItem0

import org.compiere.util.Env; //导入方法依赖的package包/类
private final void addItem0(final MTreeNode node)
{
	if (node == null)
	{
		return;
	}

	// Database sync
	if (!loading)
	{
		try
		{
			favoritesDAO.add(getLoggedUserId(), node.getNode_ID());
		}
		catch (Exception e)
		{
			final int windowNo = Env.getWindowNo(getComponent());
			if (DBException.isUniqueContraintError(e))
			{
				clientUI.error(windowNo, "BookmarkExist");
			}
			else
			{
				clientUI.error(windowNo, e);
			}

			// stop here
			return;
		}
	}

	final FavoritesGroup favoritesGroup = getCreateGroup(node);
	favoritesGroup.addFavorite(node);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:35,代码来源:FavoritesGroupContainer.java

示例10: Calculator

import org.compiere.util.Env; //导入方法依赖的package包/类
/**
 *	Create Calculator
 * 	@param frame parent
 * 	@param title title
 * 	@param displayType date or datetime or time
 * 	@param format display format
 * 	@param number initial amount
 */
public Calculator(Frame frame, String title, int displayType,
	DecimalFormat format, BigDecimal number)
{
	super(frame, title, true);
	setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
	
	final Image icon = Images.getImage2("Calculator16");
	if(icon != null)
	{
		setIconImage(icon);
	}
	
	//  Get WindowNo for Currency
	m_WindowNo = Env.getWindowNo(frame);
	//
	m_DisplayType = displayType;
	if (!DisplayType.isNumeric(m_DisplayType))
		m_DisplayType = DisplayType.Number;
	//
	m_format = format;
	if (m_format == null)
		m_format = DisplayType.getNumberFormat(m_DisplayType);
	//
	m_number = number;
	if (m_number == null)
		m_number = new BigDecimal(0.0);
	//
	try
	{
		jbInit();
		finishSetup();
	}
	catch(Exception ex)
	{
		log.error("Calculator" + ex);
	}
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:46,代码来源:Calculator.java

示例11: getWindowNo

import org.compiere.util.Env; //导入方法依赖的package包/类
private int getWindowNo()
{
	if (_windowNo <= 0)
	{
		_windowNo = Env.getWindowNo(getParent());
	}
	if (_windowNo <= 0)
	{
		_windowNo = Env.createWindowNo(getParent());
	}
	return _windowNo;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:13,代码来源:EMailDialog.java

示例12: ask

import org.compiere.util.Env; //导入方法依赖的package包/类
@Override
public IAskDialogBuilder ask(final IComponent parentComponent)
{
	final Container awtContainer = getAWTContainer(parentComponent);
	final int windowNo = Env.getWindowNo(awtContainer);
	return clientUI.ask()
			.setParentWindowNo(windowNo)
			.setParentComponent(awtContainer);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:10,代码来源:SwingTerminalFactory.java

示例13: getWindowNo

import org.compiere.util.Env; //导入方法依赖的package包/类
private final int getWindowNo()
{
	return Env.getWindowNo(this);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:5,代码来源:BankStatementMatchPanel.java

示例14: getWindowNo

import org.compiere.util.Env; //导入方法依赖的package包/类
private final int getWindowNo()
{
	return Env.getWindowNo(getParent());
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:5,代码来源:LetterDialog.java

示例15: VLocationDialog

import org.compiere.util.Env; //导入方法依赖的package包/类
/**
 * Constructor
 *
 * @param parentFrame parent
 * @param title title (field name)
 * @param location Model Location
 */
public VLocationDialog(final Frame parentFrame, final String title, final MLocation location)
{
	super(parentFrame, title, true);
	m_WindowNo = Env.getWindowNo(parentFrame);

	final Properties ctx = Env.getCtx();

	try
	{
		jbInit();
	}
	catch (final Exception ex)
	{
		log.error("init failed", ex);
	}

	//
	// Location (model)
	_location = location;
	if (_location == null)
	{
		_location = new MLocation(ctx, 0, ITrx.TRXNAME_None);
	}

	// Overwrite title
	if (_location.getC_Location_ID() <= 0)
	{
		setTitle(msgBL.getMsg(ctx, "LocationNew"));
	}
	else
	{
		setTitle(msgBL.getMsg(ctx, "LocationUpdate"));
	}

	// Reset TAB_INFO context
	setContext(CTXNAME_C_Region_ID, null);
	setContext(CTXNAME_C_Country_ID, null);

	//
	// Country
	MCountry.setDisplayLanguage(Env.getAD_Language(ctx));
	fCountryModel.set(MCountry.getCountries(ctx));

	//
	// Add listeners
	fCountry.addActionListener(this);
	fOnline.addActionListener(this);
	fRegion.addActionListener(this);

	loadFieldsFromLocationModel();

	AEnv.positionCenterWindow(parentFrame, this);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:61,代码来源:VLocationDialog.java


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