mjudd 2007-06-22 19:59:05 +00:00
parent b844aed69b
commit 81b57acb7d
1 changed files with 20 additions and 2 deletions

View File

@ -36,6 +36,8 @@ import org.compiere.util.*;
public class VLocation extends JComponent public class VLocation extends JComponent
implements VEditor, ActionListener implements VEditor, ActionListener
{ {
int m_WindowNo = 0;
/** /**
* Constructor * Constructor
* *
@ -55,6 +57,7 @@ public class VLocation extends JComponent
// //
LookAndFeel.installBorder(this, "TextField.border"); LookAndFeel.installBorder(this, "TextField.border");
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
// Size // Size
this.setPreferredSize(m_text.getPreferredSize()); // causes r/o to be the same length this.setPreferredSize(m_text.getPreferredSize()); // causes r/o to be the same length
int height = m_text.getPreferredSize().height; int height = m_text.getPreferredSize().height;
@ -86,7 +89,22 @@ public class VLocation extends JComponent
popupMenu.add(mDelete); popupMenu.add(mDelete);
} // VLocation } // VLocation
/**
* Constructor
*
* @param columnName column name
* @param mandatory mandatory
* @param isReadOnly read only
* @param isUpdateable updateable
* @param mLocation location model
*/
public VLocation(String columnName, boolean mandatory, boolean isReadOnly, boolean isUpdateable,
MLocationLookup mLocation, int windowno)
{
this(columnName, mandatory, isReadOnly, isUpdateable, mLocation);
m_WindowNo = windowno;
}
/** /**
* Dispose * Dispose
*/ */
@ -269,7 +287,7 @@ public class VLocation extends JComponent
// //
log.config( "actionPerformed - " + m_value); log.config( "actionPerformed - " + m_value);
VLocationDialog ld = new VLocationDialog(Env.getFrame(this), VLocationDialog ld = new VLocationDialog(Env.getFrame(this),
Msg.getMsg(Env.getCtx(), "Location"), m_value); Msg.getMsg(Env.getCtx(), "Location"), m_value, m_WindowNo);
ld.setVisible(true); ld.setVisible(true);
m_value = ld.getValue(); m_value = ld.getValue();
// //