當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。