From ea9349b5cc51629f3ebdbbe03041907856aeb409 Mon Sep 17 00:00:00 2001 From: mjudd Date: Tue, 2 Feb 2010 22:07:58 +0000 Subject: [PATCH] [ FR 2944893 ] - Improve the visual layout of Info and InfoProduct task pane https://sourceforge.net/tracker/?func=detail&aid=2944893&group_id=176962&atid=879335 Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2944893 --- client/src/org/compiere/apps/search/Info.java | 8 ++++++-- client/src/org/compiere/apps/search/InfoProduct.java | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/client/src/org/compiere/apps/search/Info.java b/client/src/org/compiere/apps/search/Info.java index 0f7ccd924a..59e78b6882 100644 --- a/client/src/org/compiere/apps/search/Info.java +++ b/client/src/org/compiere/apps/search/Info.java @@ -20,6 +20,7 @@ import java.awt.BorderLayout; import java.awt.Cursor; import java.awt.Dimension; import java.awt.Frame; +import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.MouseEvent; import java.math.BigDecimal; @@ -267,8 +268,11 @@ public abstract class Info extends CDialog } // showAssignment /** Window Width */ - protected static final int INFO_WIDTH = 800; + Toolkit toolkit = Toolkit.getDefaultToolkit(); + Dimension screensize = toolkit.getScreenSize(); + protected final int INFO_WIDTH = screensize.width > 1500 ? 1500 : screensize.width - 100; + protected final int SCREEN_HEIGHT = screensize.height; /************************************************************************** * Detail Constructor @@ -277,7 +281,7 @@ public abstract class Info extends CDialog * @param WindowNo window no * @param tableName table name * @param keyColumn key column name - * @param multiSelection muiliple selection + * @param multiSelection multiple selection * @param whereClause where clause */ protected Info (Frame frame, boolean modal, int WindowNo, diff --git a/client/src/org/compiere/apps/search/InfoProduct.java b/client/src/org/compiere/apps/search/InfoProduct.java index fb1b90cc33..9e29df22d1 100644 --- a/client/src/org/compiere/apps/search/InfoProduct.java +++ b/client/src/org/compiere/apps/search/InfoProduct.java @@ -326,13 +326,13 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener CTabbedPane jTab = new CTabbedPane(); jTab.addTab(Msg.translate(Env.getCtx(), "Warehouse"), new JScrollPane(warehouseTbl)); - jTab.setPreferredSize(new Dimension(INFO_WIDTH, 105)); + jTab.setPreferredSize(new Dimension(INFO_WIDTH, SCREEN_HEIGHT > 600 ? 250 : 105)); jTab.addTab(Msg.translate(Env.getCtx(), "Description"), new JScrollPane(fieldDescription)); jTab.addTab(Msg.translate(Env.getCtx(), "Substitute_ID"), new JScrollPane(substituteTbl)); jTab.addTab(Msg.translate(Env.getCtx(), "RelatedProduct_ID"), new JScrollPane(relatedTbl)); jTab.addTab (Msg.getMsg(Env.getCtx(), "ATP"), new JScrollPane(m_tableAtp)); jTab.addChangeListener(this); - tablePanel.setPreferredSize(new Dimension(INFO_WIDTH, 110)); + tablePanel.setPreferredSize(new Dimension(INFO_WIDTH, SCREEN_HEIGHT > 600 ? 255 : 110)); tablePanel.add(jTab); warehouseStockPanel.setExpanded(false);