# IDEMPIERE-5494 - enable zoom in WLocationEditor (#1586)
This commit is contained in:
parent
fbc4ae35b0
commit
7621447500
|
@ -137,9 +137,18 @@ public final class MLocationLookup extends Lookup
|
||||||
*/
|
*/
|
||||||
public String getColumnName()
|
public String getColumnName()
|
||||||
{
|
{
|
||||||
return "C_Location_ID";
|
return "C_Location.C_Location_ID";
|
||||||
} // getColumnName
|
} // getColumnName
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Zoom - Location Window
|
||||||
|
* @return Zoom AD_Window_ID
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int getZoom() {
|
||||||
|
return MTable.get(MLocation.Table_ID).getAD_Window_ID();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return data as sorted Array - not implemented
|
* Return data as sorted Array - not implemented
|
||||||
* @param mandatory mandatory
|
* @param mandatory mandatory
|
||||||
|
|
|
@ -24,6 +24,7 @@ import java.util.logging.Level;
|
||||||
import org.adempiere.webui.ClientInfo;
|
import org.adempiere.webui.ClientInfo;
|
||||||
import org.adempiere.webui.LayoutUtils;
|
import org.adempiere.webui.LayoutUtils;
|
||||||
import org.adempiere.webui.ValuePreference;
|
import org.adempiere.webui.ValuePreference;
|
||||||
|
import org.adempiere.webui.apps.AEnv;
|
||||||
import org.adempiere.webui.component.Locationbox;
|
import org.adempiere.webui.component.Locationbox;
|
||||||
import org.adempiere.webui.event.ContextMenuEvent;
|
import org.adempiere.webui.event.ContextMenuEvent;
|
||||||
import org.adempiere.webui.event.ContextMenuListener;
|
import org.adempiere.webui.event.ContextMenuListener;
|
||||||
|
@ -50,7 +51,7 @@ import org.zkoss.zk.ui.event.OpenEvent;
|
||||||
*
|
*
|
||||||
* This class is based on VLocation written by Jorg Janke
|
* This class is based on VLocation written by Jorg Janke
|
||||||
**/
|
**/
|
||||||
public class WLocationEditor extends WEditor implements EventListener<Event>, PropertyChangeListener, ContextMenuListener
|
public class WLocationEditor extends WEditor implements EventListener<Event>, PropertyChangeListener, ContextMenuListener, IZoomableEditor
|
||||||
{
|
{
|
||||||
private static final String[] LISTENER_EVENTS = {Events.ON_CLICK};
|
private static final String[] LISTENER_EVENTS = {Events.ON_CLICK};
|
||||||
|
|
||||||
|
@ -103,7 +104,7 @@ public class WLocationEditor extends WEditor implements EventListener<Event>, Pr
|
||||||
else
|
else
|
||||||
getComponent().setButtonImage(ThemeManager.getThemeResource("images/Location16.png"));
|
getComponent().setButtonImage(ThemeManager.getThemeResource("images/Location16.png"));
|
||||||
|
|
||||||
popupMenu = new WEditorPopupMenu(false, false, isShowPreference());
|
popupMenu = new WEditorPopupMenu(true, false, isShowPreference(), false, false, false, gridField.getLookup());
|
||||||
popupMenu.addMenuListener(this);
|
popupMenu.addMenuListener(this);
|
||||||
addChangeLogMenu(popupMenu);
|
addChangeLogMenu(popupMenu);
|
||||||
if (gridField != null)
|
if (gridField != null)
|
||||||
|
@ -265,6 +266,10 @@ public class WLocationEditor extends WEditor implements EventListener<Event>, Pr
|
||||||
if (isShowPreference())
|
if (isShowPreference())
|
||||||
ValuePreference.start (getComponent(), this.getGridField(), getValue());
|
ValuePreference.start (getComponent(), this.getGridField(), getValue());
|
||||||
}
|
}
|
||||||
|
else if (WEditorPopupMenu.ZOOM_EVENT.equals(evt.getContextEvent()))
|
||||||
|
{
|
||||||
|
actionZoom();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -272,6 +277,10 @@ public class WLocationEditor extends WEditor implements EventListener<Event>, Pr
|
||||||
super.setTableEditor(b);
|
super.setTableEditor(b);
|
||||||
getComponent().setTableEditorMode(b);
|
getComponent().setTableEditorMode(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionZoom() {
|
||||||
|
AEnv.actionZoom(m_Location, getValue());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue