Fix bug 2307133 - Swing client hiding fields incorrectly
This commit is contained in:
parent
6eeae4f6b7
commit
69cb7e5ceb
|
@ -82,6 +82,7 @@ import org.jdesktop.swingx.border.DropShadowBorder;
|
||||||
* @author Jorg Janke
|
* @author Jorg Janke
|
||||||
* @version $Id: VPanel.java,v 1.3 2006/07/30 00:51:28 jjanke Exp $
|
* @version $Id: VPanel.java,v 1.3 2006/07/30 00:51:28 jjanke Exp $
|
||||||
* @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ]
|
* @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ]
|
||||||
|
* Carlos Ruiz - globalqss / Fix bug 2307133 - Swing client hiding fields incorrectly
|
||||||
*/
|
*/
|
||||||
public final class VPanel extends CTabbedPane
|
public final class VPanel extends CTabbedPane
|
||||||
{
|
{
|
||||||
|
@ -173,6 +174,10 @@ public final class VPanel extends CTabbedPane
|
||||||
private String m_oldFieldGroup = null;
|
private String m_oldFieldGroup = null;
|
||||||
/** Previous Field Group Type */
|
/** Previous Field Group Type */
|
||||||
private String m_oldFieldGroupType = null;
|
private String m_oldFieldGroupType = null;
|
||||||
|
/** Previous Field Is Same Line */
|
||||||
|
private boolean m_oldSameLine = false;
|
||||||
|
/** Previous Field Size */
|
||||||
|
private boolean m_oldLongField = false;
|
||||||
//[ 1757088 ]
|
//[ 1757088 ]
|
||||||
private java.util.Hashtable<String, JPanel> m_tablist = new java.util.Hashtable<String, JPanel>();
|
private java.util.Hashtable<String, JPanel> m_tablist = new java.util.Hashtable<String, JPanel>();
|
||||||
private java.util.Hashtable<Integer, CollapsiblePanel> m_tabincludelist = new java.util.Hashtable<Integer, CollapsiblePanel>();
|
private java.util.Hashtable<Integer, CollapsiblePanel> m_tabincludelist = new java.util.Hashtable<Integer, CollapsiblePanel>();
|
||||||
|
@ -257,6 +262,9 @@ public final class VPanel extends CTabbedPane
|
||||||
return;
|
return;
|
||||||
|
|
||||||
boolean sameLine = mField.isSameLine();
|
boolean sameLine = mField.isSameLine();
|
||||||
|
if (sameLine && (m_oldSameLine || m_oldLongField))
|
||||||
|
sameLine = false;
|
||||||
|
|
||||||
//[ 1757088 ] // sets top
|
//[ 1757088 ] // sets top
|
||||||
String fieldGroup = mField.getFieldGroup();
|
String fieldGroup = mField.getFieldGroup();
|
||||||
String fieldGroupType = mField.getFieldGroupType();
|
String fieldGroupType = mField.getFieldGroupType();
|
||||||
|
@ -294,9 +302,9 @@ public final class VPanel extends CTabbedPane
|
||||||
m_gbc.fill = GridBagConstraints.HORIZONTAL; // required for right justified
|
m_gbc.fill = GridBagConstraints.HORIZONTAL; // required for right justified
|
||||||
// Set column #
|
// Set column #
|
||||||
if (m_leftToRight)
|
if (m_leftToRight)
|
||||||
m_gbc.gridx = sameLine ? 2 : 0;
|
m_gbc.gridx = mField.isSameLine() ? 2 : 0;
|
||||||
else
|
else
|
||||||
m_gbc.gridx = sameLine | mField.isLongField() ? 3 : 1;
|
m_gbc.gridx = mField.isSameLine() | mField.isLongField() ? 3 : 1;
|
||||||
if (m_gbc.gridx == 0)
|
if (m_gbc.gridx == 0)
|
||||||
m_gbc.insets = m_firstLabelInset;
|
m_gbc.insets = m_firstLabelInset;
|
||||||
// Weight factor for Label
|
// Weight factor for Label
|
||||||
|
@ -341,9 +349,9 @@ public final class VPanel extends CTabbedPane
|
||||||
m_gbc.fill = GridBagConstraints.HORIZONTAL;
|
m_gbc.fill = GridBagConstraints.HORIZONTAL;
|
||||||
// Set column #
|
// Set column #
|
||||||
if (m_leftToRight)
|
if (m_leftToRight)
|
||||||
m_gbc.gridx = sameLine ? 3 : 1;
|
m_gbc.gridx = mField.isSameLine() ? 3 : 1;
|
||||||
else
|
else
|
||||||
m_gbc.gridx = sameLine ? 2 : 0;
|
m_gbc.gridx = mField.isSameLine() ? 2 : 0;
|
||||||
// Weight factor for Fields
|
// Weight factor for Fields
|
||||||
m_gbc.weightx = 1;
|
m_gbc.weightx = 1;
|
||||||
// Add Field
|
// Add Field
|
||||||
|
@ -394,6 +402,8 @@ public final class VPanel extends CTabbedPane
|
||||||
else if (mField.isCreateMnemonic())
|
else if (mField.isCreateMnemonic())
|
||||||
setMnemonic(editor, mField.getMnemonic());
|
setMnemonic(editor, mField.getMnemonic());
|
||||||
}
|
}
|
||||||
|
m_oldSameLine = sameLine;
|
||||||
|
m_oldLongField = mField.isLongField();
|
||||||
} // addField
|
} // addField
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue