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


Java Env.getFrame方法代码示例

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


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

示例1: cmd_button

import org.compiere.util.Env; //导入方法依赖的package包/类
/**
 * Button - Start Dialog
 */
public void cmd_button()
{
	setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
	try
	{
		final int C_AcctSchema_ID = getAcctSchemaID();
		final VAccountDialog ad = new VAccountDialog(Env.getFrame(this), m_title, m_mAccount, C_AcctSchema_ID);
		//
		final Integer newValue = ad.getValue();
		// if (newValue == null)
		// return;

		// set & redisplay & data binding (i.e. fire vetoable change)
		setValue(newValue);
	}
	finally
	{
		setCursor(Cursor.getDefaultCursor());
	}
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:24,代码来源:VAccount.java

示例2: PosLogin

import org.compiere.util.Env; //导入方法依赖的package包/类
/**
 * 	Constructor
 *	@param posPanel POS Panel
 */
public PosLogin (PosBasePanel posPanel)
{
	super (Env.getFrame(posPanel),Msg.translate(posPanel.getCtx(), "Login"), true);
	init();
	this.posPanel = posPanel;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:11,代码来源:PosLogin.java

示例3: actionPerformed

import org.compiere.util.Env; //导入方法依赖的package包/类
/**
 *	ActionListener
 *  @param e ActionEvent
 */
@Override
public void actionPerformed(ActionEvent e)
{
	//	Warehouse/Product
	int only_Warehouse_ID = getOnly_Warehouse_ID();
	int only_Product_ID = getOnly_Product_ID();
	log.info("Only Warehouse_ID=" + only_Warehouse_ID
		+ ", Product_ID=" + only_Product_ID);

	//	Text Entry ok
	if (e.getSource() == m_text 
		&& actionText(only_Warehouse_ID, only_Product_ID))
		return;

	//	 Button - Start Dialog
	int M_Locator_ID = 0;
	if (m_value instanceof Integer)
		M_Locator_ID = ((Integer)m_value).intValue();
	//
	m_mLocator.setOnly_Warehouse_ID(only_Warehouse_ID);
	m_mLocator.setOnly_Product_ID(getOnly_Product_ID());
	VLocatorDialog ld = new VLocatorDialog(Env.getFrame(this),
		Services.get(IMsgBL.class).translate(Env.getCtx(), m_columnName),
		m_mLocator, M_Locator_ID, isMandatory(), only_Warehouse_ID);
	//	display
	ld.setVisible(true);
	m_mLocator.setOnly_Warehouse_ID(0);

	//	redisplay
	if (!ld.isChanged())
		return;
	setValue (ld.getValue(), true);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:38,代码来源:VLocator.java

示例4: startEditor

import org.compiere.util.Env; //导入方法依赖的package包/类
/**
 *	Factory: Start Editor
 *	@param jc container to get parent frame
 *	@param header heading
 *	@param text initial text
 *	@param editable if false = r/o
 *	@param maxSize max size
 *	@return edited string
 */
public static String startEditor(Container jc, String header, String text, boolean editable, int maxSize)
{
	//	Find frame
	JFrame frame = Env.getFrame(jc);
	String hdr = header;
	if (Check.isEmpty(hdr, true))
		hdr = Services.get(IMsgBL.class).getMsg(Env.getCtx(), "Editor");
	//	Start it
	Editor ed = new Editor(frame, hdr, text, editable, maxSize, getGridField(jc)); // metas: added last parameter: GridField
	AEnv.showCenterWindow(frame, ed);
	String s = ed.getText();
	ed = null;
	return s;
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:24,代码来源:Editor.java

示例5: startCalculator

import org.compiere.util.Env; //导入方法依赖的package包/类
/**
 *	Invalid Entry - Start Calculator
 *  @param jc parent
 *  @param value value
 *  @param format format
 *  @param displayType display type
 *  @param title title
 *  @return value
 */
static String startCalculator(final Container jc, final String value, final DecimalFormat format, final int displayType, final String title)
{
	log.info("Value=" + value);
	BigDecimal startValue = new BigDecimal(0.0);
	try
	{
		if (value != null && value.length() > 0)
		{
			Number number = format.parse(value);
			startValue = new BigDecimal (number.toString());
		}
	}
	catch (ParseException pe)
	{
		log.info("InvalidEntry - " + pe.getMessage());
	}
	
	//	Find frame
	final Frame frame = Env.getFrame(jc);
	//	Actual Call
	Calculator calc = new Calculator(frame, title, displayType, format, startValue);
	AEnv.showCenterWindow(frame, calc);
	BigDecimal result = calc.getNumber();
	log.info( "Result=" + result);
	//
	calc = null;
	if (result != null)
		return format.format(result);
	else
		return value;		//	original value
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:41,代码来源:VNumber.java

示例6: PosPayment

import org.compiere.util.Env; //导入方法依赖的package包/类
public PosPayment(PosBasePanel posPanel) {
	super(Env.getFrame(posPanel),true);
	p_posPanel = posPanel;
	p_pos = posPanel.p_pos;
	p_ctx = p_pos.getCtx();
	p_order = p_posPanel.m_order;
	
	if ( p_order == null )
		dispose();
	
	init();
	pack();
	setLocationByPlatform(true);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:15,代码来源:PosPayment.java

示例7: POSKeyboard

import org.compiere.util.Env; //导入方法依赖的package包/类
public POSKeyboard(final PosBasePanel posPanel, final int keyLayoutId)
{
	super(Env.getFrame(posPanel), true);

	keylayout = InterfaceWrapperHelper.create(posPanel.getCtx(), keyLayoutId, I_C_POSKeyLayout.class, ITrx.TRXNAME_None);

	init(keyLayoutId);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:9,代码来源:POSKeyboard.java

示例8: PosQuery

import org.compiere.util.Env; //导入方法依赖的package包/类
/**
 * 	Constructor
 */
public PosQuery (PosBasePanel posPanel)
{
	super(Env.getFrame(posPanel), true);
	p_posPanel = posPanel;
	p_pos = posPanel.p_pos;
	p_ctx = p_pos.getCtx();
	init();
	pack();
	setLocationByPlatform(true);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:14,代码来源:PosQuery.java

示例9: actionHelp

import org.compiere.util.Env; //导入方法依赖的package包/类
/**
 *	Show Help
 */
private void actionHelp()
{
	StringBuffer sb = new StringBuffer();
	if (m_Description != null && m_Description.length() > 0)
		sb.append("<h2>").append(m_Description).append("</h2>");
	if (m_Help != null && m_Help.length() > 0)
		sb.append("<p>").append(m_Help);
	Help hlp = new Help (Env.getFrame(this), this.getTitle(), sb.toString());
	hlp.setVisible(true);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:14,代码来源:FormFrame.java

示例10: showRecordInfo

import org.compiere.util.Env; //导入方法依赖的package包/类
/**
 * Show {@link RecordInfo} dialog
 */
private void showRecordInfo()
{
	if (m_dse == null 
		|| m_dse.CreatedBy == null
		|| !Env.getUserRolePermissions().isShowPreference())
	{
		return;
	}
	
	//
	final String title = Services.get(IMsgBL.class).getMsg(Env.getCtx(), "Who") + m_text;
	final RecordInfo info = new RecordInfo(Env.getFrame(this), title, m_dse);
	AEnv.showCenterScreen(info);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:18,代码来源:StatusBar.java

示例11: getFrame

import org.compiere.util.Env; //导入方法依赖的package包/类
public static JFrame getFrame(final Object container)
{
	if (container instanceof Container)
	{
		return Env.getFrame((Container)container);
	}
	else
	{
		return null;
	}
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:12,代码来源:SwingTerminalFactory.java

示例12: createWindow

import org.compiere.util.Env; //导入方法依赖的package包/类
private void createWindow()
{
	final JFrame parentWindow = Env.getFrame(m_Button);
	final InfoPAttribute ia = new InfoPAttribute(parentWindow, "M_Product");
	String whereClause = ia.getWhereClause();
	if (Check.isEmpty(whereClause, true))
		return;

	m_WhereClause = whereClause.trim();
	// Fix returned query because it always starts with an AND
	if (m_WhereClause.startsWith("AND "))
		m_WhereClause = m_WhereClause.substring(4);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:14,代码来源:InfoQueryCriteriaASI.java

示例13: actionPerformed

import org.compiere.util.Env; //导入方法依赖的package包/类
@Override
public void actionPerformed(final ActionEvent event)
{
	final ProcessInfo pi = viewer.getProcessInfo();
	final OutputType exportFormat = viewer.getExportFormat();

	final IEmailParamsFactory factory = new EMailParamsFactory();
	final IEmailParameters emailParams = factory.getInstanceForPI(pi);

	File attachment = null;
	I_AD_Archive archive;
	try
	{
		attachment = File.createTempFile(emailParams.getAttachmentPrefix("mail") + '_', "." + exportFormat.getFileExtension());
		archive = viewer.exportToFile(attachment);
	}
	catch (final Exception e)
	{
		ADialog.error(0, viewer, e);
		return;
	}

	//
	// Start EMail dialog
	new EMailDialog(
			Env.getFrame(viewer), // parent frame
			emailParams.getTitle(),
			emailParams.getFrom(),
			emailParams.getTo(),
			emailParams.getSubject(),
			emailParams.getMessage(),
			attachment,
			emailParams.getDefaultTextPreset(),
			archive);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:36,代码来源:JasperReportViewerPanel.java

示例14: getParentFrame

import org.compiere.util.Env; //导入方法依赖的package包/类
private final Frame getParentFrame()
{
	return parentComp == null ? null : Env.getFrame(parentComp);
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:5,代码来源:Calendar.java

示例15: actionPerformed

import org.compiere.util.Env; //导入方法依赖的package包/类
/**
 *	ActionListener - Button - Start Dialog
 *  @param e ActionEvent
 */
@Override
public void actionPerformed(ActionEvent e)
{
	if (e.getSource() == mDelete)
	{
		m_value = null;        //  create new
	}
	
	//
	final VLocationDialog ld = new VLocationDialog(Env.getFrame(this), Services.get(IMsgBL.class).getMsg(Env.getCtx(), "Location"), m_value);
	ld.setVisible(true);
	Object oldValue = getValue();
	m_value = ld.getValue();
	//
	if (e.getSource() == mDelete)
		;
	else if (!ld.isChanged())
		return;

	//	Data Binding
	try
	{
		int C_Location_ID = 0;
		if (m_value != null)
			C_Location_ID = m_value.getC_Location_ID();
		Integer ii = new Integer(C_Location_ID);
		
		if (C_Location_ID > 0)
			fireVetoableChange(m_columnName, oldValue, ii);
		setValue(ii);
		if (ii.equals(oldValue) && m_GridTab != null && m_GridField != null)
		{
			//  force Change - user does not realize that embedded object is already saved.
			m_GridTab.processFieldChange(m_GridField);
		}
	}
	catch (PropertyVetoException pve)
	{
		log.error("VLocation.actionPerformed", pve);
	}

}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:47,代码来源:VLocation.java


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